Error using pysijs.scene in Java script

HI. I am following though example exercise in a javascript book but have received an error using physijs. I get the error "physijs.scene is not a valid constructor" can anyone tell me what is wrong with my code please?


<script src=""></script>
<script src=""></script>
<script src=""></script>
<script src=""></script>
//Physics settings
Physijs.scripts.ammo ='';

  // This is where stuff in our game will happen:
  //var scene = new THREE.Scene();
  var scene =new Physijs.scene({ fixedTimeStep: 2/60 });
  scene.setGravity(new THREE.vector3( 0, -100, 0 ));

  // This is what sees the stuff:
  var aspect_ratio = window.innerWidth / window.innerHeight;
  var camera = new THREE.PerspectiveCamera(75, aspect_ratio, 1, 10000);
  camera.position.z = 200;
  camera.position.y = 100;

  // This will draw what the camera sees onto the screen:
  var renderer = new THREE.WebGLRenderer();
  renderer.setSize(window.innerWidth, window.innerHeight);

  // ******** START CODING ON THE NEXT LINE ********

Open in new window

*************************ENd CODE SO FAR***********************************************************
V NadeauAsked:
Who is Participating?
leakim971Connect With a Mentor PluritechnicianCommented:
As you can see, it a uppercase S for Scene not lowercase :
var scene =new Physijs.Scene({ fixedTimeStep: 2/60 });

Open in new window

Also I would suggest you to download all the file required to your own dev/site environment
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.