@tsparticles/perlin-noise 3.9.1 → 4.0.0-alpha.1

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/cjs/Grad.js CHANGED
@@ -1,7 +1,4 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Grad = void 0;
4
- class Grad {
1
+ export class Grad {
5
2
  constructor(x, y, z, w) {
6
3
  this.x = x;
7
4
  this.y = y;
@@ -18,4 +15,3 @@ class Grad {
18
15
  return this.dot3(x, y, z) + this.w * w;
19
16
  }
20
17
  }
21
- exports.Grad = Grad;
@@ -1,42 +1,39 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.PerlinNoise = void 0;
4
- const Grad_js_1 = require("./Grad.js");
5
- class PerlinNoise {
1
+ import { Grad } from "./Grad.js";
2
+ export class PerlinNoise {
6
3
  constructor() {
7
4
  this._grad4 = [
8
- new Grad_js_1.Grad(0, 1, 1, 1),
9
- new Grad_js_1.Grad(0, 1, 1, -1),
10
- new Grad_js_1.Grad(0, 1, -1, 1),
11
- new Grad_js_1.Grad(0, 1, -1, -1),
12
- new Grad_js_1.Grad(0, -1, 1, 1),
13
- new Grad_js_1.Grad(0, -1, 1, -1),
14
- new Grad_js_1.Grad(0, -1, -1, 1),
15
- new Grad_js_1.Grad(0, -1, -1, -1),
16
- new Grad_js_1.Grad(1, 0, 1, 1),
17
- new Grad_js_1.Grad(1, 0, 1, -1),
18
- new Grad_js_1.Grad(1, 0, -1, 1),
19
- new Grad_js_1.Grad(1, 0, -1, -1),
20
- new Grad_js_1.Grad(-1, 0, 1, 1),
21
- new Grad_js_1.Grad(-1, 0, 1, -1),
22
- new Grad_js_1.Grad(-1, 0, -1, 1),
23
- new Grad_js_1.Grad(-1, 0, -1, -1),
24
- new Grad_js_1.Grad(1, 1, 0, 1),
25
- new Grad_js_1.Grad(1, 1, 0, -1),
26
- new Grad_js_1.Grad(1, -1, 0, 1),
27
- new Grad_js_1.Grad(1, -1, 0, -1),
28
- new Grad_js_1.Grad(-1, 1, 0, 1),
29
- new Grad_js_1.Grad(-1, 1, 0, -1),
30
- new Grad_js_1.Grad(-1, -1, 0, 1),
31
- new Grad_js_1.Grad(-1, -1, 0, -1),
32
- new Grad_js_1.Grad(1, 1, 1, 0),
33
- new Grad_js_1.Grad(1, 1, -1, 0),
34
- new Grad_js_1.Grad(1, -1, 1, 0),
35
- new Grad_js_1.Grad(1, -1, -1, 0),
36
- new Grad_js_1.Grad(-1, 1, 1, 0),
37
- new Grad_js_1.Grad(-1, 1, -1, 0),
38
- new Grad_js_1.Grad(-1, -1, 1, 0),
39
- new Grad_js_1.Grad(-1, -1, -1, 0),
5
+ new Grad(0, 1, 1, 1),
6
+ new Grad(0, 1, 1, -1),
7
+ new Grad(0, 1, -1, 1),
8
+ new Grad(0, 1, -1, -1),
9
+ new Grad(0, -1, 1, 1),
10
+ new Grad(0, -1, 1, -1),
11
+ new Grad(0, -1, -1, 1),
12
+ new Grad(0, -1, -1, -1),
13
+ new Grad(1, 0, 1, 1),
14
+ new Grad(1, 0, 1, -1),
15
+ new Grad(1, 0, -1, 1),
16
+ new Grad(1, 0, -1, -1),
17
+ new Grad(-1, 0, 1, 1),
18
+ new Grad(-1, 0, 1, -1),
19
+ new Grad(-1, 0, -1, 1),
20
+ new Grad(-1, 0, -1, -1),
21
+ new Grad(1, 1, 0, 1),
22
+ new Grad(1, 1, 0, -1),
23
+ new Grad(1, -1, 0, 1),
24
+ new Grad(1, -1, 0, -1),
25
+ new Grad(-1, 1, 0, 1),
26
+ new Grad(-1, 1, 0, -1),
27
+ new Grad(-1, -1, 0, 1),
28
+ new Grad(-1, -1, 0, -1),
29
+ new Grad(1, 1, 1, 0),
30
+ new Grad(1, 1, -1, 0),
31
+ new Grad(1, -1, 1, 0),
32
+ new Grad(1, -1, -1, 0),
33
+ new Grad(-1, 1, 1, 0),
34
+ new Grad(-1, 1, -1, 0),
35
+ new Grad(-1, -1, 1, 0),
36
+ new Grad(-1, -1, -1, 0),
40
37
  ];
41
38
  this._p = [
42
39
  151,
@@ -359,4 +356,3 @@ class PerlinNoise {
359
356
  return (1 - t) * a + t * b;
360
357
  }
361
358
  }
362
- exports.PerlinNoise = PerlinNoise;
package/cjs/index.js CHANGED
@@ -1,5 +1 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.PerlinNoise = void 0;
4
- var PerlinNoise_js_1 = require("./PerlinNoise.js");
5
- Object.defineProperty(exports, "PerlinNoise", { enumerable: true, get: function () { return PerlinNoise_js_1.PerlinNoise; } });
1
+ export { PerlinNoise } from "./PerlinNoise.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tsparticles/perlin-noise",
3
- "version": "3.9.1",
3
+ "version": "4.0.0-alpha.1",
4
4
  "description": "tsParticles perlin noise library",
5
5
  "homepage": "https://particles.js.org",
6
6
  "repository": {
@@ -101,5 +101,6 @@
101
101
  "default": "./cjs/index.js"
102
102
  },
103
103
  "./package.json": "./package.json"
104
- }
104
+ },
105
+ "type": "module"
105
106
  }