UNPKG

@tsparticles/updater-rotate

Version:

tsParticles particles rotate updater

17 lines (16 loc) 555 B
import { RotateDirection, ValueWithRandom, isNull, loadProperty, } from "@tsparticles/engine"; import { RotateAnimation } from "./RotateAnimation.js"; export class Rotate extends ValueWithRandom { animation = new RotateAnimation(); direction = RotateDirection.clockwise; path = false; load(data) { if (isNull(data)) { return; } super.load(data); loadProperty(this, "direction", data.direction); this.animation.load(data.animation); loadProperty(this, "path", data.path); } }