Advertisement
Guest User

Untitled

a guest
Mar 19th, 2012
331
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.     sceneHolder = document.getElementById( 'sceneHolder' );
  2.     scene = new THREE.Scene();
  3.     camera = new THREE.PerspectiveCamera( 60, SCENE_WIDTH / SCENE_HEIGHT, 1, 10000 );
  4.     camera.position.z = 0;
  5.     scene.add( camera );
  6.  
  7.     var sphereGeom = new THREE.SphereGeometry( 200, 20, 20 );
  8.     //NOTE: If we add {},function(){render()} in the following, it stops working!
  9.     var sphereTexture = THREE.ImageUtils.loadTexture('media/vr/testpot.jpg');
  10.     mesh = new THREE.Mesh(sphereGeom,new THREE.MeshBasicMaterial({map:sphereTexture,overdraw:true}));
  11.     //So that we see the inside of the sphere too!
  12.     mesh.doubleSided=true;
  13.     scene.add( mesh );
  14.  
  15.     renderer = new THREE.CanvasRenderer();
  16.     renderer.setSize(  SCENE_WIDTH, SCENE_HEIGHT );
  17.     sceneHolder.appendChild( renderer.domElement );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement