UNPKG

@polygonjs/polygonjs

Version:

node-based WebGL 3D engine https://polygonjs.com

57 lines (56 loc) 3.31 kB
import { NodeParamsConfig } from '../utils/params/ParamsConfig'; import { TypedEventNode } from './_Base'; import { EventContext } from '../../../core/event/EventContextType'; declare enum EventName { CREATED = "created", READY = "ready", PLAY = "play", PAUSE = "pause" } export declare const ACCEPTED_EVENT_TYPES: EventName[]; declare class SceneEventParamsConfig extends NodeParamsConfig { /** @param toggle on to allow any event to be listened to */ active: import("../utils/params/ParamsConfig").ParamTemplate<import("../../index_all").ParamType.BOOLEAN>; /** @param set which element triggers the event */ element: import("../utils/params/ParamsConfig").ParamTemplate<import("../../index_all").ParamType.INTEGER>; /** @param toggle on to trigger an event when the scene has been created. This can be useful to initialize other nodes */ created: import("../utils/params/ParamsConfig").ParamTemplate<import("../../index_all").ParamType.BOOLEAN>; /** @param toggle on to trigger an event when every object in the scene has been loaded. This can be useful to initialize other nodes */ ready: import("../utils/params/ParamsConfig").ParamTemplate<import("../../index_all").ParamType.BOOLEAN>; /** @param toggle on to trigger an event when the scene starts playing */ play: import("../utils/params/ParamsConfig").ParamTemplate<import("../../index_all").ParamType.BOOLEAN>; /** @param toggle on to trigger an event when the scene pauses */ pause: import("../utils/params/ParamsConfig").ParamTemplate<import("../../index_all").ParamType.BOOLEAN>; /** @param toggle on to trigger an event on every tick */ tick: import("../utils/params/ParamsConfig").ParamTemplate<import("../../index_all").ParamType.BOOLEAN>; /** @param toggle on to trigger an event on every tick */ treachedTime: import("../utils/params/ParamsConfig").ParamTemplate<import("../../index_all").ParamType.BOOLEAN>; /** @param time to trigger an event */ reachedTime: import("../utils/params/ParamsConfig").ParamTemplate<import("../../index_all").ParamType.FLOAT>; /** @param frame to set */ setFrameValue: import("../utils/params/ParamsConfig").ParamTemplate<import("../../index_all").ParamType.INTEGER>; /** @param button to set a specific frame */ setFrame: import("../utils/params/ParamsConfig").ParamTemplate<import("../../index_all").ParamType.BUTTON>; } export declare class SceneEventNode extends TypedEventNode<SceneEventParamsConfig> { paramsConfig: SceneEventParamsConfig; static type(): string; private _graphNode; dispose(): void; initializeNode(): void; processEvent(eventContext: EventContext<Event>): Promise<void> | undefined; private _onSetFrame; private _play; private _pause; private _timeReached; private _onTickCheckTimeReached; private _onTickEvent; private _updateTimeDependency; private _buildOnTickCallback; static PARAM_CALLBACK_setFrame(node: SceneEventNode): void; static PARAM_CALLBACK_updateTimeDependency(node: SceneEventNode): void; static PARAM_CALLBACK_updateSceneEventsController(node: SceneEventNode): void; static PARAM_CALLBACK_updateActiveState(node: SceneEventNode): void; private _updateSceneEventsController; } export {};