UNPKG

@tsparticles/editor

Version:

tsParticles Configuration Editor

35 lines (34 loc) 1.21 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.MotionOptionsEditor = void 0; const object_gui_1 = require("object-gui"); const EditorBase_1 = require("../../../EditorBase"); class MotionOptionsEditor extends EditorBase_1.EditorBase { constructor(particles) { super(particles); } addToGroup(parent) { this.group = parent.addGroup("motion", "Motion"); this.options = this.group.data; this.addReduce(); this.addProperties(); } addProperties() { this.group.addProperty("disable", "Disable", object_gui_1.EditorType.boolean).change(() => { void this.particles().refresh(); }); } addReduce() { const coverGroup = this.group.addGroup("reduce", "Reduce"); coverGroup .addProperty("factor", "Factor", object_gui_1.EditorType.number) .change(() => { void this.particles().refresh(); }) .step(1); coverGroup.addProperty("value", "Value", object_gui_1.EditorType.boolean).change(() => { void this.particles().refresh(); }); } } exports.MotionOptionsEditor = MotionOptionsEditor;