@kognifai/cogsengine
    Preparing search index...

    Class TwinVisualsComponent

    Component that control Kognitwin's visuals.

    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 TwinVisualsComponent

    Properties

    biosphere: string

    Path to biosphere textures.

    brightness: number

    Normalized brightness value in the range [0, 1]

    dynamicRenderResolution: TwinVisualsDynamicRenderResolution

    Dynamic render resolution preset

    gridEnable: boolean

    Enable/disable grid lines.

    gridFadeTweakMaj: number

    Tweak-knob for world-space size where major lines fades in.

    gridFadeTweakMin: number

    Tweak-knob for world-space size where minor lines fades in.

    gridLineColorMaj: vec4

    Color of major grid line

    gridLineColorMin: vec4

    Color of minor grid lines

    gridLineWidthMaj: number

    Pixel width of major grid line.

    gridLineWidthMin: number

    Pixel width of minor grid line.

    gridOrigin: dvec2

    Grid origin in world space.

    gridRotation: number

    Grid rotation in radians.

    gridSpacingMaj: number

    Spacing of major grid lines, minor is 1/10th of this

    groundColor: vec4

    Color of ground plane.

    groundElevation: number

    Ground plane elevation

    groundOpaqueness: number

    Visiblity of ground, in [0,1].

    groundPlaneEnabled: boolean

    Visibility of ground plane.

    hazeColor: vec3

    Color of haze

    hazeIntensity: number

    Controls intensity of haze, in [0,1]

    highlightRegionEnable: boolean

    Enable highlight regions. Set to true if scene can contain highlight regions.

    isTyped: boolean = false

    Internal flag set if component is a Cogs Core component.

    Major mode

    Quality preset

    shadowsEnable: boolean
    texAtlases: Entity[]

    TexAtlas entities to apply during the TexAtlas render task.

    Style used when coloring tex atlas overlays.

    Tonemapper to use in modes that support it.

    useLowResolution: boolean

    Use the lower of the two render resolutions specified in the preset

    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.