threepipe
Version:
A modern 3D viewer framework built on top of three.js, written in TypeScript, designed to make creating high-quality, modular, and extensible 3D experiences on the web simple and enjoyable.
21 lines (19 loc) • 601 B
text/typescript
import {AViewerPluginSync, ThreeViewer} from '../../viewer'
import {serialize} from 'ts-browser-helpers'
import {RootScene} from '../../core'
export class SceneUiConfigPlugin extends AViewerPluginSync {
static readonly PluginType = 'SceneUiConfigPlugin'
enabled = true
serializeWithViewer = false
constructor() {
super()
this.uiConfig = {}
}
onAdded(viewer: ThreeViewer) {
super.onAdded(viewer)
this.uiConfig = viewer.scene.uiConfig
this._scene = viewer.scene
}
('scene')
protected _scene: RootScene | undefined
}