UNPKG

@tsparticles/plugin-emitters

Version:

tsParticles emitters plugin

19 lines (18 loc) 427 B
import { Fill, Stroke, isNull } from "@tsparticles/engine"; export class EmitterSpawn { fill; stroke; load(data) { if (isNull(data)) { return; } if (data.fill) { this.fill ??= new Fill(); this.fill.load(data.fill); } if (data.stroke) { this.stroke ??= new Stroke(); this.stroke.load(data.stroke); } } }