@kognifai/cogsengine
    Preparing search index...

    Class BadgeSetComponent

    Component for showing lots of badges.

    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 BadgeSetComponent

    Properties

    anchorPoint: vec2

    The location where the badge is anchored. [0,0] is bottom left and [1,1] is top right. [0.5, 0.5] is middle, which is default.

    badgeSize: number

    Size of the badge.

    boundingBoxLower: vec2

    Position of the lower corner of the bounding box. It is set as [0,0] as bottom left corner by default.

    boundingBoxUpper: vec2

    Position of the upper corner of the bounding box. It is set as [1,1] as top right corner by default.

    digitTexture: TextureResource | null

    Texture array (ktx2) containing all valid numeric icons. Index is retrieved from InstanceColor's x value.

    farScalingCutoff: number

    Determines the far limit where the badge stops scaling freely.

    farVisibilityLimit: number

    Don't display badges further than this distance from the camera.

    icons: Int32Array

    Icon (index) to be rendered on top of style.

    iconTexture: TextureResource | null

    Texture array (ktx2) containing icons. Index is retrieved from InstanceColor's w value.

    isTyped: boolean = false

    Internal flag set if component is a Cogs Core component.

    nearScalingCutoff: number

    Determines the near limit where the badge stops scaling freely.

    nearVisibilityLimit: number

    Don't display badges closer than this distance from the camera.

    numbers: Int32Array

    The number to display on the badge.

    outputAlphaValue: number

    Output alpha value for the fragments not discarded by the shader.

    positions: Float32Array

    (Contents: vec3[]) Badge positions.

    styles: Int32Array

    Style (index) used for background behind icon.

    styleTexture: TextureResource | null

    Texture array (ktx2) containing background styling. Index is retrieved from InstanceColor's y value.

    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.