Demo Class
Demo framework class. If you want to learn how to connect Cannon.js with Three.js, please look at the examples/ instead.
Constructor
Demo
(
-
options
Parameters:
-
options
Object
Item Index
Methods
Methods
addScene
(
-
title
-
initfunc
Add a scene to the demo app
Parameters:
-
title
StringTitle of the scene
-
initfunc
FunctionA function that takes one argument, app, and initializes a physics scene. The function runs app.setWorld(body), app.addVisual(body), app.removeVisual(body) etc.
restartCurrentScene
()
Restarts the current scene