Code: Cave Puzzle

This is the final version of the game code from Chapter 18, Project: Cave Puzzle.

 
<body>​</body>
 
<script src="http://gamingJS.com/Three.js​"></script>
 
<script src="​http:​//gamingJS.com/physi.js"></script>
 
<script src="http://gamingJS.com/ChromeFixes.js">​</script>
 
<script src="http://gamingJS.com/Scoreboard.js​"></script>
 
<script src="​http:​//gamingJS.com/Mouse.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​ Physijs.Scene({ fixedTimeStep: 2 / 60 });
 
scene.setGravity(​new​ THREE.Vector3( 0, -100, 0 )); ...

Get 3D Game Programming for Kids now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.