Appearance
ModelLabViewer
component · /viewerProps
| Prop | Type | Default | Description |
|---|---|---|---|
src | string | required | GLB or GLTF URL |
preset | ViewerExportPayload | — | Full editor export |
config | DeepPartial<ViewerConfig> | — | Overrides preset viewer values |
sequence | SequenceInput | — | Overrides stored sequence |
textureUrls | Record<string,string> | — | Replacement texture URL map |
playSequence | boolean | true when a sequence exists | Play by elapsed time |
sequenceProgress | number | — | Deterministic normalized progress |
sequenceLoop | boolean | sequence value | Loop override |
sequenceSpeed | number | sequence value | Speed override; negative reverses |
controls | boolean | true | Show OrbitControls behavior |
controlsWhilePlaying | boolean | false | Allow interaction during sequence |
autoFit | boolean | true without preset/sequence | Fit after loading |
dracoDecoderPath | string | /draco/ | Draco decoder directory |
resourcePath | string | — | Base for external GLTF resources |
dpr | `number | [number,number]` | [1, 2] |
effect | CinematicEffectConfig | — | Runtime material effect |
Events
onLoad(info)onError(error)onTextureError(textureName, error)onCameraChange(position, target)onSequenceFrame(time, snapshot)onSequenceComplete()
Ref methods
| Method | Result |
|---|---|
getModel() | Pivot-root THREE.Object3D or null |
getRenderer() | THREE.WebGLRenderer or null |
getCamera() | Active camera or null |
getPivot() | Local pivot tuple |
getPivotWorldPosition() | Current world pivot |
getBoundsCenter() | Imported local bounds center |
fitCamera() | Reframe model |
captureScreenshot() | PNG data URL or null |