Created
March 26, 2013 06:45
-
-
Save lite/5243576 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
<body></body> | |
<script src="http://gamingJS.com/Three.js"></script> | |
<script src="http://gamingJS.com/ChromeFixes.js"></script> | |
<script> | |
var camera, scene, renderer; | |
var geometry, material, mesh; | |
init(); | |
function init() { | |
scene = new THREE.Scene(); | |
var aspect = window.innerWidth / window.innerHeight; | |
camera = new THREE.PerspectiveCamera(75, aspect, 1, 1000); | |
camera.position.z = 800; | |
scene.add(camera); | |
renderer = new THREE.CanvasRenderer(); | |
renderer.setSize(window.innerWidth, window.innerHeight); | |
document.body.appendChild(renderer.domElement); | |
var shape = new THREE.SphereGeometry(300); | |
var cover = new THREE.MeshNormalMaterial(); | |
var ball = new THREE.Mesh(shape, cover); | |
scene.add(ball); | |
renderer.render(scene, camera); | |
} | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment