Skip to content

Instantly share code, notes, and snippets.

@enjalot
Forked from anonymous/_.md
Created August 19, 2012 14:07
Show Gist options
  • Save enjalot/3395030 to your computer and use it in GitHub Desktop.
Save enjalot/3395030 to your computer and use it in GitHub Desktop.
Tributary inlet
{"description":"Tributary inlet","endpoint":"","display":"webgl","public":true,"require":[],"fileconfigs":{"_.md":{"default":true,"vim":false,"emacs":false,"fontSize":12},"config.json":{"default":true,"vim":false,"emacs":false,"fontSize":12},"inlet.js":{"default":true,"vim":false,"emacs":false,"fontSize":12}},"fullscreen":false,"play":true,"loop":false,"restart":false,"autoinit":true,"pause":true,"loop_type":"period","bv":false,"nclones":15,"clone_opacity":0.4,"duration":3000,"ease":"linear","dt":0.01,"editor_editor":{"coffee":false,"vim":false,"emacs":false,"width":347,"height":323,"hide":false},"thumbnail":"http://i.imgur.com/mQ0mF5C.png"}
var positionX = 180;
var positionY = -90;
var positionZ = 50;
var rotationX = 12;
var rotationY = 50;
var rotationZ = 12;
//tributary.__threeControls__.noZoom = false;
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( 200, 200, 200, 1, 1, 1), new THREE.MeshBasicMaterial(materials) );
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( 210, 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