三个中是否有容器类型对象.js来转换一组子对象

is there a container type object in three.js to transform a group of children?

本文关键字:对象 js 转换 一组 三个 是否 类型      更新时间:2023-09-26

是否有一个容器或节点对象.js其中可以将多个网格添加为子网格,以便它们可以一起转换?

(一个不可见的容器,允许像在组中一样对所有子对象执行转换?

谢谢

示例。

var group = new THREE.Group();
for ( var i = 0; i < 1000; i ++ ) {
    var mesh = new THREE.Mesh( geometry, material );
    mesh.position.x = Math.random() * 2000 - 1000;
    mesh.position.y = Math.random() * 2000 - 1000;
    mesh.position.z = Math.random() * 2000 - 1000;
    mesh.rotation.x = Math.random() * 360 * ( Math.PI / 180 );
    mesh.rotation.y = Math.random() * 360 * ( Math.PI / 180 );
    group.add( mesh );
}
scene.add( group );

R69+