#

API Docs for: 0.6.1
Show: Inherited Protected Private Deprecated

# Demo Class

Defined in: `src/demo/Demo.js:5`

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`

)

Defined in `src/demo/Demo.js:5`

#### Parameters:

- `options` Object

- Index
- Methods

## Item Index

### Methods

- addScene
- restartCurrentScene

## Methods

### `addScene`

(

- `title`
- `initfunc`

)

Defined in `src/demo/Demo.js:209`

Add a scene to the demo app

#### Parameters:

- `title` String

  Title of the scene

- `initfunc` Function

  A 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`

()

Defined in `src/demo/Demo.js:230`

Restarts the current scene