@tsparticles/plugin-emitters
Version:
tsParticles emitters plugin
18 lines (17 loc) • 530 B
JavaScript
import { deepExtend, isNull, loadProperty } from "@tsparticles/engine";
import { EmitterShapeReplace } from "./EmitterShapeReplace.js";
export class EmitterShape {
options = {};
replace = new EmitterShapeReplace();
type = "square";
load(data) {
if (isNull(data)) {
return;
}
if (data.options !== undefined) {
this.options = deepExtend({}, data.options ?? {});
}
this.replace.load(data.replace);
loadProperty(this, "type", data.type);
}
}