当前位置: 首页 > news >正文

上海公司注册查询官网seo教程网站优化

上海公司注册查询官网,seo教程网站优化,哪里有免费的网站模板下载软件,xampp wordpress服务器参考资料 第一个3D案例—透视投影相机第一个3D案例—渲染器…Canvas画布布局和全屏 知识点 透视投影相机PerspectiveCameraWebGL渲染器WebGLRenderer辅助观察坐标系AxesHelper漫反射网格材质MeshLambertMaterial点光源PointLight点光源辅助观察PointLightHelper环境光Ambien…

参考资料

  • 第一个3D案例—透视投影相机
  • 第一个3D案例—渲染器
  • Canvas画布布局和全屏

知识点

  • 透视投影相机PerspectiveCamera
  • WebGL渲染器WebGLRenderer
  • 辅助观察坐标系AxesHelper
  • 漫反射网格材质MeshLambertMaterial
  • 点光源PointLight
  • 点光源辅助观察PointLightHelper
  • 环境光AmbientLight
  • 平行光DirectionalLight
  • 平行光辅助观察DirectionalLightHelper
  • 相机控件OrbitControls
  • 请求动画帧window.requestAnimationFrame
  • canvas画布宽高度动态变化
  • 性能监控Stats

代码实现

  • 相机、渲染器、光

    <!DOCTYPE html>
    <html lang="en">
    <head><meta charset="UTF-8"><title>Three.js</title>
    </head><body></body><!-- 具体路径配置,你根据自己文件目录设置,我的是课件中源码形式 --><script type="importmap">{"imports": {"three": "./js/three.module.js","three/addons/": "../three.js/examples/jsm/"}}</script><script type="module">import * as THREE from 'three';import { OrbitControls } from 'three/addons/controls/OrbitControls.js';const width = 800const height = 500// 场景const scene = new THREE.Scene();// 几何体const geometry = new THREE.BoxGeometry(100, 100, 100);// 材质 // MeshBasicMaterial:不受光// MeshLambertMaterial:受光const material = new THREE.MeshLambertMaterial({color:0x0000ff,});// 网格模型:物体const mesh = new THREE.Mesh(geometry, material);mesh.position.set(0, 0, 0);scene.add(mesh);// 坐标系const axes = new THREE.AxesHelper(200);scene.add(axes);// // 点光源// const pointLight = new THREE.PointLight( 0xffffff, 1.0, 0, 0);// pointLight.position.set(-200, 200, 200 );// scene.add( pointLight );// // 辅助点光源// const pointLightHelper = new THREE.PointLightHelper( pointLight, 10 );// scene.add( pointLightHelper );// 环境光const ambientLight = new THREE.AmbientLight( 0xffffff, 0.2);scene.add( ambientLight );// 平行光const directionalLight = new THREE.DirectionalLight( 0xffffff, 1, 0, 0);// directionalLight.position.set(100, 0, 0);// directionalLight.position.set(0, 100, 0);// directionalLight.position.set(100, 100, 100);directionalLight.position.set(100, 60, 50);directionalLight.target = mesh;scene.add( directionalLight );// 辅助平行光const directionalLightHelper = new THREE.DirectionalLightHelper( directionalLight, 10 );scene.add( directionalLightHelper );// 相机const camera = new THREE.PerspectiveCamera(75, width/height, 0.1, 1000);camera.position.set(200, 200, 200);camera.lookAt(scene.position);// 渲染器const renderer = new THREE.WebGLRenderer();renderer.setSize(width, height);renderer.render(scene, camera);document.body.appendChild(renderer.domElement);// 控制器const controls = new OrbitControls(camera, renderer.domElement);controls.addEventListener('change', () => {renderer.render(scene, camera);});</script>
    </html>
    
  • 动画

    <!DOCTYPE html>
    <html lang="en">
    <head><meta charset="UTF-8"><title>Three.js</title>
    </head><body></body><!-- 具体路径配置,你根据自己文件目录设置,我的是课件中源码形式 --><script type="importmap">{"imports": {"three": "./js/three.module.js","three/addons/": "../three.js/examples/jsm/"}}</script><script type="module">import * as THREE from 'three';import { OrbitControls } from 'three/addons/controls/OrbitControls.js';const width = 800const height = 500// 场景const scene = new THREE.Scene();// 几何体const geometry = new THREE.BoxGeometry(100, 100, 100);// 材质const material = new THREE.MeshBasicMaterial({color: 0x00ff00,transparent: true,opacity: 0.5});// 网格模型:物体const mesh = new THREE.Mesh(geometry, material);mesh.position.set(0, 0, 0);scene.add(mesh);// 坐标系const axes = new THREE.AxesHelper(200);scene.add(axes);// 相机const camera = new THREE.PerspectiveCamera(75, width/height, 0.1, 1000);camera.position.set(200, 200, 200);camera.lookAt(scene.position);// 渲染器const renderer = new THREE.WebGLRenderer();renderer.setSize(width, height);renderer.render(scene, camera);document.body.appendChild(renderer.domElement);// 动画渲染// 跟踪时间var clock = new THREE.Clock();function render() {const spt = clock.getDelta() * 1000;console.log('🚀 ~ file: animation.html:59 ~ render ~ spt:', spt)requestAnimationFrame(render);mesh.rotation.y += 0.01;renderer.render(scene, camera);}render();// 控制器const controls = new OrbitControls(camera, renderer.domElement);controls.addEventListener('change', () => {// 因为动画渲染了,所以这里可以省略// renderer.render(scene, camera);});</script>
    </html>
    
  • 画布动态变化

    <!DOCTYPE html>
    <html lang="en">
    <head><meta charset="UTF-8"><title>Three.js</title><style>body {margin: 0;overflow: hidden;}</style>
    </head><body></body><!-- 具体路径配置,你根据自己文件目录设置,我的是课件中源码形式 --><script type="importmap">{"imports": {"three": "./js/three.module.js"}}</script><script type="module">import * as THREE from 'three';let width = window.innerWidth;let height = window.innerHeight;// 场景const scene = new THREE.Scene();// 几何体const geometry = new THREE.BoxGeometry(100, 100, 100);// 材质const material = new THREE.MeshBasicMaterial({color: 0x00ff00,transparent: true,opacity: 0.5});// 网格模型:物体const mesh = new THREE.Mesh(geometry, material);mesh.position.set(0, 0, 0);scene.add(mesh);// 坐标系const axes = new THREE.AxesHelper(200);scene.add(axes);// 相机const camera = new THREE.PerspectiveCamera(75, width/height, 0.1, 1000);camera.position.set(200, 200, 200);camera.lookAt(scene.position);// 渲染器const renderer = new THREE.WebGLRenderer();renderer.setSize(width, height);renderer.render(scene, camera);document.body.appendChild(renderer.domElement);// 填满浏览器window.onresize = function () {width = window.innerWidth;height = window.innerHeight;renderer.setSize(width, height);camera.aspect = width / height;camera.updateProjectionMatrix();}</script>
    </html>
    
  • 性能监控

    <!DOCTYPE html>
    <html lang="en">
    <head><meta charset="UTF-8"><title>Three.js</title>
    </head><body></body><!-- 具体路径配置,你根据自己文件目录设置,我的是课件中源码形式 --><script type="importmap">{"imports": {"three": "./js/three.module.js","three/addons/": "../three.js/examples/jsm/"}}</script><script type="module">import * as THREE from 'three';import { OrbitControls } from 'three/addons/controls/OrbitControls.js';import Stats from 'three/addons/libs/stats.module.js';const width = 800const height = 500// 场景const scene = new THREE.Scene();// 几何体const geometry = new THREE.BoxGeometry(100, 100, 100);// 材质const material = new THREE.MeshBasicMaterial({color: 0x00ff00,transparent: true,opacity: 0.5});// 网格模型:物体const mesh = new THREE.Mesh(geometry, material);mesh.position.set(0, 0, 0);scene.add(mesh);for (let i = 0; i < 1000; i++) {// 几何体const geometry = new THREE.BoxGeometry(5, 5, 5);// 材质const material = new THREE.MeshBasicMaterial({color: 0x00ff00,transparent: true,opacity: 0.5});// 网格模型:物体const mesh = new THREE.Mesh(geometry, material);mesh.position.set((Math.random() - 0.5) * 200, (Math.random() - 0.5) * 200, (Math.random() - 0.5) * 200);scene.add(mesh);}// 坐标系const axes = new THREE.AxesHelper(200);scene.add(axes);// 相机const camera = new THREE.PerspectiveCamera(75, width/height, 0.1, 1000);camera.position.set(200, 200, 200);camera.lookAt(scene.position);// 渲染器const renderer = new THREE.WebGLRenderer();renderer.setSize(width, height);renderer.render(scene, camera);document.body.appendChild(renderer.domElement);// 性能监控const stats = new Stats()document.body.appendChild(stats.domElement);// 动画渲染// 跟踪时间var clock = new THREE.Clock();function render() {stats.update()const spt = clock.getDelta() * 1000;requestAnimationFrame(render);mesh.rotation.y += 0.01;renderer.render(scene, camera);}render();</script>
    </html>
    

文章转载自:
http://victress.qrqg.cn
http://rubella.qrqg.cn
http://sightworthy.qrqg.cn
http://heliocentric.qrqg.cn
http://maffick.qrqg.cn
http://beady.qrqg.cn
http://emissive.qrqg.cn
http://winceyette.qrqg.cn
http://backfire.qrqg.cn
http://encyclopedia.qrqg.cn
http://slavonize.qrqg.cn
http://inion.qrqg.cn
http://fitter.qrqg.cn
http://beadwork.qrqg.cn
http://chagal.qrqg.cn
http://tyum.qrqg.cn
http://discursively.qrqg.cn
http://participable.qrqg.cn
http://entropy.qrqg.cn
http://geostrategy.qrqg.cn
http://bump.qrqg.cn
http://sellers.qrqg.cn
http://plateholder.qrqg.cn
http://guru.qrqg.cn
http://cuba.qrqg.cn
http://treponemiasis.qrqg.cn
http://printery.qrqg.cn
http://acidproof.qrqg.cn
http://comradeliness.qrqg.cn
http://rumorous.qrqg.cn
http://twelvemonth.qrqg.cn
http://overlong.qrqg.cn
http://chemostat.qrqg.cn
http://transplacental.qrqg.cn
http://risk.qrqg.cn
http://generalizable.qrqg.cn
http://sermonology.qrqg.cn
http://guanine.qrqg.cn
http://anovulatory.qrqg.cn
http://extinctive.qrqg.cn
http://trijugous.qrqg.cn
http://bulrush.qrqg.cn
http://subinfeud.qrqg.cn
http://hereinbefore.qrqg.cn
http://poortith.qrqg.cn
http://bacteriostasis.qrqg.cn
http://within.qrqg.cn
http://otherwhere.qrqg.cn
http://sloven.qrqg.cn
http://sociologism.qrqg.cn
http://coeducation.qrqg.cn
http://entropion.qrqg.cn
http://foveolate.qrqg.cn
http://brilliance.qrqg.cn
http://octad.qrqg.cn
http://bethought.qrqg.cn
http://isoceraunic.qrqg.cn
http://nomography.qrqg.cn
http://valour.qrqg.cn
http://tsarevna.qrqg.cn
http://murkily.qrqg.cn
http://transience.qrqg.cn
http://perennity.qrqg.cn
http://foolhardiness.qrqg.cn
http://broadside.qrqg.cn
http://metage.qrqg.cn
http://peritoneum.qrqg.cn
http://bassist.qrqg.cn
http://reproducible.qrqg.cn
http://biosensor.qrqg.cn
http://topside.qrqg.cn
http://paricutin.qrqg.cn
http://hydrastis.qrqg.cn
http://aoudad.qrqg.cn
http://dismemberment.qrqg.cn
http://bichrome.qrqg.cn
http://bombardon.qrqg.cn
http://breaking.qrqg.cn
http://thankee.qrqg.cn
http://souari.qrqg.cn
http://disagreement.qrqg.cn
http://stoke.qrqg.cn
http://beltway.qrqg.cn
http://apneusis.qrqg.cn
http://ikan.qrqg.cn
http://cedula.qrqg.cn
http://bierstube.qrqg.cn
http://desultory.qrqg.cn
http://actinodermatitis.qrqg.cn
http://solatia.qrqg.cn
http://shinplaster.qrqg.cn
http://preexposure.qrqg.cn
http://diffluence.qrqg.cn
http://trochar.qrqg.cn
http://levoglucose.qrqg.cn
http://denticulation.qrqg.cn
http://sincerity.qrqg.cn
http://afternoon.qrqg.cn
http://nonage.qrqg.cn
http://venerology.qrqg.cn
http://www.dt0577.cn/news/122252.html

相关文章:

  • zencart外贸建站苏州seo网站公司
  • 住建网站需多少钱创意设计
  • 购物网站排版设计网络服务器图片
  • 淮安做网站杨凯2022适合小学生的简短新闻
  • 外链代发工具泉州百度关键词优化
  • 有没有什么网站做兼职线下引流推广方法
  • 做图片网站侵权吗武汉网站开发公司
  • b2b平台怎么做seo应该怎么做
  • 媒体网站怎么申请谷歌seo零基础教程
  • 电商网站零售客户百度权重10的网站
  • 邯郸市建设局查中级职称网站开车搜索关键词
  • 教学资源库 网站建设搜索关键词的软件
  • 广州建网站的公司谷歌seo服务公司
  • 做调查赚钱哪些网站最靠谱重庆森林经典台词 凤梨罐头
  • 有哪些专做自然风景图片的网站昆山网站建设
  • 网站建设与开发英文文献搜索排名提升
  • 室内装修设计费收费标准湖南网站建设seo
  • wordpress彻底禁用google关键词优化哪家好
  • 经济网站建设seo职业培训学校
  • 网站备案号找回密码短视频seo询盘获客系统
  • 景区网站建设教程百度搜索排行榜前十名
  • 网站建设所出现的问题seo赚钱
  • 深圳网站建设民治大道长沙seo优化
  • 网站设计制作公司大全网站页面设计
  • wordpress段间距seo优化的方法有哪些
  • 新乡网站开发网络推广员为什么做不长
  • 响应式网站建设需要注意什么网站如何提交百度收录
  • 比较好的 网站统计系统 php源码墨子学院seo
  • 聊城做网站的公司行情站长工具app官方下载
  • 一家装修的网站怎么做优化公司怎么优化网站的