@tsparticles/simplex-noise 4.0.5 → 4.1.0
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/browser/Classes/SimplexNoise2D.js +40 -40
- package/browser/Classes/SimplexNoise3D.js +42 -42
- package/browser/Classes/SimplexNoise4D.js +47 -47
- package/cjs/Classes/SimplexNoise2D.js +40 -40
- package/cjs/Classes/SimplexNoise3D.js +42 -42
- package/cjs/Classes/SimplexNoise4D.js +47 -47
- package/esm/Classes/SimplexNoise2D.js +40 -40
- package/esm/Classes/SimplexNoise3D.js +42 -42
- package/esm/Classes/SimplexNoise4D.js +47 -47
- package/package.json +1 -1
- package/report.html +1 -1
- package/tsparticles.simplex.noise.js +130 -130
- package/tsparticles.simplex.noise.min.js +1 -1
- package/types/Classes/SimplexNoise2D.d.ts +1 -11
- package/types/Classes/SimplexNoise3D.d.ts +1 -11
- package/types/Classes/SimplexNoise4D.d.ts +1 -11
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
(function(g){g.__tsParticlesInternals=g.__tsParticlesInternals||{};g.__tsParticlesInternals.bundles=g.__tsParticlesInternals.bundles||{};g.__tsParticlesInternals.effects=g.__tsParticlesInternals.effects||{};g.__tsParticlesInternals.engine=g.__tsParticlesInternals.engine||{};g.__tsParticlesInternals.interactions=g.__tsParticlesInternals.interactions||{};g.__tsParticlesInternals.palettes=g.__tsParticlesInternals.palettes||{};g.__tsParticlesInternals.paths=g.__tsParticlesInternals.paths||{};g.__tsParticlesInternals.plugins=g.__tsParticlesInternals.plugins||{};g.__tsParticlesInternals.plugins=g.__tsParticlesInternals.plugins||{};g.__tsParticlesInternals.plugins.emittersShapes=g.__tsParticlesInternals.plugins.emittersShapes||{};g.__tsParticlesInternals.presets=g.__tsParticlesInternals.presets||{};g.__tsParticlesInternals.shapes=g.__tsParticlesInternals.shapes||{};g.__tsParticlesInternals.updaters=g.__tsParticlesInternals.updaters||{};g.__tsParticlesInternals.utils=g.__tsParticlesInternals.utils||{};g.__tsParticlesInternals.canvas=g.__tsParticlesInternals.canvas||{};g.__tsParticlesInternals.canvas=g.__tsParticlesInternals.canvas||{};g.__tsParticlesInternals.canvas.utils=g.__tsParticlesInternals.canvas.utils||{};g.__tsParticlesInternals.path=g.__tsParticlesInternals.path||{};g.__tsParticlesInternals.path=g.__tsParticlesInternals.path||{};g.__tsParticlesInternals.path.utils=g.__tsParticlesInternals.path.utils||{};var __tsProxyFactory=typeof Proxy!=="undefined"?function(obj){return new Proxy(obj,{get:function(target,key){if(!(key in target)){target[key]={};}return target[key];}});}:function(obj){return obj;};g.__tsParticlesInternals.bundles=__tsProxyFactory(g.__tsParticlesInternals.bundles);g.__tsParticlesInternals.effects=__tsProxyFactory(g.__tsParticlesInternals.effects);g.__tsParticlesInternals.interactions=__tsProxyFactory(g.__tsParticlesInternals.interactions);g.__tsParticlesInternals.palettes=__tsProxyFactory(g.__tsParticlesInternals.palettes);g.__tsParticlesInternals.paths=__tsProxyFactory(g.__tsParticlesInternals.paths);g.__tsParticlesInternals.plugins=__tsProxyFactory(g.__tsParticlesInternals.plugins);g.__tsParticlesInternals.plugins.emittersShapes=__tsProxyFactory(g.__tsParticlesInternals.plugins.emittersShapes);g.__tsParticlesInternals.presets=__tsProxyFactory(g.__tsParticlesInternals.presets);g.__tsParticlesInternals.shapes=__tsProxyFactory(g.__tsParticlesInternals.shapes);g.__tsParticlesInternals.updaters=__tsProxyFactory(g.__tsParticlesInternals.updaters);g.__tsParticlesInternals.utils=__tsProxyFactory(g.__tsParticlesInternals.utils);g.__tsParticlesInternals.canvas=__tsProxyFactory(g.__tsParticlesInternals.canvas);g.__tsParticlesInternals.path=__tsProxyFactory(g.__tsParticlesInternals.path);g.tsparticlesInternalExports=g.tsparticlesInternalExports||{};})(typeof globalThis!=="undefined"?globalThis:typeof window!=="undefined"?window:this);
|
|
2
|
-
/* Utility v4.0
|
|
2
|
+
/* Utility v4.1.0 */
|
|
3
3
|
(function (global, factory) {
|
|
4
4
|
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
|
|
5
5
|
typeof define === 'function' && define.amd ? define(['exports'], factory) :
|
|
@@ -14,25 +14,25 @@
|
|
|
14
14
|
|
|
15
15
|
const half = 0.5;
|
|
16
16
|
class SimplexNoise2D {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
17
|
+
#NORM_2D;
|
|
18
|
+
#SQUISH_2D;
|
|
19
|
+
#STRETCH_2D;
|
|
20
|
+
#base2D;
|
|
21
|
+
#gradients2D;
|
|
22
|
+
#lookup;
|
|
23
|
+
#lookupPairs2D;
|
|
24
|
+
#p2D;
|
|
25
|
+
#perm;
|
|
26
|
+
#perm2D;
|
|
27
27
|
constructor() {
|
|
28
|
-
this
|
|
29
|
-
this
|
|
30
|
-
this
|
|
31
|
-
this
|
|
28
|
+
this.#NORM_2D = 1 / 47;
|
|
29
|
+
this.#SQUISH_2D = (Math.sqrt(2 + 1) - 1) * half;
|
|
30
|
+
this.#STRETCH_2D = (1 / Math.sqrt(2 + 1) - 1) * half;
|
|
31
|
+
this.#base2D = [
|
|
32
32
|
[1, 1, 0, 1, 0, 1, 0, 0, 0],
|
|
33
33
|
[1, 1, 0, 1, 0, 1, 2, 1, 1],
|
|
34
34
|
];
|
|
35
|
-
this
|
|
35
|
+
this.#gradients2D = [
|
|
36
36
|
5,
|
|
37
37
|
2,
|
|
38
38
|
2,
|
|
@@ -50,8 +50,8 @@
|
|
|
50
50
|
-2,
|
|
51
51
|
-5,
|
|
52
52
|
];
|
|
53
|
-
this
|
|
54
|
-
this
|
|
53
|
+
this.#lookup = [];
|
|
54
|
+
this.#lookupPairs2D = [
|
|
55
55
|
0,
|
|
56
56
|
1,
|
|
57
57
|
1,
|
|
@@ -77,7 +77,7 @@
|
|
|
77
77
|
43,
|
|
78
78
|
3,
|
|
79
79
|
];
|
|
80
|
-
this
|
|
80
|
+
this.#p2D = [
|
|
81
81
|
0,
|
|
82
82
|
0,
|
|
83
83
|
1,
|
|
@@ -103,29 +103,29 @@
|
|
|
103
103
|
0,
|
|
104
104
|
0,
|
|
105
105
|
];
|
|
106
|
-
this
|
|
107
|
-
this
|
|
106
|
+
this.#perm = new Uint8Array(256);
|
|
107
|
+
this.#perm2D = new Uint8Array(256);
|
|
108
108
|
}
|
|
109
109
|
noise(x, y) {
|
|
110
|
-
const
|
|
110
|
+
const gradients2D = this.#gradients2D, NORM_2D = this.#NORM_2D, SQUISH_2D = this.#SQUISH_2D, STRETCH_2D = this.#STRETCH_2D, lookup = this.#lookup, perm = this.#perm, perm2D = this.#perm2D, stretchOffset = (x + y) * STRETCH_2D, xs = x + stretchOffset, ys = y + stretchOffset, xsb = Math.floor(xs), ysb = Math.floor(ys), squishOffset = (xsb + ysb) * SQUISH_2D, dx0 = x - (xsb + squishOffset), dy0 = y - (ysb + squishOffset), xins = xs - xsb, yins = ys - ysb, inSum = xins + yins, hash = (xins - yins + 1) | (inSum << 1) | ((inSum + yins) << 2) | ((inSum + xins) << 4);
|
|
111
111
|
let value = 0;
|
|
112
|
-
for (let c =
|
|
112
|
+
for (let c = lookup[hash]; c !== undefined; c = c.next) {
|
|
113
113
|
const dx = dx0 + c.dx, dy = dy0 + c.dy, attn = 2 - dx * dx - dy * dy;
|
|
114
114
|
if (attn <= 0) {
|
|
115
115
|
continue;
|
|
116
116
|
}
|
|
117
|
-
const px = xsb + c.xsb, py = ysb + c.ysb, indexPartA =
|
|
117
|
+
const px = xsb + c.xsb, py = ysb + c.ysb, indexPartA = perm[px & 0xff], index = perm2D[(indexPartA + py) & 0xff], valuePart = gradients2D[index] * dx + gradients2D[index + 1] * dy;
|
|
118
118
|
value += attn * attn * attn * attn * valuePart;
|
|
119
119
|
}
|
|
120
|
-
return value *
|
|
120
|
+
return value * NORM_2D;
|
|
121
121
|
}
|
|
122
122
|
seed(clientSeed) {
|
|
123
|
-
const
|
|
124
|
-
for (let i = 0; i <
|
|
125
|
-
const baseSet =
|
|
123
|
+
const p2D = this.#p2D, base2D = this.#base2D, lookupPairs2D = this.#lookupPairs2D, contributions = [];
|
|
124
|
+
for (let i = 0; i < p2D.length; i += 4) {
|
|
125
|
+
const baseSet = base2D[p2D[i]];
|
|
126
126
|
let previous = null, current = null;
|
|
127
127
|
for (let k = 0; k < baseSet.length; k += 3) {
|
|
128
|
-
current = this
|
|
128
|
+
current = this.#contribution2D(baseSet[k], baseSet[k + 1], baseSet[k + 2]);
|
|
129
129
|
if (previous === null) {
|
|
130
130
|
contributions[i / 4] = current;
|
|
131
131
|
}
|
|
@@ -135,15 +135,15 @@
|
|
|
135
135
|
previous = current;
|
|
136
136
|
}
|
|
137
137
|
if (current) {
|
|
138
|
-
current.next = this
|
|
138
|
+
current.next = this.#contribution2D(p2D[i + 1], p2D[i + 2], p2D[i + 3]);
|
|
139
139
|
}
|
|
140
140
|
}
|
|
141
|
-
this
|
|
142
|
-
for (let i = 0; i <
|
|
143
|
-
this
|
|
141
|
+
this.#lookup = [];
|
|
142
|
+
for (let i = 0; i < lookupPairs2D.length; i += 2) {
|
|
143
|
+
this.#lookup[lookupPairs2D[i]] = contributions[lookupPairs2D[i + 1]];
|
|
144
144
|
}
|
|
145
|
-
this
|
|
146
|
-
this
|
|
145
|
+
this.#perm = new Uint8Array(256);
|
|
146
|
+
this.#perm2D = new Uint8Array(256);
|
|
147
147
|
const source = new Uint8Array(256);
|
|
148
148
|
for (let i = 0; i < 256; i++) {
|
|
149
149
|
source[i] = i;
|
|
@@ -158,16 +158,16 @@
|
|
|
158
158
|
if (r[0] < 0) {
|
|
159
159
|
r[0] += i + 1;
|
|
160
160
|
}
|
|
161
|
-
this
|
|
162
|
-
this
|
|
161
|
+
this.#perm[i] = source[r[0]];
|
|
162
|
+
this.#perm2D[i] = this.#perm[i] & 0x0e;
|
|
163
163
|
source[r[0]] = source[i];
|
|
164
164
|
}
|
|
165
165
|
}
|
|
166
|
-
|
|
167
|
-
const
|
|
166
|
+
#contribution2D(multiplier, xsb, ysb) {
|
|
167
|
+
const SQUISH_2D = this.#SQUISH_2D;
|
|
168
168
|
return {
|
|
169
|
-
dx: -xsb - multiplier *
|
|
170
|
-
dy: -ysb - multiplier *
|
|
169
|
+
dx: -xsb - multiplier * SQUISH_2D,
|
|
170
|
+
dy: -ysb - multiplier * SQUISH_2D,
|
|
171
171
|
xsb,
|
|
172
172
|
ysb,
|
|
173
173
|
};
|
|
@@ -176,26 +176,26 @@
|
|
|
176
176
|
|
|
177
177
|
const third = 1 / 3;
|
|
178
178
|
class SimplexNoise3D {
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
179
|
+
#NORM_3D;
|
|
180
|
+
#SQUISH_3D;
|
|
181
|
+
#STRETCH_3D;
|
|
182
|
+
#base3D;
|
|
183
|
+
#gradients3D;
|
|
184
|
+
#lookup;
|
|
185
|
+
#lookupPairs3D;
|
|
186
|
+
#p3D;
|
|
187
|
+
#perm;
|
|
188
|
+
#perm3D;
|
|
189
189
|
constructor() {
|
|
190
|
-
this
|
|
191
|
-
this
|
|
192
|
-
this
|
|
193
|
-
this
|
|
190
|
+
this.#NORM_3D = 1 / 103;
|
|
191
|
+
this.#SQUISH_3D = (Math.sqrt(3 + 1) - 1) * third;
|
|
192
|
+
this.#STRETCH_3D = (1 / Math.sqrt(3 + 1) - 1) * third;
|
|
193
|
+
this.#base3D = [
|
|
194
194
|
[0, 0, 0, 0, 1, 1, 0, 0, 1, 0, 1, 0, 1, 0, 0, 1],
|
|
195
195
|
[2, 1, 1, 0, 2, 1, 0, 1, 2, 0, 1, 1, 3, 1, 1, 1],
|
|
196
196
|
[1, 1, 0, 0, 1, 0, 1, 0, 1, 0, 0, 1, 2, 1, 1, 0, 2, 1, 0, 1, 2, 0, 1, 1],
|
|
197
197
|
];
|
|
198
|
-
this
|
|
198
|
+
this.#gradients3D = [
|
|
199
199
|
-11,
|
|
200
200
|
4,
|
|
201
201
|
4,
|
|
@@ -269,8 +269,8 @@
|
|
|
269
269
|
-4,
|
|
270
270
|
-11,
|
|
271
271
|
];
|
|
272
|
-
this
|
|
273
|
-
this
|
|
272
|
+
this.#lookup = [];
|
|
273
|
+
this.#lookupPairs3D = [
|
|
274
274
|
0,
|
|
275
275
|
2,
|
|
276
276
|
1,
|
|
@@ -416,7 +416,7 @@
|
|
|
416
416
|
2039,
|
|
417
417
|
6,
|
|
418
418
|
];
|
|
419
|
-
this
|
|
419
|
+
this.#p3D = [
|
|
420
420
|
0,
|
|
421
421
|
0,
|
|
422
422
|
1,
|
|
@@ -634,11 +634,11 @@
|
|
|
634
634
|
2,
|
|
635
635
|
0,
|
|
636
636
|
];
|
|
637
|
-
this
|
|
638
|
-
this
|
|
637
|
+
this.#perm = new Uint8Array(256);
|
|
638
|
+
this.#perm3D = new Uint8Array(256);
|
|
639
639
|
}
|
|
640
640
|
noise(x, y, z) {
|
|
641
|
-
const
|
|
641
|
+
const STRETCH_3D = this.#STRETCH_3D, NORM_3D = this.#NORM_3D, SQUISH_3D = this.#SQUISH_3D, lookup = this.#lookup, perm = this.#perm, perm3D = this.#perm3D, gradients3D = this.#gradients3D, stretchOffset = (x + y + z) * STRETCH_3D, xs = x + stretchOffset, ys = y + stretchOffset, zs = z + stretchOffset, xsb = Math.floor(xs), ysb = Math.floor(ys), zsb = Math.floor(zs), squishOffset = (xsb + ysb + zsb) * SQUISH_3D, dx0 = x - (xsb + squishOffset), dy0 = y - (ysb + squishOffset), dz0 = z - (zsb + squishOffset), xins = xs - xsb, yins = ys - ysb, zins = zs - zsb, inSum = xins + yins + zins, hash = (yins - zins + 1) |
|
|
642
642
|
((xins - yins + 1) << 1) |
|
|
643
643
|
((xins - zins + 1) << 2) |
|
|
644
644
|
(inSum << 3) |
|
|
@@ -646,22 +646,22 @@
|
|
|
646
646
|
((inSum + yins) << 7) |
|
|
647
647
|
((inSum + xins) << 9);
|
|
648
648
|
let value = 0;
|
|
649
|
-
for (let c =
|
|
649
|
+
for (let c = lookup[hash]; c !== undefined; c = c.next) {
|
|
650
650
|
const dx = dx0 + c.dx, dy = dy0 + c.dy, dz = dz0 + c.dz, attn = 2 - dx * dx - dy * dy - dz * dz;
|
|
651
651
|
if (attn > 0) {
|
|
652
|
-
const px = xsb + c.xsb, py = ysb + c.ysb, pz = zsb + c.zsb, indexPartA =
|
|
652
|
+
const px = xsb + c.xsb, py = ysb + c.ysb, pz = zsb + c.zsb, indexPartA = perm[px & 0xff], indexPartB = perm[(indexPartA + py) & 0xff], index = perm3D[(indexPartB + pz) & 0xff], valuePart = gradients3D[index] * dx + gradients3D[index + 1] * dy + gradients3D[index + 2] * dz;
|
|
653
653
|
value += attn * attn * attn * attn * valuePart;
|
|
654
654
|
}
|
|
655
655
|
}
|
|
656
|
-
return value *
|
|
656
|
+
return value * NORM_3D;
|
|
657
657
|
}
|
|
658
658
|
seed(clientSeed) {
|
|
659
|
-
const
|
|
660
|
-
for (let i = 0; i <
|
|
661
|
-
const baseSet =
|
|
659
|
+
const base3D = this.#base3D, lookupPairs3D = this.#lookupPairs3D, p3D = this.#p3D, contributions = [];
|
|
660
|
+
for (let i = 0; i < p3D.length; i += 9) {
|
|
661
|
+
const baseSet = base3D[p3D[i]];
|
|
662
662
|
let previous = null, current = null;
|
|
663
663
|
for (let k = 0; k < baseSet.length; k += 4) {
|
|
664
|
-
current = this
|
|
664
|
+
current = this.#contribution3D(baseSet[k], baseSet[k + 1], baseSet[k + 2], baseSet[k + 3]);
|
|
665
665
|
if (previous === null) {
|
|
666
666
|
contributions[i / 9] = current;
|
|
667
667
|
}
|
|
@@ -671,16 +671,16 @@
|
|
|
671
671
|
previous = current;
|
|
672
672
|
}
|
|
673
673
|
if (current) {
|
|
674
|
-
current.next = this
|
|
675
|
-
current.next.next = this
|
|
674
|
+
current.next = this.#contribution3D(p3D[i + 1], p3D[i + 2], p3D[i + 3], p3D[i + 4]);
|
|
675
|
+
current.next.next = this.#contribution3D(p3D[i + 5], p3D[i + 6], p3D[i + 7], p3D[i + 8]);
|
|
676
676
|
}
|
|
677
677
|
}
|
|
678
|
-
this
|
|
679
|
-
for (let i = 0; i <
|
|
680
|
-
this
|
|
678
|
+
this.#lookup = [];
|
|
679
|
+
for (let i = 0; i < lookupPairs3D.length; i += 2) {
|
|
680
|
+
this.#lookup[lookupPairs3D[i]] = contributions[lookupPairs3D[i + 1]];
|
|
681
681
|
}
|
|
682
|
-
this
|
|
683
|
-
this
|
|
682
|
+
this.#perm = new Uint8Array(256);
|
|
683
|
+
this.#perm3D = new Uint8Array(256);
|
|
684
684
|
const source = new Uint8Array(256);
|
|
685
685
|
for (let i = 0; i < 256; i++) {
|
|
686
686
|
source[i] = i;
|
|
@@ -695,17 +695,17 @@
|
|
|
695
695
|
if (r[0] < 0) {
|
|
696
696
|
r[0] += i + 1;
|
|
697
697
|
}
|
|
698
|
-
this
|
|
699
|
-
this
|
|
698
|
+
this.#perm[i] = source[r[0]];
|
|
699
|
+
this.#perm3D[i] = (this.#perm[i] % 24) * 3;
|
|
700
700
|
source[r[0]] = source[i];
|
|
701
701
|
}
|
|
702
702
|
}
|
|
703
|
-
|
|
704
|
-
const
|
|
703
|
+
#contribution3D(multiplier, xsb, ysb, zsb) {
|
|
704
|
+
const SQUISH_3D = this.#SQUISH_3D;
|
|
705
705
|
return {
|
|
706
|
-
dx: -xsb - multiplier *
|
|
707
|
-
dy: -ysb - multiplier *
|
|
708
|
-
dz: -zsb - multiplier *
|
|
706
|
+
dx: -xsb - multiplier * SQUISH_3D,
|
|
707
|
+
dy: -ysb - multiplier * SQUISH_3D,
|
|
708
|
+
dz: -zsb - multiplier * SQUISH_3D,
|
|
709
709
|
xsb,
|
|
710
710
|
ysb,
|
|
711
711
|
zsb,
|
|
@@ -715,24 +715,24 @@
|
|
|
715
715
|
|
|
716
716
|
const quarter = 0.25;
|
|
717
717
|
class SimplexNoise4D {
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
718
|
+
#NORM_4D;
|
|
719
|
+
#SQUISH_4D;
|
|
720
|
+
#STRETCH_4D;
|
|
721
|
+
#base4D;
|
|
722
|
+
#gradients4D;
|
|
723
|
+
#lookup;
|
|
724
|
+
#lookupPairs4D;
|
|
725
|
+
#p4D;
|
|
726
|
+
#perm;
|
|
727
|
+
#perm4D;
|
|
728
728
|
constructor() {
|
|
729
|
-
this
|
|
730
|
-
this
|
|
731
|
-
this
|
|
732
|
-
this
|
|
733
|
-
this
|
|
734
|
-
this
|
|
735
|
-
this
|
|
729
|
+
this.#NORM_4D = 1 / 30;
|
|
730
|
+
this.#SQUISH_4D = (Math.sqrt(4 + 1) - 1) * quarter;
|
|
731
|
+
this.#STRETCH_4D = (1 / Math.sqrt(4 + 1) - 1) * quarter;
|
|
732
|
+
this.#lookup = [];
|
|
733
|
+
this.#perm = new Uint8Array(0);
|
|
734
|
+
this.#perm4D = new Uint8Array(0);
|
|
735
|
+
this.#base4D = [
|
|
736
736
|
[0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 1, 0, 1, 0, 0, 1, 0, 0, 1, 0, 1, 0, 0, 0, 1],
|
|
737
737
|
[3, 1, 1, 1, 0, 3, 1, 1, 0, 1, 3, 1, 0, 1, 1, 3, 0, 1, 1, 1, 4, 1, 1, 1, 1],
|
|
738
738
|
[
|
|
@@ -840,7 +840,7 @@
|
|
|
840
840
|
1,
|
|
841
841
|
],
|
|
842
842
|
];
|
|
843
|
-
this
|
|
843
|
+
this.#gradients4D = [
|
|
844
844
|
3,
|
|
845
845
|
1,
|
|
846
846
|
1,
|
|
@@ -1098,7 +1098,7 @@
|
|
|
1098
1098
|
-1,
|
|
1099
1099
|
-3,
|
|
1100
1100
|
];
|
|
1101
|
-
this
|
|
1101
|
+
this.#lookupPairs4D = [
|
|
1102
1102
|
0,
|
|
1103
1103
|
3,
|
|
1104
1104
|
1,
|
|
@@ -2220,7 +2220,7 @@
|
|
|
2220
2220
|
599295,
|
|
2221
2221
|
10,
|
|
2222
2222
|
];
|
|
2223
|
-
this
|
|
2223
|
+
this.#p4D = [
|
|
2224
2224
|
0,
|
|
2225
2225
|
0,
|
|
2226
2226
|
1,
|
|
@@ -3504,7 +3504,7 @@
|
|
|
3504
3504
|
];
|
|
3505
3505
|
}
|
|
3506
3506
|
noise(x, y, z, w) {
|
|
3507
|
-
const
|
|
3507
|
+
const perm = this.#perm, perm4D = this.#perm4D, lookup = this.#lookup, STRETCH_4D = this.#STRETCH_4D, SQUISH_4D = this.#SQUISH_4D, gradients4D = this.#gradients4D, NORM_4D = this.#NORM_4D, stretchOffset = (x + y + z + w) * STRETCH_4D, xs = x + stretchOffset, ys = y + stretchOffset, zs = z + stretchOffset, ws = w + stretchOffset, xsb = Math.floor(xs), ysb = Math.floor(ys), zsb = Math.floor(zs), wsb = Math.floor(ws), squishOffset = (xsb + ysb + zsb + wsb) * SQUISH_4D, dx0 = x - (xsb + squishOffset), dy0 = y - (ysb + squishOffset), dz0 = z - (zsb + squishOffset), dw0 = w - (wsb + squishOffset), xins = xs - xsb, yins = ys - ysb, zins = zs - zsb, wins = ws - wsb, inSum = xins + yins + zins + wins, hash = (zins - wins + 1) |
|
|
3508
3508
|
((yins - zins + 1) << 1) |
|
|
3509
3509
|
((yins - wins + 1) << 2) |
|
|
3510
3510
|
((xins - yins + 1) << 3) |
|
|
@@ -3516,25 +3516,25 @@
|
|
|
3516
3516
|
((inSum + yins) << 14) |
|
|
3517
3517
|
((inSum + xins) << 17);
|
|
3518
3518
|
let value = 0;
|
|
3519
|
-
for (let c =
|
|
3519
|
+
for (let c = lookup[hash]; c !== undefined; c = c.next) {
|
|
3520
3520
|
const dx = dx0 + c.dx, dy = dy0 + c.dy, dz = dz0 + c.dz, dw = dw0 + c.dw, attn = 2 - dx * dx - dy * dy - dz * dz - dw * dw;
|
|
3521
3521
|
if (attn > 0) {
|
|
3522
|
-
const px = xsb + c.xsb, py = ysb + c.ysb, pz = zsb + c.zsb, pw = wsb + c.wsb, indexPartA =
|
|
3523
|
-
|
|
3524
|
-
|
|
3525
|
-
|
|
3522
|
+
const px = xsb + c.xsb, py = ysb + c.ysb, pz = zsb + c.zsb, pw = wsb + c.wsb, indexPartA = perm[px & 0xff], indexPartB = perm[(indexPartA + py) & 0xff], indexPartC = perm[(indexPartB + pz) & 0xff], index = perm4D[(indexPartC + pw) & 0xff], valuePart = gradients4D[index] * dx +
|
|
3523
|
+
gradients4D[index + 1] * dy +
|
|
3524
|
+
gradients4D[index + 2] * dz +
|
|
3525
|
+
gradients4D[index + 3] * dw;
|
|
3526
3526
|
value += attn * attn * attn * attn * valuePart;
|
|
3527
3527
|
}
|
|
3528
3528
|
}
|
|
3529
|
-
return value *
|
|
3529
|
+
return value * NORM_4D;
|
|
3530
3530
|
}
|
|
3531
3531
|
seed(clientSeed) {
|
|
3532
|
-
const
|
|
3533
|
-
for (let i = 0; i <
|
|
3534
|
-
const baseSet =
|
|
3532
|
+
const p4D = this.#p4D, base4D = this.#base4D, lookupPairs4D = this.#lookupPairs4D, contributions = [];
|
|
3533
|
+
for (let i = 0; i < p4D.length; i += 16) {
|
|
3534
|
+
const baseSet = base4D[p4D[i]];
|
|
3535
3535
|
let previous = null, current = null;
|
|
3536
3536
|
for (let k = 0; k < baseSet.length; k += 5) {
|
|
3537
|
-
current = this
|
|
3537
|
+
current = this.#contribution4D(baseSet[k], baseSet[k + 1], baseSet[k + 2], baseSet[k + 3], baseSet[k + 4]);
|
|
3538
3538
|
if (previous === null) {
|
|
3539
3539
|
contributions[i / 16] = current;
|
|
3540
3540
|
}
|
|
@@ -3544,17 +3544,17 @@
|
|
|
3544
3544
|
previous = current;
|
|
3545
3545
|
}
|
|
3546
3546
|
if (current) {
|
|
3547
|
-
current.next = this
|
|
3548
|
-
current.next.next = this
|
|
3549
|
-
current.next.next.next = this
|
|
3547
|
+
current.next = this.#contribution4D(p4D[i + 1], p4D[i + 2], p4D[i + 3], p4D[i + 4], p4D[i + 5]);
|
|
3548
|
+
current.next.next = this.#contribution4D(p4D[i + 6], p4D[i + 7], p4D[i + 8], p4D[i + 9], p4D[i + 10]);
|
|
3549
|
+
current.next.next.next = this.#contribution4D(p4D[i + 11], p4D[i + 12], p4D[i + 13], p4D[i + 14], p4D[i + 15]);
|
|
3550
3550
|
}
|
|
3551
3551
|
}
|
|
3552
|
-
this
|
|
3553
|
-
for (let i = 0; i <
|
|
3554
|
-
this
|
|
3552
|
+
this.#lookup = [];
|
|
3553
|
+
for (let i = 0; i < lookupPairs4D.length; i += 2) {
|
|
3554
|
+
this.#lookup[lookupPairs4D[i]] = contributions[lookupPairs4D[i + 1]];
|
|
3555
3555
|
}
|
|
3556
|
-
this
|
|
3557
|
-
this
|
|
3556
|
+
this.#perm = new Uint8Array(256);
|
|
3557
|
+
this.#perm4D = new Uint8Array(256);
|
|
3558
3558
|
const source = new Uint8Array(256);
|
|
3559
3559
|
for (let i = 0; i < 256; i++) {
|
|
3560
3560
|
source[i] = i;
|
|
@@ -3569,18 +3569,18 @@
|
|
|
3569
3569
|
if (r[0] < 0) {
|
|
3570
3570
|
r[0] += i + 1;
|
|
3571
3571
|
}
|
|
3572
|
-
this
|
|
3573
|
-
this
|
|
3572
|
+
this.#perm[i] = source[r[0]];
|
|
3573
|
+
this.#perm4D[i] = this.#perm[i] & 0xfc;
|
|
3574
3574
|
source[r[0]] = source[i];
|
|
3575
3575
|
}
|
|
3576
3576
|
}
|
|
3577
|
-
|
|
3578
|
-
const
|
|
3577
|
+
#contribution4D(multiplier, xsb, ysb, zsb, wsb) {
|
|
3578
|
+
const SQUISH_4D = this.#SQUISH_4D;
|
|
3579
3579
|
return {
|
|
3580
|
-
dx: -xsb - multiplier *
|
|
3581
|
-
dy: -ysb - multiplier *
|
|
3582
|
-
dz: -zsb - multiplier *
|
|
3583
|
-
dw: -wsb - multiplier *
|
|
3580
|
+
dx: -xsb - multiplier * SQUISH_4D,
|
|
3581
|
+
dy: -ysb - multiplier * SQUISH_4D,
|
|
3582
|
+
dz: -zsb - multiplier * SQUISH_4D,
|
|
3583
|
+
dw: -wsb - multiplier * SQUISH_4D,
|
|
3584
3584
|
xsb,
|
|
3585
3585
|
ysb,
|
|
3586
3586
|
zsb,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(t){t.__tsParticlesInternals=t.__tsParticlesInternals||{},t.__tsParticlesInternals.bundles=t.__tsParticlesInternals.bundles||{},t.__tsParticlesInternals.effects=t.__tsParticlesInternals.effects||{},t.__tsParticlesInternals.engine=t.__tsParticlesInternals.engine||{},t.__tsParticlesInternals.interactions=t.__tsParticlesInternals.interactions||{},t.__tsParticlesInternals.palettes=t.__tsParticlesInternals.palettes||{},t.__tsParticlesInternals.paths=t.__tsParticlesInternals.paths||{},t.__tsParticlesInternals.plugins=t.__tsParticlesInternals.plugins||{},t.__tsParticlesInternals.plugins=t.__tsParticlesInternals.plugins||{},t.__tsParticlesInternals.plugins.emittersShapes=t.__tsParticlesInternals.plugins.emittersShapes||{},t.__tsParticlesInternals.presets=t.__tsParticlesInternals.presets||{},t.__tsParticlesInternals.shapes=t.__tsParticlesInternals.shapes||{},t.__tsParticlesInternals.updaters=t.__tsParticlesInternals.updaters||{},t.__tsParticlesInternals.utils=t.__tsParticlesInternals.utils||{},t.__tsParticlesInternals.canvas=t.__tsParticlesInternals.canvas||{},t.__tsParticlesInternals.canvas=t.__tsParticlesInternals.canvas||{},t.__tsParticlesInternals.canvas.utils=t.__tsParticlesInternals.canvas.utils||{},t.__tsParticlesInternals.path=t.__tsParticlesInternals.path||{},t.__tsParticlesInternals.path=t.__tsParticlesInternals.path||{},t.__tsParticlesInternals.path.utils=t.__tsParticlesInternals.path.utils||{};var s="undefined"!=typeof Proxy?function(t){return new Proxy(t,{get:function(t,s){return s in t||(t[s]={}),t[s]}})}:function(t){return t};t.__tsParticlesInternals.bundles=s(t.__tsParticlesInternals.bundles),t.__tsParticlesInternals.effects=s(t.__tsParticlesInternals.effects),t.__tsParticlesInternals.interactions=s(t.__tsParticlesInternals.interactions),t.__tsParticlesInternals.palettes=s(t.__tsParticlesInternals.palettes),t.__tsParticlesInternals.paths=s(t.__tsParticlesInternals.paths),t.__tsParticlesInternals.plugins=s(t.__tsParticlesInternals.plugins),t.__tsParticlesInternals.plugins.emittersShapes=s(t.__tsParticlesInternals.plugins.emittersShapes),t.__tsParticlesInternals.presets=s(t.__tsParticlesInternals.presets),t.__tsParticlesInternals.shapes=s(t.__tsParticlesInternals.shapes),t.__tsParticlesInternals.updaters=s(t.__tsParticlesInternals.updaters),t.__tsParticlesInternals.utils=s(t.__tsParticlesInternals.utils),t.__tsParticlesInternals.canvas=s(t.__tsParticlesInternals.canvas),t.__tsParticlesInternals.path=s(t.__tsParticlesInternals.path),t.tsparticlesInternalExports=t.tsparticlesInternalExports||{}}("undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:this),function(t,s){"object"==typeof exports&&"undefined"!=typeof module?s(exports):"function"==typeof define&&define.amd?define(["exports"],s):s(((t="undefined"!=typeof globalThis?globalThis:t||self).__tsParticlesInternals=t.__tsParticlesInternals||{},t.__tsParticlesInternals.simplex=t.__tsParticlesInternals.simplex||{},t.__tsParticlesInternals.simplex.noise=t.__tsParticlesInternals.simplex.noise||{}))}(this,function(t){"use strict";function s(t){const s=new Uint32Array(1);return s[0]=1664525*t[0]+1013904223,s}class e{_NORM_2D;_SQUISH_2D;_STRETCH_2D;_base2D;_gradients2D;_lookup;_lookupPairs2D;_p2D;_perm;_perm2D;constructor(){this._NORM_2D=1/47,this._SQUISH_2D=.5*(Math.sqrt(3)-1),this._STRETCH_2D=.5*(1/Math.sqrt(3)-1),this._base2D=[[1,1,0,1,0,1,0,0,0],[1,1,0,1,0,1,2,1,1]],this._gradients2D=[5,2,2,5,-5,2,-2,5,5,-2,2,-5,-5,-2,-2,-5],this._lookup=[],this._lookupPairs2D=[0,1,1,0,4,1,17,0,20,2,21,2,22,5,23,5,26,4,39,3,42,4,43,3],this._p2D=[0,0,1,-1,0,0,-1,1,0,2,1,1,1,2,2,0,1,2,0,2,1,0,0,0],this._perm=new Uint8Array(256),this._perm2D=new Uint8Array(256)}noise(t,s){const{_gradients2D:e,_NORM_2D:n,_SQUISH_2D:r,_STRETCH_2D:_,_lookup:i,_perm:l,_perm2D:a}=this,o=(t+s)*_,c=t+o,p=s+o,h=Math.floor(c),u=Math.floor(p),D=(h+u)*r,I=t-(h+D),P=s-(u+D),d=c-h,f=p-u,b=d+f;let m=0;for(let t=i[d-f+1|b<<1|b+f<<2|b+d<<4];void 0!==t;t=t.next){const s=I+t.dx,n=P+t.dy,r=2-s*s-n*n;if(r<=0)continue;const _=h+t.xsb,i=u+t.ysb,o=a[l[255&_]+i&255];m+=r*r*r*r*(e[o]*s+e[o+1]*n)}return m*n}seed(t){const{_p2D:e,_base2D:n,_lookupPairs2D:r}=this,_=[];for(let t=0;t<e.length;t+=4){const s=n[e[t]];let r=null,i=null;for(let e=0;e<s.length;e+=3)i=this._contribution2D(s[e],s[e+1],s[e+2]),null===r?_[t/4]=i:r.next=i,r=i;i&&(i.next=this._contribution2D(e[t+1],e[t+2],e[t+3]))}this._lookup=[];for(let t=0;t<r.length;t+=2)this._lookup[r[t]]=_[r[t+1]];this._perm=new Uint8Array(256),this._perm2D=new Uint8Array(256);const i=new Uint8Array(256);for(let t=0;t<256;t++)i[t]=t;let l=new Uint32Array(1);l[0]=t,l=s(s(s(l)));for(let t=255;t>=0;t--){l=s(l);const e=new Uint32Array(1);e[0]=(l[0]+31)%(t+1),e[0]<0&&(e[0]+=t+1),this._perm[t]=i[e[0]],this._perm2D[t]=14&this._perm[t],i[e[0]]=i[t]}}_contribution2D(t,s,e){const{_SQUISH_2D:n}=this;return{dx:-s-t*n,dy:-e-t*n,xsb:s,ysb:e}}}const n=1/3;class r{_NORM_3D;_SQUISH_3D;_STRETCH_3D;_base3D;_gradients3D;_lookup;_lookupPairs3D;_p3D;_perm;_perm3D;constructor(){this._NORM_3D=1/103,this._SQUISH_3D=(Math.sqrt(4)-1)*n,this._STRETCH_3D=(1/Math.sqrt(4)-1)*n,this._base3D=[[0,0,0,0,1,1,0,0,1,0,1,0,1,0,0,1],[2,1,1,0,2,1,0,1,2,0,1,1,3,1,1,1],[1,1,0,0,1,0,1,0,1,0,0,1,2,1,1,0,2,1,0,1,2,0,1,1]],this._gradients3D=[-11,4,4,-4,11,4,-4,4,11,11,4,4,4,11,4,4,4,11,-11,-4,4,-4,-11,4,-4,-4,11,11,-4,4,4,-11,4,4,-4,11,-11,4,-4,-4,11,-4,-4,4,-11,11,4,-4,4,11,-4,4,4,-11,-11,-4,-4,-4,-11,-4,-4,-4,-11,11,-4,-4,4,-11,-4,4,-4,-11],this._lookup=[],this._lookupPairs3D=[0,2,1,1,2,2,5,1,6,0,7,0,32,2,34,2,129,1,133,1,160,5,161,5,518,0,519,0,546,4,550,4,645,3,647,3,672,5,673,5,674,4,677,3,678,4,679,3,680,13,681,13,682,12,685,14,686,12,687,14,712,20,714,18,809,21,813,23,840,20,841,21,1198,19,1199,22,1226,18,1230,19,1325,23,1327,22,1352,15,1353,17,1354,15,1357,17,1358,16,1359,16,1360,11,1361,10,1362,11,1365,10,1366,9,1367,9,1392,11,1394,11,1489,10,1493,10,1520,8,1521,8,1878,9,1879,9,1906,7,1910,7,2005,6,2007,6,2032,8,2033,8,2034,7,2037,6,2038,7,2039,6],this._p3D=[0,0,1,-1,0,0,1,0,-1,0,0,-1,1,0,0,0,1,-1,0,0,-1,0,1,0,0,-1,1,0,2,1,1,0,1,1,1,-1,0,2,1,0,1,1,1,-1,1,0,2,0,1,1,1,-1,1,1,1,3,2,1,0,3,1,2,0,1,3,2,0,1,3,1,0,2,1,3,0,2,1,3,0,1,2,1,1,1,0,0,2,2,0,0,1,1,0,1,0,2,0,2,0,1,1,0,0,1,2,0,0,2,2,0,0,0,0,1,1,-1,1,2,0,0,0,0,1,-1,1,1,2,0,0,0,0,1,1,1,-1,2,3,1,1,1,2,0,0,2,2,3,1,1,1,2,2,0,0,2,3,1,1,1,2,0,2,0,2,1,1,-1,1,2,0,0,2,2,1,1,-1,1,2,2,0,0,2,1,-1,1,1,2,0,0,2,2,1,-1,1,1,2,0,2,0,2,1,1,1,-1,2,2,0,0,2,1,1,1,-1,2,0,2,0],this._perm=new Uint8Array(256),this._perm3D=new Uint8Array(256)}noise(t,s,e){const{_STRETCH_3D:n,_NORM_3D:r,_SQUISH_3D:_,_lookup:i,_perm:l,_perm3D:a,_gradients3D:o}=this,c=(t+s+e)*n,p=t+c,h=s+c,u=e+c,D=Math.floor(p),I=Math.floor(h),P=Math.floor(u),d=(D+I+P)*_,f=t-(D+d),b=s-(I+d),m=e-(P+d),y=p-D,x=h-I,g=u-P,S=y+x+g;let w=0;for(let t=i[x-g+1|y-x+1<<1|y-g+1<<2|S<<3|S+g<<5|S+x<<7|S+y<<9];void 0!==t;t=t.next){const s=f+t.dx,e=b+t.dy,n=m+t.dz,r=2-s*s-e*e-n*n;if(r>0){const _=D+t.xsb,i=I+t.ysb,c=P+t.zsb,p=a[l[l[255&_]+i&255]+c&255];w+=r*r*r*r*(o[p]*s+o[p+1]*e+o[p+2]*n)}}return w*r}seed(t){const{_base3D:e,_lookupPairs3D:n,_p3D:r}=this,_=[];for(let t=0;t<r.length;t+=9){const s=e[r[t]];let n=null,i=null;for(let e=0;e<s.length;e+=4)i=this._contribution3D(s[e],s[e+1],s[e+2],s[e+3]),null===n?_[t/9]=i:n.next=i,n=i;i&&(i.next=this._contribution3D(r[t+1],r[t+2],r[t+3],r[t+4]),i.next.next=this._contribution3D(r[t+5],r[t+6],r[t+7],r[t+8]))}this._lookup=[];for(let t=0;t<n.length;t+=2)this._lookup[n[t]]=_[n[t+1]];this._perm=new Uint8Array(256),this._perm3D=new Uint8Array(256);const i=new Uint8Array(256);for(let t=0;t<256;t++)i[t]=t;let l=new Uint32Array(1);l[0]=t,l=s(s(s(l)));for(let t=255;t>=0;t--){l=s(l);const e=new Uint32Array(1);e[0]=(l[0]+31)%(t+1),e[0]<0&&(e[0]+=t+1),this._perm[t]=i[e[0]],this._perm3D[t]=this._perm[t]%24*3,i[e[0]]=i[t]}}_contribution3D(t,s,e,n){const{_SQUISH_3D:r}=this;return{dx:-s-t*r,dy:-e-t*r,dz:-n-t*r,xsb:s,ysb:e,zsb:n}}}class _{_NORM_4D;_SQUISH_4D;_STRETCH_4D;_base4D;_gradients4D;_lookup;_lookupPairs4D;_p4D;_perm;_perm4D;constructor(){this._NORM_4D=1/30,this._SQUISH_4D=.25*(Math.sqrt(5)-1),this._STRETCH_4D=.25*(1/Math.sqrt(5)-1),this._lookup=[],this._perm=new Uint8Array(0),this._perm4D=new Uint8Array(0),this._base4D=[[0,0,0,0,0,1,1,0,0,0,1,0,1,0,0,1,0,0,1,0,1,0,0,0,1],[3,1,1,1,0,3,1,1,0,1,3,1,0,1,1,3,0,1,1,1,4,1,1,1,1],[1,1,0,0,0,1,0,1,0,0,1,0,0,1,0,1,0,0,0,1,2,1,1,0,0,2,1,0,1,0,2,1,0,0,1,2,0,1,1,0,2,0,1,0,1,2,0,0,1,1],[3,1,1,1,0,3,1,1,0,1,3,1,0,1,1,3,0,1,1,1,2,1,1,0,0,2,1,0,1,0,2,1,0,0,1,2,0,1,1,0,2,0,1,0,1,2,0,0,1,1]],this._gradients4D=[3,1,1,1,1,3,1,1,1,1,3,1,1,1,1,3,-3,1,1,1,-1,3,1,1,-1,1,3,1,-1,1,1,3,3,-1,1,1,1,-3,1,1,1,-1,3,1,1,-1,1,3,-3,-1,1,1,-1,-3,1,1,-1,-1,3,1,-1,-1,1,3,3,1,-1,1,1,3,-1,1,1,1,-3,1,1,1,-1,3,-3,1,-1,1,-1,3,-1,1,-1,1,-3,1,-1,1,-1,3,3,-1,-1,1,1,-3,-1,1,1,-1,-3,1,1,-1,-1,3,-3,-1,-1,1,-1,-3,-1,1,-1,-1,-3,1,-1,-1,-1,3,3,1,1,-1,1,3,1,-1,1,1,3,-1,1,1,1,-3,-3,1,1,-1,-1,3,1,-1,-1,1,3,-1,-1,1,1,-3,3,-1,1,-1,1,-3,1,-1,1,-1,3,-1,1,-1,1,-3,-3,-1,1,-1,-1,-3,1,-1,-1,-1,3,-1,-1,-1,1,-3,3,1,-1,-1,1,3,-1,-1,1,1,-3,-1,1,1,-1,-3,-3,1,-1,-1,-1,3,-1,-1,-1,1,-3,-1,-1,1,-1,-3,3,-1,-1,-1,1,-3,-1,-1,1,-1,-3,-1,1,-1,-1,-3,-3,-1,-1,-1,-1,-3,-1,-1,-1,-1,-3,-1,-1,-1,-1,-3],this._lookupPairs4D=[0,3,1,2,2,3,5,2,6,1,7,1,8,3,9,2,10,3,13,2,16,3,18,3,22,1,23,1,24,3,26,3,33,2,37,2,38,1,39,1,41,2,45,2,54,1,55,1,56,0,57,0,58,0,59,0,60,0,61,0,62,0,63,0,256,3,258,3,264,3,266,3,272,3,274,3,280,3,282,3,2049,2,2053,2,2057,2,2061,2,2081,2,2085,2,2089,2,2093,2,2304,9,2305,9,2312,9,2313,9,16390,1,16391,1,16406,1,16407,1,16422,1,16423,1,16438,1,16439,1,16642,8,16646,8,16658,8,16662,8,18437,6,18439,6,18469,6,18471,6,18688,9,18689,9,18690,8,18693,6,18694,8,18695,6,18696,9,18697,9,18706,8,18710,8,18725,6,18727,6,131128,0,131129,0,131130,0,131131,0,131132,0,131133,0,131134,0,131135,0,131352,7,131354,7,131384,7,131386,7,133161,5,133165,5,133177,5,133181,5,133376,9,133377,9,133384,9,133385,9,133400,7,133402,7,133417,5,133421,5,133432,7,133433,5,133434,7,133437,5,147510,4,147511,4,147518,4,147519,4,147714,8,147718,8,147730,8,147734,8,147736,7,147738,7,147766,4,147767,4,147768,7,147770,7,147774,4,147775,4,149509,6,149511,6,149541,6,149543,6,149545,5,149549,5,149558,4,149559,4,149561,5,149565,5,149566,4,149567,4,149760,9,149761,9,149762,8,149765,6,149766,8,149767,6,149768,9,149769,9,149778,8,149782,8,149784,7,149786,7,149797,6,149799,6,149801,5,149805,5,149814,4,149815,4,149816,7,149817,5,149818,7,149821,5,149822,4,149823,4,149824,37,149825,37,149826,36,149829,34,149830,36,149831,34,149832,37,149833,37,149842,36,149846,36,149848,35,149850,35,149861,34,149863,34,149865,33,149869,33,149878,32,149879,32,149880,35,149881,33,149882,35,149885,33,149886,32,149887,32,150080,49,150082,48,150088,49,150098,48,150104,47,150106,47,151873,46,151877,45,151881,46,151909,45,151913,44,151917,44,152128,49,152129,46,152136,49,152137,46,166214,43,166215,42,166230,43,166247,42,166262,41,166263,41,166466,48,166470,43,166482,48,166486,43,168261,45,168263,42,168293,45,168295,42,168512,31,168513,28,168514,31,168517,28,168518,25,168519,25,280952,40,280953,39,280954,40,280957,39,280958,38,280959,38,281176,47,281178,47,281208,40,281210,40,282985,44,282989,44,283001,39,283005,39,283208,30,283209,27,283224,30,283241,27,283256,22,283257,22,297334,41,297335,41,297342,38,297343,38,297554,29,297558,24,297562,29,297590,24,297594,21,297598,21,299365,26,299367,23,299373,26,299383,23,299389,20,299391,20,299584,31,299585,28,299586,31,299589,28,299590,25,299591,25,299592,30,299593,27,299602,29,299606,24,299608,30,299610,29,299621,26,299623,23,299625,27,299629,26,299638,24,299639,23,299640,22,299641,22,299642,21,299645,20,299646,21,299647,20,299648,61,299649,60,299650,61,299653,60,299654,59,299655,59,299656,58,299657,57,299666,55,299670,54,299672,58,299674,55,299685,52,299687,51,299689,57,299693,52,299702,54,299703,51,299704,56,299705,56,299706,53,299709,50,299710,53,299711,50,299904,61,299906,61,299912,58,299922,55,299928,58,299930,55,301697,60,301701,60,301705,57,301733,52,301737,57,301741,52,301952,79,301953,79,301960,76,301961,76,316038,59,316039,59,316054,54,316071,51,316086,54,316087,51,316290,78,316294,78,316306,73,316310,73,318085,77,318087,77,318117,70,318119,70,318336,79,318337,79,318338,78,318341,77,318342,78,318343,77,430776,56,430777,56,430778,53,430781,50,430782,53,430783,50,431e3,75,431002,72,431032,75,431034,72,432809,74,432813,69,432825,74,432829,69,433032,76,433033,76,433048,75,433065,74,433080,75,433081,74,447158,71,447159,68,447166,71,447167,68,447378,73,447382,73,447386,72,447414,71,447418,72,447422,71,449189,70,449191,70,449197,69,449207,68,449213,69,449215,68,449408,67,449409,67,449410,66,449413,64,449414,66,449415,64,449416,67,449417,67,449426,66,449430,66,449432,65,449434,65,449445,64,449447,64,449449,63,449453,63,449462,62,449463,62,449464,65,449465,63,449466,65,449469,63,449470,62,449471,62,449472,19,449473,19,449474,18,449477,16,449478,18,449479,16,449480,19,449481,19,449490,18,449494,18,449496,17,449498,17,449509,16,449511,16,449513,15,449517,15,449526,14,449527,14,449528,17,449529,15,449530,17,449533,15,449534,14,449535,14,449728,19,449729,19,449730,18,449734,18,449736,19,449737,19,449746,18,449750,18,449752,17,449754,17,449784,17,449786,17,451520,19,451521,19,451525,16,451527,16,451528,19,451529,19,451557,16,451559,16,451561,15,451565,15,451577,15,451581,15,451776,19,451777,19,451784,19,451785,19,465858,18,465861,16,465862,18,465863,16,465874,18,465878,18,465893,16,465895,16,465910,14,465911,14,465918,14,465919,14,466114,18,466118,18,466130,18,466134,18,467909,16,467911,16,467941,16,467943,16,468160,13,468161,13,468162,13,468163,13,468164,13,468165,13,468166,13,468167,13,580568,17,580570,17,580585,15,580589,15,580598,14,580599,14,580600,17,580601,15,580602,17,580605,15,580606,14,580607,14,580824,17,580826,17,580856,17,580858,17,582633,15,582637,15,582649,15,582653,15,582856,12,582857,12,582872,12,582873,12,582888,12,582889,12,582904,12,582905,12,596982,14,596983,14,596990,14,596991,14,597202,11,597206,11,597210,11,597214,11,597234,11,597238,11,597242,11,597246,11,599013,10,599015,10,599021,10,599023,10,599029,10,599031,10,599037,10,599039,10,599232,13,599233,13,599234,13,599235,13,599236,13,599237,13,599238,13,599239,13,599240,12,599241,12,599250,11,599254,11,599256,12,599257,12,599258,11,599262,11,599269,10,599271,10,599272,12,599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;t=t.next){const s=y+t.dx,e=x+t.dy,n=g+t.dz,i=S+t.dw,l=2-s*s-e*e-n*n-i*i;if(l>0){const a=P+t.xsb,c=d+t.ysb,p=f+t.zsb,h=b+t.wsb,u=_[r[r[r[255&a]+c&255]+p&255]+h&255];A+=l*l*l*l*(o[u]*s+o[u+1]*e+o[u+2]*n+o[u+3]*i)}}return A*c}seed(t){const{_p4D:e,_base4D:n,_lookupPairs4D:r}=this,_=[];for(let t=0;t<e.length;t+=16){const s=n[e[t]];let r=null,i=null;for(let e=0;e<s.length;e+=5)i=this._contribution4D(s[e],s[e+1],s[e+2],s[e+3],s[e+4]),null===r?_[t/16]=i:r.next=i,r=i;i&&(i.next=this._contribution4D(e[t+1],e[t+2],e[t+3],e[t+4],e[t+5]),i.next.next=this._contribution4D(e[t+6],e[t+7],e[t+8],e[t+9],e[t+10]),i.next.next.next=this._contribution4D(e[t+11],e[t+12],e[t+13],e[t+14],e[t+15]))}this._lookup=[];for(let t=0;t<r.length;t+=2)this._lookup[r[t]]=_[r[t+1]];this._perm=new Uint8Array(256),this._perm4D=new Uint8Array(256);const i=new Uint8Array(256);for(let t=0;t<256;t++)i[t]=t;let l=new Uint32Array(1);l[0]=t,l=s(s(s(l)));for(let t=255;t>=0;t--){l=s(l);const e=new Uint32Array(1);e[0]=(l[0]+31)%(t+1),e[0]<0&&(e[0]+=t+1),this._perm[t]=i[e[0]],this._perm4D[t]=252&this._perm[t],i[e[0]]=i[t]}}_contribution4D(t,s,e,n,r){const{_SQUISH_4D:_}=this;return{dx:-s-t*_,dy:-e-t*_,dz:-n-t*_,dw:-r-t*_,xsb:s,ysb:e,zsb:n,wsb:r}}}const i=globalThis;i.__tsParticlesInternals=i.__tsParticlesInternals??{},t.SimplexNoise=class{noise2d;noise3d;noise4d;constructor(){this.noise2d=new e,this.noise3d=new r,this.noise4d=new _}}}),delete(globalThis.window||globalThis).tsparticlesInternalExports;
|
|
1
|
+
!function(t){t.__tsParticlesInternals=t.__tsParticlesInternals||{},t.__tsParticlesInternals.bundles=t.__tsParticlesInternals.bundles||{},t.__tsParticlesInternals.effects=t.__tsParticlesInternals.effects||{},t.__tsParticlesInternals.engine=t.__tsParticlesInternals.engine||{},t.__tsParticlesInternals.interactions=t.__tsParticlesInternals.interactions||{},t.__tsParticlesInternals.palettes=t.__tsParticlesInternals.palettes||{},t.__tsParticlesInternals.paths=t.__tsParticlesInternals.paths||{},t.__tsParticlesInternals.plugins=t.__tsParticlesInternals.plugins||{},t.__tsParticlesInternals.plugins=t.__tsParticlesInternals.plugins||{},t.__tsParticlesInternals.plugins.emittersShapes=t.__tsParticlesInternals.plugins.emittersShapes||{},t.__tsParticlesInternals.presets=t.__tsParticlesInternals.presets||{},t.__tsParticlesInternals.shapes=t.__tsParticlesInternals.shapes||{},t.__tsParticlesInternals.updaters=t.__tsParticlesInternals.updaters||{},t.__tsParticlesInternals.utils=t.__tsParticlesInternals.utils||{},t.__tsParticlesInternals.canvas=t.__tsParticlesInternals.canvas||{},t.__tsParticlesInternals.canvas=t.__tsParticlesInternals.canvas||{},t.__tsParticlesInternals.canvas.utils=t.__tsParticlesInternals.canvas.utils||{},t.__tsParticlesInternals.path=t.__tsParticlesInternals.path||{},t.__tsParticlesInternals.path=t.__tsParticlesInternals.path||{},t.__tsParticlesInternals.path.utils=t.__tsParticlesInternals.path.utils||{};var s="undefined"!=typeof Proxy?function(t){return new Proxy(t,{get:function(t,s){return s in t||(t[s]={}),t[s]}})}:function(t){return t};t.__tsParticlesInternals.bundles=s(t.__tsParticlesInternals.bundles),t.__tsParticlesInternals.effects=s(t.__tsParticlesInternals.effects),t.__tsParticlesInternals.interactions=s(t.__tsParticlesInternals.interactions),t.__tsParticlesInternals.palettes=s(t.__tsParticlesInternals.palettes),t.__tsParticlesInternals.paths=s(t.__tsParticlesInternals.paths),t.__tsParticlesInternals.plugins=s(t.__tsParticlesInternals.plugins),t.__tsParticlesInternals.plugins.emittersShapes=s(t.__tsParticlesInternals.plugins.emittersShapes),t.__tsParticlesInternals.presets=s(t.__tsParticlesInternals.presets),t.__tsParticlesInternals.shapes=s(t.__tsParticlesInternals.shapes),t.__tsParticlesInternals.updaters=s(t.__tsParticlesInternals.updaters),t.__tsParticlesInternals.utils=s(t.__tsParticlesInternals.utils),t.__tsParticlesInternals.canvas=s(t.__tsParticlesInternals.canvas),t.__tsParticlesInternals.path=s(t.__tsParticlesInternals.path),t.tsparticlesInternalExports=t.tsparticlesInternalExports||{}}("undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:this),function(t,s){"object"==typeof exports&&"undefined"!=typeof module?s(exports):"function"==typeof define&&define.amd?define(["exports"],s):s(((t="undefined"!=typeof globalThis?globalThis:t||self).__tsParticlesInternals=t.__tsParticlesInternals||{},t.__tsParticlesInternals.simplex=t.__tsParticlesInternals.simplex||{},t.__tsParticlesInternals.simplex.noise=t.__tsParticlesInternals.simplex.noise||{}))}(this,function(t){"use strict";function s(t){const s=new Uint32Array(1);return s[0]=1664525*t[0]+1013904223,s}class e{#t;#s;#e;#n;#r;#i;#l;#a;#o;#_;constructor(){this.#t=1/47,this.#s=.5*(Math.sqrt(3)-1),this.#e=.5*(1/Math.sqrt(3)-1),this.#n=[[1,1,0,1,0,1,0,0,0],[1,1,0,1,0,1,2,1,1]],this.#r=[5,2,2,5,-5,2,-2,5,5,-2,2,-5,-5,-2,-2,-5],this.#i=[],this.#l=[0,1,1,0,4,1,17,0,20,2,21,2,22,5,23,5,26,4,39,3,42,4,43,3],this.#a=[0,0,1,-1,0,0,-1,1,0,2,1,1,1,2,2,0,1,2,0,2,1,0,0,0],this.#o=new Uint8Array(256),this.#_=new Uint8Array(256)}noise(t,s){const e=this.#r,n=this.#t,r=this.#s,i=this.#e,l=this.#i,a=this.#o,o=this.#_,_=(t+s)*i,c=t+_,h=s+_,p=Math.floor(c),u=Math.floor(h),D=(p+u)*r,I=t-(p+D),P=s-(u+D),d=c-p,f=h-u,b=d+f;let m=0;for(let t=l[d-f+1|b<<1|b+f<<2|b+d<<4];void 0!==t;t=t.next){const s=I+t.dx,n=P+t.dy,r=2-s*s-n*n;if(r<=0)continue;const i=p+t.xsb,l=u+t.ysb,_=o[a[255&i]+l&255];m+=r*r*r*r*(e[_]*s+e[_+1]*n)}return m*n}seed(t){const e=this.#a,n=this.#n,r=this.#l,i=[];for(let t=0;t<e.length;t+=4){const s=n[e[t]];let r=null,l=null;for(let e=0;e<s.length;e+=3)l=this.#c(s[e],s[e+1],s[e+2]),null===r?i[t/4]=l:r.next=l,r=l;l&&(l.next=this.#c(e[t+1],e[t+2],e[t+3]))}this.#i=[];for(let t=0;t<r.length;t+=2)this.#i[r[t]]=i[r[t+1]];this.#o=new Uint8Array(256),this.#_=new Uint8Array(256);const l=new Uint8Array(256);for(let t=0;t<256;t++)l[t]=t;let a=new Uint32Array(1);a[0]=t,a=s(s(s(a)));for(let t=255;t>=0;t--){a=s(a);const e=new Uint32Array(1);e[0]=(a[0]+31)%(t+1),e[0]<0&&(e[0]+=t+1),this.#o[t]=l[e[0]],this.#_[t]=14&this.#o[t],l[e[0]]=l[t]}}#c(t,s,e){const n=this.#s;return{dx:-s-t*n,dy:-e-t*n,xsb:s,ysb:e}}}const n=1/3;class r{#h;#p;#u;#D;#I;#i;#P;#d;#o;#f;constructor(){this.#h=1/103,this.#p=(Math.sqrt(4)-1)*n,this.#u=(1/Math.sqrt(4)-1)*n,this.#D=[[0,0,0,0,1,1,0,0,1,0,1,0,1,0,0,1],[2,1,1,0,2,1,0,1,2,0,1,1,3,1,1,1],[1,1,0,0,1,0,1,0,1,0,0,1,2,1,1,0,2,1,0,1,2,0,1,1]],this.#I=[-11,4,4,-4,11,4,-4,4,11,11,4,4,4,11,4,4,4,11,-11,-4,4,-4,-11,4,-4,-4,11,11,-4,4,4,-11,4,4,-4,11,-11,4,-4,-4,11,-4,-4,4,-11,11,4,-4,4,11,-4,4,4,-11,-11,-4,-4,-4,-11,-4,-4,-4,-11,11,-4,-4,4,-11,-4,4,-4,-11],this.#i=[],this.#P=[0,2,1,1,2,2,5,1,6,0,7,0,32,2,34,2,129,1,133,1,160,5,161,5,518,0,519,0,546,4,550,4,645,3,647,3,672,5,673,5,674,4,677,3,678,4,679,3,680,13,681,13,682,12,685,14,686,12,687,14,712,20,714,18,809,21,813,23,840,20,841,21,1198,19,1199,22,1226,18,1230,19,1325,23,1327,22,1352,15,1353,17,1354,15,1357,17,1358,16,1359,16,1360,11,1361,10,1362,11,1365,10,1366,9,1367,9,1392,11,1394,11,1489,10,1493,10,1520,8,1521,8,1878,9,1879,9,1906,7,1910,7,2005,6,2007,6,2032,8,2033,8,2034,7,2037,6,2038,7,2039,6],this.#d=[0,0,1,-1,0,0,1,0,-1,0,0,-1,1,0,0,0,1,-1,0,0,-1,0,1,0,0,-1,1,0,2,1,1,0,1,1,1,-1,0,2,1,0,1,1,1,-1,1,0,2,0,1,1,1,-1,1,1,1,3,2,1,0,3,1,2,0,1,3,2,0,1,3,1,0,2,1,3,0,2,1,3,0,1,2,1,1,1,0,0,2,2,0,0,1,1,0,1,0,2,0,2,0,1,1,0,0,1,2,0,0,2,2,0,0,0,0,1,1,-1,1,2,0,0,0,0,1,-1,1,1,2,0,0,0,0,1,1,1,-1,2,3,1,1,1,2,0,0,2,2,3,1,1,1,2,2,0,0,2,3,1,1,1,2,0,2,0,2,1,1,-1,1,2,0,0,2,2,1,1,-1,1,2,2,0,0,2,1,-1,1,1,2,0,0,2,2,1,-1,1,1,2,0,2,0,2,1,1,1,-1,2,2,0,0,2,1,1,1,-1,2,0,2,0],this.#o=new Uint8Array(256),this.#f=new Uint8Array(256)}noise(t,s,e){const n=this.#u,r=this.#h,i=this.#p,l=this.#i,a=this.#o,o=this.#f,_=this.#I,c=(t+s+e)*n,h=t+c,p=s+c,u=e+c,D=Math.floor(h),I=Math.floor(p),P=Math.floor(u),d=(D+I+P)*i,f=t-(D+d),b=s-(I+d),m=e-(P+d),y=h-D,x=p-I,g=u-P,S=y+x+g;let w=0;for(let t=l[x-g+1|y-x+1<<1|y-g+1<<2|S<<3|S+g<<5|S+x<<7|S+y<<9];void 0!==t;t=t.next){const s=f+t.dx,e=b+t.dy,n=m+t.dz,r=2-s*s-e*e-n*n;if(r>0){const i=D+t.xsb,l=I+t.ysb,c=P+t.zsb,h=o[a[a[255&i]+l&255]+c&255];w+=r*r*r*r*(_[h]*s+_[h+1]*e+_[h+2]*n)}}return w*r}seed(t){const e=this.#D,n=this.#P,r=this.#d,i=[];for(let t=0;t<r.length;t+=9){const s=e[r[t]];let n=null,l=null;for(let e=0;e<s.length;e+=4)l=this.#b(s[e],s[e+1],s[e+2],s[e+3]),null===n?i[t/9]=l:n.next=l,n=l;l&&(l.next=this.#b(r[t+1],r[t+2],r[t+3],r[t+4]),l.next.next=this.#b(r[t+5],r[t+6],r[t+7],r[t+8]))}this.#i=[];for(let t=0;t<n.length;t+=2)this.#i[n[t]]=i[n[t+1]];this.#o=new Uint8Array(256),this.#f=new Uint8Array(256);const l=new Uint8Array(256);for(let t=0;t<256;t++)l[t]=t;let a=new Uint32Array(1);a[0]=t,a=s(s(s(a)));for(let t=255;t>=0;t--){a=s(a);const e=new Uint32Array(1);e[0]=(a[0]+31)%(t+1),e[0]<0&&(e[0]+=t+1),this.#o[t]=l[e[0]],this.#f[t]=this.#o[t]%24*3,l[e[0]]=l[t]}}#b(t,s,e,n){const r=this.#p;return{dx:-s-t*r,dy:-e-t*r,dz:-n-t*r,xsb:s,ysb:e,zsb:n}}}class i{#m;#y;#x;#g;#S;#i;#w;#U;#o;#T;constructor(){this.#m=1/30,this.#y=.25*(Math.sqrt(5)-1),this.#x=.25*(1/Math.sqrt(5)-1),this.#i=[],this.#o=new Uint8Array(0),this.#T=new Uint8Array(0),this.#g=[[0,0,0,0,0,1,1,0,0,0,1,0,1,0,0,1,0,0,1,0,1,0,0,0,1],[3,1,1,1,0,3,1,1,0,1,3,1,0,1,1,3,0,1,1,1,4,1,1,1,1],[1,1,0,0,0,1,0,1,0,0,1,0,0,1,0,1,0,0,0,1,2,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,9,2313,9,16390,1,16391,1,16406,1,16407,1,16422,1,16423,1,16438,1,16439,1,16642,8,16646,8,16658,8,16662,8,18437,6,18439,6,18469,6,18471,6,18688,9,18689,9,18690,8,18693,6,18694,8,18695,6,18696,9,18697,9,18706,8,18710,8,18725,6,18727,6,131128,0,131129,0,131130,0,131131,0,131132,0,131133,0,131134,0,131135,0,131352,7,131354,7,131384,7,131386,7,133161,5,133165,5,133177,5,133181,5,133376,9,133377,9,133384,9,133385,9,133400,7,133402,7,133417,5,133421,5,133432,7,133433,5,133434,7,133437,5,147510,4,147511,4,147518,4,147519,4,147714,8,147718,8,147730,8,147734,8,147736,7,147738,7,147766,4,147767,4,147768,7,147770,7,147774,4,147775,4,149509,6,149511,6,149541,6,149543,6,149545,5,149549,5,149558,4,149559,4,149561,5,149565,5,149566,4,149567,4,149760,9,149761,9,149762,8,149765,6,149766,8,149767,6,149768,9,149769,9,149778,8,149782,8,149784,7,149786,7,149797,6,149799,6,149801,5,149805,5,149814,4,149815,4,149816,7,149817,5,149818,7,149821,5,149822,4,149823,4,149824,37,149825,37,149826,36,149829,34,149830,36,149831,34,149832,37,149833,37,149842,36,149846,36,149848,35,149850,35,149861,34,149863,34,149865,33,149869,33,149878,32,149879,32,149880,35,149881,33,149882,35,149885,33,149886,32,149887,32,150080,49,150082,48,150088,49,150098,48,150104,47,150106,47,151873,46,151877,45,151881,46,151909,45,151913,44,151917,44,152128,49,152129,46,152136,49,152137,46,166214,43,166215,42,166230,43,166247,42,166262,41,166263,41,166466,48,166470,43,166482,48,166486,43,168261,45,168263,42,168293,45,168295,42,168512,31,168513,28,168514,31,168517,28,168518,25,168519,25,280952,40,280953,39,280954,40,280957,39,280958,38,280959,38,281176,47,281178,47,281208,40,281210,40,282985,44,282989,44,283001,39,283005,39,283208,30,283209,27,283224,30,283241,27,283256,22,283257,22,297334,41,297335,41,297342,38,297343,38,297554,29,297558,24,297562,29,297590,24,297594,21,297598,21,299365,26,299367,23,299373,26,299383,23,299389,20,299391,20,299584,31,299585,28,299586,31,299589,28,299590,25,299591,25,299592,30,299593,27,299602,29,299606,24,299608,30,299610,29,299621,26,299623,23,299625,27,299629,26,299638,24,299639,23,299640,22,299641,22,299642,21,299645,20,299646,21,299647,20,299648,61,299649,60,299650,61,299653,60,299654,59,299655,59,299656,58,299657,57,299666,55,299670,54,299672,58,299674,55,299685,52,299687,51,299689,57,299693,52,299702,54,299703,51,299704,56,299705,56,299706,53,299709,50,299710,53,299711,50,299904,61,299906,61,299912,58,299922,55,299928,58,299930,55,301697,60,301701,60,301705,57,301733,52,301737,57,301741,52,301952,79,301953,79,301960,76,301961,76,316038,59,316039,59,316054,54,316071,51,316086,54,316087,51,316290,78,316294,78,316306,73,316310,73,318085,77,318087,77,318117,70,318119,70,318336,79,318337,79,318338,78,318341,77,318342,78,318343,77,430776,56,430777,56,430778,53,430781,50,430782,53,430783,50,431e3,75,431002,72,431032,75,431034,72,432809,74,432813,69,432825,74,432829,69,433032,76,433033,76,433048,75,433065,74,433080,75,433081,74,447158,71,447159,68,447166,71,447167,68,447378,73,447382,73,447386,72,447414,71,447418,72,447422,71,449189,70,449191,70,449197,69,449207,68,449213,69,449215,68,449408,67,449409,67,449410,66,449413,64,449414,66,449415,64,449416,67,449417,67,449426,66,449430,66,449432,65,449434,65,449445,64,449447,64,449449,63,449453,63,449462,62,449463,62,449464,65,449465,63,449466,65,449469,63,449470,62,449471,62,449472,19,449473,19,449474,18,449477,16,449478,18,449479,16,449480,19,449481,19,449490,18,449494,18,449496,17,449498,17,449509,16,449511,16,449513,15,449517,15,449526,14,449527,14,449528,17,449529,15,449530,17,449533,15,449534,14,449535,14,449728,19,449729,19,449730,18,449734,18,449736,19,449737,19,449746,18,449750,18,449752,17,449754,17,449784,17,449786,17,451520,19,451521,19,451525,16,451527,16,451528,19,451529,19,451557,16,451559,16,451561,15,451565,15,451577,15,451581,15,451776,19,451777,19,451784,19,451785,19,465858,18,465861,16,465862,18,465863,16,465874,18,465878,18,465893,16,465895,16,465910,14,465911,14,465918,14,465919,14,466114,18,466118,18,466130,18,466134,18,467909,16,467911,16,467941,16,467943,16,468160,13,468161,13,468162,13,468163,13,468164,13,468165,13,468166,13,468167,13,580568,17,580570,17,580585,15,580589,15,580598,14,580599,14,580600,17,580601,15,580602,17,580605,15,580606,14,580607,14,580824,17,580826,17,580856,17,580858,17,582633,15,582637,15,582649,15,582653,15,582856,12,582857,12,582872,12,582873,12,582888,12,582889,12,582904,12,582905,12,596982,14,596983,14,596990,14,596991,14,597202,11,597206,11,597210,11,597214,11,597234,11,597238,11,597242,11,597246,11,599013,10,599015,10,599021,10,599023,10,599029,10,599031,10,599037,10,599039,10,599232,13,599233,13,599234,13,599235,13,599236,13,599237,13,599238,13,599239,13,599240,12,599241,12,599250,11,599254,11,599256,12,599257,12,599258,11,599262,11,599269,10,599271,10,599272,12,599273,12,599277,10,599279,10,599282,11,599285,10,599286,11,599287,10,599288,12,599289,12,599290,11,599293,10,599294,11,599295,10],this.#U=[0,0,1,-1,0,0,0,1,0,-1,0,0,1,0,0,-1,0,0,-1,1,0,0,0,0,1,-1,0,0,0,1,0,-1,0,0,-1,0,1,0,0,0,-1,1,0,0,0,0,1,-1,0,0,-1,0,0,1,0,0,-1,0,1,0,0,0,-1,1,0,2,1,1,0,0,1,1,1,-1,0,1,1,1,0,-1,0,2,1,0,1,0,1,1,-1,1,0,1,1,0,1,-1,0,2,0,1,1,0,1,-1,1,1,0,1,0,1,1,-1,0,2,1,0,0,1,1,1,-1,0,1,1,1,0,-1,1,0,2,0,1,0,1,1,-1,1,0,1,1,0,1,-1,1,0,2,0,0,1,1,1,-1,0,1,1,1,0,-1,1,1,1,4,2,1,1,0,4,1,2,1,0,4,1,1,2,0,1,4,2,1,0,1,4,1,2,0,1,4,1,1,0,2,1,4,2,0,1,1,4,1,0,2,1,4,1,0,1,2,1,4,0,2,1,1,4,0,1,2,1,4,0,1,1,2,1,2,1,1,0,0,3,2,1,0,0,3,1,2,0,0,1,2,1,0,1,0,3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1,0,3,0,1,2,0,2,-1,1,1,1,3,3,0,2,0,1,3,0,1,0,2,2,-1,1,1,1,3,3,0,0,2,1,3,0,0,1,2,2,-1,1,1,1]}noise(t,s,e,n){const r=this.#o,i=this.#T,l=this.#i,a=this.#x,o=this.#y,_=this.#S,c=this.#m,h=(t+s+e+n)*a,p=t+h,u=s+h,D=e+h,I=n+h,P=Math.floor(p),d=Math.floor(u),f=Math.floor(D),b=Math.floor(I),m=(P+d+f+b)*o,y=t-(P+m),x=s-(d+m),g=e-(f+m),S=n-(b+m),w=p-P,U=u-d,T=D-f,k=I-b,M=w+U+T+k;let A=0;for(let t=l[T-k+1|U-T+1<<1|U-k+1<<2|w-U+1<<3|w-T+1<<4|w-k+1<<5|M<<6|M+k<<8|M+T<<11|M+U<<14|M+w<<17];void 0!==t;t=t.next){const s=y+t.dx,e=x+t.dy,n=g+t.dz,l=S+t.dw,a=2-s*s-e*e-n*n-l*l;if(a>0){const o=P+t.xsb,c=d+t.ysb,h=f+t.zsb,p=b+t.wsb,u=i[r[r[r[255&o]+c&255]+h&255]+p&255];A+=a*a*a*a*(_[u]*s+_[u+1]*e+_[u+2]*n+_[u+3]*l)}}return A*c}seed(t){const e=this.#U,n=this.#g,r=this.#w,i=[];for(let t=0;t<e.length;t+=16){const s=n[e[t]];let r=null,l=null;for(let e=0;e<s.length;e+=5)l=this.#k(s[e],s[e+1],s[e+2],s[e+3],s[e+4]),null===r?i[t/16]=l:r.next=l,r=l;l&&(l.next=this.#k(e[t+1],e[t+2],e[t+3],e[t+4],e[t+5]),l.next.next=this.#k(e[t+6],e[t+7],e[t+8],e[t+9],e[t+10]),l.next.next.next=this.#k(e[t+11],e[t+12],e[t+13],e[t+14],e[t+15]))}this.#i=[];for(let t=0;t<r.length;t+=2)this.#i[r[t]]=i[r[t+1]];this.#o=new Uint8Array(256),this.#T=new Uint8Array(256);const l=new Uint8Array(256);for(let t=0;t<256;t++)l[t]=t;let a=new Uint32Array(1);a[0]=t,a=s(s(s(a)));for(let t=255;t>=0;t--){a=s(a);const e=new Uint32Array(1);e[0]=(a[0]+31)%(t+1),e[0]<0&&(e[0]+=t+1),this.#o[t]=l[e[0]],this.#T[t]=252&this.#o[t],l[e[0]]=l[t]}}#k(t,s,e,n,r){const i=this.#y;return{dx:-s-t*i,dy:-e-t*i,dz:-n-t*i,dw:-r-t*i,xsb:s,ysb:e,zsb:n,wsb:r}}}const l=globalThis;l.__tsParticlesInternals=l.__tsParticlesInternals??{},t.SimplexNoise=class{noise2d;noise3d;noise4d;constructor(){this.noise2d=new e,this.noise3d=new r,this.noise4d=new i}}}),delete(globalThis.window||globalThis).tsparticlesInternalExports;
|
|
@@ -1,16 +1,6 @@
|
|
|
1
1
|
export declare class SimplexNoise2D {
|
|
2
|
-
private
|
|
3
|
-
private readonly _SQUISH_2D;
|
|
4
|
-
private readonly _STRETCH_2D;
|
|
5
|
-
private readonly _base2D;
|
|
6
|
-
private readonly _gradients2D;
|
|
7
|
-
private _lookup;
|
|
8
|
-
private readonly _lookupPairs2D;
|
|
9
|
-
private readonly _p2D;
|
|
10
|
-
private _perm;
|
|
11
|
-
private _perm2D;
|
|
2
|
+
#private;
|
|
12
3
|
constructor();
|
|
13
4
|
noise(x: number, y: number): number;
|
|
14
5
|
seed(clientSeed: number): void;
|
|
15
|
-
private _contribution2D;
|
|
16
6
|
}
|
|
@@ -1,16 +1,6 @@
|
|
|
1
1
|
export declare class SimplexNoise3D {
|
|
2
|
-
private
|
|
3
|
-
private readonly _SQUISH_3D;
|
|
4
|
-
private readonly _STRETCH_3D;
|
|
5
|
-
private readonly _base3D;
|
|
6
|
-
private readonly _gradients3D;
|
|
7
|
-
private _lookup;
|
|
8
|
-
private readonly _lookupPairs3D;
|
|
9
|
-
private readonly _p3D;
|
|
10
|
-
private _perm;
|
|
11
|
-
private _perm3D;
|
|
2
|
+
#private;
|
|
12
3
|
constructor();
|
|
13
4
|
noise(x: number, y: number, z: number): number;
|
|
14
5
|
seed(clientSeed: number): void;
|
|
15
|
-
private _contribution3D;
|
|
16
6
|
}
|
|
@@ -1,16 +1,6 @@
|
|
|
1
1
|
export declare class SimplexNoise4D {
|
|
2
|
-
private
|
|
3
|
-
private readonly _SQUISH_4D;
|
|
4
|
-
private readonly _STRETCH_4D;
|
|
5
|
-
private readonly _base4D;
|
|
6
|
-
private readonly _gradients4D;
|
|
7
|
-
private _lookup;
|
|
8
|
-
private readonly _lookupPairs4D;
|
|
9
|
-
private readonly _p4D;
|
|
10
|
-
private _perm;
|
|
11
|
-
private _perm4D;
|
|
2
|
+
#private;
|
|
12
3
|
constructor();
|
|
13
4
|
noise(x: number, y: number, z: number, w: number): number;
|
|
14
5
|
seed(clientSeed: number): void;
|
|
15
|
-
private _contribution4D;
|
|
16
6
|
}
|