tsparticles
Version:
Porting of the abandoned Vincent Garreau's particles.js, converted in TypeScript. Added many new cool features and various bug fixes.
23 lines (22 loc) • 511 B
JavaScript
export class PolygonShape {
constructor() {
this.close = true;
this.fill = true;
this.sides = 5;
}
get nb_sides() {
return this.sides;
}
set nb_sides(value) {
this.sides = value;
}
load(data) {
var _a;
if (data !== undefined) {
const sides = (_a = data.sides) !== null && _a !== void 0 ? _a : data.nb_sides;
if (sides !== undefined) {
this.sides = sides;
}
}
}
}