@tsparticles/updater-life
Version:
tsParticles particles life updater
17 lines (16 loc) • 465 B
JavaScript
import { isNull, loadProperty } from "@tsparticles/engine";
import { LifeDelay } from "./LifeDelay.js";
import { LifeDuration } from "./LifeDuration.js";
export class Life {
count = 0;
delay = new LifeDelay();
duration = new LifeDuration();
load(data) {
if (isNull(data)) {
return;
}
loadProperty(this, "count", data.count);
this.delay.load(data.delay);
this.duration.load(data.duration);
}
}