前端三剑客
TypeScript
Vue
React
C++
C#
Rust
Appearance
Threejs中三维坐标系如图所示
原点在canvas画布的中央,x轴向右,y轴向上,z轴对着屏幕垂直指向自己
THREE.AxesHelper()对象可以帮助我们建立一个三维坐标系
THREE.AxesHelper()
three.js坐标轴颜色红R、绿G、蓝B分别对应坐标系的x、y、z轴,对于three.js的3D坐标系默认y轴朝上。
const axesHelper = new THREE.AxesHelper(20) scene.add(axesHelper)
THREE.AxesHelper()可传入一个长度作为参数,效果如下