2012-05-27 11 views

risposta

34

Example.

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 +

+0

po 'pensato Object3D fosse una sorta di classe di base astratta, non pensare di utilizzarlo come un contenitore. funziona come un fascino, grazie! – JayDee

+0

Il gruppo THREE.Group è diventato obsoleto? – Schoening

+3

No. Non ce l'ha. – mrdoob

Problemi correlati