@tsparticles/editor
Version:
tsParticles Configuration Editor
25 lines (24 loc) • 853 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.ShapeOptionsEditor = void 0;
const object_gui_1 = require("object-gui");
const EditorBase_1 = require("../../../../EditorBase");
class ShapeOptionsEditor extends EditorBase_1.EditorBase {
constructor(particles) {
super(particles);
}
addToGroup(parent) {
this.group = parent.addGroup("shape", "Shape");
this.options = this.group.data;
this.addProperties();
}
addProperties() {
const selectType = this.group.addProperty("type", "Type", object_gui_1.EditorType.select).change(() => {
void this.particles().refresh();
});
for (const key of this.particles().shapeDrawers.keys()) {
selectType.addItem(key);
}
}
}
exports.ShapeOptionsEditor = ShapeOptionsEditor;