UNPKG

@woosh/meep-engine

Version:

Pure JavaScript game engine. Fully featured and production ready.

25 lines (15 loc) 607 B
import Entity from "../Entity"; import {EntityComponentDataset} from "../EntityComponentDataset"; import {Transform} from "../transform/Transform"; export class EntityNode { constructor(entity?: Entity) readonly parent: EntityNode | null readonly entity: Entity readonly transform: Transform readonly children: Readonly<EntityNode[]> addChild(node: EntityNode): boolean removeChild(node: EntityNode): boolean traverse(visitor: (node: EntityNode) => any, thisArg?: any): void build(ecd: EntityComponentDataset): void destroy(): void }