Skip to content

Instantly share code, notes, and snippets.

@roundrobin
Forked from anonymous/_.md
Created September 11, 2012 20:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save roundrobin/3701637 to your computer and use it in GitHub Desktop.
Save roundrobin/3701637 to your computer and use it in GitHub Desktop.
just another inlet to tributary
{"editor_editor":{"coffee":false,"vim":false,"emacs":false,"width":643,"height":635,"hide":false},"endpoint":"curiosity"}
var positionX = 12;
var positionY = 10;
var positionZ = 40;
var geometry = new THREE.CubeGeometry( 100, 100, 100 );
var material = new THREE.MeshNormalMaterial();
group = new THREE.Object3D();
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 );
mesh.matrixAutoUpdate = false;
mesh.updateMatrix();
group.add( mesh );
}
tributary.camera.position.z = 1000;
tributary.scene.add( group );
//console.log('sdf',tributary.render)
// console.log('Helloo',tributary.animate)
tributary.animate = function () {
requestAnimationFrame( tributary.animate );
tributary.render();
stats.update();
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment