threejs-tutorial:学习three.js

时间:2021-05-20 14:31:10
【文件属性】:
文件名称:threejs-tutorial:学习three.js
文件大小:63.6MB
文件格式:ZIP
更新时间:2021-05-20 14:31:10
JavaScript 常见scene基本操作 scene.add(obj) scene.remove(obj) scene.getObjectByName(name) scene.getObjectBuId(id) scene.traverse( obj => console.log(obj)) // 遍历子元素 scene.background = '' 设置背景 Mesh 操作 obj.position.set(x, y, z) obj.position.x = x obj.scale.set(x, y, z) obj.scale.x = x obj.rotation.set(rad, rad, rad) 3d坐标和2d坐标转换 // 3d => 2d function getLocalPosition(point){ const halfWidth = window.innerWidth / 2

网友评论