new ColliderModel(json)
Model of a collider component
Parameters:
Name | Type | Description | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
json | object | object to configure collider model Properties
|
- Source
- To Do
- body should be handle by context (meaning context move according the physic of the collision)
Members
body :boolean
if true this is a physics collision
Type:
- boolean
- Source
shapesJSON :Array.<(PolygonJSON|CircleJSON)>
shapes of collisions
Type:
- Array.<(PolygonJSON|CircleJSON)>
- Source
Methods
getShapesJSON() → {Array.<(PolygonJSON|CircleJSON)>}
- Source
Returns:
- shapes json of collider model
- Type:
- Array.<(PolygonJSON|CircleJSON)>
isBody() → {boolean}
- Source
Returns:
- body of collider model
- Type:
- boolean
toJSON() → {object}
- Source
Returns:
- export collider model to json object
- Type:
- object