2023-02-17 11:06:01 +01:00

25 lines
663 B
JavaScript

import { ValueWithRandom } from "tsparticles-engine";
import { RotateAnimation } from "./RotateAnimation";
export class Rotate extends ValueWithRandom {
constructor() {
super();
this.animation = new RotateAnimation();
this.direction = "clockwise";
this.path = false;
this.value = 0;
}
load(data) {
if (!data) {
return;
}
super.load(data);
if (data.direction !== undefined) {
this.direction = data.direction;
}
this.animation.load(data.animation);
if (data.path !== undefined) {
this.path = data.path;
}
}
}