A Pen by Anonasaurus Rex on CodePen.
Created
April 5, 2014 15:47
-
-
Save maximilianschmid/9993581 to your computer and use it in GitHub Desktop.
A Pen by Secret Sam.
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
var scene = new THREE.Scene(); | |
var camera = new THREE.PerspectiveCamera( 100, window.innerWidth / window.innerHeight, 0.1, 1000 ); | |
var renderer = new THREE.WebGLRenderer(); | |
renderer.setSize( window.innerWidth, window.innerHeight ); | |
document.body.appendChild( renderer.domElement ); | |
var geometry = new THREE.CylinderGeometry( 10, 50, 20, 32 ); | |
var material = new THREE.MeshBasicMaterial( { color: 0xfffff , wireframe: true} ); | |
var cylinder = new THREE.Mesh( geometry, material ); | |
scene.add( cylinder ); | |
camera.position.z = 20; | |
function render() { | |
requestAnimationFrame(render); | |
cylinder.rotation.z = 0; | |
cylinder.rotation.y += 1; | |
renderer.render(scene, camera); | |
} | |
render(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment