Skip to content

Instantly share code, notes, and snippets.

/_.md

Created August 19, 2012 09:09
Show Gist options
  • Save anonymous/3393881 to your computer and use it in GitHub Desktop.
Save anonymous/3393881 to your computer and use it in GitHub Desktop.
just another inlet to tributary
{"editor_editor":{"coffee":false,"vim":false,"emacs":false,"width":523,"height":560,"hide":false}}
scene.clear();
var materials = [];
var cube;
materials.push( new THREE.MeshBasicMaterial( { color: 0xffffaa } ) );
materials.push( new THREE.MeshBasicMaterial( { color: 0xaaffaa } ) );
materials.push( new THREE.MeshBasicMaterial( { color: 0xffff00 } ) );
materials.push( new THREE.MeshBasicMaterial( { color: 0xdddddd } ) );
materials.push( new THREE.MeshBasicMaterial( { color: 0xffff } ) );
cube = new THREE.Mesh( new THREE.CubeGeometry( 200, 200, 200, 1, 1, 1, materials ), new THREE.MeshFaceMaterial() );
cube.position.y = 270;
cube.position.x = -324;
scene.add( cube );
// Plane
plane = new THREE.Mesh( new THREE.PlaneGeometry( 347, 200 ), new THREE.MeshBasicMaterial( { color: 0xe0e0e0 } ) );
plane.geometry.applyMatrix( new THREE.Matrix4().makeRotationX( - Math.PI / 2 ) );
scene.add( plane );
renderer.render( scene, camera );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment