@tsparticles/plugin-emitters-shape-canvas
Version:
tsParticles emitters shape canvas plugin
29 lines (28 loc) • 890 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.TextOptions = void 0;
const engine_1 = require("@tsparticles/engine");
const TextFontOptions_js_1 = require("./TextFontOptions.js");
const TextLinesOptions_js_1 = require("./TextLinesOptions.js");
class TextOptions {
constructor() {
this.color = "#000000";
this.font = new TextFontOptions_js_1.TextFontOptions();
this.lines = new TextLinesOptions_js_1.TextLinesOptions();
this.text = "";
}
load(data) {
if ((0, engine_1.isNull)(data)) {
return;
}
if (data.color !== undefined) {
this.color = data.color;
}
this.font.load(data.font);
this.lines.load(data.lines);
if (data.text !== undefined) {
this.text = data.text;
}
}
}
exports.TextOptions = TextOptions;