Physics: {
createBoxBody: ((inst, mass, material?, offset?) => Body);
createPlaneBody: ((inst, mass, material?) => Body);
createSphereBody: ((inst, mass, material?, offset?) => Body);
} = ...
Type declaration
createBoxBody: ((inst, mass, material?, offset?) => Body)
- (inst, mass, material?, offset?): Body
Parameters
- inst: Instance
- mass: number
Optional
material: Material- offset: XYZ = ...
Returns Body
createPlaneBody: ((inst, mass, material?) => Body)
- (inst, mass, material?): Body
Parameters
- inst: Instance
- mass: number
Optional
material: Material
Returns Body
createSphereBody: ((inst, mass, material?, offset?) => Body)
- (inst, mass, material?, offset?): Body
Parameters
- inst: Instance
- mass: number
Optional
material: Material- offset: XYZ = ...
Returns Body
Create a new cube/box CANNON.Body enclosing the provided instance. It will attempt fit the box to the instance as best a possible, otherwise will fall back to a 1x1x1 box