### Start Media Player Session Response Source: https://lfdocs.lookingglassfactory.com/software/looking-glass-bridge-sdk/web-application-integration.md Example JSON response after starting a media player session. ```json { "name": "value", "orchestration": { "name": "orchestration", "type": "WSTRING", "value": "default" }, "payload": { "name": "payload", "type": "WSTRING", "value": "1a6aed0d-77bf-4129-8e01-71d61c58473d" }, "status": { "name": "status", "type": "WSTRING", "value": "Completion" } } ``` -------------------------------- ### Install Dependencies and Run Liteforms Locally Source: https://lfdocs.lookingglassfactory.com/software/liteforms-tm.md Use these bash commands to clone the Liteforms repository, install its Node.js dependencies, and start the local development server. ```bash git clone https://github.com/Looking-Glass/liteforms-web.git cd liteforms-web npm install npm run dev ``` -------------------------------- ### Clone and Install Video Depth Anything Locally Source: https://lfdocs.lookingglassfactory.com/community/convert-any-video-into-a-hologram Clone the Video Depth Anything repository and install its dependencies. Ensure you have Git and Python installed. ```bash git clone https://github.com/DepthAnything/Video-Depth-Anything cd Video-Depth-Anything pip install -r requirements.txt ``` -------------------------------- ### Install Looking Glass WebXR (npm) Source: https://lfdocs.lookingglassfactory.com/software/creator-tools/webxr/react-three-fiber.md Use this command to install the Looking Glass WebXR library using npm. ```bash npm install @lookingglass/webxr ``` -------------------------------- ### Install Looking Glass WebXR (yarn) Source: https://lfdocs.lookingglassfactory.com/software/creator-tools/webxr/react-three-fiber.md Use this command to install the Looking Glass WebXR library using yarn. ```bash yarn install @lookingglass/webxr ``` -------------------------------- ### Start Media Player Session Payload Source: https://lfdocs.lookingglassfactory.com/software/looking-glass-bridge-sdk/web-application-integration.md Example JSON payload for starting a media player session. ```json { "name": "default" } ``` -------------------------------- ### Install Distill Any Depth Locally Source: https://lfdocs.lookingglassfactory.com/community/convert-any-image-into-a-hologram Set up a virtual environment and install Distill Any Depth with its dependencies. Ensure you have Python, Anaconda or Miniconda installed. ```bash # Create a new conda environment with Python 3.10 conda create -n distill-any-depth -y python=3.10 # Activate the created environment conda activate distill-any-depth # Install the required Python packages pip install -r requirements.txt # Navigate to the Detectron2 directory and install it cd detectron2 pip install -e . cd .. pip install -e . ``` -------------------------------- ### Query Available Output Devices Response Source: https://lfdocs.lookingglassfactory.com/software/looking-glass-bridge-sdk/web-application-integration.md This is an example response from the /available_output_devices endpoint, detailing the properties of available displays. ```json { "name": "value", "orchestration": { "name": "orchestration", "type": "WSTRING", "value": "1a6aed0d-77bf-4129-8e01-71d61c58473d" }, "payload": { "name": "payload", "type": "VARIANT_MAP", "value": { "0": { "name": "0", "type": "VARIANT_MAP", "value": { "calibration": { "name": "calibration", "type": "WSTRING", "value": "" }, "defaultQuilt": { "name": "defaultQuilt", "type": "WSTRING", "value": "{}" }, "hardwareVersion": { "name": "hardwareVersion", "type": "WSTRING", "value": "thirdparty" }, "hwid": { "name": "hwid", "type": "WSTRING", "value": "" }, "index": { "name": "index", "type": "UNSIGNED_INT", "value": 0 }, "state": { "name": "state", "type": "WSTRING", "value": "ok" }, "windowCoords": { "name": "windowCoords", "type": "INT2", "value": { "x": 0, "y": 0 } } } }, "1": { "name": "1", "type": "VARIANT_MAP", "value": { "calibration": { "name": "calibration", "type": "WSTRING", "value": "{\"DPI\":{\"value\":491.0},\"center\":{\"value\":0.22076533734798431},\"configVersion\":\"3.0\",\"flipImageX\":{\"value\":0.0},\"flipImageY\":{\"value\":0.0},\"flipSubp\":{\"value\":0.0},\"fringe\":{\"value\":0.0},\"invView\":{\"value\":1.0},\"pitch\":{\"value\":80.75597381591797},\"screenH\":{\"value\":2560.0},\"screenW\":{\"value\":1440.0},\"serial\":\"LKG-E\",\"slope\":{\"value\":-6.619636058807373},\"verticalAngle\":{\"value\":0.0},\"viewCone\":{\"value\":54.0}}" }, "defaultQuilt": { "name": "defaultQuilt", "type": "WSTRING", "value": "{ \"quiltAspect\" : 0.5625, \"quiltX\" : 4092, \"quiltY\" : 4092, \"tileX\" : 11, \"tileY\" : 6}" }, "hardwareVersion": { "name": "hardwareVersion", "type": "WSTRING", "value": "go_p" }, "hwid": { "name": "hwid", "type": "WSTRING", "value": "LKG-E00194" }, "index": { "name": "index", "type": "UNSIGNED_INT", "value": 1 }, "state": { "name": "state", "type": "WSTRING", "value": "ok" }, "windowCoords": { "name": "windowCoords", "type": "INT2", "value": { "x": -1440, "y": 0 } } } } } }, "status": { "name": "status", "type": "WSTRING", "value": "Completion" } } ``` -------------------------------- ### Start Quilt Animation Rendering Source: https://lfdocs.lookingglassfactory.com/software/creator-tools/index-1 Use this command to start rendering a quilt animation. Blender must be in background mode with a specified .blend file. ```bash blender -b my_lg_hologram.blend -- -alicelg-render-anim -o /tmp/quilt_anim.png -s 10 -e 24 ``` -------------------------------- ### Test Looking Glass Setup Source: https://lfdocs.lookingglassfactory.com/software/looking-glass-bridge.md This embed allows users to test their Looking Glass setup. Clicking the button should display a test hologram if the hardware is connected and software is installed and configured correctly. Ensure Looking Glass Bridge is running and the device is in Desktop Mode if no hologram appears. ```embed ``` -------------------------------- ### Start media player session Source: https://lfdocs.lookingglassfactory.com/software/looking-glass-bridge-sdk/web-application-integration.md Initiates a media player session with a specified orchestration. ```APIDOC ## POST /enter_orchestration ### Description Initiates a media player session with a specified orchestration. This is used to start or resume a media playback session. ### Method POST ### Endpoint /enter_orchestration ### Parameters #### Request Body - **name** (string) - Required - The name of the orchestration to start (e.g., "default"). ### Request Example ```json { "name": "default" } ``` ### Response #### Success Response (200) - **name** (string) - The name of the response field. - **orchestration** (object) - Details about the initiated orchestration. - **name** (string) - The name of the orchestration field. - **type** (string) - The data type of the orchestration value. - **value** (string) - The name of the orchestration used. - **payload** (object) - Contains a unique identifier for the session. - **name** (string) - The name of the payload field. - **type** (string) - The data type of the payload value. - **value** (string) - A unique session ID (UUID). - **status** (object) - The status of the request. - **name** (string) - The name of the status field. - **type** (string) - The data type of the status value. - **value** (string) - The status message, e.g., "Completion". #### Response Example ```json { "name": "value", "orchestration": { "name": "orchestration", "type": "WSTRING", "value": "default" }, "payload": { "name": "payload", "type": "WSTRING", "value": "1a6aed0d-77bf-4129-8e01-71d61c58473d" }, "status": { "name": "status", "type": "WSTRING", "value": "Completion" } } ``` ``` -------------------------------- ### Start OpenClaw Gateway Source: https://lfdocs.lookingglassfactory.com/software/liteforms-tm.md Starts the OpenClaw Gateway. If the Gateway is already running, this command might restart it or show its status, depending on the OpenClaw version and configuration. ```bash openclaw gateway ``` -------------------------------- ### Show Media Player Window Response Source: https://lfdocs.lookingglassfactory.com/software/looking-glass-bridge-sdk/web-application-integration.md This is an example response from the /show_window endpoint, confirming the status of the media player window operation. ```json { "name": "value", "orchestration": { "name": "orchestration", "type": "WSTRING", "value": "1a6aed0d-77bf-4129-8e01-71d61c58473d" }, "status": { "name": "status", "type": "WSTRING", "value": "Completion" } } ``` -------------------------------- ### Start and End HoloPlay Recording Source: https://lfdocs.lookingglassfactory.com/software/index/quilt-video-audio-and-playback This script snippet demonstrates how to start and end HoloPlay recordings. Ensure this script is attached to your HoloPlay Capture object. ```csharp using UnityEngine; using HoloPlay.Recorder; public class ToggleHoloplayRecorder : MonoBehaviour { private HoloplayRecorder recorder; void Start() { recorder = GetComponent(); recorder.StartRecord(); } void OnDestroy() { recorder.EndRecord(); } } ``` -------------------------------- ### Get Viewcone Source: https://lfdocs.lookingglassfactory.com/software/looking-glass-bridge-sdk/native-function-reference Retrieves the viewcone value for the display product rendering the specified window. ```c bool get_viewcone(WINDOW_HANDLE wnd, float* viewcone); ``` -------------------------------- ### Get Device Type Source: https://lfdocs.lookingglassfactory.com/software/looking-glass-bridge-sdk/native-function-reference Retrieves the type of display product associated with the given window. ```c bool get_device_type(WINDOW_HANDLE wnd, int* hw_enum); ``` -------------------------------- ### Example playlist.m3u format Source: https://lfdocs.lookingglassfactory.com/software/looking-glass-studio/troubleshooting The `playlist.m3u` file controls the playback order of holograms on your Looking Glass. Each line should contain the filename of a synced hologram. ```plaintext hologram1.mp4 hologram4.mp4 hologram2.mp4 hologram5.mp4 ``` -------------------------------- ### Run Linux Builds with Adapter Parameter Source: https://lfdocs.lookingglassfactory.com/software/index When running builds on Linux, it's necessary to launch them from the command line with the "-adapter" parameter set to the index of your Looking Glass display. This is experimental support and may have limitations. ```bash YourApp.x86_64 -adapter 2 ``` -------------------------------- ### Get Bridge Version Response Source: https://lfdocs.lookingglassfactory.com/software/looking-glass-bridge-sdk/web-application-integration.md Example JSON response when querying the bridge version. ```json { "name": "value", "payload": { "name": "payload", "type": "STRING", "value": "2.4.7" }, "status": { "name": "status", "type": "WSTRING", "value": "Completion" } } ``` -------------------------------- ### Initialize GLFW and Create Window Source: https://lfdocs.lookingglassfactory.com/software/looking-glass-bridge-sdk/integrating-native-applications.md Initializes GLFW and creates a window with specific OpenGL context version and profile. This is the first step in setting up the rendering environment. ```cpp // initialize glfw if (!glfwInit()) return -1; // create preview window glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3); glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 3); glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE); GLFWwindow* window = glfwCreateWindow(800, 800, "Bridge SDK example", nullptr, nullptr); if (!window) { glfwTerminate(); return -1; } gglfwMakeContextCurrent(window); ``` -------------------------------- ### StartRecording Source: https://lfdocs.lookingglassfactory.com/software/index/script-reference/quiltcapture.cs.md Initiates video recording. Can specify an output file path. ```APIDOC ## void StartRecording() ### Description Start recording. ### Method `StartRecording` ``` ```APIDOC ## void StartRecording(string outputFilePath) ### Description Same as the overload without `outputFilePath`, setting the output file to `outputFilePath`. ### Method `StartRecording` ### Parameters #### Path Parameters - **outputFilePath** (string) - Required - The path for the output recording file. ``` -------------------------------- ### instance_window_gl Source: https://lfdocs.lookingglassfactory.com/software/looking-glass-bridge-sdk/native-function-reference Creates a new window using display parameters. The window position and size will match the selected display. ```APIDOC ## instance_window_gl ### Description Creates a new window using display parameters. If the `display_index` parameter is not supplied, the Bridge SDK will search for the first display that matches a Looking Glass product and use that. The window position and size will match the selected display. ### Parameters #### Path Parameters - **wnd** (WINDOW_HANDLE *) - Required - The pointer used to store the platform-specific window handle. - **display_index** (unsigned long) - Optional - The index of the display to configure the window for. A value of -1 will select the first available Looking Glass display. Defaults to -1. ### Returns - bool - TRUE when a window was created, FALSE otherwise. ### Notes The window created is meant for use with OpenGL texture sharing. ``` -------------------------------- ### Get Display Indices Source: https://lfdocs.lookingglassfactory.com/software/looking-glass-bridge-sdk/native-function-reference Retrieves the indices of displays attached to the host. Call once with a null buffer to get the size, then again with an allocated buffer to populate it. ```c bool get_displays(int* number_of_indices, unsigned long* indices); ``` -------------------------------- ### Get Info on Liteforms Skill Source: https://lfdocs.lookingglassfactory.com/software/liteforms-tm.md Use this command to get detailed information about the 'liteforms-web' skill in OpenClaw. This is useful for troubleshooting skill integration. ```bash openclaw skills info liteforms-web ``` -------------------------------- ### XYSpotlight.cs Methods Source: https://lfdocs.lookingglassfactory.com/software/index/script-reference/ios-sample-scene-scripts/xyspotlight.cs.md Provides reference for the methods available in the XYSpotlight.cs script, used to control the spotlight's behavior. ```APIDOC ## SetSliderPos(float x, float y) ### Description Updates the spotlight's position based on normalized slider values. ### Method ``` void SetSliderPos(float x, float y) ``` ### Parameters #### Path Parameters * **x** (float) - Required - Normalized X-axis value. * **y** (float) - Required - Normalized Y-axis value. ``` ```APIDOC ## SetLightIntensity(float intensity) ### Description Updates the intensity of the spotlight. ### Method ``` void SetLightIntensity(float intensity) ``` ### Parameters #### Path Parameters * **intensity** (float) - Required - The new intensity value. ``` -------------------------------- ### Initialize Looking Glass WebXR Polyfill Source: https://lfdocs.lookingglassfactory.com/software/creator-tools/webxr/react-three-fiber.md Import and initialize the Looking Glass WebXR polyfill with recommended defaults. Modify config settings like targetY, targetZ, targetDiam, and fovy as needed. ```javascript import { LookingGlassWebXRPolyfill, LookingGlassConfig } from "@lookingglass/webxr" const config = LookingGlassConfig config.targetY = 0 config.targetZ = 0 config.targetDiam = 3 config.fovy = (40 * Math.PI) / 180 new LookingGlassWebXRPolyfill() ``` -------------------------------- ### Initialize Looking Glass WebXR with Script Tag (ES6) Source: https://lfdocs.lookingglassfactory.com/software/creator-tools/webxr.md This example shows how to import and initialize the Looking Glass WebXR polyfill using an ES6 module script tag. Configure display properties like targetY, targetZ, targetDiam, and fovy before creating an instance of the polyfill. ```html ``` -------------------------------- ### Get Device Name Source: https://lfdocs.lookingglassfactory.com/software/looking-glass-bridge-sdk/native-function-reference Retrieves the device name for a given Looking Glass window. The caller must allocate the `device_name` buffer. Call once with a null buffer to get the required size, then again with an allocated buffer. ```c bool get_device_name(WINDOW_HANDLE wnd, int* number_of_device_name_wchars, wchar_t* device_name); ``` -------------------------------- ### Start Single Quilt Rendering Source: https://lfdocs.lookingglassfactory.com/software/creator-tools/index-1 Use this command to initiate the rendering of a single quilt. Ensure Blender is in background mode and a .blend file with render settings is specified. ```bash blender -b my_lg_hologram.blend -- -alicelg-render ``` -------------------------------- ### Get Bridge version Source: https://lfdocs.lookingglassfactory.com/software/looking-glass-bridge-sdk/web-application-integration.md Retrieves the current version of the Bridge Media Player. ```APIDOC ## GET /bridge_version ### Description Retrieves the current version of the Bridge Media Player. ### Method GET ### Endpoint /bridge_version ### Request Example none ### Response #### Success Response (200) - **name** (string) - The name of the response field. - **payload** (object) - Contains details about the version. - **name** (string) - The name of the payload field. - **type** (string) - The data type of the payload value. - **value** (string) - The Bridge version number. - **status** (object) - The status of the request. - **name** (string) - The name of the status field. - **type** (string) - The data type of the status value. - **value** (string) - The status message, e.g., "Completion". ### Response Example ```json { "name": "value", "payload": { "name": "payload", "type": "STRING", "value": "2.4.7" }, "status": { "name": "status", "type": "WSTRING", "value": "Completion" } } ``` ``` -------------------------------- ### Get Viewcone for Display Source: https://lfdocs.lookingglassfactory.com/software/looking-glass-bridge-sdk/native-function-reference Retrieves the viewcone value for a specific Looking Glass display. ```c bool get_viewcone_for_display(unsigned long display_index, float* viewcone); ``` -------------------------------- ### Ask a Question via Documentation API Source: https://lfdocs.lookingglassfactory.com/llms.txt Use this GET request to query the documentation index with a specific question and an optional broader goal. The response includes a direct answer and relevant sources. ```http GET https://lfdocs.lookingglassfactory.com/legacy/legacy-software.md?ask=&goal= ``` -------------------------------- ### Get Subpixel Size for Display Source: https://lfdocs.lookingglassfactory.com/software/looking-glass-bridge-sdk/native-function-reference Retrieves the subpixel size for a specific Looking Glass display. ```c bool get_subp_for_display(unsigned long display_index, float* subp); ``` -------------------------------- ### Test Looking Glass Setup Source: https://lfdocs.lookingglassfactory.com/getting-started/looking-glass-65 Run this interactive test to verify hardware connection and software configuration. It displays a 3D hologram of Shawn from Looking Glass. ```html ``` -------------------------------- ### Get Device Type for Display Source: https://lfdocs.lookingglassfactory.com/software/looking-glass-bridge-sdk/native-function-reference Returns the hardware type enumeration for the specified display index. ```c bool get_device_type_for_display(unsigned long display_index, int* hw_enum); ``` -------------------------------- ### Create an OpenGL-compatible window Source: https://lfdocs.lookingglassfactory.com/software/looking-glass-bridge-sdk/native-function-reference Creates a new window for OpenGL texture sharing. If display_index is not provided, it defaults to the first Looking Glass display found. The window size matches the display. ```c bool instance_window_gl(WINDOW_HANDLE *wnd, unsigned long display_index = -1); ``` -------------------------------- ### Get Window Position for Display Source: https://lfdocs.lookingglassfactory.com/software/looking-glass-bridge-sdk/native-function-reference Returns the x and y coordinates of the window for the specified display index. ```c bool get_window_position_for_display(unsigned long display_index, long* x, long* y); ``` -------------------------------- ### Initialize Bridge SDK and Query Displays Source: https://lfdocs.lookingglassfactory.com/software/looking-glass-bridge-sdk/integrating-native-applications.md Initializes the Bridge SDK and queries for connected Looking Glass displays. This must be called before any other Bridge functions. ```cpp initialize_bridge("Bridge SDK example"); // query the available Looking Glass displays int lkg_display_count = 0; std::vector lkg_displays; get_displays(&lkg_display_count, nullptr); lkg_displays.resize(lkg_display_count); get_displays(&lkg_display_count, lkg_displays.data()); ``` -------------------------------- ### Get Dimensions for Display Source: https://lfdocs.lookingglassfactory.com/software/looking-glass-bridge-sdk/native-function-reference Returns the width and height dimensions of the specified Looking Glass display. ```c bool get_dimensions_for_display(unsigned long display_index, unsigned long* width, unsigned long* height); ``` -------------------------------- ### Recording Control Source: https://lfdocs.lookingglassfactory.com/software/index/script-reference/quiltcapture.cs Methods to control the video recording process, including starting, pausing, resuming, and stopping. ```APIDOC ## Recording Control ### Description Methods to control the video recording process. ### Methods - **StartRecording()**: Begins recording. - **StartRecording(string outputFilePath)**: Begins recording and saves to the specified file path. - **PauseRecording()**: Pauses the current recording. - **ResumeRecording()**: Resumes a paused recording. - **StopRecording()**: Stops the current recording and saves the output. ``` -------------------------------- ### Get Display Subpixel Size Source: https://lfdocs.lookingglassfactory.com/software/looking-glass-bridge-sdk/native-function-reference Retrieves the subpixel size of the display associated with a given window handle. ```c bool get_subp(WINDOW_HANDLE wnd, float* subp); ```