UNPKG

@polygonjs/polygonjs

Version:

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

55 lines (54 loc) 2.7 kB
import { NodeParamsConfig } from '../utils/params/ParamsConfig'; import { TypedEventNode } from './_Base'; import { ParamType } from '../../poly/ParamType'; import { EventContext } from '../../../core/event/EventContextType'; export declare enum SetParamParamType { BOOLEAN = "boolean", BUTTON = "button", NUMBER = "number", VECTOR2 = "vector2", VECTOR3 = "vector3", VECTOR4 = "vector4", STRING = "string" } declare class SetParamParamsConfig extends NodeParamsConfig { /** @param the parameter to update */ param: import("../utils/params/ParamsConfig").ParamTemplate<ParamType.PARAM_PATH>; /** @param type of the parameter to update */ type: import("../utils/params/ParamsConfig").ParamTemplate<ParamType.INTEGER>; /** @param for a boolean parameter, sets to toggle its value */ toggle: import("../utils/params/ParamsConfig").ParamTemplate<ParamType.BOOLEAN>; /** @param if toggle is set to off, this will set the value of the parameter */ boolean: import("../utils/params/ParamsConfig").ParamTemplate<ParamType.BOOLEAN>; /** @param param value for a float parameter */ number: import("../utils/params/ParamsConfig").ParamTemplate<ParamType.FLOAT>; /** @param param value for a vector2 parameter */ vector2: import("../utils/params/ParamsConfig").ParamTemplate<ParamType.VECTOR2>; /** @param param value for a vector3 parameter */ vector3: import("../utils/params/ParamsConfig").ParamTemplate<ParamType.VECTOR3>; /** @param param value for a vector4 parameter */ vector4: import("../utils/params/ParamsConfig").ParamTemplate<ParamType.VECTOR4>; /** @param if on, the value will be incremented by the value, as opposed to be set to the value */ increment: import("../utils/params/ParamsConfig").ParamTemplate<ParamType.BOOLEAN>; /** @param param value for a string parameter */ string: import("../utils/params/ParamsConfig").ParamTemplate<ParamType.STRING>; /** @param execute button to test the node */ execute: import("../utils/params/ParamsConfig").ParamTemplate<ParamType.BUTTON>; } export declare class SetParamEventNode extends TypedEventNode<SetParamParamsConfig> { paramsConfig: SetParamParamsConfig; static type(): string; initializeNode(): void; setParamType(paramType: SetParamParamType): void; processEvent(event_context: EventContext<Event>): Promise<void>; private _tmp_vector2; private _tmp_vector3; private _tmp_vector4; private _tmp_array2; private _tmp_array3; private _tmp_array4; private _newParamValue; static PARAM_CALLBACK_execute(node: SetParamEventNode): void; private _computeParamsIfDirty; } export {};