Skip to content

@tmrw-realityos/worldDocs


@tmrw-realityos/world / ComponentsContainer

Class: ComponentsContainer

Base class for anyone who wants to have components

Extended by

Constructors

new ComponentsContainer()

new ComponentsContainer(): ComponentsContainer

Returns

ComponentsContainer

Defined in

world/components.ts:51

Properties

components

components: BaseComponent[] = []

Defined in

world/components.ts:49

Methods

addComponent()

addComponent(component): void

Parameters

component: BaseComponent

Returns

void

Defined in

world/components.ts:53


configureComponents()

configureComponents(info): void

Parameters

info

info.components?: [string, BaseComponent][]

Returns

void

Defined in

world/components.ts:100


getComponent()

getComponent<Type>(ctor): undefined | Type

Type Parameters

Type extends BaseComponent

Parameters

ctor

Returns

undefined | Type

Defined in

world/components.ts:80


getComponentByName()

getComponentByName(class_name): undefined | BaseComponent

Parameters

class_name: string

Returns

undefined | BaseComponent

Defined in

world/components.ts:88


removeAllComponents()

removeAllComponents(): void

Returns

void

Defined in

world/components.ts:95


removeComponent()

removeComponent(component): void

Parameters

component: BaseComponent

Returns

void

Defined in

world/components.ts:63