Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- sceneHolder = document.getElementById( 'sceneHolder' );
- scene = new THREE.Scene();
- camera = new THREE.PerspectiveCamera( 60, SCENE_WIDTH / SCENE_HEIGHT, 1, 10000 );
- camera.position.z = 0;
- scene.add( camera );
- var sphereGeom = new THREE.SphereGeometry( 200, 20, 20 );
- //NOTE: If we add {},function(){render()} in the following, it stops working!
- var sphereTexture = THREE.ImageUtils.loadTexture('media/vr/testpot.jpg');
- mesh = new THREE.Mesh(sphereGeom,new THREE.MeshBasicMaterial({map:sphereTexture,overdraw:true}));
- //So that we see the inside of the sphere too!
- mesh.doubleSided=true;
- scene.add( mesh );
- renderer = new THREE.CanvasRenderer();
- renderer.setSize( SCENE_WIDTH, SCENE_HEIGHT );
- sceneHolder.appendChild( renderer.domElement );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement