import { ConstructorForComponent, Event } from '@zcomponent/core'; import { AnimationState } from '@zcomponent/core/lib/animation/animationstate'; import { Keyframe } from '@zcomponent/core/lib/data'; import { Editor } from '@zcomponent/core/lib/editor'; declare enum ViewMode { Material = "Material", Wireframe = "Wireframe", Normals = "Normals", UV = "UV" } interface EditorPreferences { cameraPosition: [number, number, number]; cameraTarget: [number, number, number]; cameraZoom: number; grid: boolean; hideViewHelper?: boolean; activeCameraID: string | undefined; pinCamera?: boolean; lastSelectedCameraID?: string; nonUniformScaling?: boolean; showStats?: boolean; autoLight?: boolean; viewMode?: ViewMode; } export default class Preview { private _canvas; private _camera; private performanceStats; private _contextManager; private _childContextManager?; private _threeContext; private _raycaster; private _orbit; private _resizeObserver; private selectionBoxHelper; private _selection; private _inScopeProps?; private _component; private _pendingUpdate; private _helpersByObject; private _helpersGroup; private _mouseDownPosition; private _controls; private _toolbar; private _defaultEnvironment?; private _gridHelper; private _wireframeMaterial; private _normalMaterial; private _uvMaterial; onSelection?: (selection: { [id: string]: boolean; }) => {}; onSelectionEvent: Event<[{ [id: string]: boolean; }]>; onNodePropertyChange?: (nodeId: string, prop: string, isConstructorProp: boolean, val: any) => {}; onContextMenu?: (nodeId: string, mouseX: number, mouseY: number, initialPropsUnderRoot: { [id: string]: any; }, initialPropsUnderSelection: { [id: string]: any; }) => {}; onSnapshot?: (blob: Blob) => {}; onLayerClipTime?: (id: string, time: number) => void; onAnimationState?: (animationState: AnimationState | undefined) => void; onInstantValue?: (prop: string, values: { [id: string]: any; }) => void; private _animationStateDirty; private _lastLayerClipTimes; private _spotlightLayersByClipId; private _defaults?; private _preferences; private _filename?; private _selectionBounds; private _boundingBox; private _editSessionID?; private _snapshot; private viewHelper; private cameraPreviewRenderer; private _focusManager; constructor(editor?: Editor); private _updateStats; setEditSessionID(id: string): void; private setupCameraSelectionListener; private _takeScreenshot; private onCameraSelected; private cameraDeselected; private initializeSelectionBox; private onKeyDown; private onKeyUp; private _updateSelectionBounds; private _serializeFreeCamera; private _onTransformChange; private _onMouseMove; private _onMouseDown; private _isIDLocked; private onSelectedByBox; private _onMouseUp; private _findIDOfObject; private _findIDOfHTMLNode; private _findObjectById; private _findHTMLNodeById; private _onObject3DConstructed; private _onObject3DDisposed; private _onHTMLNodeConstructed; private _onHTMLNodeDisposed; private _onHTMLNodeClicked; setSelection(selection: { [id: string]: boolean; }, inScopeProps?: { [id: string]: boolean; }): void; private _changeSpace; private _isBaseInScope; private _isPartInScope; private _updateSelection; private updateTransformPermissions; update(c: ConstructorForComponent, filename?: string): void; private _updateIfNecessary; private _dispatchAnimationState; private _animationTick; setAnimationState(state: AnimationState): void; getAnimationState(): AnimationState | undefined; private _dirtyAnimationState; focus(f?: { [id: string]: boolean; }): void; functionCall(nodes: { [id: string]: boolean; }, name: string): void; destroy(): void; resize(): void; instantValue(prop: string, values: { [id: string]: any; }): void; instantTrackKeyframes(data: { [trackId: string]: { [id: string]: Keyframe; }; }): void; instantKeyframeValues(data: { [trackID: string]: { [keyframeID: string]: any; }; }): void; layerClipPlay(layerId: string | undefined, layerClipId: string | null, loop?: boolean): void; layerClipActivate(layerId: string | undefined, layerClipId: string | null, loop?: boolean): void; layerClipPause(layerClipId: string): void; layerClipQueue(layerId: string, layerClipId: string | null): void; layerClipSeek(layerClipId: string, ct: number): void; clipSpotlight(clipId: string | undefined): void; private _withLayerClip; setToolbarDOM(_dom: HTMLDivElement): void; private initToolbar; initViewHelper(): void; private _updateAutoEnvironment; private _serializationID; private _updateActiveCamera; private _updateCameras; private _updateViewModes; private _updateViewMode; setDefaults(d: EditorPreferences): void; private _serializePreferences; private _updateFromPreferences; private _updatePreviewCameraViewport; private _deserializePreferences; private _snapshotTimeout; private _scheduleSnapshot; } export {};