Lens Scripting API

    This class provides a naive and simple Level Of Detail (LOD) implementation for RenderMeshVisual. It switches between different meshes based on the distance from the camera to the center of the object. The class does not support fading between meshes, but simply switches to the defined mesh at the specified depth.

    USAGE:

    • Drop this component onto a scene object.
    • Add meshes to the meshes array.
    • Select thresholds at the given index (or else it falls back to default).
    • Add the material that is shared across the RenderMeshVisuals.

    Hierarchy (View Summary, Expand)

    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.

    enabled: boolean

    If disabled, the Component will stop enacting its behavior.

    material: Material
    meshes: RenderMesh[] = []
    name: string
    sceneObject: SceneObject

    The scene object this component is on.

    thresholds: number[] = []
    uniqueIdentifier: string
    updatePriority: number

    Methods

    • Parameters

      • distance: number

      Returns void

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

      Parameters

      • type: string

      Returns boolean

    • Returns void

    • Parameters

      • order: number

      Returns void

    • Returns void

    MMNEPVFCICPMFPCPTTAAATR