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

29 lines
823 B
JavaScript

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.Tilt = void 0;
const TiltAnimation_1 = require("./TiltAnimation");
const tsparticles_engine_1 = require("tsparticles-engine");
class Tilt extends tsparticles_engine_1.ValueWithRandom {
constructor() {
super();
this.animation = new TiltAnimation_1.TiltAnimation();
this.direction = "clockwise";
this.enable = false;
this.value = 0;
}
load(data) {
super.load(data);
if (!data) {
return;
}
this.animation.load(data.animation);
if (data.direction !== undefined) {
this.direction = data.direction;
}
if (data.enable !== undefined) {
this.enable = data.enable;
}
}
}
exports.Tilt = Tilt;