Code viewer for World: New World

// template is blank 
// define your own World here 

ground_material = Physijs.createMaterial(
    new THREE.MeshStandardMaterial( { color: 0x00ff00 } ),friction, .9 // low restitution
);
// Ground
ground = new Physijs.BoxMesh(new THREE.BoxGeometry(150, 1, 150),ground_material,0 // mass
);
ground.receiveShadow = true;
scene.add( ground );


function World() 
{ 

        // The following function declarations are optional.
        // If not declared, nothing happens and the run continues. 

        this.newRun = function()                // Things the World will do at the start of a run 
        {
            ABWorld.init3d ( 30, 250, 0xffffff  ); 			// sets up renderer, scene, camera
		
            // can adjust renderer:
 
	        ABWorld.renderer.shadowMap.enabled = true;
 

            // scene is Physijs.Scene, not THREE.Scene
            // can adjust scene - change gravity from default:
 
	        ABWorld.scene.setGravity (1);
	  
	  
	        loadResources();	// asynchronous file loads 
						        // calls initScene() when all done 
	

	        ABWorld.lookat.copy ( ABWorld.scene.position );  
	 
	        ABWorld.scene.simulate();		// Physics simulate - runs on independent timer to AB nextStep
        };

        this.nextStep = function()              // Things the World will do each time step 
        {
        };
        
        this.endRun = function()                // Things the World will do at the end of a run
        {
        };
}