Skip to content

ModelLabEditor

component · /editor

Props

PropTypeDescription
initialConfigDeepPartial<ViewerConfig>Initial authoring state
classNamestringRoot class name
styleCSSPropertiesRoot inline style
dracoDecoderPathstringDecoder directory
onConfigChange(config) => voidFull config change callback
onSequenceChange(sequence) => voidTimeline change callback
onModelLoaded(info) => voidLoaded asset information

Ref methods

MethodDescription
getConfig()Return current complete configuration
getPreset()Build the complete versioned export payload
setConfig(partial)Merge new values into current configuration
loadFiles(files)Load browser File objects
openFiles()Open the file picker
openFolder()Open the directory picker
fitCamera()Fit the active asset
reset()Restore initial configuration
captureScreenshot()Return PNG data URL
setPivot(point, options)Use exact local pivot
centerPivot(options)Use calculated bounds center; returns success
resetPivot(options)Restore imported origin

Export helpers

The editor entry point also exports createExportPayload() and createSequencePayload() for custom persistence workflows.

Released under the MIT License.