@tsparticles/plugin-emitters-shape-canvas
Version:
tsParticles emitters shape canvas plugin
24 lines (23 loc) • 1.16 kB
JavaScript
(function (factory) {
if (typeof module === "object" && typeof module.exports === "object") {
var v = factory(require, exports);
if (v !== undefined) module.exports = v;
}
else if (typeof define === "function" && define.amd) {
define(["require", "exports", "./EmittersCanvasShape.js", "./Options/Classes/EmittersCanvasShapeOptions.js"], factory);
}
})(function (require, exports) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.EmittersCanvasShapeGenerator = void 0;
const EmittersCanvasShape_js_1 = require("./EmittersCanvasShape.js");
const EmittersCanvasShapeOptions_js_1 = require("./Options/Classes/EmittersCanvasShapeOptions.js");
class EmittersCanvasShapeGenerator {
generate(position, size, fill, options) {
const shapeOptions = new EmittersCanvasShapeOptions_js_1.EmittersCanvasShapeOptions();
shapeOptions.load(options);
return new EmittersCanvasShape_js_1.EmittersCanvasShape(position, size, fill, shapeOptions);
}
}
exports.EmittersCanvasShapeGenerator = EmittersCanvasShapeGenerator;
});