ColliderModel

new ColliderModel(json)

Model of a collider component

Parameters:
NameTypeDescription
jsonobject

object to configure collider model

Properties
NameTypeAttributesDescription
uuidstring

uuid collider model

shapesArray.<(PolygonJSON|CircleJSON)><optional>

shapes of collisions

bodyboolean

if true this is a physics collisions

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

shapesJSON :Array.<(PolygonJSON|CircleJSON)>

shapes of collisions

Type:

Methods

getShapesJSON() → {Array.<(PolygonJSON|CircleJSON)>}

Returns:
  • shapes json of collider model
Type: 
Array.<(PolygonJSON|CircleJSON)>

isBody() → {boolean}

Returns:
  • body of collider model
Type: 
boolean

toJSON() → {object}

Returns:
  • export collider model to json object
Type: 
object