@tsparticles/preset-squares 3.0.0-beta.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +194 -0
- package/browser/bundle.js +4 -0
- package/browser/index.js +14 -0
- package/browser/options.js +60 -0
- package/cjs/bundle.js +8 -0
- package/cjs/index.js +18 -0
- package/cjs/options.js +63 -0
- package/esm/bundle.js +4 -0
- package/esm/index.js +14 -0
- package/esm/options.js +60 -0
- package/package.json +100 -0
- package/report.html +39 -0
- package/tsparticles.preset.squares.bundle.js +6352 -0
- package/tsparticles.preset.squares.bundle.min.js +2 -0
- package/tsparticles.preset.squares.bundle.min.js.LICENSE.txt +1 -0
- package/tsparticles.preset.squares.js +363 -0
- package/tsparticles.preset.squares.min.js +2 -0
- package/tsparticles.preset.squares.min.js.LICENSE.txt +1 -0
- package/types/bundle.d.ts +3 -0
- package/types/index.d.ts +2 -0
- package/types/options.d.ts +2 -0
- package/umd/bundle.js +18 -0
- package/umd/index.js +28 -0
- package/umd/options.js +73 -0
package/umd/index.js
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
(function (factory) {
|
|
2
|
+
if (typeof module === "object" && typeof module.exports === "object") {
|
|
3
|
+
var v = factory(require, exports);
|
|
4
|
+
if (v !== undefined) module.exports = v;
|
|
5
|
+
}
|
|
6
|
+
else if (typeof define === "function" && define.amd) {
|
|
7
|
+
define(["require", "exports", "@tsparticles/plugin-emitters", "@tsparticles/updater-rotate", "@tsparticles/updater-size", "@tsparticles/shape-square", "@tsparticles/updater-stroke-color", "./options"], factory);
|
|
8
|
+
}
|
|
9
|
+
})(function (require, exports) {
|
|
10
|
+
"use strict";
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.loadSquaresPreset = void 0;
|
|
13
|
+
const plugin_emitters_1 = require("@tsparticles/plugin-emitters");
|
|
14
|
+
const updater_rotate_1 = require("@tsparticles/updater-rotate");
|
|
15
|
+
const updater_size_1 = require("@tsparticles/updater-size");
|
|
16
|
+
const shape_square_1 = require("@tsparticles/shape-square");
|
|
17
|
+
const updater_stroke_color_1 = require("@tsparticles/updater-stroke-color");
|
|
18
|
+
const options_1 = require("./options");
|
|
19
|
+
async function loadSquaresPreset(engine, refresh = true) {
|
|
20
|
+
await (0, plugin_emitters_1.loadEmittersPlugin)(engine, false);
|
|
21
|
+
await (0, shape_square_1.loadSquareShape)(engine, false);
|
|
22
|
+
await (0, updater_rotate_1.loadRotateUpdater)(engine, false);
|
|
23
|
+
await (0, updater_size_1.loadSizeUpdater)(engine, false);
|
|
24
|
+
await (0, updater_stroke_color_1.loadStrokeColorUpdater)(engine, false);
|
|
25
|
+
await engine.addPreset("squares", options_1.options, refresh);
|
|
26
|
+
}
|
|
27
|
+
exports.loadSquaresPreset = loadSquaresPreset;
|
|
28
|
+
});
|
package/umd/options.js
ADDED
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
(function (factory) {
|
|
2
|
+
if (typeof module === "object" && typeof module.exports === "object") {
|
|
3
|
+
var v = factory(require, exports);
|
|
4
|
+
if (v !== undefined) module.exports = v;
|
|
5
|
+
}
|
|
6
|
+
else if (typeof define === "function" && define.amd) {
|
|
7
|
+
define(["require", "exports"], factory);
|
|
8
|
+
}
|
|
9
|
+
})(function (require, exports) {
|
|
10
|
+
"use strict";
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.options = void 0;
|
|
13
|
+
exports.options = {
|
|
14
|
+
particles: {
|
|
15
|
+
stroke: {
|
|
16
|
+
width: 5,
|
|
17
|
+
color: {
|
|
18
|
+
value: [
|
|
19
|
+
"#5bc0eb",
|
|
20
|
+
"#fde74c",
|
|
21
|
+
"#9bc53d",
|
|
22
|
+
"#e55934",
|
|
23
|
+
"#fa7921",
|
|
24
|
+
"#2FF3E0",
|
|
25
|
+
"#F8D210",
|
|
26
|
+
"#FA26A0",
|
|
27
|
+
"#F51720",
|
|
28
|
+
],
|
|
29
|
+
},
|
|
30
|
+
},
|
|
31
|
+
shape: {
|
|
32
|
+
type: "square",
|
|
33
|
+
options: {
|
|
34
|
+
square: {
|
|
35
|
+
fill: false,
|
|
36
|
+
},
|
|
37
|
+
},
|
|
38
|
+
},
|
|
39
|
+
rotate: {
|
|
40
|
+
value: 0,
|
|
41
|
+
direction: "counter-clockwise",
|
|
42
|
+
animation: {
|
|
43
|
+
enable: true,
|
|
44
|
+
speed: 2,
|
|
45
|
+
sync: true,
|
|
46
|
+
},
|
|
47
|
+
},
|
|
48
|
+
size: {
|
|
49
|
+
value: { min: 1, max: 500 },
|
|
50
|
+
animation: {
|
|
51
|
+
enable: true,
|
|
52
|
+
startValue: "min",
|
|
53
|
+
speed: 60,
|
|
54
|
+
sync: true,
|
|
55
|
+
destroy: "max",
|
|
56
|
+
},
|
|
57
|
+
},
|
|
58
|
+
},
|
|
59
|
+
background: {
|
|
60
|
+
color: "#000",
|
|
61
|
+
},
|
|
62
|
+
emitters: {
|
|
63
|
+
position: {
|
|
64
|
+
y: 50,
|
|
65
|
+
x: 50,
|
|
66
|
+
},
|
|
67
|
+
rate: {
|
|
68
|
+
delay: 1,
|
|
69
|
+
quantity: 1,
|
|
70
|
+
},
|
|
71
|
+
},
|
|
72
|
+
};
|
|
73
|
+
});
|