Component

Component

A helper class. Since there are no interfaces in JavaScript, you might have to extend this to create a component, but there is another solution. Use instead `Component.implement()` if you have your own hierarchy of classes. In typescript,this would be an interface.
Source:
Deprecated:
  • Yes

Members

CHAOS_OBJ_TYPE :string

Source:
Type:
  • string

CHOAS_CLASSNAME :string

Source:
Type:
  • string

Methods

fromJson(obj, system)

Source:
Parameters:
Name Type Description
obj *
system T

get(entity, n)

Source:
Deprecated:
  • Yes
Parameters:
Name Type Description
entity Entity
n string

init(entity)

Source:
Parameters:
Name Type Description
entity Entity

query(entity, bound, targetopt) → {Array.<Entity>}

Source:
Deprecated:
  • Yes
Parameters:
Name Type Attributes Default Description
entity Entity
bound BoundingBox | BoundingCircle
target Array.<Entity> <optional>
[]
Returns:
Type
Array.<Entity>

requires(entity, …names)

Source:
Parameters:
Name Type Attributes Description
entity Entity
names string <repeatable>

toJson() → {*}

Source:
Returns:
Type
*

update(dt)

Source:
Deprecated:
  • Yes
Parameters:
Name Type Description
dt number