Simulation
Represents a new simulation environment.
Kind: global class
new Simulation()
Creates a new simulation environment.
simulation.render()
Renders each frame.
Kind: instance method of Simulation
simulation.setAnimationLoop(loop_code)
Creates the animation loop.
Kind: instance method of Simulation
Param | Type | Description |
---|---|---|
loop_code | undefined | code to be excecuted every loop. |
simulation.fitWindow()
Makes scene fit browser window.
Kind: instance method of Simulation
simulation.add(object_sim)
Adds object to the scene.
Kind: instance method of Simulation
Param | Type | Description |
---|---|---|
object_sim | object | Object to be added. |