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?

********************CODE*********************************************

<body></body>
<script src="http://gamingJS.com/Three.js"></script>
<script src="http://gamingJS.com/physi.js"></script>
<script src="http://gamingJS.com/scoreboard.js"></script>
<script src="http://gamingJS.com/ChromeFixes.js"></script>
<script>
//Physics settings
Physijs.scripts.ammo ='http://gamingJS.com/ammo.js';
Physijs.scripts.worker='http://gamingJS.com/physijs_worker.js';

  // 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;
  scene.add(camera);

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

  // ******** 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 : https://github.com/chandlerprall/Physijs/wiki/Scene-Configuration
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
0
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.