Type Alias ComponentDef<T>

ComponentDef: {
    constructor: ComponentConstructor<T>;
    id: ComponentId;
    init: (container: T) => void;
}

A component definition.

Component definitions have the information needed to get and initialize the component on an Entity.

Use defComponent to create a new ComponentDef.

Type Parameters

Type declaration