LUX-VIEW - v1.0.0
    Preparing search index...

    Interface ILux

    interface ILux {
        fadeIn(time: number, color?: string): Promise<void>;
        fadeOut(time: number, color?: string): Promise<void>;
        getAssetData(assetId: string): any;
        getAssets(): IAssetInfo[];
        getDefaultViewer(settings: IDefaultViewerSettings): Promise<IDefaultViewer>;
        initialize(mount: HTMLDivElement, settings: ILuxSettings): Promise<void>;
        setAssetData(assetId: string, data: any): void;
    }
    Index

    Methods

    • Fades in the current render scene. Make sure to set the color the same than the one with which a previous fadeout happened. Otherwise there will be a color "flip".

      Parameters

      • time: number

        The fadein time in ms

      • Optionalcolor: string

        The color to fade from. Defaults to 'white'.

      Returns Promise<void>

    • Fades out what is currently rendered.

      Parameters

      • time: number

        The fadeout time in ms

      • Optionalcolor: string

        The color to fade to. Defaults to 'white'

      Returns Promise<void>

    • Gets a copy of the data of the asset. The data is structured depending on the type of asset. If you are calling this function you seem to know what you are doing.

      Parameters

      • assetId: string

        The id of the asset

      Returns any

    • Initializes the viewer and fetches the data referenced by the deployment config. Called with the config object received from the lux:loaded event, or with window.lux_config, where the dropcode publishes the same object once the event has fired. Does not render anything yet — use getDefaultViewer to set up a scene.

      Parameters

      Returns Promise<void>

    • Updates the data of the asset. This might not have any effect if the asset is already used somewhere. (E.g. an already running viewer will not use this new data when the asset data is updated after the viewer has been initialized.)

      Parameters

      • assetId: string

        The id of the asset

      • data: any

        The updated asset data

      Returns void