Documentation
    Preparing search index...

    Class AssetPanoramicsRenderPlugin

    A renderer plugin for managing panoramic imagery layers associated with an asset. When panoramic data is present for the asset, this plugin initializes and controls panoramic views, allowing users to seamlessly enter and exit panoramic mode.

    This plugin interacts with PanoramaSupport to handle panoramic mode, including start-up, camera synchronization, and entering the closest panoramic position to the current camera viewpoint. It also coordinates with the LuciadRIA controller stack to manage a dedicated panoramic controller.

    Hierarchy

    • RendererPluginBase<Events>
      • AssetPanoramicsRenderPlugin

    Implements

    • RendererPlugin
    • StatefulRendererPlugin<PublicStore>
    Index

    Constructors

    Properties

    emitter: Emitter<Events> = ...

    An event emitter for handling custom events.

    Methods

    • Adds an event listener to the plugin's panoramic event context. This method delegates to the internal PanoramicEventContext, allowing external components to listen for panoramic lifecycle events.

      Type Parameters

      • K extends keyof Events

      Parameters

      • event: K

        The event type to listen for (e.g., 'onEnterPanorama', 'onExitPanorama').

      • listener: (eventData: Events[K]) => void

        A callback function to invoke when the specified event occurs.

      Returns { remove: () => void }

      A function to remove the listener (if supported).

    • Registers an event listener handle to be managed by the plugin. Managed listeners will be automatically removed when the plugin is torn down.

      Parameters

      • handle: { remove: () => void } | (() => void)

        The event listener handle to manage.

      Returns void

    • Counts panorama points located within the given oriented box.

      Parameters

      • orientedBox: OrientedBox

        The oriented box geometry to test against.

      • withSlicingEffect: boolean = false

        If true, counts only points that are visible in oriented box and in the slicing box. If false, counts all points inside the oriented box regardless of slicing box. Usage:

        • Pass false when you want the total number of points inside the given level-oriented box without considering slicing visibility. Example: find how many points exist in total within this oriented box.

        • Pass true when you want to count only points visible with respect to slicing. Example: check if a given limit box contains any visible points to decide whether switching to a certain level in panorama mode is possible.

      Returns number

    • The store used by the plugin.

      Returns PublicStore

      Do not use this directly in user-land code. Either:

      • In React code, use the usePluginStore hook.
      • In non-React code, add methods to mutate the store to the plugin's API instead.
    • Called when the scene is considered "ready," i.e., sufficiently loaded. Starts entering the panoramic mode if the asset supports panoramic data and panoramic-only mode is detected.

      Parameters

      • context: RendererPluginContext

      Returns void

    • Determines if the plugin should be registered based on the asset's artifact categories. This method checks if the asset has a panoramic category, indicating that panoramic data is present and the plugin should be enabled.

      Parameters

      • context: RendererPluginContext

        The renderer plugin context providing access to the asset.

      Returns boolean

      true if the asset has a panoramic category, otherwise false.

    • Tears down the plugin by removing all managed event listeners and clearing the event emitter. This method is called when the plugin is being destroyed.

      Parameters

      • _context: RendererPluginContext

        The plugin context provided during teardown.

      Returns void