UNPKG

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.

72 lines 2.24 kB
import { Clock, EventDispatcher } from 'three'; import { ThreeViewer } from '../viewer'; import { UiObjectConfig } from 'uiconfig.js'; import { OnChangeDispatchEventType } from './browser-helpers'; export interface ViewerTimelineEventMap { start: object; stop: object; reset: object; update: object; resetOnEndChanged: OnChangeDispatchEventType<boolean>; stopOnEndChanged: OnChangeDispatchEventType<boolean>; endTimeChanged: OnChangeDispatchEventType<number>; } export declare class ViewerTimeline extends EventDispatcher<ViewerTimelineEventMap> { uiConfig: UiObjectConfig; protected _time: number; /** * Current time in secs */ get time(): number; /** * Set the current time and step a frame * @param value */ set time(value: number); /** * in secs */ delta: number; /** * Maximum time in secs. * This is used to limit the time in the timeline. * Set to 0 to disable the limit. */ endTime: number; /** * Reset the timeline time to 0 when the timeline ends. * It is applicable only when the timeline is running and `endTime` is set to a value greater than 0. * This can be used to loop the timeline. * @default true */ resetOnEnd: boolean; /** * Stop the timeline when it reaches the end. * This is applicable only when the timeline is running and `endTime` is set to a value greater than 0. * This can be used to stop the timeline when it reaches the end. * It is separate from `resetOnEnd`, the timeline is stopped and then reset when both are true. * @default false */ stopOnEnd: boolean; /** * Running state. */ running: boolean; /** * Returns true if the timeline is running or if it is set to step this/next frame. */ shouldRun(): boolean; protected _clock: Clock; private _start; private _stop; private _reset; private _step; start(): void; stop(): void; reset(): void; update(viewer: ThreeViewer): void; private _refreshParams; update2(_viewer: ThreeViewer): void; setTime(t: number, stepFrame?: boolean): void; } //# sourceMappingURL=ViewerTimeline.d.ts.map