shaders 2.0.659 → 2.0.660
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/dist/react/index.cjs +17 -17
- package/dist/react/index.cjs.map +1 -1
- package/dist/react/index.js +225 -225
- package/dist/react/index.js.map +1 -1
- package/dist/vue/index.js +1 -1
- package/package.json +1 -1
package/dist/react/index.js
CHANGED
|
@@ -3151,14 +3151,14 @@ var u1 = class o2 extends Jl {
|
|
|
3151
3151
|
let K = T / N, Z = M / A, ee = T / 2, re = M / 2, he = S / 2, pe = N + 1, Te = A + 1, we = 0, Re = 0, be = new z();
|
|
3152
3152
|
for (let de = 0; de < Te; de++) {
|
|
3153
3153
|
let ve = de * Z - re;
|
|
3154
|
-
for (let
|
|
3155
|
-
let Lt =
|
|
3156
|
-
be[f] = Lt * v, be[g] = ve * w, be[b] = he, h.push(be.x, be.y, be.z), be[f] = 0, be[g] = 0, be[b] = S > 0 ? 1 : -1, u.push(be.x, be.y, be.z), c.push(
|
|
3154
|
+
for (let ht = 0; ht < pe; ht++) {
|
|
3155
|
+
let Lt = ht * K - ee;
|
|
3156
|
+
be[f] = Lt * v, be[g] = ve * w, be[b] = he, h.push(be.x, be.y, be.z), be[f] = 0, be[g] = 0, be[b] = S > 0 ? 1 : -1, u.push(be.x, be.y, be.z), c.push(ht / N), c.push(1 - de / A), we += 1;
|
|
3157
3157
|
}
|
|
3158
3158
|
}
|
|
3159
3159
|
for (let de = 0; de < A; de++) for (let ve = 0; ve < N; ve++) {
|
|
3160
|
-
let
|
|
3161
|
-
l.push(
|
|
3160
|
+
let ht = d + ve + pe * de, Lt = d + ve + pe * (de + 1), It = d + (ve + 1) + pe * (de + 1), it = d + (ve + 1) + pe * de;
|
|
3161
|
+
l.push(ht, Lt, it), l.push(Lt, It, it), Re += 6;
|
|
3162
3162
|
}
|
|
3163
3163
|
o.addGroup(p, Re, U), p += Re, d += we;
|
|
3164
3164
|
}
|
|
@@ -5041,7 +5041,7 @@ $("element", j2), $("convert", W2);
|
|
|
5041
5041
|
const $V = (t) => (console.warn("THREE.TSL: append() has been renamed to Stack()."), wg(t));
|
|
5042
5042
|
$("append", (t) => (console.warn("THREE.TSL: .append() has been renamed to .toStack()."), wg(t)));
|
|
5043
5043
|
const GV = (...t) => (console.warn("THREE.TSL: tslFn() has been renamed to Fn()."), L(...t));
|
|
5044
|
-
var
|
|
5044
|
+
var rt = class extends _e {
|
|
5045
5045
|
static get type() {
|
|
5046
5046
|
return "PropertyNode";
|
|
5047
5047
|
}
|
|
@@ -5056,7 +5056,7 @@ var st = class extends _e {
|
|
|
5056
5056
|
return this.varying === !0 ? (e = t.getVaryingFromNode(this, this.name), e.needsInterpolation = !0) : e = t.getVarFromNode(this, this.name), t.getPropertyName(e);
|
|
5057
5057
|
}
|
|
5058
5058
|
};
|
|
5059
|
-
const Xh = (t, e) => H(new
|
|
5059
|
+
const Xh = (t, e) => H(new rt(t, e)), fd = (t, e) => H(new rt(t, e, !0)), Ze = se(rt, "vec4", "DiffuseColor"), X0 = se(rt, "vec3", "EmissiveColor"), xn = se(rt, "float", "Roughness"), gd = se(rt, "float", "Metalness"), zf = se(rt, "float", "Clearcoat"), yd = se(rt, "float", "ClearcoatRoughness"), hl = se(rt, "vec3", "Sheen"), _g = se(rt, "float", "SheenRoughness"), Mg = se(rt, "float", "Iridescence"), T1 = se(rt, "float", "IridescenceIOR"), w1 = se(rt, "float", "IridescenceThickness"), Bf = se(rt, "float", "AlphaT"), no = se(rt, "float", "Anisotropy"), Yc = se(rt, "vec3", "AnisotropyT"), gl = se(rt, "vec3", "AnisotropyB"), Ns = se(rt, "color", "SpecularColor"), xd = se(rt, "float", "SpecularF90"), Vf = se(rt, "float", "Shininess"), vh = se(rt, "vec4", "Output"), nf = se(rt, "float", "dashSize"), Y0 = se(rt, "float", "gapSize"), jV = se(rt, "float", "pointWidth"), Zc = se(rt, "float", "IOR"), Of = se(rt, "float", "Transmission"), S1 = se(rt, "float", "Thickness"), _1 = se(rt, "float", "AttenuationDistance"), M1 = se(rt, "color", "AttenuationColor"), N1 = se(rt, "float", "Dispersion");
|
|
5060
5060
|
var H2 = class extends _e {
|
|
5061
5061
|
static get type() {
|
|
5062
5062
|
return "UniformGroupNode";
|
|
@@ -5338,10 +5338,10 @@ var O = class St extends Jt {
|
|
|
5338
5338
|
}
|
|
5339
5339
|
};
|
|
5340
5340
|
O.ALL = "all", O.ANY = "any", O.RADIANS = "radians", O.DEGREES = "degrees", O.EXP = "exp", O.EXP2 = "exp2", O.LOG = "log", O.LOG2 = "log2", O.SQRT = "sqrt", O.INVERSE_SQRT = "inversesqrt", O.FLOOR = "floor", O.CEIL = "ceil", O.NORMALIZE = "normalize", O.FRACT = "fract", O.SIN = "sin", O.COS = "cos", O.TAN = "tan", O.ASIN = "asin", O.ACOS = "acos", O.ATAN = "atan", O.ABS = "abs", O.SIGN = "sign", O.LENGTH = "length", O.NEGATE = "negate", O.ONE_MINUS = "oneMinus", O.DFDX = "dFdx", O.DFDY = "dFdy", O.ROUND = "round", O.RECIPROCAL = "reciprocal", O.TRUNC = "trunc", O.FWIDTH = "fwidth", O.TRANSPOSE = "transpose", O.BITCAST = "bitcast", O.EQUALS = "equals", O.MIN = "min", O.MAX = "max", O.STEP = "step", O.REFLECT = "reflect", O.DISTANCE = "distance", O.DIFFERENCE = "difference", O.DOT = "dot", O.CROSS = "cross", O.POW = "pow", O.TRANSFORM_DIRECTION = "transformDirection", O.MIX = "mix", O.CLAMP = "clamp", O.REFRACT = "refract", O.SMOOTHSTEP = "smoothstep", O.FACEFORWARD = "faceforward";
|
|
5341
|
-
const xA = _(1e-6), XV = _(1e6), kf = _(Math.PI), YV = _(Math.PI * 2), bA = X(O, O.ALL).setParameterLength(1), vA = X(O, O.ANY).setParameterLength(1), TA = X(O, O.RADIANS).setParameterLength(1), wA = X(O, O.DEGREES).setParameterLength(1), E1 = X(O, O.EXP).setParameterLength(1), zh = X(O, O.EXP2).setParameterLength(1), Ag = X(O, O.LOG).setParameterLength(1), wn = X(O, O.LOG2).setParameterLength(1), Un = X(O, O.SQRT).setParameterLength(1), P1 = X(O, O.INVERSE_SQRT).setParameterLength(1), Sn = X(O, O.FLOOR).setParameterLength(1), Cg = X(O, O.CEIL).setParameterLength(1), _a = X(O, O.NORMALIZE).setParameterLength(1), Ia = X(O, O.FRACT).setParameterLength(1), Ys = X(O, O.SIN).setParameterLength(1), ra = X(O, O.COS).setParameterLength(1), SA = X(O, O.TAN).setParameterLength(1), _A = X(O, O.ASIN).setParameterLength(1), F1 = X(O, O.ACOS).setParameterLength(1), L1 = X(O, O.ATAN).setParameterLength(1, 2), Tt = X(O, O.ABS).setParameterLength(1), bd = X(O, O.SIGN).setParameterLength(1), _n = X(O, O.LENGTH).setParameterLength(1), MA = X(O, O.NEGATE).setParameterLength(1), NA = X(O, O.ONE_MINUS).setParameterLength(1), I1 = X(O, O.DFDX).setParameterLength(1), z1 = X(O, O.DFDY).setParameterLength(1), AA = X(O, O.ROUND).setParameterLength(1), CA = X(O, O.RECIPROCAL).setParameterLength(1), B1 = X(O, O.TRUNC).setParameterLength(1), RA = X(O, O.FWIDTH).setParameterLength(1), EA = X(O, O.TRANSPOSE).setParameterLength(1), ZV = X(O, O.BITCAST).setParameterLength(2), PA = (t, e) => (console.warn('THREE.TSL: "equals" is deprecated. Use "equal" inside a vector instead, like: "bvec*( equal( ... ) )"'), C1(t, e)), Fs = X(O, O.MIN).setParameterLength(2, 1 / 0), Gt = X(O, O.MAX).setParameterLength(2, 1 / 0), Rg = X(O, O.STEP).setParameterLength(2), FA = X(O, O.REFLECT).setParameterLength(2), LA = X(O, O.DISTANCE).setParameterLength(2), IA = X(O, O.DIFFERENCE).setParameterLength(2), Lo = X(O, O.DOT).setParameterLength(2), Eg = X(O, O.CROSS).setParameterLength(2), en = X(O, O.POW).setParameterLength(2), V1 = X(O, O.POW, 2).setParameterLength(1), zA = X(O, O.POW, 3).setParameterLength(1), BA = X(O, O.POW, 4).setParameterLength(1), VA = X(O, O.TRANSFORM_DIRECTION).setParameterLength(2), OA = (t) => Fe(bd(t), en(Tt(t), 1 / 3)), O1 = (t) => Lo(t, t),
|
|
5341
|
+
const xA = _(1e-6), XV = _(1e6), kf = _(Math.PI), YV = _(Math.PI * 2), bA = X(O, O.ALL).setParameterLength(1), vA = X(O, O.ANY).setParameterLength(1), TA = X(O, O.RADIANS).setParameterLength(1), wA = X(O, O.DEGREES).setParameterLength(1), E1 = X(O, O.EXP).setParameterLength(1), zh = X(O, O.EXP2).setParameterLength(1), Ag = X(O, O.LOG).setParameterLength(1), wn = X(O, O.LOG2).setParameterLength(1), Un = X(O, O.SQRT).setParameterLength(1), P1 = X(O, O.INVERSE_SQRT).setParameterLength(1), Sn = X(O, O.FLOOR).setParameterLength(1), Cg = X(O, O.CEIL).setParameterLength(1), _a = X(O, O.NORMALIZE).setParameterLength(1), Ia = X(O, O.FRACT).setParameterLength(1), Ys = X(O, O.SIN).setParameterLength(1), ra = X(O, O.COS).setParameterLength(1), SA = X(O, O.TAN).setParameterLength(1), _A = X(O, O.ASIN).setParameterLength(1), F1 = X(O, O.ACOS).setParameterLength(1), L1 = X(O, O.ATAN).setParameterLength(1, 2), Tt = X(O, O.ABS).setParameterLength(1), bd = X(O, O.SIGN).setParameterLength(1), _n = X(O, O.LENGTH).setParameterLength(1), MA = X(O, O.NEGATE).setParameterLength(1), NA = X(O, O.ONE_MINUS).setParameterLength(1), I1 = X(O, O.DFDX).setParameterLength(1), z1 = X(O, O.DFDY).setParameterLength(1), AA = X(O, O.ROUND).setParameterLength(1), CA = X(O, O.RECIPROCAL).setParameterLength(1), B1 = X(O, O.TRUNC).setParameterLength(1), RA = X(O, O.FWIDTH).setParameterLength(1), EA = X(O, O.TRANSPOSE).setParameterLength(1), ZV = X(O, O.BITCAST).setParameterLength(2), PA = (t, e) => (console.warn('THREE.TSL: "equals" is deprecated. Use "equal" inside a vector instead, like: "bvec*( equal( ... ) )"'), C1(t, e)), Fs = X(O, O.MIN).setParameterLength(2, 1 / 0), Gt = X(O, O.MAX).setParameterLength(2, 1 / 0), Rg = X(O, O.STEP).setParameterLength(2), FA = X(O, O.REFLECT).setParameterLength(2), LA = X(O, O.DISTANCE).setParameterLength(2), IA = X(O, O.DIFFERENCE).setParameterLength(2), Lo = X(O, O.DOT).setParameterLength(2), Eg = X(O, O.CROSS).setParameterLength(2), en = X(O, O.POW).setParameterLength(2), V1 = X(O, O.POW, 2).setParameterLength(1), zA = X(O, O.POW, 3).setParameterLength(1), BA = X(O, O.POW, 4).setParameterLength(1), VA = X(O, O.TRANSFORM_DIRECTION).setParameterLength(2), OA = (t) => Fe(bd(t), en(Tt(t), 1 / 3)), O1 = (t) => Lo(t, t), et = X(O, O.MIX).setParameterLength(3), Fn = (t, e = 0, r = 1) => H(new O(O.CLAMP, H(t), H(e), H(r))), k1 = (t) => Fn(t), U1 = X(O, O.REFRACT).setParameterLength(3), Ln = X(O, O.SMOOTHSTEP).setParameterLength(3), D1 = X(O, O.FACEFORWARD).setParameterLength(3), kA = L(([t]) => {
|
|
5342
5342
|
let e = 12.9898, r = 78.233, s = 43758.5453, i = Lo(t.xy, J(e, r)), n = Id(i, kf);
|
|
5343
5343
|
return Ia(Ys(n).mul(s));
|
|
5344
|
-
}), UA = (t, e, r) =>
|
|
5344
|
+
}), UA = (t, e, r) => et(e, r, t), DA = (t, e, r) => Ln(e, r, t), $A = (t, e) => (console.warn('THREE.TSL: "atan2" is overloaded. Use "atan" instead.'), L1(t, e)), JV = D1, QV = P1;
|
|
5345
5345
|
$("all", bA), $("any", vA), $("equals", PA), $("radians", TA), $("degrees", wA), $("exp", E1), $("exp2", zh), $("log", Ag), $("log2", wn), $("sqrt", Un), $("inverseSqrt", P1), $("floor", Sn), $("ceil", Cg), $("normalize", _a), $("fract", Ia), $("sin", Ys), $("cos", ra), $("tan", SA), $("asin", _A), $("acos", F1), $("atan", L1), $("abs", Tt), $("sign", bd), $("length", _n), $("lengthSq", O1), $("negate", MA), $("oneMinus", NA), $("dFdx", I1), $("dFdy", z1), $("round", AA), $("reciprocal", CA), $("trunc", B1), $("fwidth", RA), $("atan2", $A), $("min", Fs), $("max", Gt), $("step", Rg), $("reflect", FA), $("distance", LA), $("dot", Lo), $("cross", Eg), $("pow", en), $("pow2", V1), $("pow3", zA), $("pow4", BA), $("transformDirection", VA), $("mix", UA), $("clamp", Fn), $("refract", U1), $("smoothstep", DA), $("faceForward", D1), $("difference", IA), $("saturate", k1), $("cbrt", OA), $("transpose", EA), $("rand", kA);
|
|
5346
5346
|
var KV = class extends _e {
|
|
5347
5347
|
static get type() {
|
|
@@ -5504,10 +5504,10 @@ const si = X(eO).setParameterLength(1, 2), YA = (t) => si(t);
|
|
|
5504
5504
|
$("toVarying", si), $("toVertexStage", YA), $("varying", (...t) => (console.warn("THREE.TSL: .varying() has been renamed to .toVarying()."), si(...t))), $("vertexStage", (...t) => (console.warn("THREE.TSL: .vertexStage() has been renamed to .toVertexStage()."), si(...t)));
|
|
5505
5505
|
const ZA = L(([t]) => {
|
|
5506
5506
|
let e = t.mul(0.9478672986).add(0.0521327014).pow(2.4), r = t.mul(0.0773993808), s = t.lessThanEqual(0.04045);
|
|
5507
|
-
return
|
|
5507
|
+
return et(e, r, s);
|
|
5508
5508
|
}).setLayout({ name: "sRGBTransferEOTF", type: "vec3", inputs: [{ name: "color", type: "vec3" }] }), JA = L(([t]) => {
|
|
5509
5509
|
let e = t.pow(0.41666).mul(1.055).sub(0.055), r = t.mul(12.92), s = t.lessThanEqual(31308e-7);
|
|
5510
|
-
return
|
|
5510
|
+
return et(e, r, s);
|
|
5511
5511
|
}).setLayout({ name: "sRGBTransferOETF", type: "vec3", inputs: [{ name: "color", type: "vec3" }] }), G1 = "WorkingColorSpace", tO = "OutputColorSpace";
|
|
5512
5512
|
var j1 = class extends Jt {
|
|
5513
5513
|
static get type() {
|
|
@@ -6326,7 +6326,7 @@ const oa = (t, e, r = null) => H(new $O(t, e, r)), Vg = L((t) => (t.geometry.has
|
|
|
6326
6326
|
return r.material.flatShading !== !0 && (s = si(s, e)), s;
|
|
6327
6327
|
}).once(), jO = Gd(Ig.cross(Vg), "v_bitangentGeometry").normalize().toVar("bitangentGeometry"), WO = Gd(Ls.cross(Dd), "v_bitangentLocal").normalize().toVar("bitangentLocal"), EC = Gd(an.cross($d), "v_bitangentView").normalize().toVar("bitangentView"), HO = Gd(Ud.cross(RC), "v_bitangentWorld").normalize().toVar("bitangentWorld"), PC = Gd(qt.cross(J1), "v_transformedBitangentView").normalize().toVar("transformedBitangentView"), qO = PC.transformDirection(zs).normalize().toVar("transformedBitangentWorld"), cl = os($d, EC, an), FC = Nt.mul(cl), XO = (t, e) => t.sub(FC.mul(e)), LC = (() => {
|
|
6328
6328
|
let t = gl.cross(Nt);
|
|
6329
|
-
return t = t.cross(gl).normalize(), t =
|
|
6329
|
+
return t = t.cross(gl).normalize(), t = et(t, qt, no.mul(xn.oneMinus()).oneMinus().pow2().pow2()).normalize(), t;
|
|
6330
6330
|
})(), YO = L((t) => {
|
|
6331
6331
|
let { eye_pos: e, surf_norm: r, mapN: s, uv: i } = t, n = e.dFdx(), a = e.dFdy(), o = i.dFdx(), l = i.dFdy(), h = r, u = a.cross(h), c = h.cross(n), d = u.mul(o.x).add(c.mul(l.x)), p = u.mul(o.y).add(c.mul(l.y)), m = d.dot(d).max(p.dot(p)), f = kd.mul(m.inverseSqrt());
|
|
6332
6332
|
return ar(d.mul(s.x, f), p.mul(s.y, f), h.mul(s.z)).normalize();
|
|
@@ -6752,7 +6752,7 @@ var d4 = class extends _e {
|
|
|
6752
6752
|
return t.addFlowTab(), n;
|
|
6753
6753
|
}
|
|
6754
6754
|
};
|
|
6755
|
-
const
|
|
6755
|
+
const tt = (...t) => H(new d4(ml(t, "int"))).toStack(), p4 = () => Ma("continue").toStack(), bR = () => Ma("break").toStack(), m4 = (...t) => (console.warn("THREE.TSL: loop() has been renamed to Loop()."), tt(...t)), Wy = /* @__PURE__ */ new WeakMap(), Us = new Xe(), Ow = L(({ bufferMap: t, influence: e, stride: r, width: s, depth: i, offset: n }) => {
|
|
6756
6756
|
let a = R(dR).mul(r).add(n), o = a.div(s), l = a.sub(o.mul(s));
|
|
6757
6757
|
return Wt(t, Nr(l, o)).depth(i).xyz.mul(e);
|
|
6758
6758
|
});
|
|
@@ -6792,7 +6792,7 @@ var g4 = class extends _e {
|
|
|
6792
6792
|
let { geometry: e } = t, r = e.morphAttributes.position !== void 0, s = e.hasAttribute("normal") && e.morphAttributes.normal !== void 0, i = e.morphAttributes.position || e.morphAttributes.normal || e.morphAttributes.color, n = i === void 0 ? 0 : i.length, { texture: a, stride: o, size: l } = f4(e);
|
|
6793
6793
|
r === !0 && Xt.mulAssign(this.morphBaseInfluence), s === !0 && Ls.mulAssign(this.morphBaseInfluence);
|
|
6794
6794
|
let h = R(l.width);
|
|
6795
|
-
|
|
6795
|
+
tt(n, ({ i: u }) => {
|
|
6796
6796
|
let c = _(0).toVar();
|
|
6797
6797
|
this.mesh.count > 1 && this.mesh.morphTexture !== null && this.mesh.morphTexture !== void 0 ? c.assign(Wt(this.mesh.morphTexture, Nr(R(u).add(1), R(vo))).r) : c.assign(bt("morphTargetInfluences", "float").element(u).toVar()), Ie(c.notEqual(0), () => {
|
|
6798
6798
|
r === !0 && Xt.addAssign(Ow({ bufferMap: a, influence: c, stride: o, width: h, depth: u, offset: R(0) })), s === !0 && Ls.addAssign(Ow({ bufferMap: a, influence: c, stride: o, width: h, depth: u, offset: R(1) }));
|
|
@@ -6967,7 +6967,7 @@ var To = class hf extends _e {
|
|
|
6967
6967
|
let s = _().toVar("distanceToPlane"), i = _().toVar("distanceToGradient"), n = _(1).toVar("clipOpacity"), a = r.length;
|
|
6968
6968
|
if (this.hardwareClipping === !1 && a > 0) {
|
|
6969
6969
|
let l = yi(r);
|
|
6970
|
-
|
|
6970
|
+
tt(a, ({ i: h }) => {
|
|
6971
6971
|
let u = l.element(h);
|
|
6972
6972
|
s.assign(rr.dot(u.xyz).negate().add(u.w)), i.assign(s.fwidth().div(2)), n.mulAssign(Ln(i.negate(), i, s));
|
|
6973
6973
|
});
|
|
@@ -6975,7 +6975,7 @@ var To = class hf extends _e {
|
|
|
6975
6975
|
let o = e.length;
|
|
6976
6976
|
if (o > 0) {
|
|
6977
6977
|
let l = yi(e), h = _(1).toVar("intersectionClipOpacity");
|
|
6978
|
-
|
|
6978
|
+
tt(o, ({ i: u }) => {
|
|
6979
6979
|
let c = l.element(u);
|
|
6980
6980
|
s.assign(rr.dot(c.xyz).negate().add(c.w)), i.assign(s.fwidth().div(2)), h.mulAssign(Ln(i.negate(), i, s).oneMinus());
|
|
6981
6981
|
}), n.mulAssign(h.oneMinus());
|
|
@@ -6988,7 +6988,7 @@ var To = class hf extends _e {
|
|
|
6988
6988
|
let s = r.length;
|
|
6989
6989
|
if (this.hardwareClipping === !1 && s > 0) {
|
|
6990
6990
|
let n = yi(r);
|
|
6991
|
-
|
|
6991
|
+
tt(s, ({ i: a }) => {
|
|
6992
6992
|
let o = n.element(a);
|
|
6993
6993
|
rr.dot(o.xyz).greaterThan(o.w).discard();
|
|
6994
6994
|
});
|
|
@@ -6996,7 +6996,7 @@ var To = class hf extends _e {
|
|
|
6996
6996
|
let i = e.length;
|
|
6997
6997
|
if (i > 0) {
|
|
6998
6998
|
let n = yi(e), a = Pn(!0).toVar("clipped");
|
|
6999
|
-
|
|
6999
|
+
tt(i, ({ i: o }) => {
|
|
7000
7000
|
let l = n.element(o);
|
|
7001
7001
|
a.assign(rr.dot(l.xyz).greaterThan(l.w).and(a));
|
|
7002
7002
|
}), a.discard();
|
|
@@ -7007,7 +7007,7 @@ var To = class hf extends _e {
|
|
|
7007
7007
|
let s = e.length;
|
|
7008
7008
|
return r.enableHardwareClipping(s), L(() => {
|
|
7009
7009
|
let i = yi(e), n = Vd(r.getClipDistance());
|
|
7010
|
-
|
|
7010
|
+
tt(s, ({ i: a }) => {
|
|
7011
7011
|
let o = i.element(a), l = rr.dot(o.xyz).sub(o.w).negate();
|
|
7012
7012
|
n.element(a).assign(l);
|
|
7013
7013
|
});
|
|
@@ -7171,7 +7171,7 @@ var Yt = class extends Ss {
|
|
|
7171
7171
|
if (a && a.getScope().hasLights) {
|
|
7172
7172
|
let l = this.setupLightingModel(t) || null;
|
|
7173
7173
|
o = TR(a, l, r, s);
|
|
7174
|
-
} else r !== null && (o = F(s === null ? r :
|
|
7174
|
+
} else r !== null && (o = F(s === null ? r : et(o, r, s)));
|
|
7175
7175
|
return (i && i.isNode === !0 || e.emissive && e.emissive.isColor === !0) && (X0.assign(F(i || OC)), o = o.add(X0)), o;
|
|
7176
7176
|
}
|
|
7177
7177
|
setupFog(t, e) {
|
|
@@ -7385,10 +7385,10 @@ var ov = class extends Yh {
|
|
|
7385
7385
|
let { material: e, context: r } = t, s = r.outgoingLight, i = t.context.environment;
|
|
7386
7386
|
if (i) switch (e.combine) {
|
|
7387
7387
|
case mg:
|
|
7388
|
-
s.rgb.assign(
|
|
7388
|
+
s.rgb.assign(et(s.rgb, s.rgb.mul(i.rgb), Qc.mul(uf)));
|
|
7389
7389
|
break;
|
|
7390
7390
|
case xz:
|
|
7391
|
-
s.rgb.assign(
|
|
7391
|
+
s.rgb.assign(et(s.rgb, i.rgb, Qc.mul(uf)));
|
|
7392
7392
|
break;
|
|
7393
7393
|
case bz:
|
|
7394
7394
|
s.rgb.addAssign(i.rgb.mul(Qc.mul(uf)));
|
|
@@ -7562,7 +7562,7 @@ const IR = L((t) => {
|
|
|
7562
7562
|
if (m) {
|
|
7563
7563
|
f = ye().toVar(), g = F().toVar();
|
|
7564
7564
|
let M = u.sub(1).mul(m.mul(0.025)), S = F(u.sub(M), u, u.add(M));
|
|
7565
|
-
|
|
7565
|
+
tt({ start: 0, end: 3 }, ({ i: N }) => {
|
|
7566
7566
|
let A = S.element(N), U = Xw(t, e, c, A, o), K = a.add(U), Z = h.mul(l.mul(ye(K, 1))), ee = J(Z.xy.div(Z.w)).toVar();
|
|
7567
7567
|
ee.addAssign(1), ee.divAssign(2), ee.assign(J(ee.x, ee.y.oneMinus()));
|
|
7568
7568
|
let re = Yw(ee, r, A);
|
|
@@ -7581,10 +7581,10 @@ const IR = L((t) => {
|
|
|
7581
7581
|
let r = t.mul(2 * Math.PI * 1e-9), s = F(54856e-17, 44201e-17, 52481e-17), i = F(1681e3, 1795300, 2208400), n = F(43278e5, 93046e5, 66121e5), a = _(9747e-17 * Math.sqrt(2 * Math.PI * 45282e5)).mul(r.mul(2239900).add(e.x).cos()).mul(r.pow2().mul(-45282e5).exp()), o = s.mul(n.mul(2 * Math.PI).sqrt()).mul(i.mul(r).add(e).cos()).mul(r.pow2().negate().mul(n).exp());
|
|
7582
7582
|
return o = F(o.x.add(a), o.y, o.z).div(10685e-11), mk.mul(o);
|
|
7583
7583
|
}, yk = L(({ outsideIOR: t, eta2: e, cosTheta1: r, thinFilmThickness: s, baseF0: i }) => {
|
|
7584
|
-
let n =
|
|
7584
|
+
let n = et(t, e, Ln(0, 0.03, s)), a = t.div(n).pow2().mul(r.pow2().oneMinus()), o = a.oneMinus();
|
|
7585
7585
|
Ie(o.lessThan(0), () => F(1));
|
|
7586
7586
|
let l = o.sqrt(), h = Jw(n, t), u = Vh({ f0: h, f90: 1, dotVH: r }), c = u.oneMinus(), d = n.lessThan(t).select(Math.PI, 0), p = _(Math.PI).sub(d), m = fk(i.clamp(0, 0.9999)), f = Jw(m, n.toVec3()), g = Vh({ f0: f, f90: 1, dotVH: l }), b = F(m.x.lessThan(n).select(Math.PI, 0), m.y.lessThan(n).select(Math.PI, 0), m.z.lessThan(n).select(Math.PI, 0)), v = n.mul(s, l, 2), w = F(p).add(b), T = u.mul(g).clamp(1e-5, 0.9999), M = T.sqrt(), S = c.pow2().mul(g).div(F(1).sub(T)), N = u.add(S), A = N.toVar(), U = S.sub(c).toVar();
|
|
7587
|
-
return
|
|
7587
|
+
return tt({ start: 1, end: 2, condition: "<=", name: "m" }, ({ m: K }) => {
|
|
7588
7588
|
U.mulAssign(M);
|
|
7589
7589
|
let Z = gk(_(K).mul(v), _(K).mul(w)).mul(2);
|
|
7590
7590
|
A.addAssign(U.mul(Z));
|
|
@@ -7604,7 +7604,7 @@ var $R = class extends kg {
|
|
|
7604
7604
|
}
|
|
7605
7605
|
if (this.transmission === !0) {
|
|
7606
7606
|
let e = ga, r = gC.sub(ga).normalize(), s = zg, i = t.context;
|
|
7607
|
-
i.backdrop = pk(s, r, xn, Ze, Ns, xd, e, bi, zs, tu, Zc, S1, M1, _1, this.dispersion ? N1 : null), i.backdropAlpha = Of, Ze.a.mulAssign(
|
|
7607
|
+
i.backdrop = pk(s, r, xn, Ze, Ns, xd, e, bi, zs, tu, Zc, S1, M1, _1, this.dispersion ? N1 : null), i.backdropAlpha = Of, Ze.a.mulAssign(et(1, i.backdrop.a, Of));
|
|
7608
7608
|
}
|
|
7609
7609
|
super.start(t);
|
|
7610
7610
|
}
|
|
@@ -7722,7 +7722,7 @@ const Qw = _(1), ab = _(-2), qp = _(0.8), Zy = _(-1), Xp = _(0.4), Jy = _(2), Yp
|
|
|
7722
7722
|
let a = _(r), o = F(e), l = Fn(Sk(a), ab, n), h = Ia(l), u = Sn(l), c = F(ob(t, o, u, s, i, n)).toVar();
|
|
7723
7723
|
return Ie(h.notEqual(0), () => {
|
|
7724
7724
|
let d = F(ob(t, o, u.add(1), s, i, n)).toVar();
|
|
7725
|
-
c.assign(
|
|
7725
|
+
c.assign(et(c, d, h));
|
|
7726
7726
|
}), c;
|
|
7727
7727
|
}), ob = L(([t, e, r, s, i, n]) => {
|
|
7728
7728
|
let a = _(r).toVar(), o = F(e), l = _(Tk(o)).toVar(), h = _(Gt(eS.sub(a), 0)).toVar();
|
|
@@ -7740,7 +7740,7 @@ const Qw = _(1), ab = _(-2), qp = _(0.8), Zy = _(-1), Xp = _(0.4), Jy = _(2), Yp
|
|
|
7740
7740
|
d.assign(F(s.z, 0, s.x.negate()));
|
|
7741
7741
|
}), d.assign(_a(d));
|
|
7742
7742
|
let p = F().toVar();
|
|
7743
|
-
return p.addAssign(i.element(0).mul(Ky({ theta: 0, axis: d, outputDirection: s, mipInt: o, envMap: l, CUBEUV_TEXEL_WIDTH: h, CUBEUV_TEXEL_HEIGHT: u, CUBEUV_MAX_MIP: c }))),
|
|
7743
|
+
return p.addAssign(i.element(0).mul(Ky({ theta: 0, axis: d, outputDirection: s, mipInt: o, envMap: l, CUBEUV_TEXEL_WIDTH: h, CUBEUV_TEXEL_HEIGHT: u, CUBEUV_MAX_MIP: c }))), tt({ start: R(1), end: t }, ({ i: m }) => {
|
|
7744
7744
|
Ie(m.greaterThanEqual(n), () => {
|
|
7745
7745
|
bR();
|
|
7746
7746
|
});
|
|
@@ -8047,7 +8047,7 @@ var qR = class extends Yt {
|
|
|
8047
8047
|
return new $R();
|
|
8048
8048
|
}
|
|
8049
8049
|
setupSpecular() {
|
|
8050
|
-
let t =
|
|
8050
|
+
let t = et(F(0.04), Ze.rgb, gd);
|
|
8051
8051
|
Ns.assign(t), xd.assign(1);
|
|
8052
8052
|
}
|
|
8053
8053
|
setupVariants() {
|
|
@@ -8088,7 +8088,7 @@ var Uk = class extends qR {
|
|
|
8088
8088
|
}
|
|
8089
8089
|
setupSpecular() {
|
|
8090
8090
|
let t = this.iorNode ? _(this.iorNode) : rR;
|
|
8091
|
-
Zc.assign(t), Ns.assign(
|
|
8091
|
+
Zc.assign(t), Ns.assign(et(Fs(V1(Zc.sub(1).div(Zc.add(1))).mul(UC), F(1)).mul(rb), Ze.rgb, gd)), xd.assign(et(rb, 1, gd));
|
|
8092
8092
|
}
|
|
8093
8093
|
setupLightingModel() {
|
|
8094
8094
|
return new $R(this.useClearcoat, this.useSheen, this.useIridescence, this.useAnisotropy, this.useTransmission, this.useDispersion);
|
|
@@ -8139,7 +8139,7 @@ const Dk = L(({ normal: t, lightDirection: e, builder: r }) => {
|
|
|
8139
8139
|
return F(n.r);
|
|
8140
8140
|
} else {
|
|
8141
8141
|
let n = i.fwidth().mul(0.5);
|
|
8142
|
-
return
|
|
8142
|
+
return et(F(0.7), F(1), Ln(_(0.7).sub(n.x), _(0.7).add(n.x), i.x));
|
|
8143
8143
|
}
|
|
8144
8144
|
});
|
|
8145
8145
|
var $k = class extends kg {
|
|
@@ -8185,7 +8185,7 @@ var qk = class extends Yt {
|
|
|
8185
8185
|
}
|
|
8186
8186
|
setupVariants(t) {
|
|
8187
8187
|
let e = XR, r;
|
|
8188
|
-
r = t.material.matcap ? oa("matcap", "texture").context({ getUV: () => e }) : F(
|
|
8188
|
+
r = t.material.matcap ? oa("matcap", "texture").context({ getUV: () => e }) : F(et(0.2, 0.8, e.y)), Ze.rgb.mulAssign(r.rgb);
|
|
8189
8189
|
}
|
|
8190
8190
|
}, Xk = class extends Jt {
|
|
8191
8191
|
static get type() {
|
|
@@ -8954,7 +8954,7 @@ var MU = class extends Io {
|
|
|
8954
8954
|
clone() {
|
|
8955
8955
|
return new this.constructor(this.r, this.g, this.b, this.a);
|
|
8956
8956
|
}
|
|
8957
|
-
}, KR = class extends
|
|
8957
|
+
}, KR = class extends rt {
|
|
8958
8958
|
static get type() {
|
|
8959
8959
|
return "ParameterNode";
|
|
8960
8960
|
}
|
|
@@ -9157,7 +9157,7 @@ const rE = X(LU), IU = L(([t]) => {
|
|
|
9157
9157
|
return r.shiftRight(22).bitXor(r).toFloat().mul(1 / 2 ** 32);
|
|
9158
9158
|
}), lb = (t, e) => en(Fe(4, t.mul(He(1, t))), e), zU = (t, e) => t.lessThan(0.5) ? lb(t.mul(2), e).div(2) : He(1, lb(Fe(He(1, t), 2), e).div(2)), BU = (t, e, r) => en(Mi(en(t, e), ar(en(t, e), en(He(1, t), r))), 1 / e), VU = (t, e) => Ys(kf.mul(e.mul(t).sub(1))).div(kf.mul(e.mul(t).sub(1))), sa = L(([t]) => t.fract().sub(0.5).abs()).setLayout({ name: "tri", type: "float", inputs: [{ name: "x", type: "float" }] }), OU = L(([t]) => F(sa(t.z.add(sa(t.y.mul(1)))), sa(t.z.add(sa(t.x.mul(1)))), sa(t.y.add(sa(t.x.mul(1)))))).setLayout({ name: "tri3", type: "vec3", inputs: [{ name: "p", type: "vec3" }] }), kU = L(([t, e, r]) => {
|
|
9159
9159
|
let s = F(t).toVar(), i = _(1.4).toVar(), n = _(0).toVar(), a = F(s).toVar();
|
|
9160
|
-
return
|
|
9160
|
+
return tt({ start: _(0), end: _(3), type: "float", condition: "<=" }, () => {
|
|
9161
9161
|
let o = F(OU(a.mul(2))).toVar();
|
|
9162
9162
|
s.addAssign(o.add(r.mul(_(0.1).mul(e)))), a.mulAssign(1.8), i.mulAssign(1.5), s.mulAssign(1.2);
|
|
9163
9163
|
let l = _(sa(s.z.add(sa(s.x.add(sa(s.y)))))).toVar();
|
|
@@ -9573,12 +9573,12 @@ function mS(t, e = 0) {
|
|
|
9573
9573
|
let r = cE(t), s = r[e];
|
|
9574
9574
|
return s === void 0 && (r[e] = s = new Je(), r[e].copy(t.matrixWorld)), s;
|
|
9575
9575
|
}
|
|
9576
|
-
const CD = se(AD), dE = L(([t, e]) => Fs(1, t.oneMinus().div(e)).oneMinus()).setLayout({ name: "blendBurn", type: "vec3", inputs: [{ name: "base", type: "vec3" }, { name: "blend", type: "vec3" }] }), pE = L(([t, e]) => Fs(t.div(e.oneMinus()), 1)).setLayout({ name: "blendDodge", type: "vec3", inputs: [{ name: "base", type: "vec3" }, { name: "blend", type: "vec3" }] }), mE = L(([t, e]) => t.oneMinus().mul(e.oneMinus()).oneMinus()).setLayout({ name: "blendScreen", type: "vec3", inputs: [{ name: "base", type: "vec3" }, { name: "blend", type: "vec3" }] }), fE = L(([t, e]) =>
|
|
9576
|
+
const CD = se(AD), dE = L(([t, e]) => Fs(1, t.oneMinus().div(e)).oneMinus()).setLayout({ name: "blendBurn", type: "vec3", inputs: [{ name: "base", type: "vec3" }, { name: "blend", type: "vec3" }] }), pE = L(([t, e]) => Fs(t.div(e.oneMinus()), 1)).setLayout({ name: "blendDodge", type: "vec3", inputs: [{ name: "base", type: "vec3" }, { name: "blend", type: "vec3" }] }), mE = L(([t, e]) => t.oneMinus().mul(e.oneMinus()).oneMinus()).setLayout({ name: "blendScreen", type: "vec3", inputs: [{ name: "base", type: "vec3" }, { name: "blend", type: "vec3" }] }), fE = L(([t, e]) => et(t.mul(2).mul(e), t.oneMinus().mul(2).mul(e.oneMinus()).oneMinus(), Rg(0.5, t))).setLayout({ name: "blendOverlay", type: "vec3", inputs: [{ name: "base", type: "vec3" }, { name: "blend", type: "vec3" }] }), RD = L(([t, e]) => {
|
|
9577
9577
|
let r = e.a.add(t.a.mul(e.a.oneMinus()));
|
|
9578
9578
|
return ye(e.rgb.mul(e.a).add(t.rgb.mul(t.a).mul(e.a.oneMinus())).div(r), r);
|
|
9579
9579
|
}).setLayout({ name: "blendColor", type: "vec4", inputs: [{ name: "base", type: "vec4" }, { name: "blend", type: "vec4" }] }), ED = L(([t]) => ye(t.rgb.mul(t.a), t.a), { color: "vec4", return: "vec4" }), PD = L(([t]) => (Ie(t.a.equal(0), () => ye(0)), ye(t.rgb.div(t.a), t.a)), { color: "vec4", return: "vec4" }), FD = (...t) => (console.warn('THREE.TSL: "burn" has been renamed. Use "blendBurn" instead.'), dE(t)), LD = (...t) => (console.warn('THREE.TSL: "dodge" has been renamed. Use "blendDodge" instead.'), pE(t)), ID = (...t) => (console.warn('THREE.TSL: "screen" has been renamed. Use "blendScreen" instead.'), mE(t)), zD = (...t) => (console.warn('THREE.TSL: "overlay" has been renamed. Use "blendOverlay" instead.'), fE(t)), BD = L(([t]) => mv(t.rgb)), VD = L(([t, e = _(1)]) => e.mix(mv(t.rgb), t.rgb)), OD = L(([t, e = _(1)]) => {
|
|
9580
9580
|
let r = ar(t.r, t.g, t.b).div(3), s = t.r.max(t.g.max(t.b)), i = s.sub(r).mul(e).mul(-3);
|
|
9581
|
-
return
|
|
9581
|
+
return et(t.rgb, s, i);
|
|
9582
9582
|
}), kD = L(([t, e = _(1)]) => {
|
|
9583
9583
|
let r = F(0.57735, 0.57735, 0.57735), s = e.cos();
|
|
9584
9584
|
return F(t.rgb.mul(s).add(r.cross(t.rgb).mul(e.sin()).add(r.mul(Lo(r, t.rgb).mul(s.oneMinus())))));
|
|
@@ -9780,7 +9780,7 @@ const qD = (t, e, r = new Qe(0, 0, 0), s = 3e-3, i = 1) => H(new HD(t, e, H(r),
|
|
|
9780
9780
|
let o = He(1, r), l = He(1, o.mul(o).div(a.add(o.sub(r))));
|
|
9781
9781
|
t.mulAssign(l.div(a));
|
|
9782
9782
|
let h = He(1, Mi(1, s.mul(a.sub(l)).add(1)));
|
|
9783
|
-
return
|
|
9783
|
+
return et(t, F(l), h);
|
|
9784
9784
|
}).setLayout({ name: "neutralToneMapping", type: "vec3", inputs: [{ name: "color", type: "vec3" }, { name: "exposure", type: "float" }] });
|
|
9785
9785
|
var fr = class extends _e {
|
|
9786
9786
|
static get type() {
|
|
@@ -10362,7 +10362,7 @@ const gS = /* @__PURE__ */ new WeakMap(), EE = L(({ depthTexture: t, shadowCoord
|
|
|
10362
10362
|
let p = De(t, c);
|
|
10363
10363
|
return t.isArrayTexture && (p = p.depth(s)), p.compare(d);
|
|
10364
10364
|
}, n = bt("mapSize", "vec2", r).setGroup(Se), a = J(1).div(n), o = a.x, l = a.y, h = e.xy, u = Ia(h.mul(n).add(0.5));
|
|
10365
|
-
return h.subAssign(u.mul(a)), ar(i(h, e.z), i(h.add(J(o, 0)), e.z), i(h.add(J(0, l)), e.z), i(h.add(a), e.z),
|
|
10365
|
+
return h.subAssign(u.mul(a)), ar(i(h, e.z), i(h.add(J(o, 0)), e.z), i(h.add(J(0, l)), e.z), i(h.add(a), e.z), et(i(h.add(J(o.negate(), 0)), e.z), i(h.add(J(o.mul(2), 0)), e.z), u.x), et(i(h.add(J(o.negate(), l)), e.z), i(h.add(J(o.mul(2), l)), e.z), u.x), et(i(h.add(J(0, l.negate())), e.z), i(h.add(J(0, l.mul(2))), e.z), u.y), et(i(h.add(J(o, l.negate())), e.z), i(h.add(J(o, l.mul(2))), e.z), u.y), et(et(i(h.add(J(o.negate(), l.negate())), e.z), i(h.add(J(o.mul(2), l.negate())), e.z), u.x), et(i(h.add(J(o.negate(), l.mul(2))), e.z), i(h.add(J(o.mul(2), l.mul(2))), e.z), u.x), u.y)).mul(1 / 9);
|
|
10366
10366
|
}), LE = L(({ depthTexture: t, shadowCoord: e, depthLayer: r }) => {
|
|
10367
10367
|
let s = _(1).toVar(), i = De(t).sample(e.xy);
|
|
10368
10368
|
t.isArrayTexture && (i = i.depth(r)), i = i.rg;
|
|
@@ -10392,7 +10392,7 @@ const gS = /* @__PURE__ */ new WeakMap(), EE = L(({ depthTexture: t, shadowCoord
|
|
|
10392
10392
|
}, i.shadowType = r, i.useVelocity = s, yS.set(Au, i)), Au[0] = null, Au[1] = null, i;
|
|
10393
10393
|
}, X6 = L(({ samples: t, radius: e, size: r, shadowPass: s, depthLayer: i }) => {
|
|
10394
10394
|
let n = _(0).toVar("meanVertical"), a = _(0).toVar("squareMeanVertical"), o = t.lessThanEqual(_(1)).select(_(0), _(2).div(t.sub(1))), l = t.lessThanEqual(_(1)).select(_(0), _(-1));
|
|
10395
|
-
|
|
10395
|
+
tt({ start: R(0), end: R(t), type: "int", condition: "<" }, ({ i: u }) => {
|
|
10396
10396
|
let c = l.add(_(u).mul(o)), d = s.sample(ar(jd.xy, J(0, c).mul(e)).div(r));
|
|
10397
10397
|
s.value.isArrayTexture && (d = d.depth(i)), d = d.x, n.addAssign(d), a.addAssign(d.mul(d));
|
|
10398
10398
|
}), n.divAssign(t), a.divAssign(t);
|
|
@@ -10400,7 +10400,7 @@ const gS = /* @__PURE__ */ new WeakMap(), EE = L(({ depthTexture: t, shadowCoord
|
|
|
10400
10400
|
return J(n, h);
|
|
10401
10401
|
}), Y6 = L(({ samples: t, radius: e, size: r, shadowPass: s, depthLayer: i }) => {
|
|
10402
10402
|
let n = _(0).toVar("meanHorizontal"), a = _(0).toVar("squareMeanHorizontal"), o = t.lessThanEqual(_(1)).select(_(0), _(2).div(t.sub(1))), l = t.lessThanEqual(_(1)).select(_(0), _(-1));
|
|
10403
|
-
|
|
10403
|
+
tt({ start: R(0), end: R(t), type: "int", condition: "<" }, ({ i: u }) => {
|
|
10404
10404
|
let c = l.add(_(u).mul(o)), d = s.sample(ar(jd.xy, J(c, 0).mul(e)).div(r));
|
|
10405
10405
|
s.value.isArrayTexture && (d = d.depth(i)), n.addAssign(d.x), a.addAssign(ar(d.y.mul(d.y), d.x.mul(d.x)));
|
|
10406
10406
|
}), n.divAssign(t), a.divAssign(t);
|
|
@@ -10455,7 +10455,7 @@ var BE = class extends V6 {
|
|
|
10455
10455
|
if (c === null) throw Error("THREE.WebGPURenderer: Shadow map type not supported yet.");
|
|
10456
10456
|
let d = i === Qm && s.isPointLightShadow !== !0 ? this.vsmShadowMapHorizontal.texture : n, p = this.setupShadowFilter(t, { filterFn: c, shadowTexture: a.texture, depthTexture: d, shadowCoord: u, shadow: s, depthLayer: this.depthLayer }), m = De(a.texture, u);
|
|
10457
10457
|
n.isArrayTexture && (m = m.depth(this.depthLayer));
|
|
10458
|
-
let f =
|
|
10458
|
+
let f = et(1, p.rgb.mix(m, 1), o.mul(m.a)).toVar();
|
|
10459
10459
|
return this.shadowMap = a, this.shadow.map = a, f;
|
|
10460
10460
|
}
|
|
10461
10461
|
setup(t) {
|
|
@@ -10697,17 +10697,17 @@ const t8 = L(([t = Et()]) => {
|
|
|
10697
10697
|
}).setLayout({ name: "mx_hash_int_3", type: "uint", inputs: [{ name: "x", type: "int" }, { name: "y", type: "int" }, { name: "z", type: "int" }, { name: "xx", type: "int" }] }), b8 = L(([t, e, r, s, i]) => {
|
|
10698
10698
|
let n = R(i).toVar(), a = R(s).toVar(), o = R(r).toVar(), l = R(e).toVar(), h = R(t).toVar(), u = le(le(5)).toVar(), c = le().toVar(), d = le().toVar(), p = le().toVar();
|
|
10699
10699
|
return c.assign(d.assign(p.assign(le(R(3735928559)).add(u.shiftLeft(le(2))).add(le(13))))), c.addAssign(le(h)), d.addAssign(le(l)), p.addAssign(le(o)), HE(c, d, p), c.addAssign(le(a)), d.addAssign(le(n)), Hd(c, d, p);
|
|
10700
|
-
}).setLayout({ name: "mx_hash_int_4", type: "uint", inputs: [{ name: "x", type: "int" }, { name: "y", type: "int" }, { name: "z", type: "int" }, { name: "xx", type: "int" }, { name: "yy", type: "int" }] }),
|
|
10701
|
-
let r = R(e).toVar(), s = R(t).toVar(), i = le(
|
|
10700
|
+
}).setLayout({ name: "mx_hash_int_4", type: "uint", inputs: [{ name: "x", type: "int" }, { name: "y", type: "int" }, { name: "z", type: "int" }, { name: "xx", type: "int" }, { name: "yy", type: "int" }] }), ot = Hr([f8, g8, y8, x8, b8]), v8 = L(([t, e]) => {
|
|
10701
|
+
let r = R(e).toVar(), s = R(t).toVar(), i = le(ot(s, r)).toVar(), n = qh().toVar();
|
|
10702
10702
|
return n.x.assign(i.bitAnd(R(255))), n.y.assign(i.shiftRight(R(8)).bitAnd(R(255))), n.z.assign(i.shiftRight(R(16)).bitAnd(R(255))), n;
|
|
10703
10703
|
}).setLayout({ name: "mx_hash_vec3_0", type: "uvec3", inputs: [{ name: "x", type: "int" }, { name: "y", type: "int" }] }), T8 = L(([t, e, r]) => {
|
|
10704
|
-
let s = R(r).toVar(), i = R(e).toVar(), n = R(t).toVar(), a = le(
|
|
10704
|
+
let s = R(r).toVar(), i = R(e).toVar(), n = R(t).toVar(), a = le(ot(n, i, s)).toVar(), o = qh().toVar();
|
|
10705
10705
|
return o.x.assign(a.bitAnd(R(255))), o.y.assign(a.shiftRight(R(8)).bitAnd(R(255))), o.z.assign(a.shiftRight(R(16)).bitAnd(R(255))), o;
|
|
10706
10706
|
}).setLayout({ name: "mx_hash_vec3_1", type: "uvec3", inputs: [{ name: "x", type: "int" }, { name: "y", type: "int" }, { name: "z", type: "int" }] }), di = Hr([v8, T8]), w8 = L(([t]) => {
|
|
10707
|
-
let e = J(t).toVar(), r = R().toVar(), s = R().toVar(), i = _(Ct(e.x, r)).toVar(), n = _(Ct(e.y, s)).toVar(), a = _(Mn(i)).toVar(), o = _(Mn(n)).toVar(), l = _($E(Vr(
|
|
10707
|
+
let e = J(t).toVar(), r = R().toVar(), s = R().toVar(), i = _(Ct(e.x, r)).toVar(), n = _(Ct(e.y, s)).toVar(), a = _(Mn(i)).toVar(), o = _(Mn(n)).toVar(), l = _($E(Vr(ot(r, s), i, n), Vr(ot(r.add(R(1)), s), i.sub(1), n), Vr(ot(r, s.add(R(1))), i, n.sub(1)), Vr(ot(r.add(R(1)), s.add(R(1))), i.sub(1), n.sub(1)), a, o)).toVar();
|
|
10708
10708
|
return jE(l);
|
|
10709
10709
|
}).setLayout({ name: "mx_perlin_noise_float_0", type: "float", inputs: [{ name: "p", type: "vec2" }] }), S8 = L(([t]) => {
|
|
10710
|
-
let e = F(t).toVar(), r = R().toVar(), s = R().toVar(), i = R().toVar(), n = _(Ct(e.x, r)).toVar(), a = _(Ct(e.y, s)).toVar(), o = _(Ct(e.z, i)).toVar(), l = _(Mn(n)).toVar(), h = _(Mn(a)).toVar(), u = _(Mn(o)).toVar(), c = _(GE(Vr(
|
|
10710
|
+
let e = F(t).toVar(), r = R().toVar(), s = R().toVar(), i = R().toVar(), n = _(Ct(e.x, r)).toVar(), a = _(Ct(e.y, s)).toVar(), o = _(Ct(e.z, i)).toVar(), l = _(Mn(n)).toVar(), h = _(Mn(a)).toVar(), u = _(Mn(o)).toVar(), c = _(GE(Vr(ot(r, s, i), n, a, o), Vr(ot(r.add(R(1)), s, i), n.sub(1), a, o), Vr(ot(r, s.add(R(1)), i), n, a.sub(1), o), Vr(ot(r.add(R(1)), s.add(R(1)), i), n.sub(1), a.sub(1), o), Vr(ot(r, s, i.add(R(1))), n, a, o.sub(1)), Vr(ot(r.add(R(1)), s, i.add(R(1))), n.sub(1), a, o.sub(1)), Vr(ot(r, s.add(R(1)), i.add(R(1))), n, a.sub(1), o.sub(1)), Vr(ot(r.add(R(1)), s.add(R(1)), i.add(R(1))), n.sub(1), a.sub(1), o.sub(1)), l, h, u)).toVar();
|
|
10711
10711
|
return WE(c);
|
|
10712
10712
|
}).setLayout({ name: "mx_perlin_noise_float_1", type: "float", inputs: [{ name: "p", type: "vec3" }] }), Mv = Hr([w8, S8]), _8 = L(([t]) => {
|
|
10713
10713
|
let e = J(t).toVar(), r = R().toVar(), s = R().toVar(), i = _(Ct(e.x, r)).toVar(), n = _(Ct(e.y, s)).toVar(), a = _(Mn(i)).toVar(), o = _(Mn(n)).toVar(), l = F($E(ci(di(r, s), i, n), ci(di(r.add(R(1)), s), i.sub(1), n), ci(di(r, s.add(R(1))), i, n.sub(1)), ci(di(r.add(R(1)), s.add(R(1))), i.sub(1), n.sub(1)), a, o)).toVar();
|
|
@@ -10717,36 +10717,36 @@ const t8 = L(([t = Et()]) => {
|
|
|
10717
10717
|
return WE(c);
|
|
10718
10718
|
}).setLayout({ name: "mx_perlin_noise_vec3_1", type: "vec3", inputs: [{ name: "p", type: "vec3" }] }), Nv = Hr([_8, M8]), N8 = L(([t]) => {
|
|
10719
10719
|
let e = _(t).toVar(), r = R(ir(e)).toVar();
|
|
10720
|
-
return ns(
|
|
10720
|
+
return ns(ot(r));
|
|
10721
10721
|
}).setLayout({ name: "mx_cell_noise_float_0", type: "float", inputs: [{ name: "p", type: "float" }] }), A8 = L(([t]) => {
|
|
10722
10722
|
let e = J(t).toVar(), r = R(ir(e.x)).toVar(), s = R(ir(e.y)).toVar();
|
|
10723
|
-
return ns(
|
|
10723
|
+
return ns(ot(r, s));
|
|
10724
10724
|
}).setLayout({ name: "mx_cell_noise_float_1", type: "float", inputs: [{ name: "p", type: "vec2" }] }), C8 = L(([t]) => {
|
|
10725
10725
|
let e = F(t).toVar(), r = R(ir(e.x)).toVar(), s = R(ir(e.y)).toVar(), i = R(ir(e.z)).toVar();
|
|
10726
|
-
return ns(
|
|
10726
|
+
return ns(ot(r, s, i));
|
|
10727
10727
|
}).setLayout({ name: "mx_cell_noise_float_2", type: "float", inputs: [{ name: "p", type: "vec3" }] }), R8 = L(([t]) => {
|
|
10728
10728
|
let e = ye(t).toVar(), r = R(ir(e.x)).toVar(), s = R(ir(e.y)).toVar(), i = R(ir(e.z)).toVar(), n = R(ir(e.w)).toVar();
|
|
10729
|
-
return ns(
|
|
10729
|
+
return ns(ot(r, s, i, n));
|
|
10730
10730
|
}).setLayout({ name: "mx_cell_noise_float_3", type: "float", inputs: [{ name: "p", type: "vec4" }] }), E8 = Hr([N8, A8, C8, R8]), P8 = L(([t]) => {
|
|
10731
10731
|
let e = _(t).toVar(), r = R(ir(e)).toVar();
|
|
10732
|
-
return F(ns(
|
|
10732
|
+
return F(ns(ot(r, R(0))), ns(ot(r, R(1))), ns(ot(r, R(2))));
|
|
10733
10733
|
}).setLayout({ name: "mx_cell_noise_vec3_0", type: "vec3", inputs: [{ name: "p", type: "float" }] }), F8 = L(([t]) => {
|
|
10734
10734
|
let e = J(t).toVar(), r = R(ir(e.x)).toVar(), s = R(ir(e.y)).toVar();
|
|
10735
|
-
return F(ns(
|
|
10735
|
+
return F(ns(ot(r, s, R(0))), ns(ot(r, s, R(1))), ns(ot(r, s, R(2))));
|
|
10736
10736
|
}).setLayout({ name: "mx_cell_noise_vec3_1", type: "vec3", inputs: [{ name: "p", type: "vec2" }] }), L8 = L(([t]) => {
|
|
10737
10737
|
let e = F(t).toVar(), r = R(ir(e.x)).toVar(), s = R(ir(e.y)).toVar(), i = R(ir(e.z)).toVar();
|
|
10738
|
-
return F(ns(
|
|
10738
|
+
return F(ns(ot(r, s, i, R(0))), ns(ot(r, s, i, R(1))), ns(ot(r, s, i, R(2))));
|
|
10739
10739
|
}).setLayout({ name: "mx_cell_noise_vec3_2", type: "vec3", inputs: [{ name: "p", type: "vec3" }] }), I8 = L(([t]) => {
|
|
10740
10740
|
let e = ye(t).toVar(), r = R(ir(e.x)).toVar(), s = R(ir(e.y)).toVar(), i = R(ir(e.z)).toVar(), n = R(ir(e.w)).toVar();
|
|
10741
|
-
return F(ns(
|
|
10741
|
+
return F(ns(ot(r, s, i, n, R(0))), ns(ot(r, s, i, n, R(1))), ns(ot(r, s, i, n, R(2))));
|
|
10742
10742
|
}).setLayout({ name: "mx_cell_noise_vec3_3", type: "vec3", inputs: [{ name: "p", type: "vec4" }] }), qE = Hr([P8, F8, L8, I8]), Wf = L(([t, e, r, s]) => {
|
|
10743
10743
|
let i = _(s).toVar(), n = _(r).toVar(), a = R(e).toVar(), o = F(t).toVar(), l = _(0).toVar(), h = _(1).toVar();
|
|
10744
|
-
return
|
|
10744
|
+
return tt(a, () => {
|
|
10745
10745
|
l.addAssign(h.mul(Mv(o))), h.mulAssign(i), o.mulAssign(n);
|
|
10746
10746
|
}), l;
|
|
10747
10747
|
}).setLayout({ name: "mx_fractal_noise_float", type: "float", inputs: [{ name: "p", type: "vec3" }, { name: "octaves", type: "int" }, { name: "lacunarity", type: "float" }, { name: "diminish", type: "float" }] }), XE = L(([t, e, r, s]) => {
|
|
10748
10748
|
let i = _(s).toVar(), n = _(r).toVar(), a = R(e).toVar(), o = F(t).toVar(), l = F(0).toVar(), h = _(1).toVar();
|
|
10749
|
-
return
|
|
10749
|
+
return tt(a, () => {
|
|
10750
10750
|
l.addAssign(h.mul(Nv(o))), h.mulAssign(i), o.mulAssign(n);
|
|
10751
10751
|
}), l;
|
|
10752
10752
|
}).setLayout({ name: "mx_fractal_noise_vec3", type: "vec3", inputs: [{ name: "p", type: "vec3" }, { name: "octaves", type: "int" }, { name: "lacunarity", type: "float" }, { name: "diminish", type: "float" }] }), z8 = L(([t, e, r, s]) => {
|
|
@@ -10767,8 +10767,8 @@ const t8 = L(([t = Et()]) => {
|
|
|
10767
10767
|
return Ie(h.equal(R(2)), () => Tt(T.x).add(Tt(T.y)).add(Tt(T.z))), Ie(h.equal(R(3)), () => Gt(Tt(T.x), Tt(T.y), Tt(T.z))), Lo(T, T);
|
|
10768
10768
|
}).setLayout({ name: "mx_worley_distance_1", type: "float", inputs: [{ name: "p", type: "vec3" }, { name: "x", type: "int" }, { name: "y", type: "int" }, { name: "z", type: "int" }, { name: "xoff", type: "int" }, { name: "yoff", type: "int" }, { name: "zoff", type: "int" }, { name: "jitter", type: "float" }, { name: "metric", type: "int" }] }), Zh = Hr([V8, O8]), k8 = L(([t, e, r]) => {
|
|
10769
10769
|
let s = R(r).toVar(), i = _(e).toVar(), n = J(t).toVar(), a = R().toVar(), o = R().toVar(), l = J(Ct(n.x, a), Ct(n.y, o)).toVar(), h = _(1e6).toVar();
|
|
10770
|
-
return
|
|
10771
|
-
|
|
10770
|
+
return tt({ start: -1, end: R(1), name: "x", condition: "<=" }, ({ x: u }) => {
|
|
10771
|
+
tt({ start: -1, end: R(1), name: "y", condition: "<=" }, ({ y: c }) => {
|
|
10772
10772
|
let d = _(Zh(l, u, c, a, o, i, s)).toVar();
|
|
10773
10773
|
h.assign(Fs(h, d));
|
|
10774
10774
|
});
|
|
@@ -10777,8 +10777,8 @@ const t8 = L(([t = Et()]) => {
|
|
|
10777
10777
|
}), h;
|
|
10778
10778
|
}).setLayout({ name: "mx_worley_noise_float_0", type: "float", inputs: [{ name: "p", type: "vec2" }, { name: "jitter", type: "float" }, { name: "metric", type: "int" }] }), U8 = L(([t, e, r]) => {
|
|
10779
10779
|
let s = R(r).toVar(), i = _(e).toVar(), n = J(t).toVar(), a = R().toVar(), o = R().toVar(), l = J(Ct(n.x, a), Ct(n.y, o)).toVar(), h = J(1e6, 1e6).toVar();
|
|
10780
|
-
return
|
|
10781
|
-
|
|
10780
|
+
return tt({ start: -1, end: R(1), name: "x", condition: "<=" }, ({ x: u }) => {
|
|
10781
|
+
tt({ start: -1, end: R(1), name: "y", condition: "<=" }, ({ y: c }) => {
|
|
10782
10782
|
let d = _(Zh(l, u, c, a, o, i, s)).toVar();
|
|
10783
10783
|
Ie(d.lessThan(h.x), () => {
|
|
10784
10784
|
h.y.assign(h.x), h.x.assign(d);
|
|
@@ -10791,8 +10791,8 @@ const t8 = L(([t = Et()]) => {
|
|
|
10791
10791
|
}), h;
|
|
10792
10792
|
}).setLayout({ name: "mx_worley_noise_vec2_0", type: "vec2", inputs: [{ name: "p", type: "vec2" }, { name: "jitter", type: "float" }, { name: "metric", type: "int" }] }), D8 = L(([t, e, r]) => {
|
|
10793
10793
|
let s = R(r).toVar(), i = _(e).toVar(), n = J(t).toVar(), a = R().toVar(), o = R().toVar(), l = J(Ct(n.x, a), Ct(n.y, o)).toVar(), h = F(1e6, 1e6, 1e6).toVar();
|
|
10794
|
-
return
|
|
10795
|
-
|
|
10794
|
+
return tt({ start: -1, end: R(1), name: "x", condition: "<=" }, ({ x: u }) => {
|
|
10795
|
+
tt({ start: -1, end: R(1), name: "y", condition: "<=" }, ({ y: c }) => {
|
|
10796
10796
|
let d = _(Zh(l, u, c, a, o, i, s)).toVar();
|
|
10797
10797
|
Ie(d.lessThan(h.x), () => {
|
|
10798
10798
|
h.z.assign(h.y), h.y.assign(h.x), h.x.assign(d);
|
|
@@ -10807,9 +10807,9 @@ const t8 = L(([t = Et()]) => {
|
|
|
10807
10807
|
}), h;
|
|
10808
10808
|
}).setLayout({ name: "mx_worley_noise_vec3_0", type: "vec3", inputs: [{ name: "p", type: "vec2" }, { name: "jitter", type: "float" }, { name: "metric", type: "int" }] }), $8 = L(([t, e, r]) => {
|
|
10809
10809
|
let s = R(r).toVar(), i = _(e).toVar(), n = F(t).toVar(), a = R().toVar(), o = R().toVar(), l = R().toVar(), h = F(Ct(n.x, a), Ct(n.y, o), Ct(n.z, l)).toVar(), u = _(1e6).toVar();
|
|
10810
|
-
return
|
|
10811
|
-
|
|
10812
|
-
|
|
10810
|
+
return tt({ start: -1, end: R(1), name: "x", condition: "<=" }, ({ x: c }) => {
|
|
10811
|
+
tt({ start: -1, end: R(1), name: "y", condition: "<=" }, ({ y: d }) => {
|
|
10812
|
+
tt({ start: -1, end: R(1), name: "z", condition: "<=" }, ({ z: p }) => {
|
|
10813
10813
|
let m = _(Zh(h, c, d, p, a, o, l, i, s)).toVar();
|
|
10814
10814
|
u.assign(Fs(u, m));
|
|
10815
10815
|
});
|
|
@@ -10819,9 +10819,9 @@ const t8 = L(([t = Et()]) => {
|
|
|
10819
10819
|
}), u;
|
|
10820
10820
|
}).setLayout({ name: "mx_worley_noise_float_1", type: "float", inputs: [{ name: "p", type: "vec3" }, { name: "jitter", type: "float" }, { name: "metric", type: "int" }] }), G8 = Hr([k8, $8]), j8 = L(([t, e, r]) => {
|
|
10821
10821
|
let s = R(r).toVar(), i = _(e).toVar(), n = F(t).toVar(), a = R().toVar(), o = R().toVar(), l = R().toVar(), h = F(Ct(n.x, a), Ct(n.y, o), Ct(n.z, l)).toVar(), u = J(1e6, 1e6).toVar();
|
|
10822
|
-
return
|
|
10823
|
-
|
|
10824
|
-
|
|
10822
|
+
return tt({ start: -1, end: R(1), name: "x", condition: "<=" }, ({ x: c }) => {
|
|
10823
|
+
tt({ start: -1, end: R(1), name: "y", condition: "<=" }, ({ y: d }) => {
|
|
10824
|
+
tt({ start: -1, end: R(1), name: "z", condition: "<=" }, ({ z: p }) => {
|
|
10825
10825
|
let m = _(Zh(h, c, d, p, a, o, l, i, s)).toVar();
|
|
10826
10826
|
Ie(m.lessThan(u.x), () => {
|
|
10827
10827
|
u.y.assign(u.x), u.x.assign(m);
|
|
@@ -10835,9 +10835,9 @@ const t8 = L(([t = Et()]) => {
|
|
|
10835
10835
|
}), u;
|
|
10836
10836
|
}).setLayout({ name: "mx_worley_noise_vec2_1", type: "vec2", inputs: [{ name: "p", type: "vec3" }, { name: "jitter", type: "float" }, { name: "metric", type: "int" }] }), W8 = Hr([U8, j8]), H8 = L(([t, e, r]) => {
|
|
10837
10837
|
let s = R(r).toVar(), i = _(e).toVar(), n = F(t).toVar(), a = R().toVar(), o = R().toVar(), l = R().toVar(), h = F(Ct(n.x, a), Ct(n.y, o), Ct(n.z, l)).toVar(), u = F(1e6, 1e6, 1e6).toVar();
|
|
10838
|
-
return
|
|
10839
|
-
|
|
10840
|
-
|
|
10838
|
+
return tt({ start: -1, end: R(1), name: "x", condition: "<=" }, ({ x: c }) => {
|
|
10839
|
+
tt({ start: -1, end: R(1), name: "y", condition: "<=" }, ({ y: d }) => {
|
|
10840
|
+
tt({ start: -1, end: R(1), name: "z", condition: "<=" }, ({ z: p }) => {
|
|
10841
10841
|
let m = _(Zh(h, c, d, p, a, o, l, i, s)).toVar();
|
|
10842
10842
|
Ie(m.lessThan(u.x), () => {
|
|
10843
10843
|
u.z.assign(u.y), u.y.assign(u.x), u.x.assign(m);
|
|
@@ -10894,12 +10894,12 @@ const t8 = L(([t = Et()]) => {
|
|
|
10894
10894
|
}), F(l, h, u);
|
|
10895
10895
|
}).setLayout({ name: "mx_rgbtohsv", type: "vec3", inputs: [{ name: "c", type: "vec3" }] }), Z8 = L(([t]) => {
|
|
10896
10896
|
let e = F(t).toVar(), r = v1(R1(e, F(0.04045))).toVar(), s = F(e.div(12.92)).toVar(), i = F(en(Gt(e.add(F(0.055)), F(0)).div(1.055), F(2.4))).toVar();
|
|
10897
|
-
return
|
|
10897
|
+
return et(s, i, r);
|
|
10898
10898
|
}).setLayout({ name: "mx_srgb_texture_to_lin_rec709", type: "vec3", inputs: [{ name: "color", type: "vec3" }] }), YE = (t, e) => {
|
|
10899
10899
|
t = _(t), e = _(e);
|
|
10900
10900
|
let r = J(e.dFdx(), e.dFdy()).length().mul(0.7071067811865476);
|
|
10901
10901
|
return Ln(t.sub(r), t.add(r), e);
|
|
10902
|
-
}, ZE = (t, e, r, s) =>
|
|
10902
|
+
}, ZE = (t, e, r, s) => et(t, e, r[s].clamp()), J8 = (t, e, r = Et()) => ZE(t, e, r, "x"), Q8 = (t, e, r = Et()) => ZE(t, e, r, "y"), JE = (t, e, r, s, i) => et(t, e, YE(r, s[i])), K8 = (t, e, r, s = Et()) => JE(t, e, r, s, "x"), e9 = (t, e, r, s = Et()) => JE(t, e, r, s, "y"), t9 = (t = 1, e = 0, r = Et()) => r.mul(t).add(e), r9 = (t, e = 1) => (t = _(t), t.abs().pow(e).mul(t.sign())), s9 = (t, e = 1, r = 0.5) => _(t).sub(r).mul(e).add(r), i9 = (t = Et(), e = 1, r = 0) => Mv(t.convert("vec2|vec3")).mul(e).add(r), n9 = (t = Et(), e = 1, r = 0) => Nv(t.convert("vec2|vec3")).mul(e).add(r), a9 = (t = Et(), e = 1, r = 0) => (t = t.convert("vec2|vec3"), ye(Nv(t), Mv(t.add(J(19, 73)))).mul(e).add(r)), o9 = (t = Et(), e = 1) => G8(t.convert("vec2|vec3"), e, R(1)), l9 = (t = Et(), e = 1) => W8(t.convert("vec2|vec3"), e, R(1)), u9 = (t = Et(), e = 1) => q8(t.convert("vec2|vec3"), e, R(1)), h9 = (t = Et()) => E8(t.convert("vec2|vec3")), c9 = (t = Et(), e = 3, r = 2, s = 0.5, i = 1) => Wf(t, R(e), r, s).mul(i), d9 = (t = Et(), e = 3, r = 2, s = 0.5, i = 1) => z8(t, R(e), r, s).mul(i), p9 = (t = Et(), e = 3, r = 2, s = 0.5, i = 1) => XE(t, R(e), r, s).mul(i), m9 = (t = Et(), e = 3, r = 2, s = 0.5, i = 1) => B8(t, R(e), r, s).mul(i), f9 = L(([t, e, r]) => {
|
|
10903
10903
|
let s = _a(t).toVar(), i = He(_(0.5).mul(e.sub(r)), ga).div(s).toVar(), n = He(_(-0.5).mul(e.sub(r)), ga).div(s).toVar(), a = F().toVar();
|
|
10904
10904
|
a.x = s.x.greaterThan(_(0)).select(i.x, n.x), a.y = s.y.greaterThan(_(0)).select(i.y, n.y), a.z = s.z.greaterThan(_(0)).select(i.z, n.z);
|
|
10905
10905
|
let o = Fs(a.x, a.y, a.z).toVar();
|
|
@@ -10908,7 +10908,7 @@ const t8 = L(([t = Et()]) => {
|
|
|
10908
10908
|
let r = t.x, s = t.y, i = t.z, n = e.element(0).mul(0.886227);
|
|
10909
10909
|
return n = n.add(e.element(1).mul(2 * 0.511664).mul(s)), n = n.add(e.element(2).mul(2 * 0.511664).mul(i)), n = n.add(e.element(3).mul(2 * 0.511664).mul(r)), n = n.add(e.element(4).mul(2 * 0.429043).mul(r).mul(s)), n = n.add(e.element(5).mul(2 * 0.429043).mul(s).mul(i)), n = n.add(e.element(6).mul(i.mul(i).mul(0.743125).sub(0.247708))), n = n.add(e.element(7).mul(2 * 0.429043).mul(r).mul(i)), n = n.add(e.element(8).mul(0.429043).mul(Fe(r, r).sub(Fe(s, s)))), n;
|
|
10910
10910
|
});
|
|
10911
|
-
var y = Object.freeze({ __proto__: null, BRDF_GGX: sb, BRDF_Lambert: ql, BasicPointShadowFilter: OE, BasicShadowFilter: EE, Break: bR, Const: qA, Continue: p4, DFGApprox: uv, D_GGX: BR, Discard: hC, EPSILON: xA, F_Schlick: Vh, Fn: L, INFINITY: XV, If: Ie, Loop:
|
|
10911
|
+
var y = Object.freeze({ __proto__: null, BRDF_GGX: sb, BRDF_Lambert: ql, BasicPointShadowFilter: OE, BasicShadowFilter: EE, Break: bR, Const: qA, Continue: p4, DFGApprox: uv, D_GGX: BR, Discard: hC, EPSILON: xA, F_Schlick: Vh, Fn: L, INFINITY: XV, If: Ie, Loop: tt, NodeAccess: rs, NodeShaderStage: zc, NodeType: xV, NodeUpdateType: Be, PCFShadowFilter: PE, PCFSoftShadowFilter: FE, PI: kf, PI2: YV, PointShadowFilter: kE, Return: cO, Schlick_to_F0: OR, ScriptableNodeResources: pf, ShaderNode: oh, Stack: wg, Switch: OV, TBNViewMatrix: cl, VSMShadowFilter: LE, V_GGX_SmithCorrelated: zR, Var: HA, abs: Tt, acesFilmicToneMapping: TE, acos: F1, add: ar, addMethodChaining: $, addNodeElement: mO, agxToneMapping: wE, all: bA, alphaT: Bf, and: rA, anisotropy: no, anisotropyB: gl, anisotropyT: Yc, any: vA, append: $V, array: Y2, arrayBuffer: UV, asin: _A, assign: Z2, atan: L1, atan2: $A, atomicAdd: A6, atomicAnd: P6, atomicFunc: Dn, atomicLoad: M6, atomicMax: R6, atomicMin: E6, atomicOr: F6, atomicStore: N6, atomicSub: C6, atomicXor: L6, attenuationColor: M1, attenuationDistance: _1, attribute: Na, attributeArray: yD, backgroundBlurriness: oE, backgroundIntensity: ub, backgroundRotation: lE, batch: gR, billboarding: QU, bitAnd: aA, bitNot: oA, bitOr: lA, bitXor: uA, bitangentGeometry: jO, bitangentLocal: WO, bitangentView: EC, bitangentWorld: HO, bitcast: ZV, blendBurn: dE, blendColor: RD, blendDodge: pE, blendOverlay: fE, blendScreen: mE, blur: WR, bool: Pn, buffer: Bd, bufferAttribute: zd, bumpMap: IC, burn: FD, bvec2: k2, bvec3: v1, bvec4: G2, bypass: aC, cache: Jc, call: J2, cameraFar: uo, cameraIndex: Lg, cameraNear: lo, cameraNormalMatrix: NO, cameraPosition: gC, cameraProjectionMatrix: tu, cameraProjectionMatrixInverse: _O, cameraViewMatrix: zs, cameraWorldMatrix: MO, cbrt: OA, cdl: UD, ceil: Cg, checker: t8, cineonToneMapping: vE, clamp: Fn, clearcoat: zf, clearcoatRoughness: yd, code: Gg, color: V2, colorSpaceToWorking: Fg, colorToDirection: D4, compute: iC, computeSkinning: c4, cond: GA, context: Pg, convert: W2, convertColorSpace: rO, convertToTexture: dD, cos: ra, cross: Eg, cubeTexture: Bh, cubeTextureBase: Z1, cubeToUV: Hi, dFdx: I1, dFdy: z1, dashSize: nf, debug: dC, decrement: fA, decrementBefore: pA, defaultBuildStages: j0, defaultShaderStages: P2, defined: pd, degrees: wA, deltaTime: sE, densityFog: l6, densityFogFactor: gv, depth: nv, depthPass: WD, difference: IA, diffuseColor: Ze, directPointLight: DE, directionToColor: AR, dispersion: N1, distance: LA, div: Mi, dodge: LD, dot: Lo, drawIndex: pR, dynamicBufferAttribute: sC, element: j2, emissive: X0, equal: C1, equals: PA, equirectUV: av, exp: E1, exp2: zh, expression: Ma, faceDirection: kd, faceForward: D1, faceforward: JV, float: _, floor: Sn, fog: Td, fract: Ia, frameGroup: X2, frameId: $U, frontFacing: vC, fwidth: RA, gain: zU, gapSize: Y0, getConstNodeType: B2, getCurrentStack: b1, getDirection: GR, getDistanceAttenuation: _v, getGeometryRoughness: IR, getNormalFromDepth: mD, getParallaxCorrectNormal: f9, getRoughness: lv, getScreenPosition: pD, getShIrradianceAt: QE, getShadowMaterial: IE, getShadowRenderObjectFunction: zE, getTextureIndex: tE, getViewPosition: eh, globalId: m6, glsl: e6, glslFn: t6, grayscale: BD, greaterThan: R1, greaterThanEqual: tA, hash: IU, highpModelNormalViewMatrix: K0, highpModelViewMatrix: Q0, hue: kD, increment: mA, incrementBefore: dA, instance: i4, instanceIndex: vo, instancedArray: xD, instancedBufferAttribute: Uf, instancedDynamicBufferAttribute: J0, instancedMesh: fR, int: R, inverseSqrt: P1, inversesqrt: QV, invocationLocalIndex: s4, invocationSubgroupIndex: r4, ior: Zc, iridescence: Mg, iridescenceIOR: T1, iridescenceThickness: w1, ivec2: Nr, ivec3: U2, ivec4: D2, js: QD, label: WA, length: _n, lengthSq: O1, lessThan: K2, lessThanEqual: eA, lightPosition: bv, lightProjectionUV: CE, lightShadowMatrix: xv, lightTargetDirection: Tv, lightTargetPosition: RE, lightViewPosition: vv, lightingContext: TR, lights: B6, linearDepth: $f, linearToneMapping: xE, localId: f6, log: Ag, log2: wn, logarithmicDepthToViewZ: A4, loop: m4, luminance: mv, mat2: Sg, mat3: os, mat4: fl, matcapUV: XR, materialAO: cR, materialAlphaTest: zC, materialAnisotropy: ZC, materialAnisotropyVector: Ku, materialAttenuationColor: iR, materialAttenuationDistance: sR, materialClearcoat: jC, materialClearcoatNormal: HC, materialClearcoatRoughness: WC, materialColor: BC, materialDispersion: hR, materialEmissive: OC, materialEnvIntensity: lf, materialEnvRotation: Y1, materialIOR: rR, materialIridescence: JC, materialIridescenceIOR: QC, materialIridescenceThickness: KC, materialLightMap: K1, materialLineDashOffset: lR, materialLineDashSize: aR, materialLineGapSize: oR, materialLineScale: nR, materialLineWidth: e4, materialMetalness: $C, materialNormal: GC, materialOpacity: Q1, materialPointSize: uR, materialReference: oa, materialReflectivity: uf, materialRefractionRatio: SC, materialRotation: qC, materialRoughness: DC, materialSheen: XC, materialSheenRoughness: YC, materialShininess: VC, materialSpecular: kC, materialSpecularColor: UC, materialSpecularIntensity: rb, materialSpecularStrength: Qc, materialThickness: tR, materialTransmission: eR, max: Gt, maxMipLevel: mC, mediumpModelViewMatrix: bC, metalness: gd, min: Fs, mix: et, mixElement: UA, mod: Id, modInt: yA, modelDirection: FO, modelNormalMatrix: xC, modelPosition: LO, modelRadius: BO, modelScale: IO, modelViewMatrix: ru, modelViewPosition: zO, modelViewProjection: ev, modelWorldMatrix: bi, modelWorldMatrixInverse: VO, morphReference: vR, mrt: rE, mul: Fe, mx_aastep: YE, mx_cell_noise_float: h9, mx_contrast: s9, mx_fractal_noise_float: c9, mx_fractal_noise_vec2: d9, mx_fractal_noise_vec3: p9, mx_fractal_noise_vec4: m9, mx_hsvtorgb: X8, mx_noise_float: i9, mx_noise_vec3: n9, mx_noise_vec4: a9, mx_ramplr: J8, mx_ramptb: Q8, mx_rgbtohsv: Y8, mx_safepower: r9, mx_splitlr: K8, mx_splittb: e9, mx_srgb_texture_to_lin_rec709: Z8, mx_transform_uv: t9, mx_worley_noise_float: o9, mx_worley_noise_vec2: l9, mx_worley_noise_vec3: u9, namespace: nC, negate: MA, neutralToneMapping: SE, nodeArray: ml, nodeImmutable: se, nodeObject: H, nodeObjects: Fd, nodeProxy: X, normalFlat: TC, normalGeometry: Ig, normalLocal: Ls, normalMap: tb, normalView: an, normalWorld: Ud, normalize: _a, not: iA, notEqual: Q2, numWorkgroups: d6, objectDirection: AO, objectGroup: A1, objectPosition: yC, objectRadius: PO, objectScale: RO, objectViewPosition: EO, objectWorldMatrix: CO, oneMinus: NA, or: sA, orthographicDepthToViewZ: N4, oscSawtooth: YU, oscSine: HU, oscSquare: qU, oscTriangle: XU, output: vh, outputStruct: FU, overlay: zD, overloadingFn: Hr, parabola: lb, parallaxDirection: FC, parallaxUV: XO, parameter: NU, pass: GD, passTexture: jD, pcurve: BU, perspectiveDepthToViewZ: sv, pmremTexture: dv, pointShadow: UE, pointUV: vD, pointWidth: jV, positionGeometry: Od, positionLocal: Xt, positionPrevious: Df, positionView: rr, positionViewDirection: Nt, positionWorld: ga, positionWorldDirection: q1, posterize: $D, pow: en, pow2: V1, pow3: zA, pow4: BA, premult: ED, property: Xh, radians: TA, rand: kA, range: h6, rangeFog: o6, rangeFogFactor: fv, reciprocal: CA, reference: bt, referenceBuffer: eb, reflect: FA, reflectVector: NC, reflectView: _C, reflector: oD, refract: U1, refractVector: AC, refractView: MC, reinhardToneMapping: bE, remainder: gA, remap: lC, remapClamp: uC, renderGroup: Se, renderOutput: cC, rendererReference: eC, rotate: Dg, rotateUV: ZU, roughness: xn, round: AA, rtt: aE, sRGBTransferEOTF: ZA, sRGBTransferOETF: JA, sampler: bO, samplerComparison: vO, saturate: k1, saturation: VD, screen: ID, screenCoordinate: jd, screenSize: vd, screenUV: sn, scriptable: a6, scriptableValue: df, select: Fr, setCurrentStack: md, shaderStages: W0, shadow: VE, shadowPositionWorld: Sv, shapeCircle: r8, sharedUniformGroup: Ng, sheen: hl, sheenRoughness: _g, shiftLeft: hA, shiftRight: cA, shininess: Vf, sign: bd, sin: Ys, sinc: VU, skinning: xR, smoothstep: Ln, smoothstepElement: DA, specularColor: Ns, specularF90: xd, spherizeUV: JU, split: DV, spritesheetUV: tD, sqrt: Un, stack: cf, step: Rg, storage: yl, storageBarrier: b6, storageObject: h4, storageTexture: uE, string: kV, struct: PU, sub: He, subgroupIndex: t4, subgroupSize: g6, tan: SA, tangentGeometry: Vg, tangentLocal: Dd, tangentView: $d, tangentWorld: RC, temp: XA, texture: De, texture3D: hE, textureBarrier: v6, textureBicubic: DR, textureCubeUV: jR, textureLoad: Wt, textureSize: bo, textureStore: wD, thickness: S1, time: su, timerDelta: WU, timerGlobal: jU, timerLocal: GU, toneMapping: tC, toneMappingExposure: rC, toonOutlinePass: qD, transformDirection: VA, transformNormal: wC, transformNormalToView: X1, transformedBentNormalView: LC, transformedBitangentView: PC, transformedBitangentWorld: qO, transformedClearcoatNormalView: lh, transformedNormalView: qt, transformedNormalWorld: zg, transformedTangentView: J1, transformedTangentWorld: GO, transmission: Of, transpose: EA, triNoise3D: kU, triplanarTexture: sD, triplanarTextures: iE, trunc: B1, tslFn: GV, uint: le, uniform: xe, uniformArray: yi, uniformCubeTexture: UO, uniformGroup: q2, uniformTexture: xO, uniforms: wO, unpremult: PD, userData: ND, uv: Et, uvec2: O2, uvec3: qh, uvec4: $2, varying: si, varyingProperty: fd, vec2: J, vec3: F, vec4: ye, vectorComponents: Kl, velocity: CD, vertexColor: NR, vertexIndex: dR, vertexStage: YA, vibrance: OD, viewZToLogarithmicDepth: iv, viewZToOrthographicDepth: wh, viewZToPerspectiveDepth: _R, viewport: Th, viewportBottomLeft: S4, viewportCoordinate: SR, viewportDepthTexture: rv, viewportLinearDepth: C4, viewportMipTexture: tv, viewportResolution: T4, viewportSafeUV: KU, viewportSharedTexture: U4, viewportSize: wR, viewportTexture: _4, viewportTopLeft: w4, viewportUV: v4, wgsl: KD, wgslFn: r6, workgroupArray: S6, workgroupBarrier: x6, workgroupId: p6, workingToColorSpace: QA, xor: nA });
|
|
10912
10912
|
const Ui = new pv();
|
|
10913
10913
|
var g9 = class extends Io {
|
|
10914
10914
|
constructor(t, e) {
|
|
@@ -11812,7 +11812,7 @@ var W9 = class extends Cv {
|
|
|
11812
11812
|
super.update(t), this.lightPositionNode.object3d = e, this.groundColorNode.value.copy(e.groundColor).multiplyScalar(e.intensity);
|
|
11813
11813
|
}
|
|
11814
11814
|
setup(t) {
|
|
11815
|
-
let { colorNode: e, groundColorNode: r, lightDirectionNode: s } = this, i = Ud.dot(s), n = i.mul(0.5).add(0.5), a =
|
|
11815
|
+
let { colorNode: e, groundColorNode: r, lightDirectionNode: s } = this, i = Ud.dot(s), n = i.mul(0.5).add(0.5), a = et(r, e, n);
|
|
11816
11816
|
t.context.irradiance.addAssign(a);
|
|
11817
11817
|
}
|
|
11818
11818
|
}, X9 = class extends iu {
|
|
@@ -14879,7 +14879,7 @@ void main() {}` };
|
|
|
14879
14879
|
t && t.loseContext(), this.renderer.domElement.removeEventListener("webglcontextlost", this._onContextLost);
|
|
14880
14880
|
}
|
|
14881
14881
|
};
|
|
14882
|
-
const hh = { PointList: "point-list", LineList: "line-list", LineStrip: "line-strip", TriangleList: "triangle-list", TriangleStrip: "triangle-strip" }, Gr = { Never: "never", Less: "less", Equal: "equal", LessEqual: "less-equal", Greater: "greater", NotEqual: "not-equal", GreaterEqual: "greater-equal", Always: "always" }, fs = { Store: "store" },
|
|
14882
|
+
const hh = { PointList: "point-list", LineList: "line-list", LineStrip: "line-strip", TriangleList: "triangle-list", TriangleStrip: "triangle-strip" }, Gr = { Never: "never", Less: "less", Equal: "equal", LessEqual: "less-equal", Greater: "greater", NotEqual: "not-equal", GreaterEqual: "greater-equal", Always: "always" }, fs = { Store: "store" }, Ke = { Load: "load", Clear: "clear" }, vx = { CCW: "ccw" }, Tx = { None: "none", Front: "front", Back: "back" }, Oh = { Uint16: "uint16", Uint32: "uint32" }, P = { R8Unorm: "r8unorm", R8Snorm: "r8snorm", R8Uint: "r8uint", R8Sint: "r8sint", R16Uint: "r16uint", R16Sint: "r16sint", R16Float: "r16float", RG8Unorm: "rg8unorm", RG8Snorm: "rg8snorm", RG8Uint: "rg8uint", RG8Sint: "rg8sint", R32Uint: "r32uint", R32Sint: "r32sint", R32Float: "r32float", RG16Uint: "rg16uint", RG16Sint: "rg16sint", RG16Float: "rg16float", RGBA8Unorm: "rgba8unorm", RGBA8UnormSRGB: "rgba8unorm-srgb", RGBA8Snorm: "rgba8snorm", RGBA8Uint: "rgba8uint", RGBA8Sint: "rgba8sint", BGRA8Unorm: "bgra8unorm", BGRA8UnormSRGB: "bgra8unorm-srgb", RGB9E5UFloat: "rgb9e5ufloat", RGB10A2Unorm: "rgb10a2unorm", RG11B10UFloat: "rgb10a2unorm", RG32Uint: "rg32uint", RG32Sint: "rg32sint", RG32Float: "rg32float", RGBA16Uint: "rgba16uint", RGBA16Sint: "rgba16sint", RGBA16Float: "rgba16float", RGBA32Uint: "rgba32uint", RGBA32Sint: "rgba32sint", RGBA32Float: "rgba32float", Depth16Unorm: "depth16unorm", Depth24Plus: "depth24plus", Depth24PlusStencil8: "depth24plus-stencil8", Depth32Float: "depth32float", Depth32FloatStencil8: "depth32float-stencil8", BC1RGBAUnorm: "bc1-rgba-unorm", BC1RGBAUnormSRGB: "bc1-rgba-unorm-srgb", BC2RGBAUnorm: "bc2-rgba-unorm", BC2RGBAUnormSRGB: "bc2-rgba-unorm-srgb", BC3RGBAUnorm: "bc3-rgba-unorm", BC3RGBAUnormSRGB: "bc3-rgba-unorm-srgb", BC4RUnorm: "bc4-r-unorm", BC4RSnorm: "bc4-r-snorm", BC5RGUnorm: "bc5-rg-unorm", BC5RGSnorm: "bc5-rg-snorm", BC6HRGBUFloat: "bc6h-rgb-ufloat", BC6HRGBFloat: "bc6h-rgb-float", BC7RGBAUnorm: "bc7-rgba-unorm", BC7RGBAUnormSRGB: "bc7-rgba-srgb", ETC2RGB8Unorm: "etc2-rgb8unorm", ETC2RGB8UnormSRGB: "etc2-rgb8unorm-srgb", ETC2RGB8A1Unorm: "etc2-rgb8a1unorm", ETC2RGB8A1UnormSRGB: "etc2-rgb8a1unorm-srgb", ETC2RGBA8Unorm: "etc2-rgba8unorm", ETC2RGBA8UnormSRGB: "etc2-rgba8unorm-srgb", EACR11Unorm: "eac-r11unorm", EACR11Snorm: "eac-r11snorm", EACRG11Unorm: "eac-rg11unorm", EACRG11Snorm: "eac-rg11snorm", ASTC4x4Unorm: "astc-4x4-unorm", ASTC4x4UnormSRGB: "astc-4x4-unorm-srgb", ASTC5x4Unorm: "astc-5x4-unorm", ASTC5x4UnormSRGB: "astc-5x4-unorm-srgb", ASTC5x5Unorm: "astc-5x5-unorm", ASTC5x5UnormSRGB: "astc-5x5-unorm-srgb", ASTC6x5Unorm: "astc-6x5-unorm", ASTC6x5UnormSRGB: "astc-6x5-unorm-srgb", ASTC6x6Unorm: "astc-6x6-unorm", ASTC6x6UnormSRGB: "astc-6x6-unorm-srgb", ASTC8x5Unorm: "astc-8x5-unorm", ASTC8x5UnormSRGB: "astc-8x5-unorm-srgb", ASTC8x6Unorm: "astc-8x6-unorm", ASTC8x6UnormSRGB: "astc-8x6-unorm-srgb", ASTC8x8Unorm: "astc-8x8-unorm", ASTC8x8UnormSRGB: "astc-8x8-unorm-srgb", ASTC10x5Unorm: "astc-10x5-unorm", ASTC10x5UnormSRGB: "astc-10x5-unorm-srgb", ASTC10x6Unorm: "astc-10x6-unorm", ASTC10x6UnormSRGB: "astc-10x6-unorm-srgb", ASTC10x8Unorm: "astc-10x8-unorm", ASTC10x8UnormSRGB: "astc-10x8-unorm-srgb", ASTC10x10Unorm: "astc-10x10-unorm", ASTC10x10UnormSRGB: "astc-10x10-unorm-srgb", ASTC12x10Unorm: "astc-12x10-unorm", ASTC12x10UnormSRGB: "astc-12x10-unorm-srgb", ASTC12x12Unorm: "astc-12x12-unorm", ASTC12x12UnormSRGB: "astc-12x12-unorm-srgb" }, wx = { ClampToEdge: "clamp-to-edge", Repeat: "repeat", MirrorRepeat: "mirror-repeat" }, nl = { Linear: "linear", Nearest: "nearest" }, ze = { Zero: "zero", One: "one", Src: "src", OneMinusSrc: "one-minus-src", SrcAlpha: "src-alpha", OneMinusSrcAlpha: "one-minus-src-alpha", Dst: "dst", OneMinusDst: "one-minus-dst", DstAlpha: "dst-alpha", OneMinusDstAlpha: "one-minus-dst-alpha", SrcAlphaSaturated: "src-alpha-saturated", Constant: "constant", OneMinusConstant: "one-minus-constant" }, Wo = { Add: "add", Subtract: "subtract", ReverseSubtract: "reverse-subtract", Min: "min", Max: "max" }, US = { None: 0, All: 15 }, Ha = { Keep: "keep", Zero: "zero", Replace: "replace", Invert: "invert", IncrementClamp: "increment-clamp", DecrementClamp: "decrement-clamp", IncrementWrap: "increment-wrap", DecrementWrap: "decrement-wrap" }, DS = { Storage: "storage", ReadOnlyStorage: "read-only-storage" }, Sx = { WriteOnly: "write-only", ReadOnly: "read-only", ReadWrite: "read-write" }, $S = { NonFiltering: "non-filtering", Comparison: "comparison" }, Ho = { Float: "float", UnfilterableFloat: "unfilterable-float", Depth: "depth", SInt: "sint", UInt: "uint" }, GS = { TwoD: "2d", ThreeD: "3d" }, kr = { TwoD: "2d", TwoDArray: "2d-array", Cube: "cube", ThreeD: "3d" }, z$ = { All: "all" }, lm = { Vertex: "vertex", Instance: "instance" }, cb = { DepthClipControl: "depth-clip-control", Depth32FloatStencil8: "depth32float-stencil8", TextureCompressionBC: "texture-compression-bc", TextureCompressionETC2: "texture-compression-etc2", TextureCompressionASTC: "texture-compression-astc", TimestampQuery: "timestamp-query", IndirectFirstInstance: "indirect-first-instance", ShaderF16: "shader-f16", RG11B10UFloat: "rg11b10ufloat-renderable", BGRA8UNormStorage: "bgra8unorm-storage", Float32Filterable: "float32-filterable", ClipDistances: "clip-distances", DualSourceBlending: "dual-source-blending", Subgroups: "subgroups" };
|
|
14883
14883
|
var B$ = class extends Ev {
|
|
14884
14884
|
constructor(t, e) {
|
|
14885
14885
|
super(t), this.texture = e, this.version = e ? e.version : 0, this.isSampler = !0;
|
|
@@ -14977,7 +14977,7 @@ fn main( @location( 0 ) vTex : vec2<f32> ) -> @location( 0 ) vec4<f32> {
|
|
|
14977
14977
|
}
|
|
14978
14978
|
flipY(t, e, r = 0) {
|
|
14979
14979
|
let s = e.format, { width: i, height: n } = e.size, a = this.getTransferPipeline(s), o = this.getFlipYPipeline(s), l = this.device.createTexture({ size: { width: i, height: n, depthOrArrayLayers: 1 }, format: s, usage: GPUTextureUsage.RENDER_ATTACHMENT | GPUTextureUsage.TEXTURE_BINDING }), h = t.createView({ baseMipLevel: 0, mipLevelCount: 1, dimension: kr.TwoD, baseArrayLayer: r }), u = l.createView({ baseMipLevel: 0, mipLevelCount: 1, dimension: kr.TwoD, baseArrayLayer: 0 }), c = this.device.createCommandEncoder({}), d = (p, m, f) => {
|
|
14980
|
-
let g = p.getBindGroupLayout(0), b = this.device.createBindGroup({ layout: g, entries: [{ binding: 0, resource: this.flipYSampler }, { binding: 1, resource: m }] }), v = c.beginRenderPass({ colorAttachments: [{ view: f, loadOp:
|
|
14980
|
+
let g = p.getBindGroupLayout(0), b = this.device.createBindGroup({ layout: g, entries: [{ binding: 0, resource: this.flipYSampler }, { binding: 1, resource: m }] }), v = c.beginRenderPass({ colorAttachments: [{ view: f, loadOp: Ke.Clear, storeOp: fs.Store, clearValue: [0, 0, 0, 0] }] });
|
|
14981
14981
|
v.setPipeline(p), v.setBindGroup(0, b), v.draw(4, 1, 0, 0), v.end();
|
|
14982
14982
|
};
|
|
14983
14983
|
d(a, h, u), d(o, u, h), this.device.queue.submit([c.finish()]), l.destroy();
|
|
@@ -14991,7 +14991,7 @@ fn main( @location( 0 ) vTex : vec2<f32> ) -> @location( 0 ) vec4<f32> {
|
|
|
14991
14991
|
_mipmapCreateBundles(t, e, r) {
|
|
14992
14992
|
let s = this.getTransferPipeline(e.format), i = s.getBindGroupLayout(0), n = t.createView({ baseMipLevel: 0, mipLevelCount: 1, dimension: kr.TwoD, baseArrayLayer: r }), a = [];
|
|
14993
14993
|
for (let o = 1; o < e.mipLevelCount; o++) {
|
|
14994
|
-
let l = this.device.createBindGroup({ layout: i, entries: [{ binding: 0, resource: this.mipmapSampler }, { binding: 1, resource: n }] }), h = t.createView({ baseMipLevel: o, mipLevelCount: 1, dimension: kr.TwoD, baseArrayLayer: r }), u = { colorAttachments: [{ view: h, loadOp:
|
|
14994
|
+
let l = this.device.createBindGroup({ layout: i, entries: [{ binding: 0, resource: this.mipmapSampler }, { binding: 1, resource: n }] }), h = t.createView({ baseMipLevel: o, mipLevelCount: 1, dimension: kr.TwoD, baseArrayLayer: r }), u = { colorAttachments: [{ view: h, loadOp: Ke.Clear, storeOp: fs.Store, clearValue: [0, 0, 0, 0] }] }, c = this.device.createRenderBundleEncoder({ colorFormats: [e.format] });
|
|
14995
14995
|
c.setPipeline(s), c.setBindGroup(0, l), c.draw(4, 1, 0, 0), a.push({ renderBundles: [c.finish()], passDescriptor: u }), n = h;
|
|
14996
14996
|
}
|
|
14997
14997
|
return a;
|
|
@@ -16687,7 +16687,7 @@ var i7 = class {
|
|
|
16687
16687
|
let o = { colorAttachments: [] };
|
|
16688
16688
|
for (let l = 0; l < a.textureViews.length; l++) {
|
|
16689
16689
|
let h = a.textureViews[l], u = { r: 0, g: 0, b: 0, a: 1 };
|
|
16690
|
-
l === 0 && e.clearValue && (u = e.clearValue), o.colorAttachments.push({ view: h.view, depthSlice: h.depthSlice, resolveTarget: h.resolveTarget, loadOp: e.loadOp ||
|
|
16690
|
+
l === 0 && e.clearValue && (u = e.clearValue), o.colorAttachments.push({ view: h.view, depthSlice: h.depthSlice, resolveTarget: h.resolveTarget, loadOp: e.loadOp || Ke.Load, storeOp: e.storeOp || fs.Store, clearValue: u });
|
|
16691
16691
|
}
|
|
16692
16692
|
return a.depthStencilView && (o.depthStencilAttachment = { view: a.depthStencilView }), o;
|
|
16693
16693
|
}
|
|
@@ -16695,19 +16695,19 @@ var i7 = class {
|
|
|
16695
16695
|
let e = this.get(t), r = this.device, s = t.occlusionQueryCount, i;
|
|
16696
16696
|
s > 0 && (e.currentOcclusionQuerySet && e.currentOcclusionQuerySet.destroy(), e.currentOcclusionQueryBuffer && e.currentOcclusionQueryBuffer.destroy(), e.currentOcclusionQuerySet = e.occlusionQuerySet, e.currentOcclusionQueryBuffer = e.occlusionQueryBuffer, e.currentOcclusionQueryObjects = e.occlusionQueryObjects, i = r.createQuerySet({ type: "occlusion", count: s, label: `occlusionQuerySet_${t.id}` }), e.occlusionQuerySet = i, e.occlusionQueryIndex = 0, e.occlusionQueryObjects = Array(s), e.lastOcclusionObject = null);
|
|
16697
16697
|
let n;
|
|
16698
|
-
n = t.textures === null ? this._getDefaultRenderPassDescriptor() : this._getRenderPassDescriptor(t, { loadOp:
|
|
16698
|
+
n = t.textures === null ? this._getDefaultRenderPassDescriptor() : this._getRenderPassDescriptor(t, { loadOp: Ke.Load }), this.initTimestampQuery(t, n), n.occlusionQuerySet = i;
|
|
16699
16699
|
let a = n.depthStencilAttachment;
|
|
16700
16700
|
if (t.textures !== null) {
|
|
16701
16701
|
let l = n.colorAttachments;
|
|
16702
16702
|
for (let h = 0; h < l.length; h++) {
|
|
16703
16703
|
let u = l[h];
|
|
16704
|
-
t.clearColor ? (u.clearValue = h === 0 ? t.clearColorValue : { r: 0, g: 0, b: 0, a: 1 }, u.loadOp =
|
|
16704
|
+
t.clearColor ? (u.clearValue = h === 0 ? t.clearColorValue : { r: 0, g: 0, b: 0, a: 1 }, u.loadOp = Ke.Clear) : u.loadOp = Ke.Load, u.storeOp = fs.Store;
|
|
16705
16705
|
}
|
|
16706
16706
|
} else {
|
|
16707
16707
|
let l = n.colorAttachments[0];
|
|
16708
|
-
t.clearColor ? (l.clearValue = t.clearColorValue, l.loadOp =
|
|
16708
|
+
t.clearColor ? (l.clearValue = t.clearColorValue, l.loadOp = Ke.Clear) : l.loadOp = Ke.Load, l.storeOp = fs.Store;
|
|
16709
16709
|
}
|
|
16710
|
-
t.depth && (t.clearDepth ? (a.depthClearValue = t.clearDepthValue, a.depthLoadOp =
|
|
16710
|
+
t.depth && (t.clearDepth ? (a.depthClearValue = t.clearDepthValue, a.depthLoadOp = Ke.Clear) : a.depthLoadOp = Ke.Load, a.depthStoreOp = fs.Store), t.stencil && (t.clearStencil ? (a.stencilClearValue = t.clearStencilValue, a.stencilLoadOp = Ke.Clear) : a.stencilLoadOp = Ke.Load, a.stencilStoreOp = fs.Store);
|
|
16711
16711
|
let o = r.createCommandEncoder({ label: "renderContext_" + t.id });
|
|
16712
16712
|
if (this._isRenderCameraDepthArray(t) === !0) {
|
|
16713
16713
|
let l = t.camera.cameras;
|
|
@@ -16735,7 +16735,7 @@ var i7 = class {
|
|
|
16735
16735
|
let o = { ...r, colorAttachments: [{ ...r.colorAttachments[0], view: r.colorAttachments[a].view }] };
|
|
16736
16736
|
if (r.depthStencilAttachment) {
|
|
16737
16737
|
let l = a;
|
|
16738
|
-
n.viewCache[l] || (n.viewCache[l] = n.texture.createView({ dimension: kr.TwoD, baseArrayLayer: a, arrayLayerCount: 1 })), o.depthStencilAttachment = { view: n.viewCache[l], depthLoadOp: i.depthLoadOp ||
|
|
16738
|
+
n.viewCache[l] || (n.viewCache[l] = n.texture.createView({ dimension: kr.TwoD, baseArrayLayer: a, arrayLayerCount: 1 })), o.depthStencilAttachment = { view: n.viewCache[l], depthLoadOp: i.depthLoadOp || Ke.Clear, depthStoreOp: i.depthStoreOp || fs.Store, depthClearValue: i.depthClearValue || 1 }, t.stencil && (o.depthStencilAttachment.stencilLoadOp = i.stencilLoadOp, o.depthStencilAttachment.stencilStoreOp = i.stencilStoreOp, o.depthStencilAttachment.stencilClearValue = i.stencilClearValue);
|
|
16739
16739
|
} else o.depthStencilAttachment = { ...i };
|
|
16740
16740
|
e.layerDescriptors.push(o);
|
|
16741
16741
|
}
|
|
@@ -16745,7 +16745,7 @@ var i7 = class {
|
|
|
16745
16745
|
let i = e.layerDescriptors[s];
|
|
16746
16746
|
if (i.depthStencilAttachment) {
|
|
16747
16747
|
let n = i.depthStencilAttachment;
|
|
16748
|
-
t.depth && (t.clearDepth ? (n.depthClearValue = t.clearDepthValue, n.depthLoadOp =
|
|
16748
|
+
t.depth && (t.clearDepth ? (n.depthClearValue = t.clearDepthValue, n.depthLoadOp = Ke.Clear) : n.depthLoadOp = Ke.Load), t.stencil && (t.clearStencil ? (n.stencilClearValue = t.clearStencilValue, n.stencilLoadOp = Ke.Clear) : n.stencilLoadOp = Ke.Load);
|
|
16749
16749
|
}
|
|
16750
16750
|
}
|
|
16751
16751
|
}
|
|
@@ -16820,17 +16820,17 @@ var i7 = class {
|
|
|
16820
16820
|
if (t) {
|
|
16821
16821
|
a = p.colorAttachments;
|
|
16822
16822
|
let m = a[0];
|
|
16823
|
-
m.clearValue = l, m.loadOp =
|
|
16823
|
+
m.clearValue = l, m.loadOp = Ke.Clear, m.storeOp = fs.Store;
|
|
16824
16824
|
}
|
|
16825
16825
|
(h || u) && (o = p.depthStencilAttachment);
|
|
16826
16826
|
} else {
|
|
16827
16827
|
h = s.depth, u = s.stencil;
|
|
16828
|
-
let p = { loadOp: t ?
|
|
16829
|
-
h && (p.depthLoadOp = e ?
|
|
16828
|
+
let p = { loadOp: t ? Ke.Clear : Ke.Load, clearValue: t ? l : void 0 };
|
|
16829
|
+
h && (p.depthLoadOp = e ? Ke.Clear : Ke.Load, p.depthClearValue = e ? n.getClearDepth() : void 0, p.depthStoreOp = fs.Store), u && (p.stencilLoadOp = r ? Ke.Clear : Ke.Load, p.stencilClearValue = r ? n.getClearStencil() : void 0, p.stencilStoreOp = fs.Store);
|
|
16830
16830
|
let m = this._getRenderPassDescriptor(s, p);
|
|
16831
16831
|
a = m.colorAttachments, o = m.depthStencilAttachment;
|
|
16832
16832
|
}
|
|
16833
|
-
h && o && o.depthLoadOp === void 0 && (e ? (o.depthLoadOp =
|
|
16833
|
+
h && o && o.depthLoadOp === void 0 && (e ? (o.depthLoadOp = Ke.Clear, o.depthClearValue = n.getClearDepth(), o.depthStoreOp = fs.Store) : (o.depthLoadOp = Ke.Load, o.depthStoreOp = fs.Store)), u && o && o.stencilLoadOp === void 0 && (r ? (o.stencilLoadOp = Ke.Clear, o.stencilClearValue = n.getClearStencil(), o.stencilStoreOp = fs.Store) : (o.stencilLoadOp = Ke.Load, o.stencilStoreOp = fs.Store));
|
|
16834
16834
|
let c = i.createCommandEncoder({ label: "clear" });
|
|
16835
16835
|
c.beginRenderPass({ colorAttachments: a, depthStencilAttachment: o }).end(), i.queue.submit([c.finish()]);
|
|
16836
16836
|
}
|
|
@@ -17054,8 +17054,8 @@ var i7 = class {
|
|
|
17054
17054
|
let a;
|
|
17055
17055
|
if (s.currentPass ? (s.currentPass.end(), a = s.encoder) : a = this.device.createCommandEncoder({ label: "copyFramebufferToTexture_" + t.id }), a.copyTextureToTexture({ texture: i, origin: [r.x, r.y, 0] }, { texture: n }, [r.z, r.w]), s.currentPass) {
|
|
17056
17056
|
let { descriptor: o } = s;
|
|
17057
|
-
for (let l = 0; l < o.colorAttachments.length; l++) o.colorAttachments[l].loadOp =
|
|
17058
|
-
if (e.depth && (o.depthStencilAttachment.depthLoadOp =
|
|
17057
|
+
for (let l = 0; l < o.colorAttachments.length; l++) o.colorAttachments[l].loadOp = Ke.Load;
|
|
17058
|
+
if (e.depth && (o.depthStencilAttachment.depthLoadOp = Ke.Load), e.stencil && (o.depthStencilAttachment.stencilLoadOp = Ke.Load), s.currentPass = a.beginRenderPass(o), s.currentSets = { attributes: {}, bindingGroups: [], pipeline: null, index: null }, e.viewport && this.updateViewport(e), e.scissor) {
|
|
17059
17059
|
let { x: l, y: h, width: u, height: c } = e.scissorValue;
|
|
17060
17060
|
s.currentPass.setScissorRect(l, h, u, c);
|
|
17061
17061
|
}
|
|
@@ -25491,15 +25491,15 @@ class Vv extends Jh {
|
|
|
25491
25491
|
const be = new D();
|
|
25492
25492
|
for (let de = 0; de < Te; de++) {
|
|
25493
25493
|
const ve = de * Z - re;
|
|
25494
|
-
for (let
|
|
25495
|
-
const Lt =
|
|
25496
|
-
be[f] = Lt * v, be[g] = ve * w, be[b] = he, h.push(be.x, be.y, be.z), be[f] = 0, be[g] = 0, be[b] = S > 0 ? 1 : -1, u.push(be.x, be.y, be.z), c.push(
|
|
25494
|
+
for (let ht = 0; ht < pe; ht++) {
|
|
25495
|
+
const Lt = ht * K - ee;
|
|
25496
|
+
be[f] = Lt * v, be[g] = ve * w, be[b] = he, h.push(be.x, be.y, be.z), be[f] = 0, be[g] = 0, be[b] = S > 0 ? 1 : -1, u.push(be.x, be.y, be.z), c.push(ht / N), c.push(1 - de / A), we += 1;
|
|
25497
25497
|
}
|
|
25498
25498
|
}
|
|
25499
25499
|
for (let de = 0; de < A; de++)
|
|
25500
25500
|
for (let ve = 0; ve < N; ve++) {
|
|
25501
|
-
const
|
|
25502
|
-
l.push(
|
|
25501
|
+
const ht = d + ve + pe * de, Lt = d + ve + pe * (de + 1), It = d + (ve + 1) + pe * (de + 1), it = d + (ve + 1) + pe * de;
|
|
25502
|
+
l.push(ht, Lt, it), l.push(Lt, It, it), Re += 6;
|
|
25503
25503
|
}
|
|
25504
25504
|
o.addGroup(p, Re, U), p += Re, d += we;
|
|
25505
25505
|
}
|
|
@@ -26859,28 +26859,28 @@ typeof window < "u" && (window.__THREE__ ? console.warn("WARNING: Multiple insta
|
|
|
26859
26859
|
const xl = { name: "ASCII", category: "Effects", requiresRTT: !0, props: { characters: { default: "@%#*+=-:.", description: "Characters to use for ASCII effect (light to dark)", ui: { type: "text", label: "Characters" } }, cellSize: { default: 30, description: "Size of each ASCII character cell in pixels", ui: { type: "range", min: 8, max: 100, step: 1, label: "Cell Size" } }, fontFamily: { default: "jetbrains mono", description: "Font family for characters", ui: { type: "select", options: [{ label: "JetBrains Mono", value: "jetbrains mono" }, { label: "Courier New", value: "courier new" }, { label: "Monaco", value: "monaco" }, { label: "Consolas", value: "consolas" }], label: "Font Family" } } }, fragmentNode: ({ uniforms: t, childNode: e, onCleanup: r, onBeforeRender: s, dimensions: i }) => {
|
|
26860
26860
|
let { vec2: n, vec3: a, vec4: o, floor: l, fract: h, dot: u, screenUV: c, convertToTexture: d, texture: p } = Pt;
|
|
26861
26861
|
if (!e) return o(0, 0, 0, 0);
|
|
26862
|
-
let m = Math.round(i.width), f = Math.round(i.height), g = d(e, m, f), b = (Xr,
|
|
26863
|
-
let oi = Xr.length, Sr = Math.max(2, Math.ceil(Math.sqrt(oi))), cr = Math.max(8,
|
|
26864
|
-
us.width = Sr *
|
|
26862
|
+
let m = Math.round(i.width), f = Math.round(i.height), g = d(e, m, f), b = (Xr, ct, _s) => {
|
|
26863
|
+
let oi = Xr.length, Sr = Math.max(2, Math.ceil(Math.sqrt(oi))), cr = Math.max(8, ct - 4), us = document.createElement("canvas");
|
|
26864
|
+
us.width = Sr * ct, us.height = Sr * ct;
|
|
26865
26865
|
let hs = us.getContext("2d");
|
|
26866
26866
|
hs.fillStyle = "#000000", hs.fillRect(0, 0, us.width, us.height), hs.fillStyle = "#ffffff", hs.font = `${cr}px ${_s}`, hs.textAlign = "center", hs.textBaseline = "middle";
|
|
26867
26867
|
for (let Bi = 0; Bi < oi; Bi++) {
|
|
26868
|
-
let xp = Xr[Bi], bp = Math.floor(Bi / Sr), vp = Bi % Sr, Tp = vp *
|
|
26868
|
+
let xp = Xr[Bi], bp = Math.floor(Bi / Sr), vp = Bi % Sr, Tp = vp * ct + ct / 2, wp = bp * ct + ct / 2;
|
|
26869
26869
|
hs.fillText(xp, Tp, wp);
|
|
26870
26870
|
}
|
|
26871
|
-
return console.log(`Atlas created: ${oi} chars, ${Sr}x${Sr} grid, ${us.width}x${us.height}px`), console.log(`Characters: "${Xr}"`), { canvas: us, atlasSize: Sr, cellSize:
|
|
26871
|
+
return console.log(`Atlas created: ${oi} chars, ${Sr}x${Sr} grid, ${us.width}x${us.height}px`), console.log(`Characters: "${Xr}"`), { canvas: us, atlasSize: Sr, cellSize: ct, charCount: oi };
|
|
26872
26872
|
}, v = b(t.characters.uniform.value, t.cellSize.uniform.value, t.fontFamily.uniform.value), w = new nK(v.canvas);
|
|
26873
26873
|
w.minFilter = Ai, w.magFilter = Ai, w.generateMipmaps = !1;
|
|
26874
26874
|
let T = p(w), M = t.characters.uniform.value, S = t.cellSize.uniform.value, N = t.fontFamily.uniform.value, A = () => {
|
|
26875
|
-
let Xr = t.characters.uniform.value,
|
|
26876
|
-
(Xr !== M ||
|
|
26875
|
+
let Xr = t.characters.uniform.value, ct = t.cellSize.uniform.value, _s = t.fontFamily.uniform.value;
|
|
26876
|
+
(Xr !== M || ct !== S || _s !== N) && (v = b(Xr, ct, _s), w.image = v.canvas, w.needsUpdate = !0, M = Xr, S = ct, N = _s);
|
|
26877
26877
|
};
|
|
26878
26878
|
s(() => {
|
|
26879
26879
|
A();
|
|
26880
26880
|
}), r(() => {
|
|
26881
26881
|
w.dispose();
|
|
26882
26882
|
});
|
|
26883
|
-
let U = t.cellSize.uniform, K = n(m, f).div(U), Z = c.mul(K), ee = l(Z), re = h(Z), he = ee.add(n(0.5)).div(K), pe = g.sample(he), Te = u(pe.rgb, a(0.299, 0.587, 0.114)), we = v.charCount, Re = Te.mul(0.8).add(0.1), be = Re.mul(we), de = l(be.min(we - 1e-4)), ve = v.atlasSize,
|
|
26883
|
+
let U = t.cellSize.uniform, K = n(m, f).div(U), Z = c.mul(K), ee = l(Z), re = h(Z), he = ee.add(n(0.5)).div(K), pe = g.sample(he), Te = u(pe.rgb, a(0.299, 0.587, 0.114)), we = v.charCount, Re = Te.mul(0.8).add(0.1), be = Re.mul(we), de = l(be.min(we - 1e-4)), ve = v.atlasSize, ht = de.mod(ve), Lt = l(de.div(ve)), It = 1 / ve, it = n(re.x, re.y.sub(1).mul(-1)), kt = n(ht, Lt).mul(It).add(it.mul(It)), cn = T.sample(kt);
|
|
26884
26884
|
return o(cn.rgb.mul(pe.rgb), pe.a);
|
|
26885
26885
|
} };
|
|
26886
26886
|
var M_ = function(t) {
|
|
@@ -27303,8 +27303,8 @@ function k3(t, e, { kL: r = 1, kC: s = 1, kH: i = 1 } = {}) {
|
|
|
27303
27303
|
Te = v * w === 0 ? U : K <= 180 ? U / 2 : U < 360 ? (U + 360) / 2 : (U - 360) / 2;
|
|
27304
27304
|
let we = (re - 50) ** 2, Re = 1 + 0.015 * we / Math.sqrt(20 + we), be = 1 + 0.045 * he, de = 1;
|
|
27305
27305
|
de -= 0.17 * Math.cos((Te - 30) * Du), de += 0.24 * Math.cos(2 * Te * Du), de += 0.32 * Math.cos((3 * Te + 6) * Du), de -= 0.2 * Math.cos((4 * Te - 63) * Du);
|
|
27306
|
-
let ve = 1 + 0.015 * he * de,
|
|
27307
|
-
return
|
|
27306
|
+
let ve = 1 + 0.015 * he * de, ht = 30 * Math.exp(-1 * ((Te - 275) / 25) ** 2), Lt = 2 * Math.sqrt(pe / (pe + R_)), It = -1 * Math.sin(2 * ht * Du) * Lt, it = (S / (r * Re)) ** 2;
|
|
27307
|
+
return it += (N / (s * be)) ** 2, it += (ee / (i * ve)) ** 2, it += It * (N / (s * be)) * (ee / (i * ve)), Math.sqrt(it);
|
|
27308
27308
|
}
|
|
27309
27309
|
const bK = [[0.819022437996703, 0.3619062600528904, -0.1288737815209879], [0.0329836539323885, 0.9292868615863434, 0.0361446663506424], [0.0481771893596242, 0.2642395317527308, 0.6335478284694309]], vK = [[1.2268798758459243, -0.5578149944602171, 0.2813910456659647], [-0.0405757452148008, 1.112286803280317, -0.0717110580655164], [-0.0763729366746601, -0.4214933324022432, 1.5869240198367816]], TK = [[0.210454268309314, 0.7936177747023054, -0.0040720430116193], [1.9779985324311684, -2.42859224204858, 0.450593709617411], [0.0259040424655478, 0.7827717124575296, -0.8086757549230774]], wK = [[1, 0.3963377773761749, 0.2158037573099136], [1, -0.1055613458156586, -0.0638541728258133], [1, -0.0894841775298119, -1.2914855480194092]];
|
|
27310
27310
|
var kh = new Ne({ id: "oklab", name: "Oklab", coords: { l: { refRange: [0, 1], name: "Lightness" }, a: { refRange: [-0.4, 0.4] }, b: { refRange: [-0.4, 0.4] } }, white: "D65", base: Wr, fromBase(t) {
|
|
@@ -28249,7 +28249,7 @@ function yf() {
|
|
|
28249
28249
|
let t = Math.random() * 4294967295 | 0, e = Math.random() * 4294967295 | 0, r = Math.random() * 4294967295 | 0, s = Math.random() * 4294967295 | 0;
|
|
28250
28250
|
return (Kr[t & 255] + Kr[t >> 8 & 255] + Kr[t >> 16 & 255] + Kr[t >> 24 & 255] + "-" + Kr[e & 255] + Kr[e >> 8 & 255] + "-" + Kr[e >> 16 & 15 | 64] + Kr[e >> 24 & 255] + "-" + Kr[r & 63 | 128] + Kr[r >> 8 & 255] + "-" + Kr[r >> 16 & 255] + Kr[r >> 24 & 255] + Kr[s & 255] + Kr[s >> 8 & 255] + Kr[s >> 16 & 255] + Kr[s >> 24 & 255]).toLowerCase();
|
|
28251
28251
|
}
|
|
28252
|
-
function
|
|
28252
|
+
function at(t, e, r) {
|
|
28253
28253
|
return Math.max(e, Math.min(r, t));
|
|
28254
28254
|
}
|
|
28255
28255
|
function Yv(t, e) {
|
|
@@ -28370,7 +28370,7 @@ function mt(t, e) {
|
|
|
28370
28370
|
throw Error("Invalid component type.");
|
|
28371
28371
|
}
|
|
28372
28372
|
}
|
|
28373
|
-
const Ete = { DEG2RAD: p5, RAD2DEG: m5, generateUUID: yf, clamp:
|
|
28373
|
+
const Ete = { DEG2RAD: p5, RAD2DEG: m5, generateUUID: yf, clamp: at, euclideanModulo: Yv, mapLinear: mte, inverseLerp: fte, lerp: ad, damp: gte, pingpong: yte, smoothstep: xte, smootherstep: bte, randInt: vte, randFloat: Tte, randFloatSpread: wte, seededRandom: Ste, degToRad: _te, radToDeg: Mte, isPowerOfTwo: Nte, ceilPowerOfTwo: Ate, floorPowerOfTwo: Cte, setQuaternionFromProperEuler: Rte, normalize: mt, denormalize: Qi }, Rb = 0, Pte = 1015, Eb = "", Xi = "srgb", MM = "srgb-linear", NM = "linear", od = "srgb", rg = 35044, dl = 2e3, Pb = 2001;
|
|
28374
28374
|
var rp = class f5 {
|
|
28375
28375
|
constructor(e, r, s, i, n, a, o, l, h) {
|
|
28376
28376
|
f5.prototype.isMatrix3 = !0, this.elements = [1, 0, 0, 0, 1, 0, 0, 0, 1], e !== void 0 && this.set(e, r, s, i, n, a, o, l, h);
|
|
@@ -28533,7 +28533,7 @@ var Zv = class {
|
|
|
28533
28533
|
return this.r = t, this.g = e, this.b = r, gr.colorSpaceToWorking(this, s), this;
|
|
28534
28534
|
}
|
|
28535
28535
|
setHSL(t, e, r, s = gr.workingColorSpace) {
|
|
28536
|
-
if (t = Yv(t, 1), e =
|
|
28536
|
+
if (t = Yv(t, 1), e = at(e, 0, 1), r = at(r, 0, 1), e === 0) this.r = this.g = this.b = r;
|
|
28537
28537
|
else {
|
|
28538
28538
|
let i = r <= 0.5 ? r * (1 + e) : r + e - r * e, n = 2 * r - i;
|
|
28539
28539
|
this.r = t0(n, i, t + 1 / 3), this.g = t0(n, i, t), this.b = t0(n, i, t - 1 / 3);
|
|
@@ -28591,7 +28591,7 @@ var Zv = class {
|
|
|
28591
28591
|
return this.copyLinearToSRGB(this), this;
|
|
28592
28592
|
}
|
|
28593
28593
|
getHex(t = Xi) {
|
|
28594
|
-
return gr.workingToColorSpace(es.copy(this), t), Math.round(
|
|
28594
|
+
return gr.workingToColorSpace(es.copy(this), t), Math.round(at(es.r * 255, 0, 255)) * 65536 + Math.round(at(es.g * 255, 0, 255)) * 256 + Math.round(at(es.b * 255, 0, 255));
|
|
28595
28595
|
}
|
|
28596
28596
|
getHexString(t = Xi) {
|
|
28597
28597
|
return ("000000" + this.getHex(t).toString(16)).slice(-6);
|
|
@@ -28817,7 +28817,7 @@ var Lte = class y5 {
|
|
|
28817
28817
|
return r < 2 ** -52 ? (r = 0, Math.abs(t.x) > Math.abs(t.z) ? (this._x = -t.y, this._y = t.x, this._z = 0, this._w = r) : (this._x = 0, this._y = -t.z, this._z = t.y, this._w = r)) : (this._x = t.y * e.z - t.z * e.y, this._y = t.z * e.x - t.x * e.z, this._z = t.x * e.y - t.y * e.x, this._w = r), this.normalize();
|
|
28818
28818
|
}
|
|
28819
28819
|
angleTo(t) {
|
|
28820
|
-
return 2 * Math.acos(Math.abs(
|
|
28820
|
+
return 2 * Math.acos(Math.abs(at(this.dot(t), -1, 1)));
|
|
28821
28821
|
}
|
|
28822
28822
|
rotateTowards(t, e) {
|
|
28823
28823
|
let r = this.angleTo(t);
|
|
@@ -29027,14 +29027,14 @@ var Lte = class y5 {
|
|
|
29027
29027
|
return this.x = Math.max(this.x, e.x), this.y = Math.max(this.y, e.y), this.z = Math.max(this.z, e.z), this;
|
|
29028
29028
|
}
|
|
29029
29029
|
clamp(e, r) {
|
|
29030
|
-
return this.x =
|
|
29030
|
+
return this.x = at(this.x, e.x, r.x), this.y = at(this.y, e.y, r.y), this.z = at(this.z, e.z, r.z), this;
|
|
29031
29031
|
}
|
|
29032
29032
|
clampScalar(e, r) {
|
|
29033
|
-
return this.x =
|
|
29033
|
+
return this.x = at(this.x, e, r), this.y = at(this.y, e, r), this.z = at(this.z, e, r), this;
|
|
29034
29034
|
}
|
|
29035
29035
|
clampLength(e, r) {
|
|
29036
29036
|
let s = this.length();
|
|
29037
|
-
return this.divideScalar(s || 1).multiplyScalar(
|
|
29037
|
+
return this.divideScalar(s || 1).multiplyScalar(at(s, e, r));
|
|
29038
29038
|
}
|
|
29039
29039
|
floor() {
|
|
29040
29040
|
return this.x = Math.floor(this.x), this.y = Math.floor(this.y), this.z = Math.floor(this.z), this;
|
|
@@ -29098,7 +29098,7 @@ var Lte = class y5 {
|
|
|
29098
29098
|
let r = Math.sqrt(this.lengthSq() * e.lengthSq());
|
|
29099
29099
|
if (r === 0) return Math.PI / 2;
|
|
29100
29100
|
let s = this.dot(e) / r;
|
|
29101
|
-
return Math.acos(
|
|
29101
|
+
return Math.acos(at(s, -1, 1));
|
|
29102
29102
|
}
|
|
29103
29103
|
distanceTo(e) {
|
|
29104
29104
|
return Math.sqrt(this.distanceToSquared(e));
|
|
@@ -29438,14 +29438,14 @@ var v5 = class T5 {
|
|
|
29438
29438
|
return this.x = Math.max(this.x, e.x), this.y = Math.max(this.y, e.y), this;
|
|
29439
29439
|
}
|
|
29440
29440
|
clamp(e, r) {
|
|
29441
|
-
return this.x =
|
|
29441
|
+
return this.x = at(this.x, e.x, r.x), this.y = at(this.y, e.y, r.y), this;
|
|
29442
29442
|
}
|
|
29443
29443
|
clampScalar(e, r) {
|
|
29444
|
-
return this.x =
|
|
29444
|
+
return this.x = at(this.x, e, r), this.y = at(this.y, e, r), this;
|
|
29445
29445
|
}
|
|
29446
29446
|
clampLength(e, r) {
|
|
29447
29447
|
let s = this.length();
|
|
29448
|
-
return this.divideScalar(s || 1).multiplyScalar(
|
|
29448
|
+
return this.divideScalar(s || 1).multiplyScalar(at(s, e, r));
|
|
29449
29449
|
}
|
|
29450
29450
|
floor() {
|
|
29451
29451
|
return this.x = Math.floor(this.x), this.y = Math.floor(this.y), this;
|
|
@@ -29487,7 +29487,7 @@ var v5 = class T5 {
|
|
|
29487
29487
|
let r = Math.sqrt(this.lengthSq() * e.lengthSq());
|
|
29488
29488
|
if (r === 0) return Math.PI / 2;
|
|
29489
29489
|
let s = this.dot(e) / r;
|
|
29490
|
-
return Math.acos(
|
|
29490
|
+
return Math.acos(at(s, -1, 1));
|
|
29491
29491
|
}
|
|
29492
29492
|
distanceTo(e) {
|
|
29493
29493
|
return Math.sqrt(this.distanceToSquared(e));
|
|
@@ -29667,14 +29667,14 @@ var v5 = class T5 {
|
|
|
29667
29667
|
return this.x = Math.max(this.x, e.x), this.y = Math.max(this.y, e.y), this.z = Math.max(this.z, e.z), this.w = Math.max(this.w, e.w), this;
|
|
29668
29668
|
}
|
|
29669
29669
|
clamp(e, r) {
|
|
29670
|
-
return this.x =
|
|
29670
|
+
return this.x = at(this.x, e.x, r.x), this.y = at(this.y, e.y, r.y), this.z = at(this.z, e.z, r.z), this.w = at(this.w, e.w, r.w), this;
|
|
29671
29671
|
}
|
|
29672
29672
|
clampScalar(e, r) {
|
|
29673
|
-
return this.x =
|
|
29673
|
+
return this.x = at(this.x, e, r), this.y = at(this.y, e, r), this.z = at(this.z, e, r), this.w = at(this.w, e, r), this;
|
|
29674
29674
|
}
|
|
29675
29675
|
clampLength(e, r) {
|
|
29676
29676
|
let s = this.length();
|
|
29677
|
-
return this.divideScalar(s || 1).multiplyScalar(
|
|
29677
|
+
return this.divideScalar(s || 1).multiplyScalar(at(s, e, r));
|
|
29678
29678
|
}
|
|
29679
29679
|
floor() {
|
|
29680
29680
|
return this.x = Math.floor(this.x), this.y = Math.floor(this.y), this.z = Math.floor(this.z), this.w = Math.floor(this.w), this;
|
|
@@ -31416,21 +31416,21 @@ const rne = Li(([t]) => H5(t.rgb)), sne = Li(([t, e = zn(1)]) => e.mix(H5(t.rgb)
|
|
|
31416
31416
|
e(({ pointer: Re }) => {
|
|
31417
31417
|
let be = Date.now(), de = Math.min((be - U) / 1e3, 0.016);
|
|
31418
31418
|
U = be;
|
|
31419
|
-
let ve = de > 0 ? (Re.x - N) / de : 0,
|
|
31420
|
-
M.value = M.value * 0.85 + ve * 0.15, S.value = S.value * 0.85 +
|
|
31421
|
-
let Lt = t.duration.uniform.value, It = t.intensity.uniform.value,
|
|
31419
|
+
let ve = de > 0 ? (Re.x - N) / de : 0, ht = de > 0 ? (Re.y - A) / de : 0;
|
|
31420
|
+
M.value = M.value * 0.85 + ve * 0.15, S.value = S.value * 0.85 + ht * 0.15, w.value = Re.x, T.value = Re.y;
|
|
31421
|
+
let Lt = t.duration.uniform.value, It = t.intensity.uniform.value, it = t.radius.uniform.value * 0.05, kt = t.swirl.uniform.value;
|
|
31422
31422
|
for (let cn = 0; cn < f; cn++) for (let Xr = 0; Xr < f; Xr++) {
|
|
31423
|
-
let
|
|
31424
|
-
g[
|
|
31423
|
+
let ct = (cn * f + Xr) * 2;
|
|
31424
|
+
g[ct] *= 1 - Lt * de, g[ct + 1] *= 1 - Lt * de;
|
|
31425
31425
|
let _s = (Xr + 0.5) / f, oi = (cn + 0.5) / f, Sr = _s - Re.x, cr = oi - Re.y, us = Math.sqrt(Sr * Sr + cr * cr);
|
|
31426
|
-
if (us <
|
|
31427
|
-
let hs = Math.exp(-us * us / (
|
|
31428
|
-
if (g[
|
|
31426
|
+
if (us < it * 2 && Math.abs(ve) + Math.abs(ht) > 0.01) {
|
|
31427
|
+
let hs = Math.exp(-us * us / (it * it));
|
|
31428
|
+
if (g[ct] += M.value * hs * It * de * 0.5, g[ct + 1] += S.value * hs * It * de * 0.5, kt > 0) {
|
|
31429
31429
|
let Bi = Math.atan2(cr, Sr) + Math.PI * 0.5;
|
|
31430
|
-
g[
|
|
31430
|
+
g[ct] += Math.cos(Bi) * kt * hs * de * 2, g[ct + 1] += Math.sin(Bi) * kt * hs * de * 2;
|
|
31431
31431
|
}
|
|
31432
31432
|
}
|
|
31433
|
-
g[
|
|
31433
|
+
g[ct] = Math.max(-1, Math.min(1, g[ct])), g[ct + 1] = Math.max(-1, Math.min(1, g[ct + 1]));
|
|
31434
31434
|
}
|
|
31435
31435
|
b.needsUpdate = !0, N = Re.x, A = Re.y;
|
|
31436
31436
|
}), s(() => {
|
|
@@ -31471,15 +31471,15 @@ const rne = Li(([t]) => H5(t.rgb)), sne = Li(([t, e = zn(1)]) => e.mix(H5(t.rgb)
|
|
|
31471
31471
|
U = Te;
|
|
31472
31472
|
let Re = we > 0 ? (pe.x - N) / we : 0, be = we > 0 ? (pe.y - A) / we : 0;
|
|
31473
31473
|
M.value = M.value * 0.85 + Re * 0.15, S.value = S.value * 0.85 + be * 0.15, w.value = pe.x, T.value = pe.y;
|
|
31474
|
-
let de = t.duration.uniform.value, ve = t.intensity.uniform.value,
|
|
31475
|
-
for (let It = 0; It < f; It++) for (let
|
|
31476
|
-
let kt = (It * f +
|
|
31474
|
+
let de = t.duration.uniform.value, ve = t.intensity.uniform.value, ht = t.radius.uniform.value * 0.05, Lt = t.swirl.uniform.value;
|
|
31475
|
+
for (let It = 0; It < f; It++) for (let it = 0; it < f; it++) {
|
|
31476
|
+
let kt = (It * f + it) * 2;
|
|
31477
31477
|
g[kt] *= 1 - de * we, g[kt + 1] *= 1 - de * we;
|
|
31478
|
-
let cn = (
|
|
31479
|
-
if (oi <
|
|
31480
|
-
let Sr = Math.exp(-oi * oi / (
|
|
31478
|
+
let cn = (it + 0.5) / f, Xr = (It + 0.5) / f, ct = cn - pe.x, _s = Xr - pe.y, oi = Math.sqrt(ct * ct + _s * _s);
|
|
31479
|
+
if (oi < ht * 2 && Math.abs(Re) + Math.abs(be) > 0.01) {
|
|
31480
|
+
let Sr = Math.exp(-oi * oi / (ht * ht));
|
|
31481
31481
|
if (g[kt] += M.value * Sr * ve * we * 0.5, g[kt + 1] += S.value * Sr * ve * we * 0.5, Lt > 0) {
|
|
31482
|
-
let cr = Math.atan2(_s,
|
|
31482
|
+
let cr = Math.atan2(_s, ct) + Math.PI * 0.5;
|
|
31483
31483
|
g[kt] += Math.cos(cr) * Lt * Sr * we * 2, g[kt + 1] += Math.sin(cr) * Lt * Sr * we * 2;
|
|
31484
31484
|
}
|
|
31485
31485
|
}
|
|
@@ -31523,8 +31523,8 @@ const one = ne(ane).setParameterLength(2), Il = { name: "Posterize", category: "
|
|
|
31523
31523
|
let s = e || r(0, 0, 0, 0);
|
|
31524
31524
|
return r(sne(s.rgb, t.intensity.uniform).rgb, s.a);
|
|
31525
31525
|
} }, Vl = { name: "SolidColor", category: "Gradients & Colors", props: { color: { default: "#5b18ca", transform: ws, description: "The solid color to display", ui: { type: "color", label: "Color" } } }, fragmentNode: ({ uniforms: t }) => t.color.uniform }, Ol = { name: "Spiral", category: "Shapes & Masks", props: { colorBack: { default: "#000000", transform: ws, description: "Background color", ui: { type: "color", label: "Background Color" } }, colorFront: { default: "#ffffff", transform: ws, description: "Spiral stroke color", ui: { type: "color", label: "Spiral Color" } }, strokeWidth: { default: 0.5, description: "Thickness of spiral stroke", ui: { type: "range", min: 0, max: 2, step: 0.01, label: "Stroke Width" } }, strokeFalloff: { default: 0, description: "Stroke losing width further from center", ui: { type: "range", min: 0, max: 1, step: 0.01, label: "Stroke Falloff" } }, softness: { default: 0, description: "Color transition sharpness (0 = hard edge, 1 = smooth fade)", ui: { type: "range", min: 0, max: 1, step: 0.01, label: "Softness" } }, speed: { default: 1, description: "Animation speed (negative values reverse direction)", ui: { type: "range", min: -3, max: 3, step: 0.1, label: "Speed" } }, center: { default: { x: 0.5, y: 0.5 }, transform: ep, description: "The center point of the spiral" }, scale: { default: 1, description: "Scale factor for spiral bands (higher = more bands, lower = fewer bands)", ui: { type: "range", min: 0.1, max: 5, step: 0.1, label: "Scale" } } }, fragmentNode: ({ uniforms: t }) => {
|
|
31526
|
-
let { vec2: e, vec4: r, float: s, atan: i, length: n, clamp: a, fract: o, abs: l, mix: h, smoothstep: u, screenUV: c, time: d, fwidth: p, viewportSize: m } = Pt, f = m.x.div(m.y), g = e(c.x.mul(f), c.y), b = e(t.center.uniform.x.mul(f), t.center.uniform.y.oneMinus()), v = g.sub(b), w = d.mul(t.speed.uniform), T = n(v), M = T, S = i(v.y, v.x).sub(w), N = s(6.283185307), A = S.div(N), U = M.mul(t.scale.uniform).add(A), K = o(U), Z = l(K.sub(0.5)).mul(2), ee = a(t.strokeWidth.uniform, t.strokeFalloff.uniform.mul(5e-3), 1), re = a(t.strokeFalloff.uniform, 0, 1).mul(T).oneMinus(), he = ee.mul(re), pe = p(U), Te = s(4).sub(u(0.05, 0.4, t.strokeWidth.uniform.mul(2)).mul(u(0.05, 0.4, t.strokeWidth.uniform.oneMinus().mul(2))).mul(3)), we = h(Te.mul(pe), p(Z), a(pe, 0, 1)), Re = u(he.sub(we).sub(t.softness.uniform), he.add(we).add(t.softness.uniform), Z), be = t.colorFront.uniform.rgb.mul(t.colorFront.uniform.a), de = t.colorFront.uniform.a, ve = t.colorBack.uniform.rgb.mul(t.colorBack.uniform.a),
|
|
31527
|
-
return r(
|
|
31526
|
+
let { vec2: e, vec4: r, float: s, atan: i, length: n, clamp: a, fract: o, abs: l, mix: h, smoothstep: u, screenUV: c, time: d, fwidth: p, viewportSize: m } = Pt, f = m.x.div(m.y), g = e(c.x.mul(f), c.y), b = e(t.center.uniform.x.mul(f), t.center.uniform.y.oneMinus()), v = g.sub(b), w = d.mul(t.speed.uniform), T = n(v), M = T, S = i(v.y, v.x).sub(w), N = s(6.283185307), A = S.div(N), U = M.mul(t.scale.uniform).add(A), K = o(U), Z = l(K.sub(0.5)).mul(2), ee = a(t.strokeWidth.uniform, t.strokeFalloff.uniform.mul(5e-3), 1), re = a(t.strokeFalloff.uniform, 0, 1).mul(T).oneMinus(), he = ee.mul(re), pe = p(U), Te = s(4).sub(u(0.05, 0.4, t.strokeWidth.uniform.mul(2)).mul(u(0.05, 0.4, t.strokeWidth.uniform.oneMinus().mul(2))).mul(3)), we = h(Te.mul(pe), p(Z), a(pe, 0, 1)), Re = u(he.sub(we).sub(t.softness.uniform), he.add(we).add(t.softness.uniform), Z), be = t.colorFront.uniform.rgb.mul(t.colorFront.uniform.a), de = t.colorFront.uniform.a, ve = t.colorBack.uniform.rgb.mul(t.colorBack.uniform.a), ht = t.colorBack.uniform.a, Lt = be.mul(Re), It = de.mul(Re), it = Lt.add(ve.mul(It.oneMinus())), kt = It.add(ht.mul(It.oneMinus()));
|
|
31527
|
+
return r(it, kt);
|
|
31528
31528
|
} }, kl = { name: "Swirl", category: "Gradients & Colors", props: { colorA: { default: "#1275d8", description: "Primary gradient color", transform: ws, ui: { type: "color", label: "Primary Color" } }, colorB: { default: "#e19136", description: "Secondary gradient color", transform: ws, ui: { type: "color", label: "Secondary Color" } }, colorC: { default: "#320485", description: "Accent gradient color", transform: ws, ui: { type: "color", label: "Accent Color" } }, speed: { default: 1, description: "Flow animation speed", ui: { type: "range", min: 0, max: 5, step: 0.1, label: "Speed" } }, scale: { default: 5, description: "Gradient scale", ui: { type: "range", min: 0.1, max: 20, step: 0.1, label: "Scale" } }, complexity: { default: 5, description: "Flow complexity", ui: { type: "range", min: 1, max: 10, step: 0.1, label: "Complexity" } } }, fragmentNode: ({ uniforms: t }) => {
|
|
31529
31529
|
let e = y3(), r = f3.mul(t.speed.uniform), s = t.scale.uniform, i = t.complexity.uniform, n = th(e.x.mul(s.mul(1.2)).add(r.mul(0.8))).mul(0.3), a = mf(e.y.mul(s.mul(0.9)).sub(r.mul(0.6))).mul(0.3), o = x3(e.x.add(th(e.y.mul(i.mul(2)).add(r)).mul(0.08)), e.y.add(mf(e.x.mul(i.mul(1.5)).sub(r.mul(0.7))).mul(0.08))), l = th(o.x.mul(s.mul(3)).add(o.y.mul(s.mul(2))).add(r.mul(0.5))), h = mf(o.x.sub(o.y).mul(s.mul(2.5)).add(r.mul(0.3))), u = th(o.x.mul(i).add(n).add(o.y.mul(i.mul(0.8)).add(a)).add(r.mul(0.4))), c = td(l, h, u.mul(0.5).add(0.5)), d = o.x.mul(0.7).add(o.y.mul(0.3)).add(c.mul(0.2)), p = td(t.colorA.uniform, t.colorB.uniform, mb(0.1, 0.6, d)), m = td(p, t.colorC.uniform, mb(0.4, 0.9, d.add(u.mul(0.3)))), f = th(r.mul(3).add(d.mul(10))).mul(0.02).add(1), g = m.mul(f);
|
|
31530
31530
|
return ts(g, 1);
|
|
@@ -31596,26 +31596,26 @@ function gne() {
|
|
|
31596
31596
|
if (ae <= 0 || oe <= 0 || ae === g && oe === b) return;
|
|
31597
31597
|
let ce = performance.now();
|
|
31598
31598
|
if (ce - w < S) return;
|
|
31599
|
-
let ge = g,
|
|
31599
|
+
let ge = g, nt = b;
|
|
31600
31600
|
g = ae, b = oe, w = ce, d || (d = !0), e.setSize(ae, oe, !1);
|
|
31601
31601
|
let jt = ae / oe, $r = 2, Mt = $r * jt;
|
|
31602
|
-
r.left = -Mt / 2, r.right = Mt / 2, r.top = $r / 2, r.bottom = -2 / 2, r.updateProjectionMatrix(), i.scale.set(Mt, $r, 1), (a.rootId && (ge === 0 ||
|
|
31602
|
+
r.left = -Mt / 2, r.right = Mt / 2, r.top = $r / 2, r.bottom = -2 / 2, r.updateProjectionMatrix(), i.scale.set(Mt, $r, 1), (a.rootId && (ge === 0 || nt === 0) || a.rootId && d) && ve(), cr().catch(console.warn);
|
|
31603
31603
|
}, Re = (ae) => {
|
|
31604
31604
|
if (!e || !r || !i) return;
|
|
31605
31605
|
let oe = ae[0];
|
|
31606
31606
|
if (!oe) return;
|
|
31607
|
-
let { width: ce, height: ge } = oe.contentRect,
|
|
31608
|
-
|
|
31607
|
+
let { width: ce, height: ge } = oe.contentRect, nt = Math.round(ce), jt = Math.round(ge);
|
|
31608
|
+
nt === 0 || jt === 0 || we(nt, jt);
|
|
31609
31609
|
}, be = (ae) => {
|
|
31610
31610
|
let oe = ae[0];
|
|
31611
31611
|
if (!oe) return;
|
|
31612
31612
|
let ce = m;
|
|
31613
31613
|
m = oe.isIntersecting;
|
|
31614
|
-
let ge = t?.getBoundingClientRect(),
|
|
31614
|
+
let ge = t?.getBoundingClientRect(), nt = v;
|
|
31615
31615
|
if (v = m && !!ge && ge.width > 0 && ge.height > 0, m && !ce) {
|
|
31616
31616
|
if (M = !0, t) {
|
|
31617
31617
|
let { width: jt, height: $r } = t.getBoundingClientRect(), Mt = Math.round(jt), dn = Math.round($r);
|
|
31618
|
-
Mt > 0 && dn > 0 && (g === 0 || b === 0 || Mt !== g || dn !== b ? (we(Mt, dn), !
|
|
31618
|
+
Mt > 0 && dn > 0 && (g === 0 || b === 0 || Mt !== g || dn !== b ? (we(Mt, dn), !nt && v && ve()) : n && u && a.rootId && (n.needsUpdate = !0, ve(), cr().catch(console.warn)));
|
|
31619
31619
|
}
|
|
31620
31620
|
f && us();
|
|
31621
31621
|
} else !m && ce && hs();
|
|
@@ -31639,7 +31639,7 @@ function gne() {
|
|
|
31639
31639
|
}
|
|
31640
31640
|
m && cr().catch(console.warn);
|
|
31641
31641
|
}
|
|
31642
|
-
},
|
|
31642
|
+
}, ht = (ae) => {
|
|
31643
31643
|
let oe = [];
|
|
31644
31644
|
return a.nodes.forEach((ce) => {
|
|
31645
31645
|
ce.parentId === ae && oe.push(ce);
|
|
@@ -31649,14 +31649,14 @@ function gne() {
|
|
|
31649
31649
|
return null;
|
|
31650
31650
|
}, It = (ae, oe, ce, ge) => {
|
|
31651
31651
|
if (!oe.metadata.mask?.source) return ae;
|
|
31652
|
-
let
|
|
31652
|
+
let nt = oe.metadata.mask.source, jt = Lt(nt);
|
|
31653
31653
|
if (!jt) return ae;
|
|
31654
31654
|
if (ge.has(jt)) return console.error("Uh oh, looks like you've got a circular dependency in your shader masks."), ae;
|
|
31655
31655
|
let $r = new Set(ge);
|
|
31656
31656
|
$r.add(ce);
|
|
31657
31657
|
let Mt = kt(jt, $r), dn = oe.metadata.mask.type || "alpha";
|
|
31658
31658
|
return mne(ae, Mt, dn);
|
|
31659
|
-
},
|
|
31659
|
+
}, it = (ae) => {
|
|
31660
31660
|
let oe = a.nodes.get(ae);
|
|
31661
31661
|
if (!oe || !oe.metadata.id) return !1;
|
|
31662
31662
|
let ce = oe.metadata.id;
|
|
@@ -31668,47 +31668,47 @@ function gne() {
|
|
|
31668
31668
|
if (!ce) return ts(0, 0, 0, 0);
|
|
31669
31669
|
let ge = (Mt) => {
|
|
31670
31670
|
ce.cleanupCallbacks.push(Mt);
|
|
31671
|
-
},
|
|
31671
|
+
}, nt = (Mt) => {
|
|
31672
31672
|
ce.beforeRenderCallbacks.push(Mt);
|
|
31673
31673
|
}, jt = (Mt) => {
|
|
31674
31674
|
ce.afterRenderCallbacks.push(Mt);
|
|
31675
|
-
}, $r =
|
|
31675
|
+
}, $r = ht(ae);
|
|
31676
31676
|
if ($r.length === 0) {
|
|
31677
31677
|
if (ce.requiresRTT && !v) return ts(0, 0, 0, 0);
|
|
31678
|
-
let Mt = ce.fragmentNodeFunc({ uniforms: ce.uniforms ?? {}, childNode: void 0, onCleanup: ge, onBeforeRender:
|
|
31678
|
+
let Mt = ce.fragmentNodeFunc({ uniforms: ce.uniforms ?? {}, childNode: void 0, onCleanup: ge, onBeforeRender: nt, onAfterRender: jt, canvas: t, dimensions: { width: Math.max(512, g), height: Math.max(512, b) } });
|
|
31679
31679
|
return It(Mt, ce, ae, oe);
|
|
31680
31680
|
} else {
|
|
31681
31681
|
let Mt = [...$r].sort((cs, Oa) => cs.metadata.renderOrder - Oa.metadata.renderOrder);
|
|
31682
31682
|
if (ce.parentId === null) {
|
|
31683
31683
|
let cs;
|
|
31684
|
-
for (let
|
|
31685
|
-
if ((
|
|
31686
|
-
let _p = kt(
|
|
31687
|
-
|
|
31684
|
+
for (let dt of Mt) {
|
|
31685
|
+
if ((dt.metadata.opacity ?? (it(dt.id) ? 0 : 1)) === 0 && !it(dt.id)) continue;
|
|
31686
|
+
let _p = kt(dt.id, oe), Wn;
|
|
31687
|
+
dt.metadata.opacity === void 0 ? (Wn = it(dt.id) ? 0 : 1, dt.opacityUniform.value = Wn) : Wn = dt.metadata.opacity, cs === void 0 ? cs = Wn !== 1 ? Um(ts(1, 1, 1, 0), _p, dt.metadata.blendMode, dt.opacityUniform) : _p : cs = Um(cs, _p, dt.metadata.blendMode, dt.opacityUniform);
|
|
31688
31688
|
}
|
|
31689
31689
|
if (ce.requiresRTT && !v) return ts(0, 0, 0, 0);
|
|
31690
|
-
let Oa = ce.fragmentNodeFunc({ uniforms: ce.uniforms ?? {}, childNode: cs, onCleanup: ge, onBeforeRender:
|
|
31690
|
+
let Oa = ce.fragmentNodeFunc({ uniforms: ce.uniforms ?? {}, childNode: cs, onCleanup: ge, onBeforeRender: nt, onAfterRender: jt, canvas: t, dimensions: { width: Math.max(512, g), height: Math.max(512, b) } });
|
|
31691
31691
|
return It(Oa, ce, ae, oe);
|
|
31692
31692
|
} else {
|
|
31693
31693
|
let cs;
|
|
31694
|
-
for (let
|
|
31695
|
-
let Sp = kt(
|
|
31696
|
-
if ((
|
|
31694
|
+
for (let dt of Mt) {
|
|
31695
|
+
let Sp = kt(dt.id, oe);
|
|
31696
|
+
if ((dt.metadata.opacity ?? (it(dt.id) ? 0 : 1)) === 0 && !it(dt.id)) continue;
|
|
31697
31697
|
let Wn;
|
|
31698
|
-
|
|
31698
|
+
dt.metadata.opacity === void 0 ? (Wn = it(dt.id) ? 0 : 1, dt.opacityUniform.value = Wn) : Wn = dt.metadata.opacity, cs === void 0 ? cs = Wn !== 1 ? Um(ts(1, 1, 1, 0), Sp, dt.metadata.blendMode, dt.opacityUniform) : Sp : cs = Um(cs, Sp, dt.metadata.blendMode, dt.opacityUniform);
|
|
31699
31699
|
}
|
|
31700
31700
|
if (ce.requiresRTT && !v) return ts(0, 0, 0, 0);
|
|
31701
|
-
let Oa = ce.fragmentNodeFunc({ uniforms: ce.uniforms ?? {}, childNode: cs, onCleanup: ge, onBeforeRender:
|
|
31701
|
+
let Oa = ce.fragmentNodeFunc({ uniforms: ce.uniforms ?? {}, childNode: cs, onCleanup: ge, onBeforeRender: nt, onAfterRender: jt, canvas: t, dimensions: { width: Math.max(512, g), height: Math.max(512, b) } });
|
|
31702
31702
|
return It(Oa, ce, ae, oe);
|
|
31703
31703
|
}
|
|
31704
31704
|
}
|
|
31705
|
-
}, cn = (ae, oe, ce, ge,
|
|
31705
|
+
}, cn = (ae, oe, ce, ge, nt = {}, jt) => {
|
|
31706
31706
|
let $r = 0;
|
|
31707
31707
|
if (ce !== null) {
|
|
31708
|
-
let Oa = Array.from(a.nodes.values()).filter((
|
|
31709
|
-
Oa.length > 0 && ($r = Math.max(...Oa.map((
|
|
31708
|
+
let Oa = Array.from(a.nodes.values()).filter((dt) => dt.parentId === ce);
|
|
31709
|
+
Oa.length > 0 && ($r = Math.max(...Oa.map((dt) => dt.metadata.renderOrder)) + 1);
|
|
31710
31710
|
}
|
|
31711
|
-
let Mt = ge?.opacity === void 0 ? 1 : ge.opacity, dn = g3(Mt), cs = { id: ae, fragmentNodeFunc: oe, parentId: ce, requiresRTT: jt?.requiresRTT || !1, opacityUniform: dn, metadata: { blendMode: ge?.blendMode || "normal", opacity: ge?.opacity, id: ge?.id, mask: ge?.mask, renderOrder: ge?.renderOrder === void 0 ? $r : ge?.renderOrder }, uniforms:
|
|
31711
|
+
let Mt = ge?.opacity === void 0 ? 1 : ge.opacity, dn = g3(Mt), cs = { id: ae, fragmentNodeFunc: oe, parentId: ce, requiresRTT: jt?.requiresRTT || !1, opacityUniform: dn, metadata: { blendMode: ge?.blendMode || "normal", opacity: ge?.opacity, id: ge?.id, mask: ge?.mask, renderOrder: ge?.renderOrder === void 0 ? $r : ge?.renderOrder }, uniforms: nt, cleanupCallbacks: [], beforeRenderCallbacks: [], afterRenderCallbacks: [] };
|
|
31712
31712
|
a.nodes.set(ae, cs), ce === null && (a.rootId = ae), n && u && g > 0 && b > 0 ? (ee.includes(ae) || ee.push(ae), re || (re = !0, queueMicrotask(() => {
|
|
31713
31713
|
re = !1, ee = [], ve();
|
|
31714
31714
|
}))) : n && u && (de || (de = !0, requestAnimationFrame(() => {
|
|
@@ -31717,15 +31717,15 @@ function gne() {
|
|
|
31717
31717
|
}, Xr = (ae, oe, ce) => {
|
|
31718
31718
|
let ge = a.nodes.get(ae);
|
|
31719
31719
|
if (!ge || !ge.uniforms) return;
|
|
31720
|
-
let
|
|
31721
|
-
!
|
|
31722
|
-
},
|
|
31720
|
+
let nt = ge.uniforms[oe];
|
|
31721
|
+
!nt || !nt.uniform || (nt.uniform.value = ce, m && cr());
|
|
31722
|
+
}, ct = (ae, oe) => {
|
|
31723
31723
|
let ce = a.nodes.get(ae);
|
|
31724
31724
|
if (!ce) return;
|
|
31725
31725
|
let ge = !1;
|
|
31726
31726
|
if (oe.blendMode !== void 0 && ce.metadata.blendMode !== oe.blendMode && (ce.metadata.blendMode = oe.blendMode, ge = !0), oe.opacity !== void 0 && ce.metadata.opacity !== oe.opacity) {
|
|
31727
|
-
let
|
|
31728
|
-
ce.metadata.opacity = oe.opacity, ce.opacityUniform.value = oe.opacity,
|
|
31727
|
+
let nt = ce.metadata.opacity === 0, jt = oe.opacity === 0;
|
|
31728
|
+
ce.metadata.opacity = oe.opacity, ce.opacityUniform.value = oe.opacity, nt !== jt && (ge = !0);
|
|
31729
31729
|
}
|
|
31730
31730
|
oe.renderOrder !== void 0 && ce.metadata.renderOrder !== oe.renderOrder && (ce.metadata.renderOrder = oe.renderOrder, ge = !0), oe.id !== void 0 && ce.metadata.id !== oe.id && (ce.metadata.id = oe.id, ge = !0), oe.mask !== void 0 && (ce.metadata.mask?.source !== oe.mask?.source || ce.metadata.mask?.type !== oe.mask?.type) && (ce.metadata.mask = oe.mask, ge = !0), ge && n && u ? (he.includes(ae) || he.push(ae), pe || (pe = !0, queueMicrotask(() => {
|
|
31731
31731
|
pe = !1, he = [], ve();
|
|
@@ -31735,25 +31735,25 @@ function gne() {
|
|
|
31735
31735
|
let oe = a.nodes.get(ae);
|
|
31736
31736
|
if (oe && oe.cleanupCallbacks.length > 0) for (let ge of oe.cleanupCallbacks) try {
|
|
31737
31737
|
ge();
|
|
31738
|
-
} catch (
|
|
31739
|
-
console.error(`Error executing cleanup callback for node ${ae}:`,
|
|
31738
|
+
} catch (nt) {
|
|
31739
|
+
console.error(`Error executing cleanup callback for node ${ae}:`, nt);
|
|
31740
31740
|
}
|
|
31741
|
-
let ce =
|
|
31741
|
+
let ce = ht(ae);
|
|
31742
31742
|
for (let ge of ce) _s(ge.id);
|
|
31743
31743
|
a.rootId === ae && (a.rootId = null), a.nodes.delete(ae), n && u && ve();
|
|
31744
31744
|
}, oi = (ae) => {
|
|
31745
31745
|
let oe = { deltaTime: ae, pointer: { x: N, y: A }, pointerActive: U, dimensions: { width: g, height: b } };
|
|
31746
31746
|
for (let ce of a.nodes.values()) if (ce.beforeRenderCallbacks.length > 0) for (let ge of ce.beforeRenderCallbacks) try {
|
|
31747
31747
|
ge(oe);
|
|
31748
|
-
} catch (
|
|
31749
|
-
console.error(`Error executing before render callback for node ${ce.id}:`,
|
|
31748
|
+
} catch (nt) {
|
|
31749
|
+
console.error(`Error executing before render callback for node ${ce.id}:`, nt);
|
|
31750
31750
|
}
|
|
31751
31751
|
}, Sr = (ae) => {
|
|
31752
31752
|
let oe = { deltaTime: ae, pointer: { x: N, y: A }, pointerActive: U, dimensions: { width: g, height: b } };
|
|
31753
31753
|
for (let ce of a.nodes.values()) if (ce.afterRenderCallbacks.length > 0) for (let ge of ce.afterRenderCallbacks) try {
|
|
31754
31754
|
ge(oe);
|
|
31755
|
-
} catch (
|
|
31756
|
-
console.error(`Error executing after render callback for node ${ce.id}:`,
|
|
31755
|
+
} catch (nt) {
|
|
31756
|
+
console.error(`Error executing after render callback for node ${ce.id}:`, nt);
|
|
31757
31757
|
}
|
|
31758
31758
|
}, cr = async () => {
|
|
31759
31759
|
if (!u || !e || !s || !r || !n || g === 0 || b === 0) return;
|
|
@@ -31784,8 +31784,8 @@ function gne() {
|
|
|
31784
31784
|
if (ae.touches.length === 0) return;
|
|
31785
31785
|
oe = ae.touches[0].clientX, ce = ae.touches[0].clientY;
|
|
31786
31786
|
} else oe = ae.clientX, ce = ae.clientY;
|
|
31787
|
-
let ge = t.getBoundingClientRect(),
|
|
31788
|
-
N =
|
|
31787
|
+
let ge = t.getBoundingClientRect(), nt = (oe - ge.left) / ge.width, jt = (ce - ge.top) / ge.height;
|
|
31788
|
+
N = nt, A = jt;
|
|
31789
31789
|
}, xp = (ae) => {
|
|
31790
31790
|
Bi(ae);
|
|
31791
31791
|
}, bp = (ae) => {
|
|
@@ -31818,7 +31818,7 @@ function gne() {
|
|
|
31818
31818
|
i = new En(ce, n), s.add(i), l = new ResizeObserver(Re), l.observe(ae), h = new IntersectionObserver(be, { threshold: 0 }), h.observe(ae);
|
|
31819
31819
|
let ge = ae.getBoundingClientRect();
|
|
31820
31820
|
m = ge.width > 0 && ge.height > 0 && ge.top < window.innerHeight && ge.bottom > 0 && ge.left < window.innerWidth && ge.right > 0, v = m && ge.width > 0 && ge.height > 0, f = !Te();
|
|
31821
|
-
let { width:
|
|
31821
|
+
let { width: nt, height: jt } = ae.getBoundingClientRect(), $r = Math.round(nt), Mt = Math.round(jt);
|
|
31822
31822
|
$r > 0 && Mt > 0 ? (we($r, Mt), d = !0, await cr()) : d = !1, f && m && us(), oe.signal.aborted || (u = !0);
|
|
31823
31823
|
} catch (ce) {
|
|
31824
31824
|
console.error("[Shaders] Initialization error:", ce);
|
|
@@ -31842,7 +31842,7 @@ function gne() {
|
|
|
31842
31842
|
} catch {
|
|
31843
31843
|
}
|
|
31844
31844
|
t = null, e = null, r = null, s = null, i = null, n = null, u = !1, c = !1, d = !1, p = null, g = 0, b = 0, m = !1, f = !0, N = 0.5, A = 0.5, U = !1;
|
|
31845
|
-
}, registerNode: cn, removeNode: _s, updateUniformValue: Xr, updateNodeMetadata:
|
|
31845
|
+
}, registerNode: cn, removeNode: _s, updateUniformValue: Xr, updateNodeMetadata: ct, showLicenseWarning: () => {
|
|
31846
31846
|
!fne() || $M || (console.warn("Shaders is running in development mode. Please purchase a license at https://shaders.com to use it in production."), $M = !0);
|
|
31847
31847
|
}, isInitialized: () => u };
|
|
31848
31848
|
}
|
|
@@ -32203,7 +32203,7 @@ function eP(t) {
|
|
|
32203
32203
|
const Gc = {
|
|
32204
32204
|
VERTEX: "vertex",
|
|
32205
32205
|
FRAGMENT: "fragment"
|
|
32206
|
-
},
|
|
32206
|
+
}, ut = {
|
|
32207
32207
|
NONE: "none",
|
|
32208
32208
|
FRAME: "frame",
|
|
32209
32209
|
RENDER: "render",
|
|
@@ -32237,7 +32237,7 @@ class Me extends nu {
|
|
|
32237
32237
|
* @param {?string} nodeType - The node type.
|
|
32238
32238
|
*/
|
|
32239
32239
|
constructor(e = null) {
|
|
32240
|
-
super(), this.nodeType = e, this.updateType =
|
|
32240
|
+
super(), this.nodeType = e, this.updateType = ut.NONE, this.updateBeforeType = ut.NONE, this.updateAfterType = ut.NONE, this.uuid = S3.generateUUID(), this.version = 0, this.global = !1, this.parents = !1, this.isNode = !0, this._cacheKey = null, this._cacheKeyVersion = 0, Object.defineProperty(this, "id", { value: Ene++ });
|
|
32241
32241
|
}
|
|
32242
32242
|
/**
|
|
32243
32243
|
* Set this property to `true` when the node should be regenerated.
|
|
@@ -32276,7 +32276,7 @@ class Me extends nu {
|
|
|
32276
32276
|
* @return {Node} A reference to this node.
|
|
32277
32277
|
*/
|
|
32278
32278
|
onFrameUpdate(e) {
|
|
32279
|
-
return this.onUpdate(e,
|
|
32279
|
+
return this.onUpdate(e, ut.FRAME);
|
|
32280
32280
|
}
|
|
32281
32281
|
/**
|
|
32282
32282
|
* Convenient method for defining {@link Node#update}. Similar to {@link Node#onUpdate}, but
|
|
@@ -32286,7 +32286,7 @@ class Me extends nu {
|
|
|
32286
32286
|
* @return {Node} A reference to this node.
|
|
32287
32287
|
*/
|
|
32288
32288
|
onRenderUpdate(e) {
|
|
32289
|
-
return this.onUpdate(e,
|
|
32289
|
+
return this.onUpdate(e, ut.RENDER);
|
|
32290
32290
|
}
|
|
32291
32291
|
/**
|
|
32292
32292
|
* Convenient method for defining {@link Node#update}. Similar to {@link Node#onUpdate}, but
|
|
@@ -32296,7 +32296,7 @@ class Me extends nu {
|
|
|
32296
32296
|
* @return {Node} A reference to this node.
|
|
32297
32297
|
*/
|
|
32298
32298
|
onObjectUpdate(e) {
|
|
32299
|
-
return this.onUpdate(e,
|
|
32299
|
+
return this.onUpdate(e, ut.OBJECT);
|
|
32300
32300
|
}
|
|
32301
32301
|
/**
|
|
32302
32302
|
* Convenient method for defining {@link Node#updateReference}.
|
|
@@ -33288,7 +33288,7 @@ j("convert", gP);
|
|
|
33288
33288
|
const Qne = (t) => (console.warn("THREE.TSL: append() has been renamed to Stack()."), iy(t));
|
|
33289
33289
|
j("append", (t) => (console.warn("THREE.TSL: .append() has been renamed to .toStack()."), iy(t)));
|
|
33290
33290
|
const Kne = (...t) => (console.warn("THREE.TSL: tslFn() has been renamed to Fn()."), B(...t));
|
|
33291
|
-
class
|
|
33291
|
+
class st extends Me {
|
|
33292
33292
|
static get type() {
|
|
33293
33293
|
return "PropertyNode";
|
|
33294
33294
|
}
|
|
@@ -33310,7 +33310,7 @@ class it extends Me {
|
|
|
33310
33310
|
return this.varying === !0 ? (r = e.getVaryingFromNode(this, this.name), r.needsInterpolation = !0) : r = e.getVarFromNode(this, this.name), e.getPropertyName(r);
|
|
33311
33311
|
}
|
|
33312
33312
|
}
|
|
33313
|
-
const ec = (t, e) => q(new
|
|
33313
|
+
const ec = (t, e) => q(new st(t, e)), Rd = (t, e) => q(new st(t, e, !0)), hi = /* @__PURE__ */ ie(st, "vec4", "DiffuseColor"), $b = /* @__PURE__ */ ie(st, "vec3", "EmissiveColor"), yP = /* @__PURE__ */ ie(st, "float", "Roughness"), eae = /* @__PURE__ */ ie(st, "float", "Metalness"), tae = /* @__PURE__ */ ie(st, "float", "Clearcoat"), rae = /* @__PURE__ */ ie(st, "float", "ClearcoatRoughness"), sae = /* @__PURE__ */ ie(st, "vec3", "Sheen"), iae = /* @__PURE__ */ ie(st, "float", "SheenRoughness"), xP = /* @__PURE__ */ ie(st, "float", "Iridescence"), nae = /* @__PURE__ */ ie(st, "float", "IridescenceIOR"), aae = /* @__PURE__ */ ie(st, "float", "IridescenceThickness"), Gb = /* @__PURE__ */ ie(st, "float", "AlphaT"), bP = /* @__PURE__ */ ie(st, "float", "Anisotropy"), bf = /* @__PURE__ */ ie(st, "vec3", "AnisotropyT"), Ch = /* @__PURE__ */ ie(st, "vec3", "AnisotropyB"), oae = /* @__PURE__ */ ie(st, "color", "SpecularColor"), lae = /* @__PURE__ */ ie(st, "float", "SpecularF90"), uae = /* @__PURE__ */ ie(st, "float", "Shininess"), Rh = /* @__PURE__ */ ie(st, "vec4", "Output"), hae = /* @__PURE__ */ ie(st, "float", "dashSize"), cae = /* @__PURE__ */ ie(st, "float", "gapSize"), dae = /* @__PURE__ */ ie(st, "float", "pointWidth"), pae = /* @__PURE__ */ ie(st, "float", "IOR"), mae = /* @__PURE__ */ ie(st, "float", "Transmission"), fae = /* @__PURE__ */ ie(st, "float", "Thickness"), gae = /* @__PURE__ */ ie(st, "float", "AttenuationDistance"), yae = /* @__PURE__ */ ie(st, "color", "AttenuationColor"), xae = /* @__PURE__ */ ie(st, "float", "Dispersion");
|
|
33314
33314
|
class vP extends Me {
|
|
33315
33315
|
static get type() {
|
|
33316
33316
|
return "UniformGroupNode";
|
|
@@ -34253,7 +34253,7 @@ class Iae extends Me {
|
|
|
34253
34253
|
* @param {?number} [count=null] - When the linked property is an array-like, this parameter defines its length.
|
|
34254
34254
|
*/
|
|
34255
34255
|
constructor(e, r, s = null, i = null) {
|
|
34256
|
-
super(), this.property = e, this.uniformType = r, this.object = s, this.count = i, this.properties = e.split("."), this.reference = s, this.node = null, this.group = null, this.updateType =
|
|
34256
|
+
super(), this.property = e, this.uniformType = r, this.object = s, this.count = i, this.properties = e.split("."), this.reference = s, this.node = null, this.group = null, this.updateType = ut.OBJECT;
|
|
34257
34257
|
}
|
|
34258
34258
|
/**
|
|
34259
34259
|
* Sets the uniform group for this reference node.
|
|
@@ -34509,7 +34509,7 @@ class Oae extends Me {
|
|
|
34509
34509
|
* @param {Array<number>} [workgroupSize=[64]] - TODO.
|
|
34510
34510
|
*/
|
|
34511
34511
|
constructor(e, r, s = [64]) {
|
|
34512
|
-
super("void"), this.isComputeNode = !0, this.computeNode = e, this.count = r, this.workgroupSize = s, this.dispatchCount = 0, this.version = 1, this.name = "", this.updateBeforeType =
|
|
34512
|
+
super("void"), this.isComputeNode = !0, this.computeNode = e, this.count = r, this.workgroupSize = s, this.dispatchCount = 0, this.version = 1, this.name = "", this.updateBeforeType = ut.OBJECT, this.onInitFunction = null, this.updateDispatchCount();
|
|
34513
34513
|
}
|
|
34514
34514
|
/**
|
|
34515
34515
|
* Executes the `dispose` event for this node.
|
|
@@ -34822,7 +34822,7 @@ class qae extends np {
|
|
|
34822
34822
|
* @param {TextureNode} textureNode - The texture node to compute the max mip level for.
|
|
34823
34823
|
*/
|
|
34824
34824
|
constructor(e) {
|
|
34825
|
-
super(0), this._textureNode = e, this.updateType =
|
|
34825
|
+
super(0), this._textureNode = e, this.updateType = ut.FRAME;
|
|
34826
34826
|
}
|
|
34827
34827
|
/**
|
|
34828
34828
|
* The texture node to compute the max mip level for.
|
|
@@ -34864,7 +34864,7 @@ class Pa extends np {
|
|
|
34864
34864
|
* @param {?Node<float>} [biasNode=null] - The bias node.
|
|
34865
34865
|
*/
|
|
34866
34866
|
constructor(e = AT, r = null, s = null, i = null) {
|
|
34867
|
-
super(e), this.isTextureNode = !0, this.uvNode = r, this.levelNode = s, this.biasNode = i, this.compareNode = null, this.depthNode = null, this.gradNode = null, this.sampler = !0, this.updateMatrix = !1, this.updateType =
|
|
34867
|
+
super(e), this.isTextureNode = !0, this.uvNode = r, this.levelNode = s, this.biasNode = i, this.compareNode = null, this.depthNode = null, this.gradNode = null, this.sampler = !0, this.updateMatrix = !1, this.updateType = ut.NONE, this.referenceNode = null, this._value = e, this._matrixUniform = null, this.setUpdateMatrix(r === null);
|
|
34868
34868
|
}
|
|
34869
34869
|
set value(e) {
|
|
34870
34870
|
this.referenceNode ? this.referenceNode.value = e : this._value = e;
|
|
@@ -34937,7 +34937,7 @@ class Pa extends np {
|
|
|
34937
34937
|
* @return {TextureNode} A reference to this node.
|
|
34938
34938
|
*/
|
|
34939
34939
|
setUpdateMatrix(e) {
|
|
34940
|
-
return this.updateMatrix = e, this.updateType = e ?
|
|
34940
|
+
return this.updateMatrix = e, this.updateType = e ? ut.OBJECT : ut.NONE, this;
|
|
34941
34941
|
}
|
|
34942
34942
|
/**
|
|
34943
34943
|
* Setups the uv node. Depending on the backend as well as texture's image and type, it might be necessary
|
|
@@ -35223,7 +35223,7 @@ class XF extends CT {
|
|
|
35223
35223
|
* @param {?string} [elementType=null] - The data type of a buffer element.
|
|
35224
35224
|
*/
|
|
35225
35225
|
constructor(e, r = null) {
|
|
35226
|
-
super(null), this.array = e, this.elementType = r === null ? yo(e[0]) : r, this.paddedType = this.getPaddedType(), this.updateType =
|
|
35226
|
+
super(null), this.array = e, this.elementType = r === null ? yo(e[0]) : r, this.paddedType = this.getPaddedType(), this.updateType = ut.RENDER, this.isArrayBufferNode = !0;
|
|
35227
35227
|
}
|
|
35228
35228
|
/**
|
|
35229
35229
|
* This method is overwritten since the node type is inferred from the
|
|
@@ -35379,7 +35379,7 @@ class je extends Me {
|
|
|
35379
35379
|
* @param {?Object3D} [object3d=null] - The 3D object.
|
|
35380
35380
|
*/
|
|
35381
35381
|
constructor(e, r = null) {
|
|
35382
|
-
super(), this.scope = e, this.object3d = r, this.updateType =
|
|
35382
|
+
super(), this.scope = e, this.object3d = r, this.updateType = ut.OBJECT, this.uniformNode = new np(null);
|
|
35383
35383
|
}
|
|
35384
35384
|
/**
|
|
35385
35385
|
* Overwritten since the node type is inferred from the scope.
|
|
@@ -35622,7 +35622,7 @@ class dy extends Me {
|
|
|
35622
35622
|
* @param {?number} [count=null] - When the linked property is an array-like, this parameter defines its length.
|
|
35623
35623
|
*/
|
|
35624
35624
|
constructor(e, r, s = null, i = null) {
|
|
35625
|
-
super(), this.property = e, this.uniformType = r, this.object = s, this.count = i, this.properties = e.split("."), this.reference = s, this.node = null, this.group = null, this.name = null, this.updateType =
|
|
35625
|
+
super(), this.property = e, this.uniformType = r, this.object = s, this.count = i, this.properties = e.split("."), this.reference = s, this.node = null, this.group = null, this.name = null, this.updateType = ut.OBJECT;
|
|
35626
35626
|
}
|
|
35627
35627
|
/**
|
|
35628
35628
|
* When the referred property is array-like, this method can be used
|
|
@@ -36045,7 +36045,7 @@ class ML extends Me {
|
|
|
36045
36045
|
* @param {?InstancedBufferAttribute} instanceColor - Instanced buffer attribute representing the instance colors.
|
|
36046
36046
|
*/
|
|
36047
36047
|
constructor(e, r, s = null) {
|
|
36048
|
-
super("void"), this.count = e, this.instanceMatrix = r, this.instanceColor = s, this.instanceMatrixNode = null, this.instanceColorNode = null, this.updateType =
|
|
36048
|
+
super("void"), this.count = e, this.instanceMatrix = r, this.instanceColor = s, this.instanceMatrixNode = null, this.instanceColorNode = null, this.updateType = ut.FRAME, this.buffer = null, this.bufferColor = null;
|
|
36049
36049
|
}
|
|
36050
36050
|
/**
|
|
36051
36051
|
* Setups the internal buffers and nodes and assigns the transformed vertex data
|
|
@@ -36369,7 +36369,7 @@ class CL extends Me {
|
|
|
36369
36369
|
* @param {SkinnedMesh} skinnedMesh - The skinned mesh.
|
|
36370
36370
|
*/
|
|
36371
36371
|
constructor(e) {
|
|
36372
|
-
super("void"), this.skinnedMesh = e, this.updateType =
|
|
36372
|
+
super("void"), this.skinnedMesh = e, this.updateType = ut.OBJECT, this.skinIndexNode = Po("skinIndex", "uvec4"), this.skinWeightNode = Po("skinWeight", "vec4"), this.bindMatrixNode = Dt("bindMatrix", "mat4"), this.bindMatrixInverseNode = Dt("bindMatrixInverse", "mat4"), this.boneMatricesNode = Wb("skeleton.boneMatrices", "mat4", e.skeleton.bones.length), this.positionNode = sr, this.toPositionNode = sr, this.previousBoneMatricesNode = null;
|
|
36373
36373
|
}
|
|
36374
36374
|
/**
|
|
36375
36375
|
* Transforms the given vertex position via skinning.
|
|
@@ -36613,7 +36613,7 @@ class Cle extends Me {
|
|
|
36613
36613
|
* @param {Mesh} mesh - The mesh holding the morph targets.
|
|
36614
36614
|
*/
|
|
36615
36615
|
constructor(e) {
|
|
36616
|
-
super("void"), this.mesh = e, this.morphBaseInfluence = Ce(1), this.updateType =
|
|
36616
|
+
super("void"), this.mesh = e, this.morphBaseInfluence = Ce(1), this.updateType = ut.OBJECT;
|
|
36617
36617
|
}
|
|
36618
36618
|
/**
|
|
36619
36619
|
* Setups the morph node by assigning the transformed vertex data to predefined node variables.
|
|
@@ -36776,8 +36776,8 @@ class yr extends Me {
|
|
|
36776
36776
|
* @return {NodeUpdateType} The update type.
|
|
36777
36777
|
*/
|
|
36778
36778
|
getUpdateType() {
|
|
36779
|
-
let e =
|
|
36780
|
-
return (this.scope === yr.SIZE || this.scope === yr.VIEWPORT) && (e =
|
|
36779
|
+
let e = ut.NONE;
|
|
36780
|
+
return (this.scope === yr.SIZE || this.scope === yr.VIEWPORT) && (e = ut.RENDER), this.updateType = e, e;
|
|
36781
36781
|
}
|
|
36782
36782
|
/**
|
|
36783
36783
|
* `ScreenNode` implements {@link Node#update} to retrieve viewport and size information
|
|
@@ -36823,7 +36823,7 @@ class my extends Pa {
|
|
|
36823
36823
|
* @param {?Texture} [framebufferTexture=null] - A framebuffer texture holding the viewport data. If not provided, a framebuffer texture is created automatically.
|
|
36824
36824
|
*/
|
|
36825
36825
|
constructor(e = Vo, r = null, s = null) {
|
|
36826
|
-
s === null && (s = new R3(), s.minFilter = v3), super(s, e, r), this.generateMipmaps = !1, this.isOutputTextureNode = !0, this.updateBeforeType =
|
|
36826
|
+
s === null && (s = new R3(), s.minFilter = v3), super(s, e, r), this.generateMipmaps = !1, this.isOutputTextureNode = !0, this.updateBeforeType = ut.FRAME;
|
|
36827
36827
|
}
|
|
36828
36828
|
updateBefore(e) {
|
|
36829
36829
|
const r = e.renderer;
|
|
@@ -38093,7 +38093,7 @@ class wue extends hr {
|
|
|
38093
38093
|
constructor(e, r = null, s = null) {
|
|
38094
38094
|
super("vec3"), this._value = e, this._pmrem = null, this.uvNode = r, this.levelNode = s, this._generator = null;
|
|
38095
38095
|
const i = new jr();
|
|
38096
|
-
i.isRenderTargetTexture = !0, this._texture = ft(i), this._width = Ce(0), this._height = Ce(0), this._maxMip = Ce(0), this.updateBeforeType =
|
|
38096
|
+
i.isRenderTargetTexture = !0, this._texture = ft(i), this._width = Ce(0), this._height = Ce(0), this._maxMip = Ce(0), this.updateBeforeType = ut.RENDER;
|
|
38097
38097
|
}
|
|
38098
38098
|
set value(e) {
|
|
38099
38099
|
this._value = e, this._pmrem = null;
|
|
@@ -38249,7 +38249,7 @@ class Rue {
|
|
|
38249
38249
|
return r.delete(e[e.length - 1]);
|
|
38250
38250
|
}
|
|
38251
38251
|
}
|
|
38252
|
-
class Eue extends
|
|
38252
|
+
class Eue extends st {
|
|
38253
38253
|
static get type() {
|
|
38254
38254
|
return "ParameterNode";
|
|
38255
38255
|
}
|
|
@@ -38804,7 +38804,7 @@ class che extends Me {
|
|
|
38804
38804
|
bounces: a = !0,
|
|
38805
38805
|
depth: o = !1
|
|
38806
38806
|
} = r;
|
|
38807
|
-
this.textureNode = e, this.target = s, this.resolution = i, this.generateMipmaps = n, this.bounces = a, this.depth = o, this.updateBeforeType = a ?
|
|
38807
|
+
this.textureNode = e, this.target = s, this.resolution = i, this.generateMipmaps = n, this.bounces = a, this.depth = o, this.updateBeforeType = a ? ut.RENDER : ut.FRAME, this.virtualCameras = /* @__PURE__ */ new WeakMap(), this.renderTargets = /* @__PURE__ */ new Map(), this.forceUpdate = !1, this.hasOutput = !1;
|
|
38808
38808
|
}
|
|
38809
38809
|
/**
|
|
38810
38810
|
* Updates the resolution of the internal render target.
|
|
@@ -38930,7 +38930,7 @@ class ghe extends Pa {
|
|
|
38930
38930
|
*/
|
|
38931
38931
|
constructor(e, r = null, s = null, i = { type: go }) {
|
|
38932
38932
|
const n = new Xd(r, s, i);
|
|
38933
|
-
super(n.texture, Ft()), this.node = e, this.width = r, this.height = s, this.pixelRatio = 1, this.renderTarget = n, this.textureNeedsUpdate = !0, this.autoUpdate = !0, this._rttNode = null, this._quadMesh = new rI(new Wh()), this.updateBeforeType =
|
|
38933
|
+
super(n.texture, Ft()), this.node = e, this.width = r, this.height = s, this.pixelRatio = 1, this.renderTarget = n, this.textureNeedsUpdate = !0, this.autoUpdate = !0, this._rttNode = null, this._quadMesh = new rI(new Wh()), this.updateBeforeType = ut.RENDER;
|
|
38934
38934
|
}
|
|
38935
38935
|
/**
|
|
38936
38936
|
* Whether the internal render target should automatically be resized or not.
|
|
@@ -39295,7 +39295,7 @@ class Bhe extends hr {
|
|
|
39295
39295
|
* Constructs a new vertex color node.
|
|
39296
39296
|
*/
|
|
39297
39297
|
constructor() {
|
|
39298
|
-
super("vec2"), this.projectionMatrix = null, this.updateType =
|
|
39298
|
+
super("vec2"), this.projectionMatrix = null, this.updateType = ut.OBJECT, this.updateAfterType = ut.OBJECT, this.previousModelWorldMatrix = Ce(new vt()), this.previousProjectionMatrix = Ce(new vt()).setGroup($e), this.previousCameraViewMatrix = Ce(new vt());
|
|
39299
39299
|
}
|
|
39300
39300
|
/**
|
|
39301
39301
|
* Sets the given projection matrix.
|
|
@@ -39492,7 +39492,7 @@ class kn extends hr {
|
|
|
39492
39492
|
a.texture.name = "output", a.depthTexture = n, this.renderTarget = a, this._textures = {
|
|
39493
39493
|
output: a.texture,
|
|
39494
39494
|
depth: n
|
|
39495
|
-
}, this._textureNodes = {}, this._linearDepthNodes = {}, this._viewZNodes = {}, this._previousTextures = {}, this._previousTextureNodes = {}, this._cameraNear = Ce(0), this._cameraFar = Ce(0), this._mrt = null, this._layers = null, this._resolution = 1, this.isPassNode = !0, this.updateBeforeType =
|
|
39495
|
+
}, this._textureNodes = {}, this._linearDepthNodes = {}, this._viewZNodes = {}, this._previousTextures = {}, this._previousTextureNodes = {}, this._cameraNear = Ce(0), this._cameraFar = Ce(0), this._mrt = null, this._layers = null, this._resolution = 1, this.isPassNode = !0, this.updateBeforeType = ut.FRAME, this.global = !0;
|
|
39496
39496
|
}
|
|
39497
39497
|
/**
|
|
39498
39498
|
* Sets the resolution for the pass.
|
|
@@ -40786,7 +40786,7 @@ class sde extends Me {
|
|
|
40786
40786
|
* @param {Light} light - The shadow casting light.
|
|
40787
40787
|
*/
|
|
40788
40788
|
constructor(e) {
|
|
40789
|
-
super(), this.light = e, this.updateBeforeType =
|
|
40789
|
+
super(), this.light = e, this.updateBeforeType = ut.RENDER, this.isShadowBaseNode = !0;
|
|
40790
40790
|
}
|
|
40791
40791
|
/**
|
|
40792
40792
|
* Setups the shadow position node which is by default the predefined TSL node object `shadowPositionWorld`.
|
|
@@ -41512,8 +41512,8 @@ const Tde = (t, e) => q(new vde(t, e)), AI = /* @__PURE__ */ B(({ lightDistance:
|
|
|
41512
41512
|
{ name: "xx", type: "int" },
|
|
41513
41513
|
{ name: "yy", type: "int" }
|
|
41514
41514
|
]
|
|
41515
|
-
}),
|
|
41516
|
-
const r = E(e).toVar(), s = E(t).toVar(), i = ue(
|
|
41515
|
+
}), lt = /* @__PURE__ */ qr([Vde, Ode, kde, Ude, Dde]), $de = /* @__PURE__ */ B(([t, e]) => {
|
|
41516
|
+
const r = E(e).toVar(), s = E(t).toVar(), i = ue(lt(s, r)).toVar(), n = Kh().toVar();
|
|
41517
41517
|
return n.x.assign(i.bitAnd(E(255))), n.y.assign(i.shiftRight(E(8)).bitAnd(E(255))), n.z.assign(i.shiftRight(E(16)).bitAnd(E(255))), n;
|
|
41518
41518
|
}).setLayout({
|
|
41519
41519
|
name: "mx_hash_vec3_0",
|
|
@@ -41523,7 +41523,7 @@ const Tde = (t, e) => q(new vde(t, e)), AI = /* @__PURE__ */ B(({ lightDistance:
|
|
|
41523
41523
|
{ name: "y", type: "int" }
|
|
41524
41524
|
]
|
|
41525
41525
|
}), Gde = /* @__PURE__ */ B(([t, e, r]) => {
|
|
41526
|
-
const s = E(r).toVar(), i = E(e).toVar(), n = E(t).toVar(), a = ue(
|
|
41526
|
+
const s = E(r).toVar(), i = E(e).toVar(), n = E(t).toVar(), a = ue(lt(n, i, s)).toVar(), o = Kh().toVar();
|
|
41527
41527
|
return o.x.assign(a.bitAnd(E(255))), o.y.assign(a.shiftRight(E(8)).bitAnd(E(255))), o.z.assign(a.shiftRight(E(16)).bitAnd(E(255))), o;
|
|
41528
41528
|
}).setLayout({
|
|
41529
41529
|
name: "mx_hash_vec3_1",
|
|
@@ -41534,7 +41534,7 @@ const Tde = (t, e) => q(new vde(t, e)), AI = /* @__PURE__ */ B(({ lightDistance:
|
|
|
41534
41534
|
{ name: "z", type: "int" }
|
|
41535
41535
|
]
|
|
41536
41536
|
}), mi = /* @__PURE__ */ qr([$de, Gde]), jde = /* @__PURE__ */ B(([t]) => {
|
|
41537
|
-
const e = te(t).toVar(), r = E().toVar(), s = E().toVar(), i = C(Rt(e.x, r)).toVar(), n = C(Rt(e.y, s)).toVar(), a = C(An(i)).toVar(), o = C(An(n)).toVar(), l = C(CI(Or(
|
|
41537
|
+
const e = te(t).toVar(), r = E().toVar(), s = E().toVar(), i = C(Rt(e.x, r)).toVar(), n = C(Rt(e.y, s)).toVar(), a = C(An(i)).toVar(), o = C(An(n)).toVar(), l = C(CI(Or(lt(r, s), i, n), Or(lt(r.add(E(1)), s), i.sub(1), n), Or(lt(r, s.add(E(1))), i, n.sub(1)), Or(lt(r.add(E(1)), s.add(E(1))), i.sub(1), n.sub(1)), a, o)).toVar();
|
|
41538
41538
|
return EI(l);
|
|
41539
41539
|
}).setLayout({
|
|
41540
41540
|
name: "mx_perlin_noise_float_0",
|
|
@@ -41543,7 +41543,7 @@ const Tde = (t, e) => q(new vde(t, e)), AI = /* @__PURE__ */ B(({ lightDistance:
|
|
|
41543
41543
|
{ name: "p", type: "vec2" }
|
|
41544
41544
|
]
|
|
41545
41545
|
}), Wde = /* @__PURE__ */ B(([t]) => {
|
|
41546
|
-
const e = V(t).toVar(), r = E().toVar(), s = E().toVar(), i = E().toVar(), n = C(Rt(e.x, r)).toVar(), a = C(Rt(e.y, s)).toVar(), o = C(Rt(e.z, i)).toVar(), l = C(An(n)).toVar(), h = C(An(a)).toVar(), u = C(An(o)).toVar(), c = C(RI(Or(
|
|
41546
|
+
const e = V(t).toVar(), r = E().toVar(), s = E().toVar(), i = E().toVar(), n = C(Rt(e.x, r)).toVar(), a = C(Rt(e.y, s)).toVar(), o = C(Rt(e.z, i)).toVar(), l = C(An(n)).toVar(), h = C(An(a)).toVar(), u = C(An(o)).toVar(), c = C(RI(Or(lt(r, s, i), n, a, o), Or(lt(r.add(E(1)), s, i), n.sub(1), a, o), Or(lt(r, s.add(E(1)), i), n, a.sub(1), o), Or(lt(r.add(E(1)), s.add(E(1)), i), n.sub(1), a.sub(1), o), Or(lt(r, s, i.add(E(1))), n, a, o.sub(1)), Or(lt(r.add(E(1)), s, i.add(E(1))), n.sub(1), a, o.sub(1)), Or(lt(r, s.add(E(1)), i.add(E(1))), n, a.sub(1), o.sub(1)), Or(lt(r.add(E(1)), s.add(E(1)), i.add(E(1))), n.sub(1), a.sub(1), o.sub(1)), l, h, u)).toVar();
|
|
41547
41547
|
return PI(c);
|
|
41548
41548
|
}).setLayout({
|
|
41549
41549
|
name: "mx_perlin_noise_float_1",
|
|
@@ -41571,7 +41571,7 @@ const Tde = (t, e) => q(new vde(t, e)), AI = /* @__PURE__ */ B(({ lightDistance:
|
|
|
41571
41571
|
]
|
|
41572
41572
|
}), JT = /* @__PURE__ */ qr([Hde, qde]), Xde = /* @__PURE__ */ B(([t]) => {
|
|
41573
41573
|
const e = C(t).toVar(), r = E(nr(e)).toVar();
|
|
41574
|
-
return as(
|
|
41574
|
+
return as(lt(r));
|
|
41575
41575
|
}).setLayout({
|
|
41576
41576
|
name: "mx_cell_noise_float_0",
|
|
41577
41577
|
type: "float",
|
|
@@ -41580,7 +41580,7 @@ const Tde = (t, e) => q(new vde(t, e)), AI = /* @__PURE__ */ B(({ lightDistance:
|
|
|
41580
41580
|
]
|
|
41581
41581
|
}), Yde = /* @__PURE__ */ B(([t]) => {
|
|
41582
41582
|
const e = te(t).toVar(), r = E(nr(e.x)).toVar(), s = E(nr(e.y)).toVar();
|
|
41583
|
-
return as(
|
|
41583
|
+
return as(lt(r, s));
|
|
41584
41584
|
}).setLayout({
|
|
41585
41585
|
name: "mx_cell_noise_float_1",
|
|
41586
41586
|
type: "float",
|
|
@@ -41589,7 +41589,7 @@ const Tde = (t, e) => q(new vde(t, e)), AI = /* @__PURE__ */ B(({ lightDistance:
|
|
|
41589
41589
|
]
|
|
41590
41590
|
}), Zde = /* @__PURE__ */ B(([t]) => {
|
|
41591
41591
|
const e = V(t).toVar(), r = E(nr(e.x)).toVar(), s = E(nr(e.y)).toVar(), i = E(nr(e.z)).toVar();
|
|
41592
|
-
return as(
|
|
41592
|
+
return as(lt(r, s, i));
|
|
41593
41593
|
}).setLayout({
|
|
41594
41594
|
name: "mx_cell_noise_float_2",
|
|
41595
41595
|
type: "float",
|
|
@@ -41598,7 +41598,7 @@ const Tde = (t, e) => q(new vde(t, e)), AI = /* @__PURE__ */ B(({ lightDistance:
|
|
|
41598
41598
|
]
|
|
41599
41599
|
}), Jde = /* @__PURE__ */ B(([t]) => {
|
|
41600
41600
|
const e = Ee(t).toVar(), r = E(nr(e.x)).toVar(), s = E(nr(e.y)).toVar(), i = E(nr(e.z)).toVar(), n = E(nr(e.w)).toVar();
|
|
41601
|
-
return as(
|
|
41601
|
+
return as(lt(r, s, i, n));
|
|
41602
41602
|
}).setLayout({
|
|
41603
41603
|
name: "mx_cell_noise_float_3",
|
|
41604
41604
|
type: "float",
|
|
@@ -41607,7 +41607,7 @@ const Tde = (t, e) => q(new vde(t, e)), AI = /* @__PURE__ */ B(({ lightDistance:
|
|
|
41607
41607
|
]
|
|
41608
41608
|
}), Qde = /* @__PURE__ */ qr([Xde, Yde, Zde, Jde]), Kde = /* @__PURE__ */ B(([t]) => {
|
|
41609
41609
|
const e = C(t).toVar(), r = E(nr(e)).toVar();
|
|
41610
|
-
return V(as(
|
|
41610
|
+
return V(as(lt(r, E(0))), as(lt(r, E(1))), as(lt(r, E(2))));
|
|
41611
41611
|
}).setLayout({
|
|
41612
41612
|
name: "mx_cell_noise_vec3_0",
|
|
41613
41613
|
type: "vec3",
|
|
@@ -41616,7 +41616,7 @@ const Tde = (t, e) => q(new vde(t, e)), AI = /* @__PURE__ */ B(({ lightDistance:
|
|
|
41616
41616
|
]
|
|
41617
41617
|
}), epe = /* @__PURE__ */ B(([t]) => {
|
|
41618
41618
|
const e = te(t).toVar(), r = E(nr(e.x)).toVar(), s = E(nr(e.y)).toVar();
|
|
41619
|
-
return V(as(
|
|
41619
|
+
return V(as(lt(r, s, E(0))), as(lt(r, s, E(1))), as(lt(r, s, E(2))));
|
|
41620
41620
|
}).setLayout({
|
|
41621
41621
|
name: "mx_cell_noise_vec3_1",
|
|
41622
41622
|
type: "vec3",
|
|
@@ -41625,7 +41625,7 @@ const Tde = (t, e) => q(new vde(t, e)), AI = /* @__PURE__ */ B(({ lightDistance:
|
|
|
41625
41625
|
]
|
|
41626
41626
|
}), tpe = /* @__PURE__ */ B(([t]) => {
|
|
41627
41627
|
const e = V(t).toVar(), r = E(nr(e.x)).toVar(), s = E(nr(e.y)).toVar(), i = E(nr(e.z)).toVar();
|
|
41628
|
-
return V(as(
|
|
41628
|
+
return V(as(lt(r, s, i, E(0))), as(lt(r, s, i, E(1))), as(lt(r, s, i, E(2))));
|
|
41629
41629
|
}).setLayout({
|
|
41630
41630
|
name: "mx_cell_noise_vec3_2",
|
|
41631
41631
|
type: "vec3",
|
|
@@ -41634,7 +41634,7 @@ const Tde = (t, e) => q(new vde(t, e)), AI = /* @__PURE__ */ B(({ lightDistance:
|
|
|
41634
41634
|
]
|
|
41635
41635
|
}), rpe = /* @__PURE__ */ B(([t]) => {
|
|
41636
41636
|
const e = Ee(t).toVar(), r = E(nr(e.x)).toVar(), s = E(nr(e.y)).toVar(), i = E(nr(e.z)).toVar(), n = E(nr(e.w)).toVar();
|
|
41637
|
-
return V(as(
|
|
41637
|
+
return V(as(lt(r, s, i, n, E(0))), as(lt(r, s, i, n, E(1))), as(lt(r, s, i, n, E(2))));
|
|
41638
41638
|
}).setLayout({
|
|
41639
41639
|
name: "mx_cell_noise_vec3_3",
|
|
41640
41640
|
type: "vec3",
|
|
@@ -41960,7 +41960,7 @@ var x = /* @__PURE__ */ Object.freeze({
|
|
|
41960
41960
|
NodeAccess: vn,
|
|
41961
41961
|
NodeShaderStage: Gc,
|
|
41962
41962
|
NodeType: Nne,
|
|
41963
|
-
NodeUpdateType:
|
|
41963
|
+
NodeUpdateType: ut,
|
|
41964
41964
|
PCFShadowFilter: bI,
|
|
41965
41965
|
PCFSoftShadowFilter: vI,
|
|
41966
41966
|
PI: ng,
|