Skip to content

Instantly share code, notes, and snippets.

@roundrobin
Forked from anonymous/_.md
Created September 11, 2012 05:28
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/3696157 to your computer and use it in GitHub Desktop.
Save roundrobin/3696157 to your computer and use it in GitHub Desktop.
just another inlet to tributary
{"editor_editor":{"coffee":false,"vim":false,"emacs":false,"width":595,"height":546,"hide":false},"endpoint":"curiosity"}
var positionX = 194;
var positionY = -90;
var positionZ = -17;
var rotationX = 12;
var rotationY = 50;
var rotationZ = 12;
var materials = [];
var cube;
materials.push( new THREE.MeshBasicMaterial( { color: 0xffffaa } ) );
materials.push( new THREE.MeshBasicMaterial( { color: 0xaaffff } ) );
materials.push( new THREE.MeshBasicMaterial( { color: 0xaaffaa } ) );
materials.push( new THREE.MeshBasicMaterial( { color: 0xaaffaa } ) );
materials.push( new THREE.MeshBasicMaterial( { color: 0xaaffff } ) );
materials.push( new THREE.MeshBasicMaterial( { color: 0xaaffff } ) );
materials.push( new THREE.MeshBasicMaterial( { color: 0xaaffff } ) );
cube = new THREE.Mesh( new THREE.CubeGeometry( 432, 200, 200, 1, 1, 1, materials ), new THREE.MeshFaceMaterial() );
cube.position.y = positionX;
cube.position.x = positionY;
cube.position.z = positionZ;
cube.rotation.x = rotationX;
cube.rotation.y = rotationY;
cube.rotation.z = rotationZ;
tributary.scene.add( cube );
console.log('rotation',cube)
// Plane
plane = new THREE.Mesh( new THREE.PlaneGeometry( 344, 345 ), new THREE.MeshBasicMaterial( { color: 0xa3a3a3 } ) );
plane.geometry.applyMatrix( new THREE.Matrix4().makeRotationX( - Math.PI / 2 ) );
tributary.scene.add( plane );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment