UNPKG

@tsparticles/plugin-motion

Version:

tsParticles motion sickness plugin

18 lines (17 loc) 430 B
import { isNull } from "@tsparticles/engine"; import { MotionReduce } from "./MotionReduce.js"; export class Motion { constructor() { this.disable = true; this.reduce = new MotionReduce(); } load(data) { if (isNull(data)) { return; } if (data.disable !== undefined) { this.disable = data.disable; } this.reduce.load(data.reduce); } }