AmmoSystem

AmmoSystem

Handles integration with Ammo.js.
Depends on the global Ammo object,
so load ammo.small.js using a script tag before using this system.
Direct access to the ammoWorld is available like this: myAmmoSystem.ammoWorld
See also AmmoComponent

Constructor

new AmmoSystem(settings)

Parameters:
Name Type Description
settings Object

The settings object can contain the following properties:

Properties
Name Type Description
gravity number

(defaults to -9.81)

maxSubSteps number

(defaults to 5)

stepFrequency number

(defaults to 60)

Deprecated:
  • Deprecated as of v0.11.x and scheduled for removal in v0.13.0; consider using the Cannon system/component instead.

Example
var ammoSystem = new AmmoSystem({stepFrequency: 60});
sumerian.world.setSystem(ammoSystem);