Skip to main content

Namespace: traits

SelectableChildren Classes

Trait Classes

Child Functions

Ownership Functions

Parent Functions

SelectableChildren Functions

Trait Functions

Type Aliases

ChildAddedHandler

Ƭ ChildAddedHandler: (child: ChildTrait) => void

Type declaration

▸ (child): void

Parameters
NameType
childChildTrait
Returns

void


ChildRemovedHandler

Ƭ ChildRemovedHandler: (idx: number) => void

Type declaration

▸ (idx): void

Parameters
NameType
idxnumber
Returns

void

Child Functions

isChild

isChild(entity): entity is ChildTrait

Parameters

NameType
entityunknown

Returns

entity is ChildTrait


Ownership Functions

hasOwnership

hasOwnership(entity): entity is OwnershipTrait

Parameters

NameType
entityunknown

Returns

entity is OwnershipTrait


Parent Functions

hasChildren

hasChildren(entity): boolean

Parameters

NameType
entityunknown

Returns

boolean


isParent

isParent(entity): entity is ParentTrait

Parameters

NameType
entityunknown

Returns

entity is ParentTrait


SelectableChildren Functions

hasSelectableChildren

hasSelectableChildren(entity): entity is SelectableChildrenTrait

Parameters

NameType
entityunknown

Returns

entity is SelectableChildrenTrait


Trait Functions

applyTraitsMixins

applyTraitsMixins(baseCtors): (derivedCtor: AnyClass) => void

Mixes all the base constructors prototypes into one. Also provides a way for Entity to automatically execute all of the base constructor's "Trait Constructors".

Parameters

NameType
baseCtorsany[]

Returns

fn

▸ (derivedCtor): void

Parameters
NameType
derivedCtorAnyClass
Returns

void


hasIdentity

hasIdentity(entity): entity is IdentityTrait

Parameters

NameType
entityany

Returns

entity is IdentityTrait


hasLabel

hasLabel(entity): entity is LabelTrait

Parameters

NameType
entityunknown

Returns

entity is LabelTrait