LCCObject::setEndLod
Sets the highest LOD level to use.
For example, if the LCC model's highest LOD level is LOD6, but holes appear when viewing from a distance, call setEndLod(5) to lower the maximum rendering LOD from LOD6 to LOD5, eliminating the holes.
Version Requirement
SDK v0.5.0+
Engine Support
Three.js / CesiumJS
API
LCCObject::setEndLod(value: number): void
Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
value | number | Yes | - | Maximum allowed LOD level. |
Return Value
void
Usage Example
const lods = lccObject.getLodInfos();
// lods = [12385554, 5872608, 2838509, 1377826, 664160]
// 5 LOD levels in total
// Set the highest LOD rendering level to LOD3
lccObject.setEndLod(lods.length - 2);
Notes
- This method can be called synchronously immediately after
LCCRender.load(). - Some models exhibit noticeable holes at higher LOD levels; limiting the maximum LOD level avoids this issue.
Related APIs
LCCObject::setStartLod()LCCObject::getLodInfos()