UNPKG

@tsparticles/interaction-external-grab

Version:

tsParticles grab external interaction

30 lines (29 loc) 719 B
import { OptionsColor, isNull } from "@tsparticles/engine"; export class GrabLinks { blink; color; consent; opacity; constructor() { this.blink = false; this.consent = false; this.opacity = 1; } load(data) { if (isNull(data)) { return; } if (data.blink !== undefined) { this.blink = data.blink; } if (data.color !== undefined) { this.color = OptionsColor.create(this.color, data.color); } if (data.consent !== undefined) { this.consent = data.consent; } if (data.opacity !== undefined) { this.opacity = data.opacity; } } }