@tsparticles/perlin-noise 4.0.0-beta.8 → 4.0.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/browser.js +3 -0
- package/browser/index.lazy.js +1 -0
- package/cjs/browser.js +3 -0
- package/cjs/index.lazy.js +1 -0
- package/esm/browser.js +3 -0
- package/esm/index.lazy.js +1 -0
- package/package.json +8 -1
- package/report.html +4949 -94
- package/tsparticles.perlin.noise.js +394 -127
- package/tsparticles.perlin.noise.min.js +1 -1
- package/types/browser.d.ts +1 -0
- package/types/index.lazy.d.ts +1 -0
|
@@ -1,132 +1,399 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
*/
|
|
9
|
-
/*
|
|
10
|
-
* ATTENTION: The "eval" devtool has been used (maybe by default in mode: "development").
|
|
11
|
-
* This devtool is neither made for production nor for readable output files.
|
|
12
|
-
* It uses "eval()" calls to create a separate source file in the browser devtools.
|
|
13
|
-
* If you are trying to read the output file, select a different devtool (https://webpack.js.org/configuration/devtool/)
|
|
14
|
-
* or disable the default devtool with "devtool: false".
|
|
15
|
-
* If you are looking for production-ready output files, see mode: "production" (https://webpack.js.org/configuration/mode/).
|
|
16
|
-
*/
|
|
17
|
-
(function webpackUniversalModuleDefinition(root, factory) {
|
|
18
|
-
if(typeof exports === 'object' && typeof module === 'object')
|
|
19
|
-
module.exports = factory();
|
|
20
|
-
else if(typeof define === 'function' && define.amd)
|
|
21
|
-
define([], factory);
|
|
22
|
-
else {
|
|
23
|
-
var a = factory();
|
|
24
|
-
for(var i in a) (typeof exports === 'object' ? exports : root)[i] = a[i];
|
|
25
|
-
}
|
|
26
|
-
})(this, () => {
|
|
27
|
-
return /******/ (() => { // webpackBootstrap
|
|
28
|
-
/******/ "use strict";
|
|
29
|
-
/******/ var __webpack_modules__ = ({
|
|
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.0 */
|
|
3
|
+
(function (global, factory) {
|
|
4
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
|
|
5
|
+
typeof define === 'function' && define.amd ? define(['exports'], factory) :
|
|
6
|
+
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.__tsParticlesInternals = global.__tsParticlesInternals || {}, global.__tsParticlesInternals.perlin = global.__tsParticlesInternals.perlin || {}, global.__tsParticlesInternals.perlin.noise = global.__tsParticlesInternals.perlin.noise || {})));
|
|
7
|
+
})(this, (function (exports) { 'use strict';
|
|
30
8
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
9
|
+
class Grad {
|
|
10
|
+
w;
|
|
11
|
+
x;
|
|
12
|
+
y;
|
|
13
|
+
z;
|
|
14
|
+
constructor(x, y, z, w) {
|
|
15
|
+
this.x = x;
|
|
16
|
+
this.y = y;
|
|
17
|
+
this.z = z;
|
|
18
|
+
this.w = w;
|
|
19
|
+
}
|
|
20
|
+
dot2(x, y) {
|
|
21
|
+
return this.x * x + this.y * y;
|
|
22
|
+
}
|
|
23
|
+
dot3(x, y, z) {
|
|
24
|
+
return this.dot2(x, y) + this.z * z;
|
|
25
|
+
}
|
|
26
|
+
dot4(x, y, z, w) {
|
|
27
|
+
return this.dot3(x, y, z) + this.w * w;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
36
30
|
|
|
37
|
-
|
|
31
|
+
class PerlinNoise {
|
|
32
|
+
_grad4;
|
|
33
|
+
_gradP;
|
|
34
|
+
_p;
|
|
35
|
+
_perm;
|
|
36
|
+
constructor() {
|
|
37
|
+
this._grad4 = [
|
|
38
|
+
new Grad(0, 1, 1, 1),
|
|
39
|
+
new Grad(0, 1, 1, -1),
|
|
40
|
+
new Grad(0, 1, -1, 1),
|
|
41
|
+
new Grad(0, 1, -1, -1),
|
|
42
|
+
new Grad(0, -1, 1, 1),
|
|
43
|
+
new Grad(0, -1, 1, -1),
|
|
44
|
+
new Grad(0, -1, -1, 1),
|
|
45
|
+
new Grad(0, -1, -1, -1),
|
|
46
|
+
new Grad(1, 0, 1, 1),
|
|
47
|
+
new Grad(1, 0, 1, -1),
|
|
48
|
+
new Grad(1, 0, -1, 1),
|
|
49
|
+
new Grad(1, 0, -1, -1),
|
|
50
|
+
new Grad(-1, 0, 1, 1),
|
|
51
|
+
new Grad(-1, 0, 1, -1),
|
|
52
|
+
new Grad(-1, 0, -1, 1),
|
|
53
|
+
new Grad(-1, 0, -1, -1),
|
|
54
|
+
new Grad(1, 1, 0, 1),
|
|
55
|
+
new Grad(1, 1, 0, -1),
|
|
56
|
+
new Grad(1, -1, 0, 1),
|
|
57
|
+
new Grad(1, -1, 0, -1),
|
|
58
|
+
new Grad(-1, 1, 0, 1),
|
|
59
|
+
new Grad(-1, 1, 0, -1),
|
|
60
|
+
new Grad(-1, -1, 0, 1),
|
|
61
|
+
new Grad(-1, -1, 0, -1),
|
|
62
|
+
new Grad(1, 1, 1, 0),
|
|
63
|
+
new Grad(1, 1, -1, 0),
|
|
64
|
+
new Grad(1, -1, 1, 0),
|
|
65
|
+
new Grad(1, -1, -1, 0),
|
|
66
|
+
new Grad(-1, 1, 1, 0),
|
|
67
|
+
new Grad(-1, 1, -1, 0),
|
|
68
|
+
new Grad(-1, -1, 1, 0),
|
|
69
|
+
new Grad(-1, -1, -1, 0),
|
|
70
|
+
];
|
|
71
|
+
this._p = [
|
|
72
|
+
151,
|
|
73
|
+
160,
|
|
74
|
+
137,
|
|
75
|
+
91,
|
|
76
|
+
90,
|
|
77
|
+
15,
|
|
78
|
+
131,
|
|
79
|
+
13,
|
|
80
|
+
201,
|
|
81
|
+
95,
|
|
82
|
+
96,
|
|
83
|
+
53,
|
|
84
|
+
194,
|
|
85
|
+
233,
|
|
86
|
+
7,
|
|
87
|
+
225,
|
|
88
|
+
140,
|
|
89
|
+
36,
|
|
90
|
+
103,
|
|
91
|
+
30,
|
|
92
|
+
69,
|
|
93
|
+
142,
|
|
94
|
+
8,
|
|
95
|
+
99,
|
|
96
|
+
37,
|
|
97
|
+
240,
|
|
98
|
+
21,
|
|
99
|
+
10,
|
|
100
|
+
23,
|
|
101
|
+
190,
|
|
102
|
+
6,
|
|
103
|
+
148,
|
|
104
|
+
247,
|
|
105
|
+
120,
|
|
106
|
+
234,
|
|
107
|
+
75,
|
|
108
|
+
0,
|
|
109
|
+
26,
|
|
110
|
+
197,
|
|
111
|
+
62,
|
|
112
|
+
94,
|
|
113
|
+
252,
|
|
114
|
+
219,
|
|
115
|
+
203,
|
|
116
|
+
117,
|
|
117
|
+
35,
|
|
118
|
+
11,
|
|
119
|
+
32,
|
|
120
|
+
57,
|
|
121
|
+
177,
|
|
122
|
+
33,
|
|
123
|
+
88,
|
|
124
|
+
237,
|
|
125
|
+
149,
|
|
126
|
+
56,
|
|
127
|
+
87,
|
|
128
|
+
174,
|
|
129
|
+
20,
|
|
130
|
+
125,
|
|
131
|
+
136,
|
|
132
|
+
171,
|
|
133
|
+
168,
|
|
134
|
+
68,
|
|
135
|
+
175,
|
|
136
|
+
74,
|
|
137
|
+
165,
|
|
138
|
+
71,
|
|
139
|
+
134,
|
|
140
|
+
139,
|
|
141
|
+
48,
|
|
142
|
+
27,
|
|
143
|
+
166,
|
|
144
|
+
77,
|
|
145
|
+
146,
|
|
146
|
+
158,
|
|
147
|
+
231,
|
|
148
|
+
83,
|
|
149
|
+
111,
|
|
150
|
+
229,
|
|
151
|
+
122,
|
|
152
|
+
60,
|
|
153
|
+
211,
|
|
154
|
+
133,
|
|
155
|
+
230,
|
|
156
|
+
220,
|
|
157
|
+
105,
|
|
158
|
+
92,
|
|
159
|
+
41,
|
|
160
|
+
55,
|
|
161
|
+
46,
|
|
162
|
+
245,
|
|
163
|
+
40,
|
|
164
|
+
244,
|
|
165
|
+
102,
|
|
166
|
+
143,
|
|
167
|
+
54,
|
|
168
|
+
65,
|
|
169
|
+
25,
|
|
170
|
+
63,
|
|
171
|
+
161,
|
|
172
|
+
1,
|
|
173
|
+
216,
|
|
174
|
+
80,
|
|
175
|
+
73,
|
|
176
|
+
209,
|
|
177
|
+
76,
|
|
178
|
+
132,
|
|
179
|
+
187,
|
|
180
|
+
208,
|
|
181
|
+
89,
|
|
182
|
+
18,
|
|
183
|
+
169,
|
|
184
|
+
200,
|
|
185
|
+
196,
|
|
186
|
+
135,
|
|
187
|
+
130,
|
|
188
|
+
116,
|
|
189
|
+
188,
|
|
190
|
+
159,
|
|
191
|
+
86,
|
|
192
|
+
164,
|
|
193
|
+
100,
|
|
194
|
+
109,
|
|
195
|
+
198,
|
|
196
|
+
173,
|
|
197
|
+
186,
|
|
198
|
+
3,
|
|
199
|
+
64,
|
|
200
|
+
52,
|
|
201
|
+
217,
|
|
202
|
+
226,
|
|
203
|
+
250,
|
|
204
|
+
124,
|
|
205
|
+
123,
|
|
206
|
+
5,
|
|
207
|
+
202,
|
|
208
|
+
38,
|
|
209
|
+
147,
|
|
210
|
+
118,
|
|
211
|
+
126,
|
|
212
|
+
255,
|
|
213
|
+
82,
|
|
214
|
+
85,
|
|
215
|
+
212,
|
|
216
|
+
207,
|
|
217
|
+
206,
|
|
218
|
+
59,
|
|
219
|
+
227,
|
|
220
|
+
47,
|
|
221
|
+
16,
|
|
222
|
+
58,
|
|
223
|
+
17,
|
|
224
|
+
182,
|
|
225
|
+
189,
|
|
226
|
+
28,
|
|
227
|
+
42,
|
|
228
|
+
223,
|
|
229
|
+
183,
|
|
230
|
+
170,
|
|
231
|
+
213,
|
|
232
|
+
119,
|
|
233
|
+
248,
|
|
234
|
+
152,
|
|
235
|
+
2,
|
|
236
|
+
44,
|
|
237
|
+
154,
|
|
238
|
+
163,
|
|
239
|
+
70,
|
|
240
|
+
221,
|
|
241
|
+
153,
|
|
242
|
+
101,
|
|
243
|
+
155,
|
|
244
|
+
167,
|
|
245
|
+
43,
|
|
246
|
+
172,
|
|
247
|
+
9,
|
|
248
|
+
129,
|
|
249
|
+
22,
|
|
250
|
+
39,
|
|
251
|
+
253,
|
|
252
|
+
19,
|
|
253
|
+
98,
|
|
254
|
+
108,
|
|
255
|
+
110,
|
|
256
|
+
79,
|
|
257
|
+
113,
|
|
258
|
+
224,
|
|
259
|
+
232,
|
|
260
|
+
178,
|
|
261
|
+
185,
|
|
262
|
+
112,
|
|
263
|
+
104,
|
|
264
|
+
218,
|
|
265
|
+
246,
|
|
266
|
+
97,
|
|
267
|
+
228,
|
|
268
|
+
251,
|
|
269
|
+
34,
|
|
270
|
+
242,
|
|
271
|
+
193,
|
|
272
|
+
238,
|
|
273
|
+
210,
|
|
274
|
+
144,
|
|
275
|
+
12,
|
|
276
|
+
191,
|
|
277
|
+
179,
|
|
278
|
+
162,
|
|
279
|
+
241,
|
|
280
|
+
81,
|
|
281
|
+
51,
|
|
282
|
+
145,
|
|
283
|
+
235,
|
|
284
|
+
249,
|
|
285
|
+
14,
|
|
286
|
+
239,
|
|
287
|
+
107,
|
|
288
|
+
49,
|
|
289
|
+
192,
|
|
290
|
+
214,
|
|
291
|
+
31,
|
|
292
|
+
181,
|
|
293
|
+
199,
|
|
294
|
+
106,
|
|
295
|
+
157,
|
|
296
|
+
184,
|
|
297
|
+
84,
|
|
298
|
+
204,
|
|
299
|
+
176,
|
|
300
|
+
115,
|
|
301
|
+
121,
|
|
302
|
+
50,
|
|
303
|
+
45,
|
|
304
|
+
127,
|
|
305
|
+
4,
|
|
306
|
+
150,
|
|
307
|
+
254,
|
|
308
|
+
138,
|
|
309
|
+
236,
|
|
310
|
+
205,
|
|
311
|
+
93,
|
|
312
|
+
222,
|
|
313
|
+
114,
|
|
314
|
+
67,
|
|
315
|
+
29,
|
|
316
|
+
24,
|
|
317
|
+
72,
|
|
318
|
+
243,
|
|
319
|
+
141,
|
|
320
|
+
128,
|
|
321
|
+
195,
|
|
322
|
+
78,
|
|
323
|
+
66,
|
|
324
|
+
215,
|
|
325
|
+
61,
|
|
326
|
+
156,
|
|
327
|
+
180,
|
|
328
|
+
];
|
|
329
|
+
this._gradP = new Array(512);
|
|
330
|
+
this._perm = new Array(512);
|
|
331
|
+
}
|
|
332
|
+
noise2d(x, y) {
|
|
333
|
+
const { _gradP, _perm } = this;
|
|
334
|
+
let X = Math.floor(x), Y = Math.floor(y);
|
|
335
|
+
x -= X;
|
|
336
|
+
y -= Y;
|
|
337
|
+
X &= 255;
|
|
338
|
+
Y &= 255;
|
|
339
|
+
const n00 = _gradP[X + _perm[Y]].dot2(x, y), n01 = _gradP[X + _perm[Y + 1]].dot2(x, y - 1), n10 = _gradP[X + 1 + _perm[Y]].dot2(x - 1, y), n11 = _gradP[X + 1 + _perm[Y + 1]].dot2(x - 1, y - 1), u = this._fade(x);
|
|
340
|
+
return this._lerp(this._lerp(n00, n10, u), this._lerp(n01, n11, u), this._fade(y));
|
|
341
|
+
}
|
|
342
|
+
noise3d(x, y, z) {
|
|
343
|
+
const { _gradP: gradP, _perm: perm } = this;
|
|
344
|
+
let X = Math.floor(x), Y = Math.floor(y), Z = Math.floor(z);
|
|
345
|
+
x = x - X;
|
|
346
|
+
y = y - Y;
|
|
347
|
+
z = z - Z;
|
|
348
|
+
X = X & 255;
|
|
349
|
+
Y = Y & 255;
|
|
350
|
+
Z = Z & 255;
|
|
351
|
+
const n000 = gradP[X + perm[Y + perm[Z]]].dot3(x, y, z), n001 = gradP[X + perm[Y + perm[Z + 1]]].dot3(x, y, z - 1), n010 = gradP[X + perm[Y + 1 + perm[Z]]].dot3(x, y - 1, z), n011 = gradP[X + perm[Y + 1 + perm[Z + 1]]].dot3(x, y - 1, z - 1), n100 = gradP[X + 1 + perm[Y + perm[Z]]].dot3(x - 1, y, z), n101 = gradP[X + 1 + perm[Y + perm[Z + 1]]].dot3(x - 1, y, z - 1), n110 = gradP[X + 1 + perm[Y + 1 + perm[Z]]].dot3(x - 1, y - 1, z), n111 = gradP[X + 1 + perm[Y + 1 + perm[Z + 1]]].dot3(x - 1, y - 1, z - 1), u = this._fade(x), v = this._fade(y), w = this._fade(z);
|
|
352
|
+
return this._lerp(this._lerp(this._lerp(n000, n100, u), this._lerp(n001, n101, u), w), this._lerp(this._lerp(n010, n110, u), this._lerp(n011, n111, u), w), v);
|
|
353
|
+
}
|
|
354
|
+
noise4d(x, y, z, w) {
|
|
355
|
+
const { _gradP: gradP, _perm: perm } = this;
|
|
356
|
+
let X = Math.floor(x), Y = Math.floor(y), Z = Math.floor(z), W = Math.floor(w);
|
|
357
|
+
x -= X;
|
|
358
|
+
y -= Y;
|
|
359
|
+
z -= Z;
|
|
360
|
+
w -= W;
|
|
361
|
+
X &= 255;
|
|
362
|
+
Y &= 255;
|
|
363
|
+
Z &= 255;
|
|
364
|
+
W &= 255;
|
|
365
|
+
const u = this._fade(x), v = this._fade(y), s = this._fade(z), t = this._fade(w), gi = (i, j, k, l) => gradP[X + i + perm[Y + j + perm[Z + k + perm[W + l]]]], n0000 = gi(0, 0, 0, 0).dot4(x, y, z, w), n0001 = gi(0, 0, 0, 1).dot4(x, y, z, w - 1), n0010 = gi(0, 0, 1, 0).dot4(x, y, z - 1, w), n0011 = gi(0, 0, 1, 1).dot4(x, y, z - 1, w - 1), n0100 = gi(0, 1, 0, 0).dot4(x, y - 1, z, w), n0101 = gi(0, 1, 0, 1).dot4(x, y - 1, z, w - 1), n0110 = gi(0, 1, 1, 0).dot4(x, y - 1, z - 1, w), n0111 = gi(0, 1, 1, 1).dot4(x, y - 1, z - 1, w - 1), n1000 = gi(1, 0, 0, 0).dot4(x - 1, y, z, w), n1001 = gi(1, 0, 0, 1).dot4(x - 1, y, z, w - 1), n1010 = gi(1, 0, 1, 0).dot4(x - 1, y, z - 1, w), n1011 = gi(1, 0, 1, 1).dot4(x - 1, y, z - 1, w - 1), n1100 = gi(1, 1, 0, 0).dot4(x - 1, y - 1, z, w), n1101 = gi(1, 1, 0, 1).dot4(x - 1, y - 1, z, w - 1), n1110 = gi(1, 1, 1, 0).dot4(x - 1, y - 1, z - 1, w), n1111 = gi(1, 1, 1, 1).dot4(x - 1, y - 1, z - 1, w - 1), x00 = this._lerp(n0000, n1000, u), x01 = this._lerp(n0001, n1001, u), x10 = this._lerp(n0010, n1010, u), x11 = this._lerp(n0011, n1011, u), y00 = this._lerp(x00, x10, s), y01 = this._lerp(x01, x11, s), x20 = this._lerp(n0100, n1100, u), x21 = this._lerp(n0101, n1101, u), x30 = this._lerp(n0110, n1110, u), x31 = this._lerp(n0111, n1111, u), y10 = this._lerp(x20, x30, s), y11 = this._lerp(x21, x31, s), z0 = this._lerp(y00, y10, v), z1 = this._lerp(y01, y11, v);
|
|
366
|
+
return this._lerp(z0, z1, t);
|
|
367
|
+
}
|
|
368
|
+
seed(inputSeed) {
|
|
369
|
+
const { _grad4: grad4, _gradP: gradP, _perm: perm, _p: p } = this;
|
|
370
|
+
let seed = inputSeed;
|
|
371
|
+
if (seed > 0 && seed < 1) {
|
|
372
|
+
seed *= 65536;
|
|
373
|
+
}
|
|
374
|
+
seed = Math.floor(seed);
|
|
375
|
+
if (seed < 256) {
|
|
376
|
+
seed |= seed << 8;
|
|
377
|
+
}
|
|
378
|
+
const grad4Length = grad4.length;
|
|
379
|
+
for (let i = 0; i < 256; i++) {
|
|
380
|
+
const v = i & 1 ? p[i] ^ (seed & 255) : p[i] ^ ((seed >> 8) & 255);
|
|
381
|
+
perm[i] = perm[i + 256] = v;
|
|
382
|
+
gradP[i] = gradP[i + 256] = grad4[v % grad4Length];
|
|
383
|
+
}
|
|
384
|
+
}
|
|
385
|
+
_fade(t) {
|
|
386
|
+
return t * t * t * (t * (t * 6 - 15) + 10);
|
|
387
|
+
}
|
|
388
|
+
_lerp(a, b, t) {
|
|
389
|
+
return (1 - t) * a + t * b;
|
|
390
|
+
}
|
|
391
|
+
}
|
|
38
392
|
|
|
39
|
-
|
|
393
|
+
const globalObject = globalThis;
|
|
394
|
+
globalObject.__tsParticlesInternals = globalObject.__tsParticlesInternals ?? {};
|
|
40
395
|
|
|
41
|
-
|
|
42
|
-
/*!*************************************!*\
|
|
43
|
-
!*** ./dist/browser/PerlinNoise.js ***!
|
|
44
|
-
\*************************************/
|
|
45
|
-
(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
396
|
+
exports.PerlinNoise = PerlinNoise;
|
|
46
397
|
|
|
47
|
-
eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ PerlinNoise: () => (/* binding */ PerlinNoise)\n/* harmony export */ });\n/* harmony import */ var _Grad_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Grad.js */ \"./dist/browser/Grad.js\");\n\nclass PerlinNoise {\n _grad4;\n _gradP;\n _p;\n _perm;\n constructor(){\n this._grad4 = [\n new _Grad_js__WEBPACK_IMPORTED_MODULE_0__.Grad(0, 1, 1, 1),\n new _Grad_js__WEBPACK_IMPORTED_MODULE_0__.Grad(0, 1, 1, -1),\n new _Grad_js__WEBPACK_IMPORTED_MODULE_0__.Grad(0, 1, -1, 1),\n new _Grad_js__WEBPACK_IMPORTED_MODULE_0__.Grad(0, 1, -1, -1),\n new _Grad_js__WEBPACK_IMPORTED_MODULE_0__.Grad(0, -1, 1, 1),\n new _Grad_js__WEBPACK_IMPORTED_MODULE_0__.Grad(0, -1, 1, -1),\n new _Grad_js__WEBPACK_IMPORTED_MODULE_0__.Grad(0, -1, -1, 1),\n new _Grad_js__WEBPACK_IMPORTED_MODULE_0__.Grad(0, -1, -1, -1),\n new _Grad_js__WEBPACK_IMPORTED_MODULE_0__.Grad(1, 0, 1, 1),\n new _Grad_js__WEBPACK_IMPORTED_MODULE_0__.Grad(1, 0, 1, -1),\n new _Grad_js__WEBPACK_IMPORTED_MODULE_0__.Grad(1, 0, -1, 1),\n new _Grad_js__WEBPACK_IMPORTED_MODULE_0__.Grad(1, 0, -1, -1),\n new _Grad_js__WEBPACK_IMPORTED_MODULE_0__.Grad(-1, 0, 1, 1),\n new _Grad_js__WEBPACK_IMPORTED_MODULE_0__.Grad(-1, 0, 1, -1),\n new _Grad_js__WEBPACK_IMPORTED_MODULE_0__.Grad(-1, 0, -1, 1),\n new _Grad_js__WEBPACK_IMPORTED_MODULE_0__.Grad(-1, 0, -1, -1),\n new _Grad_js__WEBPACK_IMPORTED_MODULE_0__.Grad(1, 1, 0, 1),\n new _Grad_js__WEBPACK_IMPORTED_MODULE_0__.Grad(1, 1, 0, -1),\n new _Grad_js__WEBPACK_IMPORTED_MODULE_0__.Grad(1, -1, 0, 1),\n new _Grad_js__WEBPACK_IMPORTED_MODULE_0__.Grad(1, -1, 0, -1),\n new _Grad_js__WEBPACK_IMPORTED_MODULE_0__.Grad(-1, 1, 0, 1),\n new _Grad_js__WEBPACK_IMPORTED_MODULE_0__.Grad(-1, 1, 0, -1),\n new _Grad_js__WEBPACK_IMPORTED_MODULE_0__.Grad(-1, -1, 0, 1),\n new _Grad_js__WEBPACK_IMPORTED_MODULE_0__.Grad(-1, -1, 0, -1),\n new _Grad_js__WEBPACK_IMPORTED_MODULE_0__.Grad(1, 1, 1, 0),\n new _Grad_js__WEBPACK_IMPORTED_MODULE_0__.Grad(1, 1, -1, 0),\n new _Grad_js__WEBPACK_IMPORTED_MODULE_0__.Grad(1, -1, 1, 0),\n new _Grad_js__WEBPACK_IMPORTED_MODULE_0__.Grad(1, -1, -1, 0),\n new _Grad_js__WEBPACK_IMPORTED_MODULE_0__.Grad(-1, 1, 1, 0),\n new _Grad_js__WEBPACK_IMPORTED_MODULE_0__.Grad(-1, 1, -1, 0),\n new _Grad_js__WEBPACK_IMPORTED_MODULE_0__.Grad(-1, -1, 1, 0),\n new _Grad_js__WEBPACK_IMPORTED_MODULE_0__.Grad(-1, -1, -1, 0)\n ];\n this._p = [\n 151,\n 160,\n 137,\n 91,\n 90,\n 15,\n 131,\n 13,\n 201,\n 95,\n 96,\n 53,\n 194,\n 233,\n 7,\n 225,\n 140,\n 36,\n 103,\n 30,\n 69,\n 142,\n 8,\n 99,\n 37,\n 240,\n 21,\n 10,\n 23,\n 190,\n 6,\n 148,\n 247,\n 120,\n 234,\n 75,\n 0,\n 26,\n 197,\n 62,\n 94,\n 252,\n 219,\n 203,\n 117,\n 35,\n 11,\n 32,\n 57,\n 177,\n 33,\n 88,\n 237,\n 149,\n 56,\n 87,\n 174,\n 20,\n 125,\n 136,\n 171,\n 168,\n 68,\n 175,\n 74,\n 165,\n 71,\n 134,\n 139,\n 48,\n 27,\n 166,\n 77,\n 146,\n 158,\n 231,\n 83,\n 111,\n 229,\n 122,\n 60,\n 211,\n 133,\n 230,\n 220,\n 105,\n 92,\n 41,\n 55,\n 46,\n 245,\n 40,\n 244,\n 102,\n 143,\n 54,\n 65,\n 25,\n 63,\n 161,\n 1,\n 216,\n 80,\n 73,\n 209,\n 76,\n 132,\n 187,\n 208,\n 89,\n 18,\n 169,\n 200,\n 196,\n 135,\n 130,\n 116,\n 188,\n 159,\n 86,\n 164,\n 100,\n 109,\n 198,\n 173,\n 186,\n 3,\n 64,\n 52,\n 217,\n 226,\n 250,\n 124,\n 123,\n 5,\n 202,\n 38,\n 147,\n 118,\n 126,\n 255,\n 82,\n 85,\n 212,\n 207,\n 206,\n 59,\n 227,\n 47,\n 16,\n 58,\n 17,\n 182,\n 189,\n 28,\n 42,\n 223,\n 183,\n 170,\n 213,\n 119,\n 248,\n 152,\n 2,\n 44,\n 154,\n 163,\n 70,\n 221,\n 153,\n 101,\n 155,\n 167,\n 43,\n 172,\n 9,\n 129,\n 22,\n 39,\n 253,\n 19,\n 98,\n 108,\n 110,\n 79,\n 113,\n 224,\n 232,\n 178,\n 185,\n 112,\n 104,\n 218,\n 246,\n 97,\n 228,\n 251,\n 34,\n 242,\n 193,\n 238,\n 210,\n 144,\n 12,\n 191,\n 179,\n 162,\n 241,\n 81,\n 51,\n 145,\n 235,\n 249,\n 14,\n 239,\n 107,\n 49,\n 192,\n 214,\n 31,\n 181,\n 199,\n 106,\n 157,\n 184,\n 84,\n 204,\n 176,\n 115,\n 121,\n 50,\n 45,\n 127,\n 4,\n 150,\n 254,\n 138,\n 236,\n 205,\n 93,\n 222,\n 114,\n 67,\n 29,\n 24,\n 72,\n 243,\n 141,\n 128,\n 195,\n 78,\n 66,\n 215,\n 61,\n 156,\n 180\n ];\n this._gradP = new Array(512);\n this._perm = new Array(512);\n }\n noise2d(x, y) {\n const { _gradP, _perm } = this;\n let X = Math.floor(x), Y = Math.floor(y);\n x -= X;\n y -= Y;\n X &= 255;\n Y &= 255;\n const n00 = _gradP[X + _perm[Y]].dot2(x, y), n01 = _gradP[X + _perm[Y + 1]].dot2(x, y - 1), n10 = _gradP[X + 1 + _perm[Y]].dot2(x - 1, y), n11 = _gradP[X + 1 + _perm[Y + 1]].dot2(x - 1, y - 1), u = this._fade(x);\n return this._lerp(this._lerp(n00, n10, u), this._lerp(n01, n11, u), this._fade(y));\n }\n noise3d(x, y, z) {\n const { _gradP: gradP, _perm: perm } = this;\n let X = Math.floor(x), Y = Math.floor(y), Z = Math.floor(z);\n x = x - X;\n y = y - Y;\n z = z - Z;\n X = X & 255;\n Y = Y & 255;\n Z = Z & 255;\n const n000 = gradP[X + perm[Y + perm[Z]]].dot3(x, y, z), n001 = gradP[X + perm[Y + perm[Z + 1]]].dot3(x, y, z - 1), n010 = gradP[X + perm[Y + 1 + perm[Z]]].dot3(x, y - 1, z), n011 = gradP[X + perm[Y + 1 + perm[Z + 1]]].dot3(x, y - 1, z - 1), n100 = gradP[X + 1 + perm[Y + perm[Z]]].dot3(x - 1, y, z), n101 = gradP[X + 1 + perm[Y + perm[Z + 1]]].dot3(x - 1, y, z - 1), n110 = gradP[X + 1 + perm[Y + 1 + perm[Z]]].dot3(x - 1, y - 1, z), n111 = gradP[X + 1 + perm[Y + 1 + perm[Z + 1]]].dot3(x - 1, y - 1, z - 1), u = this._fade(x), v = this._fade(y), w = this._fade(z);\n return this._lerp(this._lerp(this._lerp(n000, n100, u), this._lerp(n001, n101, u), w), this._lerp(this._lerp(n010, n110, u), this._lerp(n011, n111, u), w), v);\n }\n noise4d(x, y, z, w) {\n const { _gradP: gradP, _perm: perm } = this;\n let X = Math.floor(x), Y = Math.floor(y), Z = Math.floor(z), W = Math.floor(w);\n x -= X;\n y -= Y;\n z -= Z;\n w -= W;\n X &= 255;\n Y &= 255;\n Z &= 255;\n W &= 255;\n const u = this._fade(x), v = this._fade(y), s = this._fade(z), t = this._fade(w), gi = (i, j, k, l)=>gradP[X + i + perm[Y + j + perm[Z + k + perm[W + l]]]], n0000 = gi(0, 0, 0, 0).dot4(x, y, z, w), n0001 = gi(0, 0, 0, 1).dot4(x, y, z, w - 1), n0010 = gi(0, 0, 1, 0).dot4(x, y, z - 1, w), n0011 = gi(0, 0, 1, 1).dot4(x, y, z - 1, w - 1), n0100 = gi(0, 1, 0, 0).dot4(x, y - 1, z, w), n0101 = gi(0, 1, 0, 1).dot4(x, y - 1, z, w - 1), n0110 = gi(0, 1, 1, 0).dot4(x, y - 1, z - 1, w), n0111 = gi(0, 1, 1, 1).dot4(x, y - 1, z - 1, w - 1), n1000 = gi(1, 0, 0, 0).dot4(x - 1, y, z, w), n1001 = gi(1, 0, 0, 1).dot4(x - 1, y, z, w - 1), n1010 = gi(1, 0, 1, 0).dot4(x - 1, y, z - 1, w), n1011 = gi(1, 0, 1, 1).dot4(x - 1, y, z - 1, w - 1), n1100 = gi(1, 1, 0, 0).dot4(x - 1, y - 1, z, w), n1101 = gi(1, 1, 0, 1).dot4(x - 1, y - 1, z, w - 1), n1110 = gi(1, 1, 1, 0).dot4(x - 1, y - 1, z - 1, w), n1111 = gi(1, 1, 1, 1).dot4(x - 1, y - 1, z - 1, w - 1), x00 = this._lerp(n0000, n1000, u), x01 = this._lerp(n0001, n1001, u), x10 = this._lerp(n0010, n1010, u), x11 = this._lerp(n0011, n1011, u), y00 = this._lerp(x00, x10, s), y01 = this._lerp(x01, x11, s), x20 = this._lerp(n0100, n1100, u), x21 = this._lerp(n0101, n1101, u), x30 = this._lerp(n0110, n1110, u), x31 = this._lerp(n0111, n1111, u), y10 = this._lerp(x20, x30, s), y11 = this._lerp(x21, x31, s), z0 = this._lerp(y00, y10, v), z1 = this._lerp(y01, y11, v);\n return this._lerp(z0, z1, t);\n }\n seed(inputSeed) {\n const { _grad4: grad4, _gradP: gradP, _perm: perm, _p: p } = this;\n let seed = inputSeed;\n if (seed > 0 && seed < 1) {\n seed *= 65536;\n }\n seed = Math.floor(seed);\n if (seed < 256) {\n seed |= seed << 8;\n }\n const grad4Length = grad4.length;\n for(let i = 0; i < 256; i++){\n const v = i & 1 ? p[i] ^ seed & 255 : p[i] ^ seed >> 8 & 255;\n perm[i] = perm[i + 256] = v;\n gradP[i] = gradP[i + 256] = grad4[v % grad4Length];\n }\n }\n _fade(t) {\n return t * t * t * (t * (t * 6 - 15) + 10);\n }\n _lerp(a, b, t) {\n return (1 - t) * a + t * b;\n }\n}\n\n\n//# sourceURL=webpack://@tsparticles/perlin-noise/./dist/browser/PerlinNoise.js?\n}");
|
|
48
|
-
|
|
49
|
-
/***/ },
|
|
50
|
-
|
|
51
|
-
/***/ "./dist/browser/index.js"
|
|
52
|
-
/*!*******************************!*\
|
|
53
|
-
!*** ./dist/browser/index.js ***!
|
|
54
|
-
\*******************************/
|
|
55
|
-
(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
56
|
-
|
|
57
|
-
eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ PerlinNoise: () => (/* reexport safe */ _PerlinNoise_js__WEBPACK_IMPORTED_MODULE_0__.PerlinNoise)\n/* harmony export */ });\n/* harmony import */ var _PerlinNoise_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./PerlinNoise.js */ \"./dist/browser/PerlinNoise.js\");\n\n\n\n//# sourceURL=webpack://@tsparticles/perlin-noise/./dist/browser/index.js?\n}");
|
|
58
|
-
|
|
59
|
-
/***/ }
|
|
60
|
-
|
|
61
|
-
/******/ });
|
|
62
|
-
/************************************************************************/
|
|
63
|
-
/******/ // The module cache
|
|
64
|
-
/******/ var __webpack_module_cache__ = {};
|
|
65
|
-
/******/
|
|
66
|
-
/******/ // The require function
|
|
67
|
-
/******/ function __webpack_require__(moduleId) {
|
|
68
|
-
/******/ // Check if module is in cache
|
|
69
|
-
/******/ var cachedModule = __webpack_module_cache__[moduleId];
|
|
70
|
-
/******/ if (cachedModule !== undefined) {
|
|
71
|
-
/******/ return cachedModule.exports;
|
|
72
|
-
/******/ }
|
|
73
|
-
/******/ // Create a new module (and put it into the cache)
|
|
74
|
-
/******/ var module = __webpack_module_cache__[moduleId] = {
|
|
75
|
-
/******/ // no module.id needed
|
|
76
|
-
/******/ // no module.loaded needed
|
|
77
|
-
/******/ exports: {}
|
|
78
|
-
/******/ };
|
|
79
|
-
/******/
|
|
80
|
-
/******/ // Execute the module function
|
|
81
|
-
/******/ if (!(moduleId in __webpack_modules__)) {
|
|
82
|
-
/******/ delete __webpack_module_cache__[moduleId];
|
|
83
|
-
/******/ var e = new Error("Cannot find module '" + moduleId + "'");
|
|
84
|
-
/******/ e.code = 'MODULE_NOT_FOUND';
|
|
85
|
-
/******/ throw e;
|
|
86
|
-
/******/ }
|
|
87
|
-
/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
|
|
88
|
-
/******/
|
|
89
|
-
/******/ // Return the exports of the module
|
|
90
|
-
/******/ return module.exports;
|
|
91
|
-
/******/ }
|
|
92
|
-
/******/
|
|
93
|
-
/************************************************************************/
|
|
94
|
-
/******/ /* webpack/runtime/define property getters */
|
|
95
|
-
/******/ (() => {
|
|
96
|
-
/******/ // define getter functions for harmony exports
|
|
97
|
-
/******/ __webpack_require__.d = (exports, definition) => {
|
|
98
|
-
/******/ for(var key in definition) {
|
|
99
|
-
/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
|
|
100
|
-
/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
|
|
101
|
-
/******/ }
|
|
102
|
-
/******/ }
|
|
103
|
-
/******/ };
|
|
104
|
-
/******/ })();
|
|
105
|
-
/******/
|
|
106
|
-
/******/ /* webpack/runtime/hasOwnProperty shorthand */
|
|
107
|
-
/******/ (() => {
|
|
108
|
-
/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
|
|
109
|
-
/******/ })();
|
|
110
|
-
/******/
|
|
111
|
-
/******/ /* webpack/runtime/make namespace object */
|
|
112
|
-
/******/ (() => {
|
|
113
|
-
/******/ // define __esModule on exports
|
|
114
|
-
/******/ __webpack_require__.r = (exports) => {
|
|
115
|
-
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
|
116
|
-
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
117
|
-
/******/ }
|
|
118
|
-
/******/ Object.defineProperty(exports, '__esModule', { value: true });
|
|
119
|
-
/******/ };
|
|
120
|
-
/******/ })();
|
|
121
|
-
/******/
|
|
122
|
-
/************************************************************************/
|
|
123
|
-
/******/
|
|
124
|
-
/******/ // startup
|
|
125
|
-
/******/ // Load entry module and return exports
|
|
126
|
-
/******/ // This entry module can't be inlined because the eval devtool is used.
|
|
127
|
-
/******/ var __webpack_exports__ = __webpack_require__("./dist/browser/index.js");
|
|
128
|
-
/******/
|
|
129
|
-
/******/ return __webpack_exports__;
|
|
130
|
-
/******/ })()
|
|
131
|
-
;
|
|
132
|
-
});
|
|
398
|
+
}));
|
|
399
|
+
delete (globalThis.window || globalThis).tsparticlesInternalExports;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(t
|
|
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.perlin=t.__tsParticlesInternals.perlin||{},t.__tsParticlesInternals.perlin.noise=t.__tsParticlesInternals.perlin.noise||{}))}(this,function(t){"use strict";class s{w;x;y;z;constructor(t,s,e,n){this.x=t,this.y=s,this.z=e,this.w=n}dot2(t,s){return this.x*t+this.y*s}dot3(t,s,e){return this.dot2(t,s)+this.z*e}dot4(t,s,e,n){return this.dot3(t,s,e)+this.w*n}}const e=globalThis;e.__tsParticlesInternals=e.__tsParticlesInternals??{},t.PerlinNoise=class{_grad4;_gradP;_p;_perm;constructor(){this._grad4=[new s(0,1,1,1),new s(0,1,1,-1),new s(0,1,-1,1),new s(0,1,-1,-1),new s(0,-1,1,1),new s(0,-1,1,-1),new s(0,-1,-1,1),new s(0,-1,-1,-1),new s(1,0,1,1),new s(1,0,1,-1),new s(1,0,-1,1),new s(1,0,-1,-1),new s(-1,0,1,1),new s(-1,0,1,-1),new s(-1,0,-1,1),new s(-1,0,-1,-1),new s(1,1,0,1),new s(1,1,0,-1),new s(1,-1,0,1),new s(1,-1,0,-1),new s(-1,1,0,1),new s(-1,1,0,-1),new s(-1,-1,0,1),new s(-1,-1,0,-1),new s(1,1,1,0),new s(1,1,-1,0),new s(1,-1,1,0),new s(1,-1,-1,0),new s(-1,1,1,0),new s(-1,1,-1,0),new s(-1,-1,1,0),new s(-1,-1,-1,0)],this._p=[151,160,137,91,90,15,131,13,201,95,96,53,194,233,7,225,140,36,103,30,69,142,8,99,37,240,21,10,23,190,6,148,247,120,234,75,0,26,197,62,94,252,219,203,117,35,11,32,57,177,33,88,237,149,56,87,174,20,125,136,171,168,68,175,74,165,71,134,139,48,27,166,77,146,158,231,83,111,229,122,60,211,133,230,220,105,92,41,55,46,245,40,244,102,143,54,65,25,63,161,1,216,80,73,209,76,132,187,208,89,18,169,200,196,135,130,116,188,159,86,164,100,109,198,173,186,3,64,52,217,226,250,124,123,5,202,38,147,118,126,255,82,85,212,207,206,59,227,47,16,58,17,182,189,28,42,223,183,170,213,119,248,152,2,44,154,163,70,221,153,101,155,167,43,172,9,129,22,39,253,19,98,108,110,79,113,224,232,178,185,112,104,218,246,97,228,251,34,242,193,238,210,144,12,191,179,162,241,81,51,145,235,249,14,239,107,49,192,214,31,181,199,106,157,184,84,204,176,115,121,50,45,127,4,150,254,138,236,205,93,222,114,67,29,24,72,243,141,128,195,78,66,215,61,156,180],this._gradP=new Array(512),this._perm=new Array(512)}noise2d(t,s){const{_gradP:e,_perm:n}=this;let r=Math.floor(t),l=Math.floor(s);t-=r,s-=l,r&=255,l&=255;const a=e[r+n[l]].dot2(t,s),_=e[r+n[l+1]].dot2(t,s-1),i=e[r+1+n[l]].dot2(t-1,s),c=e[r+1+n[l+1]].dot2(t-1,s-1),o=this._fade(t);return this._lerp(this._lerp(a,i,o),this._lerp(_,c,o),this._fade(s))}noise3d(t,s,e){const{_gradP:n,_perm:r}=this;let l=Math.floor(t),a=Math.floor(s),_=Math.floor(e);t-=l,s-=a,e-=_,l&=255,a&=255,_&=255;const i=n[l+r[a+r[_]]].dot3(t,s,e),c=n[l+r[a+r[_+1]]].dot3(t,s,e-1),o=n[l+r[a+1+r[_]]].dot3(t,s-1,e),p=n[l+r[a+1+r[_+1]]].dot3(t,s-1,e-1),h=n[l+1+r[a+r[_]]].dot3(t-1,s,e),d=n[l+1+r[a+r[_+1]]].dot3(t-1,s,e-1),P=n[l+1+r[a+1+r[_]]].dot3(t-1,s-1,e),I=n[l+1+r[a+1+r[_+1]]].dot3(t-1,s-1,e-1),u=this._fade(t),f=this._fade(s),w=this._fade(e);return this._lerp(this._lerp(this._lerp(i,h,u),this._lerp(c,d,u),w),this._lerp(this._lerp(o,P,u),this._lerp(p,I,u),w),f)}noise4d(t,s,e,n){const{_gradP:r,_perm:l}=this;let a=Math.floor(t),_=Math.floor(s),i=Math.floor(e),c=Math.floor(n);t-=a,s-=_,e-=i,n-=c,a&=255,_&=255,i&=255,c&=255;const o=this._fade(t),p=this._fade(s),h=this._fade(e),d=this._fade(n),P=(t,s,e,n)=>r[a+t+l[_+s+l[i+e+l[c+n]]]],I=P(0,0,0,0).dot4(t,s,e,n),u=P(0,0,0,1).dot4(t,s,e,n-1),f=P(0,0,1,0).dot4(t,s,e-1,n),w=P(0,0,1,1).dot4(t,s,e-1,n-1),g=P(0,1,0,0).dot4(t,s-1,e,n),y=P(0,1,0,1).dot4(t,s-1,e,n-1),b=P(0,1,1,0).dot4(t,s-1,e-1,n),m=P(0,1,1,1).dot4(t,s-1,e-1,n-1),x=P(1,0,0,0).dot4(t-1,s,e,n),M=P(1,0,0,1).dot4(t-1,s,e,n-1),v=P(1,0,1,0).dot4(t-1,s,e-1,n),T=P(1,0,1,1).dot4(t-1,s,e-1,n-1),S=P(1,1,0,0).dot4(t-1,s-1,e,n),z=P(1,1,0,1).dot4(t-1,s-1,e,n-1),E=P(1,1,1,0).dot4(t-1,s-1,e-1,n),A=P(1,1,1,1).dot4(t-1,s-1,e-1,n-1),j=this._lerp(I,x,o),N=this._lerp(u,M,o),k=this._lerp(f,v,o),q=this._lerp(w,T,o),B=this._lerp(j,k,h),C=this._lerp(N,q,h),D=this._lerp(g,S,o),F=this._lerp(y,z,o),G=this._lerp(b,E,o),H=this._lerp(m,A,o),J=this._lerp(D,G,h),K=this._lerp(F,H,h),L=this._lerp(B,J,p),O=this._lerp(C,K,p);return this._lerp(L,O,d)}seed(t){const{_grad4:s,_gradP:e,_perm:n,_p:r}=this;let l=t;l>0&&l<1&&(l*=65536),l=Math.floor(l),l<256&&(l|=l<<8);const a=s.length;for(let t=0;t<256;t++){const _=1&t?r[t]^255&l:r[t]^l>>8&255;n[t]=n[t+256]=_,e[t]=e[t+256]=s[_%a]}}_fade(t){return t*t*t*(t*(6*t-15)+10)}_lerp(t,s,e){return(1-e)*t+e*s}}}),delete(globalThis.window||globalThis).tsparticlesInternalExports;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./index.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { PerlinNoise } from "./PerlinNoise.js";
|