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:
-
optionsObject
Item Index
Methods
Methods
addScene
(
-
title -
initfunc
Add a scene to the demo app
Parameters:
-
titleStringTitle of the scene
-
initfuncFunctionA 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
