XGRIDSDocs
  • 简体中文
  • English
  • 繁體中文
  • 日本語
  • Deutsch
  • Español
  • Italiano
  • Français
  • Русский
  • 简体中文
  • English
  • 繁體中文
  • 日本語
  • Deutsch
  • Español
  • Italiano
  • Français
  • Русский
  • PortalCam

    • Product Overview
    • Basic Operation
    • Using the LCC Scan App
    • Maintenance and Care
    • FAQ
  • Lixel K Series

    • Lixel K1

      • Product Overview
      • Basic Operation
      • Device Activation and Connection
      • Scanning Workflow
      • Acquire Point Cloud Data with Absolute Coordinate
      • Map Fusion
      • Route Planning Suggestions for Typical Scenes
      • Precautions
      • FAQ
    • Lixel K2

      • Product Overview
      • Basic Operation
      • Device Activation and Connection
      • Scanning Workflow
      • Acquire Point Cloud Data with Absolute Coordinate
      • Map Fusion
      • Route Planning Suggestions for Typical Scenes
      • Precautions
      • FAQ
  • Lixel L Series

    • Lixel L2 Pro

      • Product Overview
      • Basic Operation
      • Device Activation and Connection
      • Scanning Workflow
      • Acquire Point Cloud Data with Absolute Coordinate
      • Measure Point
      • Appendix
      • FAQ
  • Accessories

    • Stick Light

      • Installation Guide
      • Basic Operation
      • FAQ
  • Lixel Studio

    • Version and Copyright
    • Installation and Activation
    • Software Interface
    • File Operations
    • Project Processing
    • Tools
    • 2D Drawing
    • Applications
    • Settings
    • Device Connection
  • Lixel CyberColor

    • LCC Studio

      • Getting Started
      • Version and Updates
      • Download and Installation
      • Interface Overview and Navigation
      • Before Reconstruction
      • Model Reconstruction
      • Single Model Reconstruction
      • Map Fusion
      • Aerial-Ground Fusion
      • Aerial Reconstruction
      • My Models
      • Other Features
      • Settings and Account
      • Converter
      • Video Reconstruction
      • FAQ
    • LCC Scene Editor

      • Version & Updates
      • Account & Login
      • Product Overview & Home
      • Editor Interface
      • Scene Navigation Modes
      • File
      • Settings
      • Edit Operations
      • Window
      • Global Toolbar
      • Assets & Properties
      • Left Toolbar
      • Viewpoints
      • Portal
      • Skybox
      • Annotations
      • Measurement
      • Flythrough
      • Scene Report
      • 3D Layout
      • Mini-Map
      • Preview Mode (Viewer)
      • Help
      • FAQ
      • Spawn Point
    • LCC Model Editor

      • Version and Updates
      • User Guide
      • Overview and Interface
      • File Operations
      • Selectors
      • Editing Models
      • Measurement
      • Color Grading
      • Asset Management
      • Settings and Help
      • FAQ
    • Capture Guide

      • Overview
      • Capture Devices Overview
      • General Capture Principles
      • Indoor Scene Capture
      • Outdoor Scene Capture
      • Large-Scale Capture (Map Fusion)
      • Aerial-Ground Map Fusion Capture
      • Object Capture
      • People Capture
      • Video Reconstruction Capture
      • HD Enhancement
      • Control Points (Lixel P1)
      • FAQ and Troubleshooting
    • LCC Studio Linux

      • Product Overview
      • Architecture Guide
      • Installation and Deployment Guide
      • Container Startup Parameters Guide
      • CodeMeter Offline Licensing Deployment Guide
      • API Reference
      • Appendix - Developer Data Guide
      • Appendix - Error Code List
      • Single-Machine Multi-GPU Cluster Deployment QuickStart
    • Version History
  • Plugin & SDK

    • Unreal

      • Introduction
      • Quick Start - Windows
      • Quick Start - Linux
      • Quick Start - Quest3
      • Editions and Licensing
      • Rendering
      • Visual Settings
      • Normals and Lighting
      • Scene Editing
      • Performance Parameters
      • Performance Guide
      • Third-party and Engine Plugin Integration
      • Proxy Mesh
      • Loading Animation
      • Collision
      • Navigation System Support
      • Single Layer Water Support
      • Localization
      • FAQ
      • Troubleshooting
      • Logging and Diagnostics
      • Contact Us
      • API Reference

        • ALCCActorBase
        • ULCCComponentBase
        • ULCCComponent
        • ULCC2Component
        • SOG / SPZ / PLY Actors
        • ALCC2ProxyMesh
        • ALCCClippingVolume
        • ALCCSectionPlane
        • ULCCUtilLibrary
        • Enums
        • Structs
      • Changelog

        • v3.3.1
        • v3.0.0
        • v2.2.1
        • v1.0.0
        • v0.9.0
        • v0.8.0
        • v0.7.1
        • v0.6.1
        • v0.5.2
        • v0.4.1
        • v0.4.0
        • v0.3.0
        • v0.0.5
        • v0.0.4
        • v0.0.3
        • v0.0.2
        • v0.0.1
    • Web

      • Introduction
      • Rendering Performance Optimization Guide
      • Graphics Configuration
      • FAQ
      • API Reference

        • LCCRender::clearIndexDB
        • LCCRender::dispose
        • LCCRender::load
        • LCCRender::setCamera
        • LCCRender::unload
        • LCCRender::update
        • LCCObject::checkRenderNextFrame
        • LCCObject::clearRenderNextFrame
        • LCCObject::ecef2Prj
        • LCCObject::getBounds
        • LCCObject::getEnvInstancedMesh
        • LCCObject::getInstancedMesh
        • LCCObject::getLodInfos
        • LCCObject::getOriginPosition
        • LCCObject::getProjectionCoordinateSystemInfos
        • LCCObject::hasCollision
        • LCCObject::hasEnvironment
        • LCCObject::hasShcoef
        • LCCObject::intersectsCapsule
        • LCCObject::intersectsRayExt
        • LCCObject::intersectsRayFromOriginExt
        • LCCObject::intersectsSphere
        • LCCObject::lowerToBottom
        • LCCObject::prj2Ecef
        • LCCObject::raiseToTop
        • LCCObject::raycast
        • LCCObject::raycastFromOrigin
        • LCCObject::setAlpha
        • LCCObject::setClipBox
        • LCCObject::setClipPlane
        • LCCObject::setEndLod
        • LCCObject::setLodAutoLevelUp
        • LCCObject::setMaxDistance
        • LCCObject::setMaxNodeSplats
        • LCCObject::setMaxSplats
        • LCCObject::setOriginPosition
        • LCCObject::setPointsColor
        • LCCObject::setRenderState
        • LCCObject::setRotation
        • LCCObject::setScale
        • LCCObject::setSemantic
        • LCCObject::setSemanticColor
        • LCCObject::setSmooth
        • LCCObject::setStartLod
        • LCCObject::setTranslation
        • LCCObject::setVisible
        • LCCObject::togglePointsDisplayMode
        • LCCObject::useEnvironment
        • LCCObject::useShcoef
      • Changelog

        • v0.6.3
        • v0.6.2
        • v0.6.1
        • v0.6.0
        • v0.5.5
        • v0.5.4
        • v0.5.3
        • v0.5.2
        • v0.5.1
        • v0.5.0
        • v0.4.1
        • v0.4.0
        • v0.3.1
        • v0.3.0
        • v0.2.0

LCCRender::load

Loads LCC data and returns an LCCObject.

The Web SDK supports Three.js and CesiumJS engines. Pass the corresponding engine parameters to load an LCC model.

Version Requirement

SDK v0.2.0+

Engine Support

Three.js / CesiumJS

API

LCCRender::load(param: LoadOptions, successFunc: SuccessFunc, progressFunc: ProgressFunc, failureFunc: FailureFunc, preProcessFunc?: PreProcessFunc): LCCObject

Parameters

param (Three.js)

ParameterTypeRequiredDefaultDescription
param.cameraTHREE.PerspectiveCamera / THREE.OrthographicCameraYes-Three.js camera object.
param.sceneTHREE.SceneYes-Three.js scene object.
param.renderLibTHREEYes-Three.js library reference, e.g., import * as THREE from 'three'.
param.renderLibWebgputypeof import('three/webgpu')No-Three.js WebGPU module reference, e.g., import * as THREE_WEBGPU from 'three/webgpu'.
param.renderLibTSLtypeof import('three/tsl')No-Three.js TSL module reference, e.g., import * as TSL from 'three/tsl'.
param.rendererTHREE.WebGLRendererYes-Three.js renderer.
param.dataPathString / ObjectYes-LCC data path. Supports string path (.lcc / .lcc2 / meta.lcc with token) or path descriptor object.
param.canvasHTMLCanvasElementYes-Canvas element for rendering, available via renderer.domElement.
param.appKeyStringNo-AppKey for removing the watermark.
param.useEnvBooleanNo-Whether to display environment data.
param.useIndexDBBooleanNotrueWhether to enable local data caching. SDK v0.5.0+
param.useLoadingEffectBooleanNofalseWhether to enable loading effects. SDK v0.5.1+
param.loadingEffectCenter{ x: number, y: number, z: number }No-Center position of the loading effect. SDK v0.5.1+
param.pointsColorStringNo'default'Point cloud display style: 'default' (original color) or 'rainbow' (elevation color).
param.modelMatrixTHREE.Matrix4No-Model matrix. SDK v0.5.2+
param.maxHostCacheSizenumberNo-Host cache size. SDK v0.5.4+
param.maxGpuCacheSizenumberNo-GPU cache size. SDK v0.5.4+
param.usePrecisionRaycastBooleanNotrue (PC)Enable high-precision raycasting. Enabled by default on PC; not supported on mobile. SDK v0.6.3+

param (CesiumJS)

ParameterTypeRequiredDefaultDescription
param.cameraCesium.CameraYes-Cesium camera object.
param.sceneCesium.SceneYes-Cesium scene object.
param.renderLibCesiumYes-CesiumJS library reference, e.g., import * as Cesium from 'cesium'.
param.dataPathString / ObjectYes-LCC data path. Supports string path (.lcc / .lcc2 / meta.lcc with token) or path descriptor object.
param.canvasHTMLCanvasElementYes-Canvas element for rendering, available via viewer.scene.canvas.
param.modelMatrixCesium.Matrix4No-Model transformation matrix. Not required for RTK georeferenced data.
param.appKeyStringNo-AppKey for removing the watermark.
param.useEnvBooleanNo-Whether to display environment data.
param.useIndexDBBooleanNotrueWhether to enable local data caching. SDK v0.5.0+
param.useLoadingEffectBooleanNofalseWhether to enable loading effects. SDK v0.5.1+
param.loadingEffectCenter{ x: number, y: number, z: number }No-Center position of the loading effect. SDK v0.5.1+
param.pointsColorStringNo'default'Point cloud display style: 'default' (original color) or 'rainbow' (elevation color).
param.maxHostCacheSizenumberNo-Host cache size. SDK v0.5.4+
param.maxGpuCacheSizenumberNo-GPU cache size. SDK v0.5.4+
param.usePrecisionRaycastBooleanNotrue (PC)Enable high-precision raycasting. Enabled by default on PC; not supported on mobile. SDK v0.6.3+

Callback Functions

ParameterTypeRequiredDescription
successFunc(model: any) => voidYesModel load success callback. Parameter is the constructed mesh.
progressFunc(progress: number) => voidYesModel load progress callback. Parameter is the percentage (0–1).
failureFunc() => voidYesModel load failure callback.
preProcessFunc(buffer: ArrayBuffer, filename: string) => Promise<{ data: ArrayBuffer; rawData: ArrayBuffer }>NoData pre-processing callback for processing data before rendering. SDK v0.5.0+

dataPath Format

dataPath supports two formats:

Option 1: String path (recommended)

Pass a string directly specifying the LCC data path:

  • Full .lcc file path, e.g., http://example.com/data/xxxx.lcc. SDK v0.4.1+ (recommended)
  • Full .lcc2 file path, e.g., http://example.com/data/xxxx.lcc2. SDK v0.6.0+ (recommended)
  • meta.lcc file path with token and other parameters for encrypted data scenarios, e.g., https://example.com/data/meta.lcc?token=xxx&other=xxx
  • Directory path requiring a meta.lcc file in the directory, e.g., https://example.com/data (deprecated)
const lccObject = LCCRender.load({
    // ...other params
    dataPath: 'http://example.com/data/xxxx.lcc',
}, successFunc, progressFunc, failureFunc);

Option 2: Path descriptor collection (SDK v0.5.0+)

Use an object to customize all file paths with encryption support, applicable to LCC format.

File path descriptor format:

{
    "fileName": {
        "url": "xxxxxxxxxxxx",
        "header": { "field1": "xxx", "field2": "yyy" }  // Optional, added to HTTP request headers
    }
}

Example:

const dataPath = {
    meta: { url: 'http://example.com/xxx/meta.lcc' },
    index: { url: 'http://example.com/xxx/index.bin' },
    data: { url: 'http://example.com/xxx/data.bin' },
    environment: { url: 'http://example.com/xxx/environment.bin' },
    collision: { url: 'http://example.com/xxx/collision.lci' },
    shcoef: { url: 'http://example.com/xxx/shcoef.bin' },
};

const lccObject = LCCRender.load({
    // ...other params
    dataPath: dataPath,
}, successFunc, progressFunc, failureFunc);

Return Value

LCCObject — LCC model object with interfaces for raycasting, clipping, render control, and more.

Notes

  • Three.js engine requires calling LCCRender.update() in the render loop.
  • The param.useSH parameter is deprecated; use the LCCObject.useShcoef() method instead.
  • The param.gpuAcceleration parameter is deprecated.
  • dataPath supports .lcc format (SDK v0.4.1+) and .lcc2 format (SDK v0.6.0+).

Related APIs

  • LCCRender::unload()
  • LCCRender::update()
  • LCCRender::dispose()
Prev
LCCRender::dispose
Next
LCCRender::setCamera