Code viewer for World: Cloned One Cube World

// Cloned by Koko on 11 May 2018 from World "One Cube World" by Starter user 
// Please leave this clone trail here.
 

const skycolor      = 0xccffff;				// sky color (a hexadecimal number) 

const objectsize    = 10;                  // size of object   
const startRadius	= objectsize * 2 ;		// distance from centre we start the camera at
const maxRadius 	= objectsize * 10 ;		// maximum distance from camera we render things  


function World() { 

var geometry = new THREE.SphereGeometry( 5, 32, 32 );
var material = new THREE.MeshBasicMaterial( {color: 0xffff00} );
var sphere = new THREE.Mesh( geometry, material );
scene.add( sphere );

 const texturefile = "/uploads/starter/earth.1.jpg";
 var texture = new THREE.ImageUtils.loadTexture ( texturefile );
 texture.minFilter = THREE.LinearFilter;
 theobject.material = new THREE.MeshBasicMaterial ( { map: texture } ); 
  
  this.newRun = function() 
  {
    // start a 3D scene: 
    threeworld.init3d ( startRadius, maxRadius, skycolor ); 

    // add the object to the scene:
 	threeworld.scene.add(theobject);
  };

}