@tsparticles/fractal-noise 3.9.1 → 4.0.0-alpha.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/cjs/FractalNoise.js
CHANGED
|
@@ -1,10 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
exports.FractalNoise = void 0;
|
|
4
|
-
const smooth_value_noise_1 = require("@tsparticles/smooth-value-noise");
|
|
5
|
-
class FractalNoise {
|
|
1
|
+
import { SmoothValueNoise } from "@tsparticles/smooth-value-noise";
|
|
2
|
+
export class FractalNoise {
|
|
6
3
|
constructor() {
|
|
7
|
-
this._smoothValueNoise = new
|
|
4
|
+
this._smoothValueNoise = new SmoothValueNoise();
|
|
8
5
|
}
|
|
9
6
|
noise2d(x, y, octaves = 5, persistence = 0.5, lacunarity = 2.0) {
|
|
10
7
|
let total = 0, frequency = 1, amplitude = 1, maxValue = 0;
|
|
@@ -41,4 +38,3 @@ class FractalNoise {
|
|
|
41
38
|
this._smoothValueNoise.seed(seed);
|
|
42
39
|
}
|
|
43
40
|
}
|
|
44
|
-
exports.FractalNoise = FractalNoise;
|
package/cjs/index.js
CHANGED
|
@@ -1,5 +1 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.FractalNoise = void 0;
|
|
4
|
-
var FractalNoise_js_1 = require("./FractalNoise.js");
|
|
5
|
-
Object.defineProperty(exports, "FractalNoise", { enumerable: true, get: function () { return FractalNoise_js_1.FractalNoise; } });
|
|
1
|
+
export { FractalNoise } from "./FractalNoise.js";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tsparticles/fractal-noise",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "4.0.0-alpha.0",
|
|
4
4
|
"description": "tsParticles fractal noise library",
|
|
5
5
|
"homepage": "https://particles.js.org",
|
|
6
6
|
"repository": {
|
|
@@ -92,7 +92,7 @@
|
|
|
92
92
|
"module": "esm/index.js",
|
|
93
93
|
"types": "types/index.d.ts",
|
|
94
94
|
"dependencies": {
|
|
95
|
-
"@tsparticles/smooth-value-noise": "
|
|
95
|
+
"@tsparticles/smooth-value-noise": "4.0.0-alpha.0"
|
|
96
96
|
},
|
|
97
97
|
"exports": {
|
|
98
98
|
".": {
|
|
@@ -104,5 +104,6 @@
|
|
|
104
104
|
"default": "./cjs/index.js"
|
|
105
105
|
},
|
|
106
106
|
"./package.json": "./package.json"
|
|
107
|
-
}
|
|
107
|
+
},
|
|
108
|
+
"type": "module"
|
|
108
109
|
}
|