Skip to content

Instantly share code, notes, and snippets.

@roundrobin
Created September 11, 2012 05:45
Show Gist options
  • Save roundrobin/3696238 to your computer and use it in GitHub Desktop.
Save roundrobin/3696238 to your computer and use it in GitHub Desktop.
just another inlet to tributary

No parent Inlet

{"editor_editor":{"coffee":false,"vim":false,"emacs":false,"width":642,"height":435,"hide":false}}
var positionX = 180;
var positionY = -90;
var positionZ = 50;
var rows = 2;
var cols = 2;
for(var i = 0; i < 4; i++){
var materials = [];
var cube;
materials.push( new THREE.MeshBasicMaterial( { color: 0xffffaa * Math.random()} ) );
materials.push( new THREE.MeshBasicMaterial( { color: 0xaaffff * Math.random()} ) );
materials.push( new THREE.MeshBasicMaterial( { color: 0xaaffaa * Math.random()} ) );
materials.push( new THREE.MeshBasicMaterial( { color: 0xaaffaa * Math.random()} ) );
materials.push( new THREE.MeshBasicMaterial( { color: 0xaaffff * Math.random()} ) );
materials.push( new THREE.MeshBasicMaterial( { color: 0xaaffff * Math.random()} ) );
materials.push( new THREE.MeshBasicMaterial( { color: 0xaaffff * Math.random()} ) );
cube = new THREE.Mesh( new THREE.CubeGeometry( 200, 100, 200, 1, 1, 1, materials ), new THREE.MeshFaceMaterial() );
cube.position.y = positionX * i;
cube.position.x = positionY;
cube.position.z = positionZ;
tributary.scene.add( cube );
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment