LCCObject::useShcoef
Enables or disables spherical harmonics rendering.
The first time SH rendering is enabled, there will be a loading period. To use SH rendering from the start, call this method synchronously immediately after model loading.
Version Requirement
SDK v0.2.0+
Engine Support
Three.js / CesiumJS
API
LCCObject::useShcoef(value: boolean, loadingCallback?: Function): void
Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
value | boolean | Yes | - | true enables SH rendering; false disables it. |
loadingCallback | Function | No | - | SH data loading progress callback. Parameter is percentage (0–1). |
Return Value
void
Usage Example
// Enable spherical harmonics rendering
lccObject.useShcoef(true, (percent) => {
console.log('loading ' + (percent * 100).toFixed(1) + '%');
});
// Disable spherical harmonics rendering
lccObject.useShcoef(false);
Notes
- This method can be called synchronously immediately after
LCCRender.load(). - The first time SH rendering is enabled, additional data needs to be loaded, which may take some time.
- Enabling SH rendering enhances the lighting details and improves the rendering quality of LCC scenes.
Related APIs
LCCObject::hasShcoef()