UNPKG

@polygonjs/polygonjs

Version:

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

32 lines (31 loc) 707 B
"use strict"; import { TypedParam } from "./_Base"; import { ParamType } from "../poly/ParamType"; export class ButtonParam extends TypedParam { static type() { return ParamType.BUTTON; } defaultValueSerialized() { return this._default_value; } rawInputSerialized() { return this._raw_input; } valueSerialized() { return this.value; } _copyValue(param) { } static areRawInputEqual(raw_input1, raw_input2) { return true; } static areValuesEqual(val1, val2) { return true; } async pressButton() { if (this.node.isDirty() || this.node.cookController.isCooking()) { await this.node.compute(); } await this.options.executeCallback(); } }