Skip to content

Instantly share code, notes, and snippets.

@roundrobin
Forked from anonymous/_.md
Created September 11, 2012 19:34
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/3701421 to your computer and use it in GitHub Desktop.
Save roundrobin/3701421 to your computer and use it in GitHub Desktop.
just another inlet to tributary
{"editor_editor":{"coffee":false,"vim":false,"emacs":false,"width":485,"height":611,"hide":false},"endpoint":"curiosity"}
//Change this :)
var radius = 65,
segments = 7,
rings = 2;
var positionX = -73;
var positionY = 165;
var positionZ = 130;
var rows = 2;
var cols = 2;
var sphereMaterial =
new THREE.MeshLambertMaterial(
{
color: 0xCC0000
});
var sphere = new THREE.Mesh(
new THREE.SphereGeometry(
radius,
segments,
rings),
sphereMaterial);
sphere.position.x = positionX;
sphere.position.y = positionY;
sphere.position.z = positionZ;
// add the sphere to the scene
tributary.scene.add( sphere );
//Create a point light
var pointLight = new THREE.PointLight(0xFFFFFF);
// set its position
pointLight.position.x = 6;
pointLight.position.y = -150;
pointLight.position.z = 409;
tributary.scene.add( pointLight );
console.log(tributary)
tributary.animate = function () {
requestAnimationFrame( tributary.animate );
tributary.render();
stats.update();
sphere.rotation.x += 0.01;
sphere.rotation.y += 0.02;
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment