UNPKG

@tsparticles/editor

Version:

tsParticles Configuration Editor

24 lines (23 loc) 827 B
import { EditorType } from "object-gui"; import { EditorBase } from "../../../../EditorBase"; export class WobbleOptionsEditor extends EditorBase { constructor(particles) { super(particles); } addToGroup(parent) { this.group = parent.addGroup("wobble", "Wobble"); this.options = this.group.data; this.addProperties(); } addProperties() { this.group.addProperty("distance", "Distance", EditorType.number).change(() => { void this.particles().refresh(); }); this.group.addProperty("enable", "Enable", EditorType.boolean).change(() => { void this.particles().refresh(); }); this.group.addProperty("speed", "Speed", EditorType.number).change(() => { void this.particles().refresh(); }); } }