LCCObject::setMaxDistance
Sets the maximum rendering view distance.
A larger view distance provides better rendering results but increases performance overhead. Use this method to control rendering performance.
Version Requirement
SDK v0.4.0+
Engine Support
Three.js / CesiumJS
API
LCCObject::setMaxDistance(value: number): void
Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
value | number | Yes | 200 (PC) / 100 (Mobile) | View distance, in meters. |
Return Value
void
Usage Example
lccObject.setMaxDistance(100);
Notes
- This method can be called synchronously immediately after
LCCRender.load(). - This method only applies to LCC format; it is ignored when loading LCC2 format.
- Starting from SDK v0.5.0,
maxDistanceautomatically increases with the camera's altitude above the LCC model. - Typically used in conjunction with
setMaxSplats().
Related APIs
LCCObject::setMaxSplats()LCCObject::setMaxNodeSplats()