V Nadeau
asked on
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** ********** ********** ********** ********** ***
*************************E Nd CODE SO FAR*********************** ********** ********** ********** ******
********************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 ********
*************************E
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.