-
-
Save anonymous/3701440 to your computer and use it in GitHub Desktop.
just another inlet to tributary
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{"editor_editor":{"coffee":false,"vim":false,"emacs":false,"width":485,"height":611,"hide":false},"endpoint":"curiosity"} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//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