Preparing search index...

    The Sphere class represents a 3D sphere component in the scene. It extends the BaseScriptComponent and provides functionality for rendering and customizing the sphere's appearance.

    @component

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    api: Record<string, any>

    Generic object accessible by other instances of ScriptComponent. Use this object to store references to properties and methods that need to be accessible from other ScriptComponents.

    This property is no longer needed, you can use a reference to the ScriptComponent, including 'script', directly

    enabled: boolean

    If disabled, the Component will stop enacting its behavior.

    isEnabledInHierarchy: boolean

    Returns true if this Component, its SceneObject, and all of that SceneObjects parents are enabled.

    name: string
    sceneObject: SceneObject

    The SceneObject this component is on.

    uniqueIdentifier: string
    updatePriority: number

    Accessors

    • get backgroundColor(): vec4

      Gets the background color of the sphere.

      Returns vec4

      The current background color as a vec4.

    • set backgroundColor(value: vec4): void

      Sets the background color of the sphere.

      Parameters

      • value: vec4

        A vec4 representing the RGBA color to set as the background color.

      Returns void

    • get icon(): Texture

      Gets the icon texture of the sphere.

      Returns Texture

      The icon texture of the sphere, or undefined if there is none.

    • set icon(icon: Texture): void

      Sets the icon texture of the sphere.

      Parameters

      • icon: Texture

        The icon texture to set.

      Returns void

    • get radius(): number

      Gets the radius of the sphere.

      Returns number

      The radius of the sphere in local space units.

    • set radius(radius: number): void

      Sets the radius of the sphere by updating its transform's local scale.

      Parameters

      • radius: number

        A number object representing the new radius of the sphere

      Returns void

    • get renderOrder(): number

      The render order of the Sphere.

      Returns number

    • set renderOrder(value: number): void

      The render order of the Sphere.

      Parameters

      • value: number

      Returns void

    • get zBackScale(): number

      Gets the scale factor for the back of the sphere along the Z-axis.

      Returns number

      The scale factor for the back of the sphere.

    • set zBackScale(zBackScale: number): void

      Sets the scale factor for the back of the sphere along the Z-axis.

      Parameters

      • zBackScale: number

        A number representing the scale factor for the back of the sphere. A value closer to 0.0 makes the back of the sphere flatter, while a value closer to 1.0 retains its original shape.

      Returns void

    Methods

    • Initializes the sphere component. This method sets up the mesh, material, size, and background color for the sphere. It ensures that the initialization process is only performed once.

      Returns void

    • Returns true if the object matches or derives from the passed in type.

      Parameters

      • type: string

      Returns boolean

    • Returns void