@kognifai/cogsengine
    Preparing search index...

    Class TexAtlasComponent

    Manage a texture atlas that can be accessed in materials See TexAtlas.md for a thorough description.

    Hierarchy (View Summary)

    Index

    Constructors

    • Internal: Component constructor

      Parameters

      • type: string

        type of the component. Ex. "TransformComponent"

      • entity: Entity | null

        Owning entity. Entity only passed when wrapping existing entity.

      Returns TexAtlasComponent

    Properties

    coefficients: Float64Array

    Coefficients that specifies the projection.

    debugBox: boolean

    Render wireframe box that outlines texture position in world.

    domainExtentsMax: dvec2

    Specifies the upper-right corner of the domain. Values in domain units.

    domainExtentsMin: dvec2

    Specifies the lower-left corner of the domain. Values in domain units.

    domainMax: dvec2

    Specifies the upper-right corner of the domain that is mapped.

    domainMin: dvec2

    Specifies the lower-left corner of the domain that is mapped.

    elevation: number

    Elevation of map to be used for culling and lod'ing. Keep as precise as possible.

    index: number

    Which atlas this is when a material has multiple atlases.

    isTyped: boolean = false

    Internal flag set if component is a Cogs Core component.

    materials: (MaterialResource | null)[]

    Materials that use this atlas.

    maxItemCount: number

    Maximum number of tiles to use simultaneously.

    maxLevel: number

    Maximum level to use.

    minLevel: number

    Minimum level to use.

    minRetryDelay: number

    Minimum delay before retrying a failed fetch in seconds. The delay will double with each successive failed fetch attempt for a tile. Set to zero to disable.

    path: string

    Path to tile hierarcy root.

    projection: WorldSpaceBilinear

    Projection to use.

    restrictBetweenNearAndFar: boolean

    Restrict visible tiles to the interval between near and far, otherwise all tiles from eye to the inifinity is considered visible.

    timeout: number

    Time before timing out a fetch, in seconds. Set to zero to disable.

    tolerance: number

    Specifies how big a texel should ideally be if screen has size 1.

    Accessors

    • get entity(): Entity | null

      Gets the optional owning entity

      Returns Entity | null

    • set entity(entity: Entity | null): void

      Internal: set owning entity.

      Parameters

      Returns void

    • get name(): string

      Component name == type. For compatibility

      Returns string

    • get type(): string

      Gets the type of the component. Ex. "TransformComponent", "SceneComponent" etc.

      Returns string

    Methods

    • Internal: Creates a new component of the given type (name). Component is wrapped when adding to an entity.

      Parameters

      • type: string

        Type of the component. Ex. "TransformComponent"

      Returns Component

      Created Cogs.js component.

    • Internal: Creates a new component being wrapped as an existing member of the entity

      Parameters

      • type: string

        Type of the component. Ex. "TransformComponent"

      • entity: Entity

        The owning entity

      Returns Component

      Created Cogs.js component.