Strata - v1.4.10
    Preparing search index...

    Variable ARCHETYPESConst

    ARCHETYPES: {
        INTERACTIVE: {
            components: readonly ["position", "collider"];
            name: "interactive";
            tags: readonly ["physics", "interaction"];
        };
        LIVING: {
            components: readonly ["health"];
            name: "living";
            tags: readonly ["combat"];
        };
        MOVABLE: {
            components: readonly ["position", "velocity"];
            name: "movable";
            tags: readonly ["physics"];
        };
        RENDERABLE: {
            components: readonly ["position", "mesh"];
            name: "renderable";
            tags: readonly ["graphics"];
        };
    } = ...

    Common game entity archetypes for quick entity creation.

    Pre-defined entity patterns for typical game objects. Each archetype specifies required components and optional tags for categorization.

    Type Declaration

    • ReadonlyINTERACTIVE: {
          components: readonly ["position", "collider"];
          name: "interactive";
          tags: readonly ["physics", "interaction"];
      }
    • ReadonlyLIVING: { components: readonly ["health"]; name: "living"; tags: readonly ["combat"] }
    • ReadonlyMOVABLE: {
          components: readonly ["position", "velocity"];
          name: "movable";
          tags: readonly ["physics"];
      }
    • ReadonlyRENDERABLE: {
          components: readonly ["position", "mesh"];
          name: "renderable";
          tags: readonly ["graphics"];
      }
    // Create a movable entity
    const entity = createFromArchetype(
    ARCHETYPES.MOVABLE,
    { position: { x: 0, y: 0, z: 0 }, velocity: { x: 1, y: 0, z: 0 } }
    );

    // Create a renderable entity
    const visual = createFromArchetype(
    ARCHETYPES.RENDERABLE,
    { position: { x: 0, y: 0, z: 0 }, mesh: myMesh }
    );