HomeWeb Components API Reference - v0.17.0
    Preparing search index...

    Class SkyElement

    The SkyElement interface provides properties and methods for manipulating <pc-sky> elements. The SkyElement interface also inherits the properties and methods of the HTMLElement interface.

    Hierarchy (View Summary)

    Index
    • get asset(): string

      Gets the id of the pc-asset to use for the skybox.

      Returns string

      The asset ID.

    • set asset(value: string): void

      Sets the id of the pc-asset to use for the skybox.

      Parameters

      • value: string

        The asset ID.

      Returns void

    • get center(): Vec3

      Gets the center of the skybox.

      Returns Vec3

      The center.

    • set center(value: Vec3): void

      Sets the center of the skybox.

      Parameters

      • value: Vec3

        The center.

      Returns void

    • get closestApp(): AppElement | null

      The nearest ancestor <pc-app> element, or null if this element has no <pc-app> ancestor. The search starts at the parent, so an element never resolves to itself.

      Returns AppElement | null

      The closest app element, or null.

    • get closestEntity(): EntityBaseElement | null

      The nearest ancestor element that fronts an entity — <pc-entity>, <pc-model> or <pc-node> — or null if this element has no such ancestor. The search starts at the parent, so an element never resolves to itself.

      Returns EntityBaseElement | null

      The closest entity-fronting element, or null.

    • get intensity(): number

      Gets the intensity of the skybox.

      Returns number

      The intensity.

    • set intensity(value: number): void

      Sets the intensity of the skybox.

      Parameters

      • value: number

        The intensity.

      Returns void

    • get lighting(): boolean

      Gets whether the skybox is used as a light source.

      Returns boolean

      Whether to use lighting.

    • set lighting(value: boolean): void

      Sets whether the skybox is used as a light source.

      Parameters

      • value: boolean

        Whether to use lighting.

      Returns void

    • get mipLevel(): number

      Gets the mip level of the skybox.

      Returns number

      The mip level.

    • set mipLevel(value: number): void

      Sets the mip level of the skybox, where 0 is the sharpest. Raising it selects a blurrier mip, which is how a skybox is softened without blurring the texture itself.

      Parameters

      • value: number

        The mip level.

      Returns void

    • get rotation(): Vec3

      Gets the Euler rotation of the skybox.

      Returns Vec3

      The rotation.

    • set rotation(value: Vec3): void

      Sets the Euler rotation of the skybox.

      Parameters

      • value: Vec3

        The rotation.

      Returns void

    • get scale(): Vec3

      Gets the scale of the skybox.

      Returns Vec3

      The scale.

    • set scale(value: Vec3): void

      Sets the scale of the skybox.

      Parameters

      • value: Vec3

        The scale.

      Returns void

    • get type(): "none" | "box" | "infinite" | "dome"

      Gets the type of the skybox.

      Returns "none" | "box" | "infinite" | "dome"

      The type.

    • set type(value: "none" | "box" | "infinite" | "dome"): void

      Sets the type of the skybox.

      Parameters

      • value: "none" | "box" | "infinite" | "dome"

        The type.

      Returns void

    • Called when the element is fully initialized and ready. Subclasses should call this when they're ready. Resolves the ready promise and dispatches a bubbling, composed ready event. Signals at most once per readiness cycle: a repeat call before _resetReady has re-armed the promise does nothing.

      Returns void

    • Returns the ready promise to its pending state. Subclasses should call this when the resource their readiness announced is torn down (typically from disconnectedCallback), so that a later re-initialization can signal readiness again. Does nothing while the promise is still pending — an in-flight waiter carries over to the next readiness cycle rather than being stranded on a promise nothing will ever resolve.

      Returns void

    • Returns a promise that resolves with this element when it's ready. This is the low-level primitive underlying whenReady, which is the recommended way to wait for elements.

      Readiness tracks the element's current lifecycle: once a ready element is torn down (for example by removing it from the document), this returns a fresh promise that resolves when the element is next ready. A promise obtained earlier stays resolved — call this again after re-inserting an element rather than reusing a promise from before its removal.

      Returns Promise<SkyElement>

      A promise that resolves with this element when it's ready.