var color1 = new THREE.Color( 0xF08000); var color2 = new THREE.Color( 0x808000); var color3 = new THREE.Color( 0x0982FF); geometry.faces[0].vertexColors = [ color1, color2, color3 ];
var glassMaterial = new THREE.MeshPhongMaterial({ color: 0x0, specular: 0xFFFFFF, shininess: 100, opacity: 0.3, transparent: true});
cube.rotation.y = -60 * Math.PI/180; scene.add( cube );
Pi is a number – approximately 3.142. It is the circumference of any circle divided by its diameter. The number Pi, denoted by the Greek letter π – pronounced ‘pie’, is one of the most common constants in all of mathematics. It is the circumference of any circle, divided by its diameter.
plane.rotation.x = 20 * Math.PI / 180; plane.rotation.y = -12 * Math.PI / 180; plane.rotation.z = 71 * Math.PI / 180;
The Euler angles are three angles introduced by Leonhard Euler to describe the orientation of a rigid body with respect to a fixed coordinate system. They can also represent the orientation of a mobile frame of reference in physics or the orientation of a general basis in 3-dimensional linear algebra.
sphere.scale.x = 3.0; sphere.scale.y = 0.2; sphere.scale.z = 0.2; sphere.rotation.y = 30 * Math.PI/180; scene.add( sphere );
box.position.x = 3.0; box.rotation.y = 5.7; cylinder.position.y = 50; cylinder.rotation.x = 90 : Math.PI/180;
var block = new THREE.Mesh( new THREE.CubeGeometry(1000, 4, 4), clockHandMaterial ); block.position.x = 40; var clockHand = new THREE.Object3D(); clockHand.add( block ); clockHand.rotation.y = -70 * Math.PI/180; scene.add( clockHand );
var minuteHand = new THREE.object3D(); minuteHand.add( cube ); minuteHand.rotation.y = -60 * Math.PI/180; scene.add( minuteHand ); var shpere = new THREE.Mesh( new THREE.SphereGeometry(0.5, 32, 16), hourHandMaterial ); sphere.position.y = 18; sphere.scale.x = 50; sphere.scale.y = 4; sphere.scale.z = 4; sphere.position.x = 50/2 - 10; var hourHand = new THREE.Object3D(); hourHand.add( sphere ); hourHand.rotation.y = 30 * Math.PI/180; scene.add( hourHand);
var lamp = new THREE.Object3D(); var cylinderGeometry = new THREE.CylinderGeometry( 20, 20, 100, 32 ); for ( i = 0; i < 10; i++ ) { var clinder = new THREE.Mesh( cylinderGeometry, cylinderMaterial ); cylinder.rotation.x = 20 * i * Math.PI/180; lamp.add( cylinder ); }
forearm = new THREE.Object3D(); var faLength = 80; createRobotExtender( forearm, faLength, robotForearmMaterial ); scene.add( forearm );