P2System

P2System

Handles integration with p2.js.
Depends on the global p2 object,
so load p2.js using a script tag before using this system.
See also P2Component

Constructor

new P2System(settingsopt)

Parameters:
Name Type Attributes Description
settings Object <optional>
Properties
Name Type Attributes Default Description
stepFrequency number <optional>
60
gravity Array.<number> <optional>
[0,-9.82]
Example
var p2System = new P2System({
    stepFrequency: 60,
    gravity: [0, -10]
});
sumerian.world.setSystem(p2System);