fastnoiselite-builder 0.2.0 → 0.3.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.
|
@@ -2115,6 +2115,14 @@ const p = new Float64Array([
|
|
|
2115
2115
|
DefaultOpenSimplex2: "DefaultOpenSimplex2"
|
|
2116
2116
|
};
|
|
2117
2117
|
class I {
|
|
2118
|
+
_prefix = "";
|
|
2119
|
+
/**
|
|
2120
|
+
* Set a prefix for all generated WGSL function names.
|
|
2121
|
+
* Required when using multiple noise builders in the same shader to avoid name collisions.
|
|
2122
|
+
*/
|
|
2123
|
+
prefix(a) {
|
|
2124
|
+
return this._prefix = a, this;
|
|
2125
|
+
}
|
|
2118
2126
|
config = {
|
|
2119
2127
|
seed: 1337,
|
|
2120
2128
|
frequency: 0.01,
|
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
import { type NoiseConfig, NoiseType, CellularDistanceFunction, CellularReturnType, FractalType, DomainWarpType, DomainWarpFractalType, TransformType3D, RotationType3D } from '../types';
|
|
2
2
|
export declare abstract class ANoiseBuilder {
|
|
3
|
+
protected _prefix: string;
|
|
4
|
+
/**
|
|
5
|
+
* Set a prefix for all generated WGSL function names.
|
|
6
|
+
* Required when using multiple noise builders in the same shader to avoid name collisions.
|
|
7
|
+
*/
|
|
8
|
+
prefix(value: string): this;
|
|
3
9
|
protected config: Required<NoiseConfig>;
|
|
4
10
|
/**
|
|
5
11
|
* Set the seed for noise generation
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { g as Q, a as H, P as F, b as P, c as B, h as U, d as $, C as nt, e as ot, R as V, f as C, G as ct, i as ft, A as Ht, N as z, F as lt, D as tt, j as gt, T as Y } from "./ANoiseBuilder-
|
|
2
|
-
import { k as dn } from "./ANoiseBuilder-
|
|
1
|
+
import { g as Q, a as H, P as F, b as P, c as B, h as U, d as $, C as nt, e as ot, R as V, f as C, G as ct, i as ft, A as Ht, N as z, F as lt, D as tt, j as gt, T as Y } from "./ANoiseBuilder-BWuN_IAo.js";
|
|
2
|
+
import { k as dn } from "./ANoiseBuilder-BWuN_IAo.js";
|
|
3
3
|
function R(t, r, e) {
|
|
4
4
|
return t + e * (r - t);
|
|
5
5
|
}
|