tsparticles
Version:
Porting of the abandoned Vincent Garreau's particles.js, converted in TypeScript. Added many new cool features and various bug fixes.
28 lines (27 loc) • 750 B
JavaScript
import { Color } from "./Color";
export class LineLinkedShadow {
constructor() {
this.blur = 5;
this.color = new Color();
this.enable = false;
this.color.value = "lime";
}
load(data) {
if (data !== undefined) {
if (data.blur !== undefined) {
this.blur = data.blur;
}
if (data.color !== undefined) {
if (typeof data.color === "string") {
this.color.value = data.color;
}
else {
this.color.load(data.color);
}
}
if (data.enable !== undefined) {
this.enable = data.enable;
}
}
}
}