three.js获取模型大小
程序员文章站
2024-03-16 22:34:28
...
let box=new THREE.BoxGeometry(3,3,3)
let mail=new THREE.MeshBasicMaterial({color:0xff6600})
let mesh=new THREE.Mesh(box,mail)
//mesh:模型
var box = new THREE.Box3().setFromObject( mesh );
var size = box.size();