@mulmoclaude/shapescript-plugin 2.7.1 → 2.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/core/publish.d.ts +3 -1
- package/dist/core/publish.d.ts.map +1 -1
- package/dist/{core-Bt3MvxL7.js → core-BP7kPYyW.js} +24 -18
- package/dist/{core-B3GMdzSM.cjs → core-CcNfRjfb.cjs} +1 -1
- package/dist/core.cjs +1 -1
- package/dist/core.js +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/lang/de.d.ts.map +1 -1
- package/dist/lang/en.d.ts.map +1 -1
- package/dist/lang/es.d.ts.map +1 -1
- package/dist/lang/fr.d.ts.map +1 -1
- package/dist/lang/ja.d.ts.map +1 -1
- package/dist/lang/ko.d.ts.map +1 -1
- package/dist/lang/messages.d.ts +4 -0
- package/dist/lang/messages.d.ts.map +1 -1
- package/dist/lang/ptBR.d.ts.map +1 -1
- package/dist/lang/zh.d.ts.map +1 -1
- package/dist/style.css +1 -1
- package/dist/vue/View.vue.d.ts.map +1 -1
- package/dist/vue.cjs +3 -3
- package/dist/vue.js +369 -338
- package/package.json +3 -3
package/dist/vue.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { a as e, h as t, n, o as r, r as i, s as a, t as o, v as s, y as c } from "./samples-CfppG9Bk.js";
|
|
2
|
-
import { $ as l, A as u, An as d, B as f, C as p, Cn as m, D as h, Dn as g, E as _, En as v, F as y, Fn as b, G as x, Gt as S, H as C, Hn as w, In as T, J as E, Jt as D, K as O, Kt as
|
|
2
|
+
import { $ as l, A as u, An as d, B as f, C as p, Cn as m, D as h, Dn as g, E as _, En as v, F as y, Fn as b, G as x, Gt as S, H as C, Hn as w, In as T, J as E, Jt as D, K as O, Kt as ee, L as k, Ln as A, M as j, Mn as te, N as ne, Nn as M, O as re, On as ie, Pn as N, Q as ae, Qt as oe, Rn as se, S as P, Sn as F, T as I, Tn as ce, U as L, Un as le, V as ue, Vn as de, W as fe, X as pe, Xt as me, Y as R, Z as he, Zt as ge, _ as z, a as _e, an as ve, at as ye, b as be, bn as xe, cn as Se, ct as Ce, d as we, dn as Te, et as Ee, f as De, fn as Oe, g as B, gn as ke, h as Ae, ht as je, i as Me, in as Ne, it as V, j as Pe, jn as H, k as Fe, kn as Ie, l as Le, ln as U, mn as Re, mt as ze, nt as W, o as G, on as Be, ot as Ve, p as He, pn as Ue, q as K, qt as We, r as Ge, rn as Ke, rt as qe, s as Je, tt as Ye, u as Xe, un as Ze, ut as Qe, v as $e, vn as et, w as tt, wn as nt, x as rt, xn as it, y as at, yn as ot, z as st } from "./toThreeJS-MMc_OzvN.js";
|
|
3
3
|
import { computed as q, createCommentVNode as ct, createElementBlock as lt, createElementVNode as J, createTextVNode as ut, defineComponent as dt, nextTick as ft, onMounted as pt, onUnmounted as mt, openBlock as ht, ref as gt, toDisplayString as Y, unref as X, vModelText as _t, watch as vt, withDirectives as yt } from "vue";
|
|
4
4
|
import { createUseT as bt, useRuntime as xt } from "gui-chat-protocol/vue";
|
|
5
5
|
//#region ../../../node_modules/three/build/three.module.js
|
|
@@ -281,7 +281,7 @@ var Z = {
|
|
|
281
281
|
normalmap: {
|
|
282
282
|
normalMap: { value: null },
|
|
283
283
|
normalMapTransform: { value: /*@__PURE__*/ new K() },
|
|
284
|
-
normalScale: { value: /*@__PURE__*/ new
|
|
284
|
+
normalScale: { value: /*@__PURE__*/ new F(1, 1) }
|
|
285
285
|
},
|
|
286
286
|
displacementmap: {
|
|
287
287
|
displacementMap: { value: null },
|
|
@@ -432,7 +432,7 @@ var Z = {
|
|
|
432
432
|
sprite: {
|
|
433
433
|
diffuse: { value: /*@__PURE__*/ new B(16777215) },
|
|
434
434
|
opacity: { value: 1 },
|
|
435
|
-
center: { value: /*@__PURE__*/ new
|
|
435
|
+
center: { value: /*@__PURE__*/ new F(.5, .5) },
|
|
436
436
|
rotation: { value: 0 },
|
|
437
437
|
map: { value: null },
|
|
438
438
|
mapTransform: { value: /*@__PURE__*/ new K() },
|
|
@@ -655,7 +655,7 @@ wt.physical = {
|
|
|
655
655
|
clearcoatMapTransform: { value: /*@__PURE__*/ new K() },
|
|
656
656
|
clearcoatNormalMap: { value: null },
|
|
657
657
|
clearcoatNormalMapTransform: { value: /*@__PURE__*/ new K() },
|
|
658
|
-
clearcoatNormalScale: { value: /*@__PURE__*/ new
|
|
658
|
+
clearcoatNormalScale: { value: /*@__PURE__*/ new F(1, 1) },
|
|
659
659
|
clearcoatRoughness: { value: 0 },
|
|
660
660
|
clearcoatRoughnessMap: { value: null },
|
|
661
661
|
clearcoatRoughnessMapTransform: { value: /*@__PURE__*/ new K() },
|
|
@@ -679,7 +679,7 @@ wt.physical = {
|
|
|
679
679
|
transmission: { value: 0 },
|
|
680
680
|
transmissionMap: { value: null },
|
|
681
681
|
transmissionMapTransform: { value: /*@__PURE__*/ new K() },
|
|
682
|
-
transmissionSamplerSize: { value: /*@__PURE__*/ new
|
|
682
|
+
transmissionSamplerSize: { value: /*@__PURE__*/ new F() },
|
|
683
683
|
transmissionSamplerMap: { value: null },
|
|
684
684
|
thickness: { value: 0 },
|
|
685
685
|
thicknessMap: { value: null },
|
|
@@ -692,7 +692,7 @@ wt.physical = {
|
|
|
692
692
|
specularIntensity: { value: 1 },
|
|
693
693
|
specularIntensityMap: { value: null },
|
|
694
694
|
specularIntensityMapTransform: { value: /*@__PURE__*/ new K() },
|
|
695
|
-
anisotropyVector: { value: /*@__PURE__*/ new
|
|
695
|
+
anisotropyVector: { value: /*@__PURE__*/ new F() },
|
|
696
696
|
anisotropyMap: { value: null },
|
|
697
697
|
anisotropyMapTransform: { value: /*@__PURE__*/ new K() }
|
|
698
698
|
}]),
|
|
@@ -725,7 +725,7 @@ function Ot(e, t, n, r, i, a) {
|
|
|
725
725
|
let i = p(n);
|
|
726
726
|
i && (i.isCubeTexture || i.mapping === 306) ? (l === void 0 && (l = new R(new we(1, 1, 1), new Be({
|
|
727
727
|
name: "BackgroundCubeMaterial",
|
|
728
|
-
uniforms:
|
|
728
|
+
uniforms: ie(wt.backgroundCube.uniforms),
|
|
729
729
|
vertexShader: wt.backgroundCube.vertexShader,
|
|
730
730
|
fragmentShader: wt.backgroundCube.fragmentShader,
|
|
731
731
|
side: 1,
|
|
@@ -739,7 +739,7 @@ function Ot(e, t, n, r, i, a) {
|
|
|
739
739
|
return this.uniforms.envMap.value;
|
|
740
740
|
} }), r.update(l)), l.material.uniforms.envMap.value = i, l.material.uniforms.backgroundBlurriness.value = n.backgroundBlurriness, l.material.uniforms.backgroundIntensity.value = n.backgroundIntensity, l.material.uniforms.backgroundRotation.value.setFromMatrix4(Et.makeRotationFromEuler(n.backgroundRotation)).transpose(), i.isCubeTexture && i.isRenderTargetTexture === !1 && l.material.uniforms.backgroundRotation.value.premultiply(Dt), l.material.toneMapped = z.getTransfer(i.colorSpace) !== Ne, (u !== i || d !== i.version || f !== e.toneMapping) && (l.material.needsUpdate = !0, u = i, d = i.version, f = e.toneMapping), l.layers.enableAll(), t.unshift(l, l.geometry, l.material, 0, 0, null)) : i && i.isTexture && (c === void 0 && (c = new R(new Ve(2, 2), new Be({
|
|
741
741
|
name: "BackgroundMaterial",
|
|
742
|
-
uniforms:
|
|
742
|
+
uniforms: ie(wt.background.uniforms),
|
|
743
743
|
vertexShader: wt.background.vertexShader,
|
|
744
744
|
fragmentShader: wt.background.fragmentShader,
|
|
745
745
|
side: 0,
|
|
@@ -752,7 +752,7 @@ function Ot(e, t, n, r, i, a) {
|
|
|
752
752
|
} }), r.update(c)), c.material.uniforms.t2D.value = i, c.material.uniforms.backgroundIntensity.value = n.backgroundIntensity, c.material.toneMapped = z.getTransfer(i.colorSpace) !== Ne, i.matrixAutoUpdate === !0 && i.updateMatrix(), c.material.uniforms.uvTransform.value.copy(i.matrix), (u !== i || d !== i.version || f !== e.toneMapping) && (c.material.needsUpdate = !0, u = i, d = i.version, f = e.toneMapping), c.layers.enableAll(), t.unshift(c, c.geometry, c.material, 0, 0, null));
|
|
753
753
|
}
|
|
754
754
|
function g(t, r) {
|
|
755
|
-
t.getRGB(Tt,
|
|
755
|
+
t.getRGB(Tt, M(e)), n.buffers.color.setClear(Tt.r, Tt.g, Tt.b, r, a);
|
|
756
756
|
}
|
|
757
757
|
function _() {
|
|
758
758
|
l !== void 0 && (l.geometry.dispose(), l.material.dispose(), l = void 0), c !== void 0 && (c.geometry.dispose(), c.material.dispose(), c = void 0);
|
|
@@ -1015,9 +1015,9 @@ function jt(e, t, n, r) {
|
|
|
1015
1015
|
return t === "mediump" && e.getShaderPrecisionFormat(e.VERTEX_SHADER, e.MEDIUM_FLOAT).precision > 0 && e.getShaderPrecisionFormat(e.FRAGMENT_SHADER, e.MEDIUM_FLOAT).precision > 0 ? "mediump" : "lowp";
|
|
1016
1016
|
}
|
|
1017
1017
|
let l = n.precision === void 0 ? "highp" : n.precision, u = c(l);
|
|
1018
|
-
u !== l && (
|
|
1018
|
+
u !== l && (A("WebGLRenderer:", l, "not supported, using", u, "instead."), l = u);
|
|
1019
1019
|
let d = n.logarithmicDepthBuffer === !0, f = n.reversedDepthBuffer === !0 && t.has("EXT_clip_control");
|
|
1020
|
-
n.reversedDepthBuffer === !0 && f === !1 &&
|
|
1020
|
+
n.reversedDepthBuffer === !0 && f === !1 && A("WebGLRenderer: Unable to use reversed depth buffer due to missing EXT_clip_control extension. Fallback to default depth buffer.");
|
|
1021
1021
|
let p = e.getParameter(e.MAX_TEXTURE_IMAGE_UNITS), m = e.getParameter(e.MAX_VERTEX_TEXTURE_IMAGE_UNITS), h = e.getParameter(e.MAX_TEXTURE_SIZE), g = e.getParameter(e.MAX_CUBE_MAP_TEXTURE_SIZE), _ = e.getParameter(e.MAX_VERTEX_ATTRIBS), v = e.getParameter(e.MAX_VERTEX_UNIFORM_VECTORS), y = e.getParameter(e.MAX_VARYING_VECTORS), b = e.getParameter(e.MAX_FRAGMENT_UNIFORM_VECTORS), x = e.getParameter(e.MAX_SAMPLES), S = e.getParameter(e.SAMPLES);
|
|
1022
1022
|
return {
|
|
1023
1023
|
isWebGL2: !0,
|
|
@@ -1125,7 +1125,7 @@ var Nt = 4, Pt = 6, Ft = 20, It = 256, Lt = /*@__PURE__*/ new qe(), Rt = /*@__PU
|
|
|
1125
1125
|
magFilter: f,
|
|
1126
1126
|
minFilter: f,
|
|
1127
1127
|
generateMipmaps: !1,
|
|
1128
|
-
type:
|
|
1128
|
+
type: k,
|
|
1129
1129
|
format: ze,
|
|
1130
1130
|
colorSpace: L,
|
|
1131
1131
|
depthBuffer: !1
|
|
@@ -1365,7 +1365,7 @@ var en = class extends v {
|
|
|
1365
1365
|
fragmentShader: "\n\n uniform sampler2D tEquirect;\n\n varying vec3 vWorldDirection;\n\n #include <common>\n\n void main() {\n\n vec3 direction = normalize( vWorldDirection );\n\n vec2 sampleUV = equirectUv( direction );\n\n gl_FragColor = texture2D( tEquirect, sampleUV );\n\n }\n "
|
|
1366
1366
|
}, r = new we(5, 5, 5), i = new Be({
|
|
1367
1367
|
name: "CubemapFromEquirect",
|
|
1368
|
-
uniforms:
|
|
1368
|
+
uniforms: ie(n.uniforms),
|
|
1369
1369
|
vertexShader: n.vertexShader,
|
|
1370
1370
|
fragmentShader: n.fragmentShader,
|
|
1371
1371
|
side: 1,
|
|
@@ -1465,7 +1465,7 @@ function nn(e) {
|
|
|
1465
1465
|
},
|
|
1466
1466
|
get: function(e) {
|
|
1467
1467
|
let t = n(e);
|
|
1468
|
-
return t === null &&
|
|
1468
|
+
return t === null && se("WebGLRenderer: " + e + " extension not supported."), t;
|
|
1469
1469
|
}
|
|
1470
1470
|
};
|
|
1471
1471
|
}
|
|
@@ -1601,7 +1601,7 @@ function sn(e, t, n) {
|
|
|
1601
1601
|
let m = o.attributes.position.count * f, h = 1;
|
|
1602
1602
|
m > t.maxTextureSize && (h = Math.ceil(m / t.maxTextureSize), m = t.maxTextureSize);
|
|
1603
1603
|
let g = new Float32Array(m * h * 4 * u), _ = new p(g, m, h, u);
|
|
1604
|
-
_.type =
|
|
1604
|
+
_.type = j, _.needsUpdate = !0;
|
|
1605
1605
|
let v = f * 4;
|
|
1606
1606
|
for (let t = 0; t < u; t++) {
|
|
1607
1607
|
let r = s[t], o = c[t], u = l[t], d = m * h * 4 * t;
|
|
@@ -1613,7 +1613,7 @@ function sn(e, t, n) {
|
|
|
1613
1613
|
d = {
|
|
1614
1614
|
count: u,
|
|
1615
1615
|
texture: _,
|
|
1616
|
-
size: new
|
|
1616
|
+
size: new F(m, h)
|
|
1617
1617
|
}, r.set(o, d);
|
|
1618
1618
|
function y() {
|
|
1619
1619
|
_.dispose(), r.delete(o), o.removeEventListener("dispose", y);
|
|
@@ -1708,11 +1708,11 @@ function un(e, t, n, r, i, a) {
|
|
|
1708
1708
|
y = e, b = y.length > 0 && y[0].isRenderPass === !0;
|
|
1709
1709
|
let t = o.width, n = o.height;
|
|
1710
1710
|
y.length > 0 && s === null && (s = new v(t, n, {
|
|
1711
|
-
type:
|
|
1711
|
+
type: k,
|
|
1712
1712
|
depthBuffer: !1,
|
|
1713
1713
|
stencilBuffer: !1
|
|
1714
1714
|
}), c = new v(t, n, {
|
|
1715
|
-
type:
|
|
1715
|
+
type: k,
|
|
1716
1716
|
depthBuffer: !1,
|
|
1717
1717
|
stencilBuffer: !1
|
|
1718
1718
|
}));
|
|
@@ -1748,7 +1748,7 @@ function un(e, t, n, r, i, a) {
|
|
|
1748
1748
|
o.dispose(), s !== null && s.dispose(), c !== null && c.dispose(), l.dispose(), u.dispose();
|
|
1749
1749
|
};
|
|
1750
1750
|
}
|
|
1751
|
-
var dn = /*@__PURE__*/ new Ze(), fn = /*@__PURE__*/ new h(1, 1), pn = /*@__PURE__*/ new p(), mn = /*@__PURE__*/ new
|
|
1751
|
+
var dn = /*@__PURE__*/ new Ze(), fn = /*@__PURE__*/ new h(1, 1), pn = /*@__PURE__*/ new p(), mn = /*@__PURE__*/ new P(), hn = /*@__PURE__*/ new rt(), gn = [], _n = [], vn = /* @__PURE__ */ new Float32Array(16), yn = /* @__PURE__ */ new Float32Array(9), bn = /* @__PURE__ */ new Float32Array(4);
|
|
1752
1752
|
function xn(e, t, n) {
|
|
1753
1753
|
let r = e[0];
|
|
1754
1754
|
if (r <= 0 || r > 0) return e;
|
|
@@ -2149,7 +2149,7 @@ function Cr(e) {
|
|
|
2149
2149
|
switch (z.getTransfer(e)) {
|
|
2150
2150
|
case fe: return [t, "LinearTransferOETF"];
|
|
2151
2151
|
case Ne: return [t, "sRGBTransferOETF"];
|
|
2152
|
-
default: return
|
|
2152
|
+
default: return A("WebGLProgram: Unsupported color space: ", e), [t, "LinearTransferOETF"];
|
|
2153
2153
|
}
|
|
2154
2154
|
}
|
|
2155
2155
|
function wr(e, t, n) {
|
|
@@ -2181,7 +2181,7 @@ var Er = {
|
|
|
2181
2181
|
};
|
|
2182
2182
|
function Dr(e, t) {
|
|
2183
2183
|
let n = Er[t];
|
|
2184
|
-
return n === void 0 ? (
|
|
2184
|
+
return n === void 0 ? (A("WebGLProgram: Unsupported toneMapping:", t), "vec3 " + e + "( vec3 color ) { return LinearToneMapping( color ); }") : "vec3 " + e + "( vec3 color ) { return " + n + "ToneMapping( color ); }";
|
|
2185
2185
|
}
|
|
2186
2186
|
var Or = /*@__PURE__*/ new m();
|
|
2187
2187
|
function kr() {
|
|
@@ -2234,7 +2234,7 @@ function zr(e, t) {
|
|
|
2234
2234
|
let n = Z[t];
|
|
2235
2235
|
if (n === void 0) {
|
|
2236
2236
|
let e = Rr.get(t);
|
|
2237
|
-
if (e !== void 0) n = Z[e],
|
|
2237
|
+
if (e !== void 0) n = Z[e], A("WebGLRenderer: Shader chunk \"%s\" has been deprecated. Use \"%s\" instead.", t, e);
|
|
2238
2238
|
else throw Error("THREE.WebGLProgram: Can not resolve #include <" + t + ">");
|
|
2239
2239
|
}
|
|
2240
2240
|
return Lr(n);
|
|
@@ -2560,7 +2560,7 @@ function $r(e, t, n, r) {
|
|
|
2560
2560
|
let e = wr(i, x, "vertex"), n = wr(i, S, "fragment");
|
|
2561
2561
|
H("WebGLProgram: Shader Error " + i.getError() + " - VALIDATE_STATUS " + i.getProgramParameter(h, i.VALIDATE_STATUS) + "\n\nMaterial Name: " + t.name + "\nMaterial Type: " + t.type + "\n\nProgram Info Log: " + o + "\n" + e + "\n" + n);
|
|
2562
2562
|
}
|
|
2563
|
-
} else o === "" ? (s === "" || c === "") && (u = !1) :
|
|
2563
|
+
} else o === "" ? (s === "" || c === "") && (u = !1) : A("WebGLProgram: Program Info Log:", o);
|
|
2564
2564
|
u && (t.diagnostics = {
|
|
2565
2565
|
runnable: l,
|
|
2566
2566
|
programLog: o,
|
|
@@ -2652,20 +2652,20 @@ function ii(e, t, n, r, i, a) {
|
|
|
2652
2652
|
}
|
|
2653
2653
|
function h(i, o, l, u, h, g) {
|
|
2654
2654
|
let _ = u.fog, v = h.geometry, y = i.isMeshStandardMaterial || i.isMeshLambertMaterial || i.isMeshPhongMaterial ? u.environment : null, b = i.isMeshStandardMaterial || i.isMeshLambertMaterial && !i.envMap || i.isMeshPhongMaterial && !i.envMap, x = t.get(i.envMap || y, b), S = x && x.mapping === 306 ? x.image.height : null, C = p[i.type];
|
|
2655
|
-
i.precision !== null && (f = r.getMaxPrecision(i.precision), f !== i.precision &&
|
|
2655
|
+
i.precision !== null && (f = r.getMaxPrecision(i.precision), f !== i.precision && A("WebGLProgram.getParameters:", i.precision, "not supported, using", f, "instead."));
|
|
2656
2656
|
let w = v.morphAttributes.position || v.morphAttributes.normal || v.morphAttributes.color, T = w === void 0 ? 0 : w.length, E = 0;
|
|
2657
2657
|
v.morphAttributes.position !== void 0 && (E = 1), v.morphAttributes.normal !== void 0 && (E = 2), v.morphAttributes.color !== void 0 && (E = 3);
|
|
2658
|
-
let D, O,
|
|
2658
|
+
let D, O, ee, k;
|
|
2659
2659
|
if (C) {
|
|
2660
2660
|
let e = wt[C];
|
|
2661
2661
|
D = e.vertexShader, O = e.fragmentShader;
|
|
2662
2662
|
} else {
|
|
2663
2663
|
D = i.vertexShader, O = i.fragmentShader;
|
|
2664
2664
|
let e = s.getVertexShaderStage(i), t = s.getFragmentShaderStage(i);
|
|
2665
|
-
s.update(i, e, t),
|
|
2665
|
+
s.update(i, e, t), ee = e.id, k = t.id;
|
|
2666
2666
|
}
|
|
2667
|
-
let
|
|
2668
|
-
i.toneMapped && (
|
|
2667
|
+
let j = e.getRenderTarget(), te = e.state.buffers.depth.getReversed(), ne = h.isInstancedMesh === !0, M = h.isBatchedMesh === !0, re = !!i.map, ie = !!i.matcap, N = !!x, ae = !!i.aoMap, oe = !!i.lightMap, se = !!i.bumpMap && i.wireframe === !1, P = !!i.normalMap, F = !!i.displacementMap, I = !!i.emissiveMap, ce = !!i.metalnessMap, L = !!i.roughnessMap, le = i.anisotropy > 0, ue = i.clearcoat > 0, de = i.dispersion > 0, fe = i.retroreflectivity > 0, pe = i.iridescence > 0, me = i.sheen > 0, R = i.transmission > 0, he = le && !!i.anisotropyMap, ge = ue && !!i.clearcoatMap, _e = ue && !!i.clearcoatNormalMap, ve = ue && !!i.clearcoatRoughnessMap, ye = pe && !!i.iridescenceMap, be = pe && !!i.iridescenceThicknessMap, xe = me && !!i.sheenColorMap, Se = me && !!i.sheenRoughnessMap, Ce = !!i.specularMap, we = !!i.specularColorMap, Te = !!i.specularIntensityMap, Ee = R && !!i.transmissionMap, De = R && !!i.thicknessMap, Oe = !!i.gradientMap, B = !!i.alphaMap, ke = i.alphaTest > 0, Ae = !!i.alphaHash, je = !!i.extensions, Me = 0;
|
|
2668
|
+
i.toneMapped && (j === null || j.isXRRenderTarget === !0) && (Me = e.toneMapping);
|
|
2669
2669
|
let Ne = {
|
|
2670
2670
|
shaderID: C,
|
|
2671
2671
|
shaderType: i.type,
|
|
@@ -2673,32 +2673,32 @@ function ii(e, t, n, r, i, a) {
|
|
|
2673
2673
|
vertexShader: D,
|
|
2674
2674
|
fragmentShader: O,
|
|
2675
2675
|
defines: i.defines,
|
|
2676
|
-
customVertexShaderID:
|
|
2677
|
-
customFragmentShaderID:
|
|
2676
|
+
customVertexShaderID: ee,
|
|
2677
|
+
customFragmentShaderID: k,
|
|
2678
2678
|
isRawShaderMaterial: i.isRawShaderMaterial === !0,
|
|
2679
2679
|
glslVersion: i.glslVersion,
|
|
2680
2680
|
precision: f,
|
|
2681
|
-
batching:
|
|
2682
|
-
batchingColor:
|
|
2683
|
-
instancing:
|
|
2684
|
-
instancingColor:
|
|
2685
|
-
instancingMorph:
|
|
2686
|
-
outputColorSpace:
|
|
2681
|
+
batching: M,
|
|
2682
|
+
batchingColor: M && h._colorsTexture !== null,
|
|
2683
|
+
instancing: ne,
|
|
2684
|
+
instancingColor: ne && h.instanceColor !== null,
|
|
2685
|
+
instancingMorph: ne && h.morphTexture !== null,
|
|
2686
|
+
outputColorSpace: j === null ? e.outputColorSpace : j.isXRRenderTarget === !0 ? j.texture.colorSpace : z.workingColorSpace,
|
|
2687
2687
|
alphaToCoverage: !!i.alphaToCoverage,
|
|
2688
|
-
map:
|
|
2689
|
-
matcap:
|
|
2690
|
-
envMap:
|
|
2691
|
-
envMapMode:
|
|
2688
|
+
map: re,
|
|
2689
|
+
matcap: ie,
|
|
2690
|
+
envMap: N,
|
|
2691
|
+
envMapMode: N && x.mapping,
|
|
2692
2692
|
envMapCubeUVHeight: S,
|
|
2693
|
-
aoMap:
|
|
2694
|
-
lightMap:
|
|
2695
|
-
bumpMap:
|
|
2696
|
-
normalMap:
|
|
2697
|
-
displacementMap:
|
|
2698
|
-
emissiveMap:
|
|
2699
|
-
normalMapObjectSpace:
|
|
2700
|
-
normalMapTangentSpace:
|
|
2701
|
-
packedNormalMap:
|
|
2693
|
+
aoMap: ae,
|
|
2694
|
+
lightMap: oe,
|
|
2695
|
+
bumpMap: se,
|
|
2696
|
+
normalMap: P,
|
|
2697
|
+
displacementMap: F,
|
|
2698
|
+
emissiveMap: I,
|
|
2699
|
+
normalMapObjectSpace: P && i.normalMapType === 1,
|
|
2700
|
+
normalMapTangentSpace: P && i.normalMapType === 0,
|
|
2701
|
+
packedNormalMap: P && i.normalMapType === 0 && ri(i.normalMap.format),
|
|
2702
2702
|
metalnessMap: ce,
|
|
2703
2703
|
roughnessMap: L,
|
|
2704
2704
|
anisotropy: le,
|
|
@@ -2727,13 +2727,13 @@ function ii(e, t, n, r, i, a) {
|
|
|
2727
2727
|
alphaTest: ke,
|
|
2728
2728
|
alphaHash: Ae,
|
|
2729
2729
|
combine: i.combine,
|
|
2730
|
-
mapUv:
|
|
2731
|
-
aoMapUv:
|
|
2732
|
-
lightMapUv:
|
|
2733
|
-
bumpMapUv:
|
|
2734
|
-
normalMapUv:
|
|
2735
|
-
displacementMapUv:
|
|
2736
|
-
emissiveMapUv:
|
|
2730
|
+
mapUv: re && m(i.map.channel),
|
|
2731
|
+
aoMapUv: ae && m(i.aoMap.channel),
|
|
2732
|
+
lightMapUv: oe && m(i.lightMap.channel),
|
|
2733
|
+
bumpMapUv: se && m(i.bumpMap.channel),
|
|
2734
|
+
normalMapUv: P && m(i.normalMap.channel),
|
|
2735
|
+
displacementMapUv: F && m(i.displacementMap.channel),
|
|
2736
|
+
emissiveMapUv: I && m(i.emissiveMap.channel),
|
|
2737
2737
|
metalnessMapUv: ce && m(i.metalnessMap.channel),
|
|
2738
2738
|
roughnessMapUv: L && m(i.roughnessMap.channel),
|
|
2739
2739
|
anisotropyMapUv: he && m(i.anisotropyMap.channel),
|
|
@@ -2750,18 +2750,18 @@ function ii(e, t, n, r, i, a) {
|
|
|
2750
2750
|
transmissionMapUv: Ee && m(i.transmissionMap.channel),
|
|
2751
2751
|
thicknessMapUv: De && m(i.thicknessMap.channel),
|
|
2752
2752
|
alphaMapUv: B && m(i.alphaMap.channel),
|
|
2753
|
-
vertexTangents: !!v.attributes.tangent && (
|
|
2753
|
+
vertexTangents: !!v.attributes.tangent && (P || le),
|
|
2754
2754
|
vertexNormals: !!v.attributes.normal,
|
|
2755
2755
|
vertexColors: i.vertexColors,
|
|
2756
2756
|
vertexAlphas: i.vertexColors === !0 && !!v.attributes.color && v.attributes.color.itemSize === 4,
|
|
2757
|
-
pointsUvs: h.isPoints === !0 && !!v.attributes.uv && (
|
|
2757
|
+
pointsUvs: h.isPoints === !0 && !!v.attributes.uv && (re || B),
|
|
2758
2758
|
fog: !!_,
|
|
2759
2759
|
useFog: i.fog === !0,
|
|
2760
2760
|
fogExp2: !!_ && _.isFogExp2,
|
|
2761
|
-
flatShading: i.wireframe === !1 && (i.flatShading === !0 || v.attributes.normal === void 0 &&
|
|
2761
|
+
flatShading: i.wireframe === !1 && (i.flatShading === !0 || v.attributes.normal === void 0 && P === !1 && (i.isMeshLambertMaterial || i.isMeshPhongMaterial || i.isMeshStandardMaterial || i.isMeshPhysicalMaterial)),
|
|
2762
2762
|
sizeAttenuation: i.sizeAttenuation === !0,
|
|
2763
2763
|
logarithmicDepthBuffer: d,
|
|
2764
|
-
reversedDepthBuffer:
|
|
2764
|
+
reversedDepthBuffer: te,
|
|
2765
2765
|
skinning: h.isSkinnedMesh === !0,
|
|
2766
2766
|
hasPositionAttribute: v.attributes.position !== void 0,
|
|
2767
2767
|
morphTargets: v.morphAttributes.position !== void 0,
|
|
@@ -2789,8 +2789,8 @@ function ii(e, t, n, r, i, a) {
|
|
|
2789
2789
|
shadowMapEnabled: e.shadowMap.enabled && l.length > 0,
|
|
2790
2790
|
shadowMapType: e.shadowMap.type,
|
|
2791
2791
|
toneMapping: Me,
|
|
2792
|
-
decodeVideoTexture:
|
|
2793
|
-
decodeVideoTextureEmissive:
|
|
2792
|
+
decodeVideoTexture: re && i.map.isVideoTexture === !0 && z.getTransfer(i.map.colorSpace) === "srgb",
|
|
2793
|
+
decodeVideoTextureEmissive: I && i.emissiveMap.isVideoTexture === !0 && z.getTransfer(i.emissiveMap.colorSpace) === "srgb",
|
|
2794
2794
|
premultipliedAlpha: i.premultipliedAlpha,
|
|
2795
2795
|
doubleSided: i.side === 2,
|
|
2796
2796
|
flipSided: i.side === 1,
|
|
@@ -2798,7 +2798,7 @@ function ii(e, t, n, r, i, a) {
|
|
|
2798
2798
|
depthPacking: i.depthPacking || 0,
|
|
2799
2799
|
index0AttributeName: i.index0AttributeName,
|
|
2800
2800
|
extensionClipCullDistance: je && i.extensions.clipCullDistance === !0 && n.has("WEBGL_clip_cull_distance"),
|
|
2801
|
-
extensionMultiDraw: (je && i.extensions.multiDraw === !0 ||
|
|
2801
|
+
extensionMultiDraw: (je && i.extensions.multiDraw === !0 || M) && n.has("WEBGL_multi_draw"),
|
|
2802
2802
|
rendererExtensionParallelShaderCompile: n.has("KHR_parallel_shader_compile"),
|
|
2803
2803
|
customProgramCacheKey: i.customProgramCacheKey()
|
|
2804
2804
|
};
|
|
@@ -3011,7 +3011,7 @@ function di() {
|
|
|
3011
3011
|
shadowBias: 0,
|
|
3012
3012
|
shadowNormalBias: 0,
|
|
3013
3013
|
shadowRadius: 1,
|
|
3014
|
-
shadowMapSize: new
|
|
3014
|
+
shadowMapSize: new F()
|
|
3015
3015
|
};
|
|
3016
3016
|
break;
|
|
3017
3017
|
case "SpotLight":
|
|
@@ -3020,7 +3020,7 @@ function di() {
|
|
|
3020
3020
|
shadowBias: 0,
|
|
3021
3021
|
shadowNormalBias: 0,
|
|
3022
3022
|
shadowRadius: 1,
|
|
3023
|
-
shadowMapSize: new
|
|
3023
|
+
shadowMapSize: new F()
|
|
3024
3024
|
};
|
|
3025
3025
|
break;
|
|
3026
3026
|
case "PointLight": n = {
|
|
@@ -3028,7 +3028,7 @@ function di() {
|
|
|
3028
3028
|
shadowBias: 0,
|
|
3029
3029
|
shadowNormalBias: 0,
|
|
3030
3030
|
shadowRadius: 1,
|
|
3031
|
-
shadowMapSize: new
|
|
3031
|
+
shadowMapSize: new F(),
|
|
3032
3032
|
shadowCameraNear: 1,
|
|
3033
3033
|
shadowCameraFar: 1e3
|
|
3034
3034
|
};
|
|
@@ -3246,7 +3246,7 @@ var _i = "void main() {\n gl_Position = vec4( position, 1.0 );\n}", vi = "unifor
|
|
|
3246
3246
|
/*@__PURE__*/ new m(0, -1, 0)
|
|
3247
3247
|
], xi = /*@__PURE__*/ new E(), Si = /*@__PURE__*/ new m(), Ci = /*@__PURE__*/ new m();
|
|
3248
3248
|
function wi(e, t, n) {
|
|
3249
|
-
let r = new
|
|
3249
|
+
let r = new ne(), i = new F(), a = new F(), o = new nt(), s = new he(), c = new ae(), l = {}, u = n.maxTextureSize, d = {
|
|
3250
3250
|
0: 1,
|
|
3251
3251
|
1: 0,
|
|
3252
3252
|
2: 2
|
|
@@ -3254,7 +3254,7 @@ function wi(e, t, n) {
|
|
|
3254
3254
|
defines: { VSM_SAMPLES: 8 },
|
|
3255
3255
|
uniforms: {
|
|
3256
3256
|
shadow_pass: { value: null },
|
|
3257
|
-
resolution: { value: new
|
|
3257
|
+
resolution: { value: new F() },
|
|
3258
3258
|
radius: { value: 4 }
|
|
3259
3259
|
},
|
|
3260
3260
|
vertexShader: _i,
|
|
@@ -3278,7 +3278,7 @@ function wi(e, t, n) {
|
|
|
3278
3278
|
let b = this.type;
|
|
3279
3279
|
this.render = function(t, n, s) {
|
|
3280
3280
|
if (y.enabled === !1 || y.autoUpdate === !1 && y.needsUpdate === !1 || t.length === 0) return;
|
|
3281
|
-
this.type === 2 && (
|
|
3281
|
+
this.type === 2 && (A("WebGLShadowMap: PCFSoftShadowMap has been removed. Using PCFShadowMap instead."), this.type = 1);
|
|
3282
3282
|
let c = e.getRenderTarget(), l = e.getActiveCubeFace(), d = e.getActiveMipmapLevel(), p = e.state;
|
|
3283
3283
|
p.setBlending(0), p.buffers.depth.getReversed() === !0 ? p.buffers.color.setClear(0, 0, 0, 0) : p.buffers.color.setClear(1, 1, 1, 1), p.buffers.depth.setTest(!0), p.setScissorTest(!1);
|
|
3284
3284
|
let m = b !== this.type;
|
|
@@ -3288,7 +3288,7 @@ function wi(e, t, n) {
|
|
|
3288
3288
|
for (let c = 0, l = t.length; c < l; c++) {
|
|
3289
3289
|
let l = t[c], d = l.shadow;
|
|
3290
3290
|
if (d === void 0) {
|
|
3291
|
-
|
|
3291
|
+
A("WebGLShadowMap:", l, "has no shadow.");
|
|
3292
3292
|
continue;
|
|
3293
3293
|
}
|
|
3294
3294
|
if (d.autoUpdate === !1 && d.needsUpdate === !1) continue;
|
|
@@ -3299,17 +3299,17 @@ function wi(e, t, n) {
|
|
|
3299
3299
|
if (d.camera._reversedDepth = _, d.map === null || m === !0) {
|
|
3300
3300
|
if (d.map !== null && (d.map.depthTexture !== null && (d.map.depthTexture.dispose(), d.map.depthTexture = null), d.map.dispose()), this.type === 3) {
|
|
3301
3301
|
if (l.isPointLight) {
|
|
3302
|
-
|
|
3302
|
+
A("WebGLShadowMap: VSM shadow maps are not supported for PointLights. Use PCF or BasicShadowMap instead.");
|
|
3303
3303
|
continue;
|
|
3304
3304
|
}
|
|
3305
3305
|
d.map = new v(i.x, i.y, {
|
|
3306
3306
|
format: S,
|
|
3307
|
-
type:
|
|
3307
|
+
type: k,
|
|
3308
3308
|
minFilter: f,
|
|
3309
3309
|
magFilter: f,
|
|
3310
3310
|
generateMipmaps: !1
|
|
3311
|
-
}), d.map.texture.name = l.name + ".shadowMap", d.map.depthTexture = new h(i.x, i.y,
|
|
3312
|
-
} else l.isPointLight ? (d.map = new en(i.x), d.map.depthTexture = new be(i.x, et)) : (d.map = new v(i.x, i.y), d.map.depthTexture = new h(i.x, i.y, et)), d.map.depthTexture.name = l.name + ".shadowMap", d.map.depthTexture.format =
|
|
3311
|
+
}), d.map.texture.name = l.name + ".shadowMap", d.map.depthTexture = new h(i.x, i.y, j), d.map.depthTexture.name = l.name + ".shadowMapDepth", d.map.depthTexture.format = I, d.map.depthTexture.compareFunction = null, d.map.depthTexture.minFilter = Ee, d.map.depthTexture.magFilter = Ee;
|
|
3312
|
+
} else l.isPointLight ? (d.map = new en(i.x), d.map.depthTexture = new be(i.x, et)) : (d.map = new v(i.x, i.y), d.map.depthTexture = new h(i.x, i.y, et)), d.map.depthTexture.name = l.name + ".shadowMap", d.map.depthTexture.format = I, this.type === 1 ? (d.map.depthTexture.compareFunction = _ ? 518 : 515, d.map.depthTexture.minFilter = f, d.map.depthTexture.magFilter = f) : (d.map.depthTexture.compareFunction = null, d.map.depthTexture.minFilter = Ee, d.map.depthTexture.magFilter = Ee);
|
|
3313
3313
|
d.camera.updateProjectionMatrix();
|
|
3314
3314
|
}
|
|
3315
3315
|
d.map.isWebGLCubeRenderTarget !== !0 && (d.map.width !== i.x || d.map.height !== i.y) && d.map.setSize(i.x, i.y);
|
|
@@ -3337,7 +3337,7 @@ function wi(e, t, n) {
|
|
|
3337
3337
|
let a = t.update(_);
|
|
3338
3338
|
p.defines.VSM_SAMPLES !== n.blurSamples && (p.defines.VSM_SAMPLES = n.blurSamples, m.defines.VSM_SAMPLES = n.blurSamples, p.needsUpdate = !0, m.needsUpdate = !0), n.mapPass === null ? n.mapPass = new v(i.x, i.y, {
|
|
3339
3339
|
format: S,
|
|
3340
|
-
type:
|
|
3340
|
+
type: k
|
|
3341
3341
|
}) : (n.mapPass.width !== n.map.width || n.mapPass.height !== n.map.height) && n.mapPass.setSize(n.map.width, n.map.height), p.uniforms.shadow_pass.value = n.map.depthTexture, p.uniforms.resolution.value.set(n.map.width, n.map.height), p.uniforms.radius.value = n.radius, e.setRenderTarget(n.mapPass), e.clear(), e.renderBufferDirect(r, null, a, p, _, null), m.uniforms.shadow_pass.value = n.mapPass.texture, m.uniforms.resolution.value.set(n.map.width, n.map.height), m.uniforms.radius.value = n.radius, e.setRenderTarget(n.map), e.clear(), e.renderBufferDirect(r, null, a, m, _, null);
|
|
3342
3342
|
}
|
|
3343
3343
|
function C(t, n, r, i) {
|
|
@@ -3424,7 +3424,7 @@ function Ti(e, t) {
|
|
|
3424
3424
|
i !== t && !n && (e.depthMask(t), i = t);
|
|
3425
3425
|
},
|
|
3426
3426
|
setFunc: function(t) {
|
|
3427
|
-
if (r && (t =
|
|
3427
|
+
if (r && (t = oe[t]), a !== t) {
|
|
3428
3428
|
switch (t) {
|
|
3429
3429
|
case 0:
|
|
3430
3430
|
e.depthFunc(e.NEVER);
|
|
@@ -3492,17 +3492,17 @@ function Ti(e, t) {
|
|
|
3492
3492
|
}
|
|
3493
3493
|
};
|
|
3494
3494
|
}
|
|
3495
|
-
let a = new n(), o = new r(), s = new i(), c = /* @__PURE__ */ new WeakMap(), l = /* @__PURE__ */ new WeakMap(), u = {}, d = {}, f = {}, p = /* @__PURE__ */ new WeakMap(), m = [], h = null, g = !1, _ = null, v = null, y = null, b = null, x = null, S = null, C = null, w = new B(0, 0, 0), T = 0, E = !1, D = null, O = null,
|
|
3496
|
-
|
|
3497
|
-
let
|
|
3498
|
-
function
|
|
3495
|
+
let a = new n(), o = new r(), s = new i(), c = /* @__PURE__ */ new WeakMap(), l = /* @__PURE__ */ new WeakMap(), u = {}, d = {}, f = {}, p = /* @__PURE__ */ new WeakMap(), m = [], h = null, g = !1, _ = null, v = null, y = null, b = null, x = null, S = null, C = null, w = new B(0, 0, 0), T = 0, E = !1, D = null, O = null, ee = null, k = null, A = null, j = e.getParameter(e.MAX_COMBINED_TEXTURE_IMAGE_UNITS), te = !1, ne = 0, M = e.getParameter(e.VERSION);
|
|
3496
|
+
M.indexOf("WebGL") === -1 ? M.indexOf("OpenGL ES") !== -1 && (ne = parseFloat(/^OpenGL ES (\d)/.exec(M)[1]), te = ne >= 2) : (ne = parseFloat(/^WebGL (\d)/.exec(M)[1]), te = ne >= 1);
|
|
3497
|
+
let re = null, ie = {}, N = e.getParameter(e.SCISSOR_BOX), ae = e.getParameter(e.VIEWPORT), se = new nt().fromArray(N), P = new nt().fromArray(ae);
|
|
3498
|
+
function F(t, n, r, i) {
|
|
3499
3499
|
let a = /* @__PURE__ */ new Uint8Array(4), o = e.createTexture();
|
|
3500
3500
|
e.bindTexture(t, o), e.texParameteri(t, e.TEXTURE_MIN_FILTER, e.NEAREST), e.texParameteri(t, e.TEXTURE_MAG_FILTER, e.NEAREST);
|
|
3501
3501
|
for (let o = 0; o < r; o++) t === e.TEXTURE_3D || t === e.TEXTURE_2D_ARRAY ? e.texImage3D(n, 0, e.RGBA, 1, 1, i, 0, e.RGBA, e.UNSIGNED_BYTE, a) : e.texImage2D(n + o, 0, e.RGBA, 1, 1, 0, e.RGBA, e.UNSIGNED_BYTE, a);
|
|
3502
3502
|
return o;
|
|
3503
3503
|
}
|
|
3504
|
-
let
|
|
3505
|
-
|
|
3504
|
+
let I = {};
|
|
3505
|
+
I[e.TEXTURE_2D] = F(e.TEXTURE_2D, e.TEXTURE_2D, 1), I[e.TEXTURE_CUBE_MAP] = F(e.TEXTURE_CUBE_MAP, e.TEXTURE_CUBE_MAP_POSITIVE_X, 6), I[e.TEXTURE_2D_ARRAY] = F(e.TEXTURE_2D_ARRAY, e.TEXTURE_2D_ARRAY, 1, 1), I[e.TEXTURE_3D] = F(e.TEXTURE_3D, e.TEXTURE_3D, 1, 1), a.setClear(0, 0, 0, 1), o.setClear(1), s.setClear(0), ce(e.DEPTH_TEST), o.setFunc(3), he(!1), ge(1), ce(e.CULL_FACE), me(0);
|
|
3506
3506
|
function ce(t) {
|
|
3507
3507
|
u[t] !== !0 && (e.enable(t), u[t] = !0);
|
|
3508
3508
|
}
|
|
@@ -3607,27 +3607,27 @@ function Ti(e, t) {
|
|
|
3607
3607
|
t === 0 ? L(e.CULL_FACE) : (ce(e.CULL_FACE), t !== O && (t === 1 ? e.cullFace(e.BACK) : t === 2 ? e.cullFace(e.FRONT) : e.cullFace(e.FRONT_AND_BACK))), O = t;
|
|
3608
3608
|
}
|
|
3609
3609
|
function z(t) {
|
|
3610
|
-
t !==
|
|
3610
|
+
t !== ee && (te && e.lineWidth(t), ee = t);
|
|
3611
3611
|
}
|
|
3612
3612
|
function _e(t, n, r) {
|
|
3613
|
-
t ? (ce(e.POLYGON_OFFSET_FILL), (
|
|
3613
|
+
t ? (ce(e.POLYGON_OFFSET_FILL), (k !== n || A !== r) && (k = n, A = r, o.getReversed() && (n = -n), e.polygonOffset(n, r))) : L(e.POLYGON_OFFSET_FILL);
|
|
3614
3614
|
}
|
|
3615
3615
|
function ve(t) {
|
|
3616
3616
|
t ? ce(e.SCISSOR_TEST) : L(e.SCISSOR_TEST);
|
|
3617
3617
|
}
|
|
3618
3618
|
function ye(t) {
|
|
3619
|
-
t === void 0 && (t = e.TEXTURE0 +
|
|
3619
|
+
t === void 0 && (t = e.TEXTURE0 + j - 1), re !== t && (e.activeTexture(t), re = t);
|
|
3620
3620
|
}
|
|
3621
3621
|
function be(t, n, r) {
|
|
3622
|
-
r === void 0 && (r =
|
|
3623
|
-
let i =
|
|
3622
|
+
r === void 0 && (r = re === null ? e.TEXTURE0 + j - 1 : re);
|
|
3623
|
+
let i = ie[r];
|
|
3624
3624
|
i === void 0 && (i = {
|
|
3625
3625
|
type: void 0,
|
|
3626
3626
|
texture: void 0
|
|
3627
|
-
},
|
|
3627
|
+
}, ie[r] = i), (i.type !== t || i.texture !== n) && (re !== r && (e.activeTexture(r), re = r), e.bindTexture(t, n || I[t]), i.type = t, i.texture = n);
|
|
3628
3628
|
}
|
|
3629
3629
|
function xe() {
|
|
3630
|
-
let t = re
|
|
3630
|
+
let t = ie[re];
|
|
3631
3631
|
t !== void 0 && t.type !== void 0 && (e.bindTexture(t.type, null), t.type = void 0, t.texture = void 0);
|
|
3632
3632
|
}
|
|
3633
3633
|
function Se() {
|
|
@@ -3707,10 +3707,10 @@ function Ti(e, t) {
|
|
|
3707
3707
|
d[t] !== n && (e.pixelStorei(t, n), d[t] = n);
|
|
3708
3708
|
}
|
|
3709
3709
|
function V(t) {
|
|
3710
|
-
|
|
3710
|
+
se.equals(t) === !1 && (e.scissor(t.x, t.y, t.z, t.w), se.copy(t));
|
|
3711
3711
|
}
|
|
3712
3712
|
function Pe(t) {
|
|
3713
|
-
|
|
3713
|
+
P.equals(t) === !1 && (e.viewport(t.x, t.y, t.z, t.w), P.copy(t));
|
|
3714
3714
|
}
|
|
3715
3715
|
function Fe(t, n) {
|
|
3716
3716
|
let r = l.get(n);
|
|
@@ -3723,7 +3723,7 @@ function Ti(e, t) {
|
|
|
3723
3723
|
c.get(n) !== r && (e.uniformBlockBinding(n, r, t.__bindingPointIndex), c.set(n, r));
|
|
3724
3724
|
}
|
|
3725
3725
|
function Le() {
|
|
3726
|
-
e.disable(e.BLEND), e.disable(e.CULL_FACE), e.disable(e.DEPTH_TEST), e.disable(e.POLYGON_OFFSET_FILL), e.disable(e.SCISSOR_TEST), e.disable(e.STENCIL_TEST), e.disable(e.SAMPLE_ALPHA_TO_COVERAGE), e.blendEquation(e.FUNC_ADD), e.blendFunc(e.ONE, e.ZERO), e.blendFuncSeparate(e.ONE, e.ZERO, e.ONE, e.ZERO), e.blendColor(0, 0, 0, 0), e.colorMask(!0, !0, !0, !0), e.clearColor(0, 0, 0, 0), e.depthMask(!0), e.depthFunc(e.LESS), o.setReversed(!1), e.clearDepth(1), e.stencilMask(4294967295), e.stencilFunc(e.ALWAYS, 0, 4294967295), e.stencilOp(e.KEEP, e.KEEP, e.KEEP), e.clearStencil(0), e.cullFace(e.BACK), e.frontFace(e.CCW), e.polygonOffset(0, 0), e.activeTexture(e.TEXTURE0), e.bindFramebuffer(e.FRAMEBUFFER, null), e.bindFramebuffer(e.DRAW_FRAMEBUFFER, null), e.bindFramebuffer(e.READ_FRAMEBUFFER, null), e.useProgram(null), e.lineWidth(1), e.scissor(0, 0, e.canvas.width, e.canvas.height), e.viewport(0, 0, e.canvas.width, e.canvas.height), e.pixelStorei(e.PACK_ALIGNMENT, 4), e.pixelStorei(e.UNPACK_ALIGNMENT, 4), e.pixelStorei(e.UNPACK_FLIP_Y_WEBGL, !1), e.pixelStorei(e.UNPACK_PREMULTIPLY_ALPHA_WEBGL, !1), e.pixelStorei(e.UNPACK_COLORSPACE_CONVERSION_WEBGL, e.BROWSER_DEFAULT_WEBGL), e.pixelStorei(e.PACK_ROW_LENGTH, 0), e.pixelStorei(e.PACK_SKIP_PIXELS, 0), e.pixelStorei(e.PACK_SKIP_ROWS, 0), e.pixelStorei(e.UNPACK_ROW_LENGTH, 0), e.pixelStorei(e.UNPACK_IMAGE_HEIGHT, 0), e.pixelStorei(e.UNPACK_SKIP_PIXELS, 0), e.pixelStorei(e.UNPACK_SKIP_ROWS, 0), e.pixelStorei(e.UNPACK_SKIP_IMAGES, 0), u = {}, d = {},
|
|
3726
|
+
e.disable(e.BLEND), e.disable(e.CULL_FACE), e.disable(e.DEPTH_TEST), e.disable(e.POLYGON_OFFSET_FILL), e.disable(e.SCISSOR_TEST), e.disable(e.STENCIL_TEST), e.disable(e.SAMPLE_ALPHA_TO_COVERAGE), e.blendEquation(e.FUNC_ADD), e.blendFunc(e.ONE, e.ZERO), e.blendFuncSeparate(e.ONE, e.ZERO, e.ONE, e.ZERO), e.blendColor(0, 0, 0, 0), e.colorMask(!0, !0, !0, !0), e.clearColor(0, 0, 0, 0), e.depthMask(!0), e.depthFunc(e.LESS), o.setReversed(!1), e.clearDepth(1), e.stencilMask(4294967295), e.stencilFunc(e.ALWAYS, 0, 4294967295), e.stencilOp(e.KEEP, e.KEEP, e.KEEP), e.clearStencil(0), e.cullFace(e.BACK), e.frontFace(e.CCW), e.polygonOffset(0, 0), e.activeTexture(e.TEXTURE0), e.bindFramebuffer(e.FRAMEBUFFER, null), e.bindFramebuffer(e.DRAW_FRAMEBUFFER, null), e.bindFramebuffer(e.READ_FRAMEBUFFER, null), e.useProgram(null), e.lineWidth(1), e.scissor(0, 0, e.canvas.width, e.canvas.height), e.viewport(0, 0, e.canvas.width, e.canvas.height), e.pixelStorei(e.PACK_ALIGNMENT, 4), e.pixelStorei(e.UNPACK_ALIGNMENT, 4), e.pixelStorei(e.UNPACK_FLIP_Y_WEBGL, !1), e.pixelStorei(e.UNPACK_PREMULTIPLY_ALPHA_WEBGL, !1), e.pixelStorei(e.UNPACK_COLORSPACE_CONVERSION_WEBGL, e.BROWSER_DEFAULT_WEBGL), e.pixelStorei(e.PACK_ROW_LENGTH, 0), e.pixelStorei(e.PACK_SKIP_PIXELS, 0), e.pixelStorei(e.PACK_SKIP_ROWS, 0), e.pixelStorei(e.UNPACK_ROW_LENGTH, 0), e.pixelStorei(e.UNPACK_IMAGE_HEIGHT, 0), e.pixelStorei(e.UNPACK_SKIP_PIXELS, 0), e.pixelStorei(e.UNPACK_SKIP_ROWS, 0), e.pixelStorei(e.UNPACK_SKIP_IMAGES, 0), u = {}, d = {}, re = null, ie = {}, f = {}, p = /* @__PURE__ */ new WeakMap(), m = [], h = null, g = !1, _ = null, v = null, y = null, b = null, x = null, S = null, C = null, w = new B(0, 0, 0), T = 0, E = !1, D = null, O = null, ee = null, k = null, A = null, se.set(0, 0, e.canvas.width, e.canvas.height), P.set(0, 0, e.canvas.width, e.canvas.height), a.reset(), o.reset(), s.reset();
|
|
3727
3727
|
}
|
|
3728
3728
|
return {
|
|
3729
3729
|
buffers: {
|
|
@@ -3766,7 +3766,7 @@ function Ti(e, t) {
|
|
|
3766
3766
|
};
|
|
3767
3767
|
}
|
|
3768
3768
|
function Ei(e, t, n, r, i, a, o) {
|
|
3769
|
-
let s = t.has("WEBGL_multisampled_render_to_texture") ? t.get("WEBGL_multisampled_render_to_texture") : null, c = typeof navigator > "u" ? !1 : /OculusBrowser/g.test(navigator.userAgent), u = new
|
|
3769
|
+
let s = t.has("WEBGL_multisampled_render_to_texture") ? t.get("WEBGL_multisampled_render_to_texture") : null, c = typeof navigator > "u" ? !1 : /OculusBrowser/g.test(navigator.userAgent), u = new F(), p = /* @__PURE__ */ new WeakMap(), m = /* @__PURE__ */ new Set(), h, g = /* @__PURE__ */ new WeakMap(), v = !1;
|
|
3770
3770
|
try {
|
|
3771
3771
|
v = typeof OffscreenCanvas < "u" && new OffscreenCanvas(1, 1).getContext("2d") !== null;
|
|
3772
3772
|
} catch {}
|
|
@@ -3780,9 +3780,9 @@ function Ei(e, t, n, r, i, a, o) {
|
|
|
3780
3780
|
let n = Math.floor(r * i.width), a = Math.floor(r * i.height);
|
|
3781
3781
|
h === void 0 && (h = y(n, a));
|
|
3782
3782
|
let o = t ? y(n, a) : h;
|
|
3783
|
-
return o.width = n, o.height = a, o.getContext("2d").drawImage(e, 0, 0, n, a),
|
|
3783
|
+
return o.width = n, o.height = a, o.getContext("2d").drawImage(e, 0, 0, n, a), A("WebGLRenderer: Texture has been resized from (" + i.width + "x" + i.height + ") to (" + n + "x" + a + ")."), o;
|
|
3784
3784
|
}
|
|
3785
|
-
return "data" in e &&
|
|
3785
|
+
return "data" in e && A("WebGLRenderer: Image in DataTexture is too big (" + i.width + "x" + i.height + ")."), e;
|
|
3786
3786
|
}
|
|
3787
3787
|
return e;
|
|
3788
3788
|
}
|
|
@@ -3798,10 +3798,10 @@ function Ei(e, t, n, r, i, a, o) {
|
|
|
3798
3798
|
function T(n, r, i, a, o, s = !1) {
|
|
3799
3799
|
if (n !== null) {
|
|
3800
3800
|
if (e[n] !== void 0) return e[n];
|
|
3801
|
-
|
|
3801
|
+
A("WebGLRenderer: Attempt to use non-existing WebGL internal format '" + n + "'");
|
|
3802
3802
|
}
|
|
3803
3803
|
let c;
|
|
3804
|
-
a && (c = t.get("EXT_texture_norm16"), c ||
|
|
3804
|
+
a && (c = t.get("EXT_texture_norm16"), c || A("WebGLRenderer: Unable to use normalized textures without EXT_texture_norm16 extension"));
|
|
3805
3805
|
let l = r;
|
|
3806
3806
|
if (r === e.RED && (i === e.FLOAT && (l = e.R32F), i === e.HALF_FLOAT && (l = e.R16F), i === e.UNSIGNED_BYTE && (l = e.R8), i === e.UNSIGNED_SHORT && c && (l = c.R16_EXT), i === e.SHORT && c && (l = c.R16_SNORM_EXT)), r === e.RED_INTEGER && (i === e.UNSIGNED_BYTE && (l = e.R8UI), i === e.UNSIGNED_SHORT && (l = e.R16UI), i === e.UNSIGNED_INT && (l = e.R32UI), i === e.BYTE && (l = e.R8I), i === e.SHORT && (l = e.R16I), i === e.INT && (l = e.R32I)), r === e.RG && (i === e.FLOAT && (l = e.RG32F), i === e.HALF_FLOAT && (l = e.RG16F), i === e.UNSIGNED_BYTE && (l = e.RG8), i === e.UNSIGNED_SHORT && c && (l = c.RG16_EXT), i === e.SHORT && c && (l = c.RG16_SNORM_EXT)), r === e.RG_INTEGER && (i === e.UNSIGNED_BYTE && (l = e.RG8UI), i === e.UNSIGNED_SHORT && (l = e.RG16UI), i === e.UNSIGNED_INT && (l = e.RG32UI), i === e.BYTE && (l = e.RG8I), i === e.SHORT && (l = e.RG16I), i === e.INT && (l = e.RG32I)), r === e.RGB_INTEGER && (i === e.UNSIGNED_BYTE && (l = e.RGB8UI), i === e.UNSIGNED_SHORT && (l = e.RGB16UI), i === e.UNSIGNED_INT && (l = e.RGB32UI), i === e.BYTE && (l = e.RGB8I), i === e.SHORT && (l = e.RGB16I), i === e.INT && (l = e.RGB32I)), r === e.RGBA_INTEGER && (i === e.UNSIGNED_BYTE && (l = e.RGBA8UI), i === e.UNSIGNED_SHORT && (l = e.RGBA16UI), i === e.UNSIGNED_INT && (l = e.RGBA32UI), i === e.BYTE && (l = e.RGBA8I), i === e.SHORT && (l = e.RGBA16I), i === e.INT && (l = e.RGBA32I)), r === e.RGB && (i === e.UNSIGNED_SHORT && c && (l = c.RGB16_EXT), i === e.SHORT && c && (l = c.RGB16_SNORM_EXT), i === e.UNSIGNED_INT_5_9_9_9_REV && (l = e.RGB9_E5), i === e.UNSIGNED_INT_10F_11F_11F_REV && (l = e.R11F_G11F_B10F)), r === e.RGBA) {
|
|
3807
3807
|
let t = s ? fe : z.getTransfer(o);
|
|
@@ -3811,36 +3811,36 @@ function Ei(e, t, n, r, i, a, o) {
|
|
|
3811
3811
|
}
|
|
3812
3812
|
function E(t, n) {
|
|
3813
3813
|
let r;
|
|
3814
|
-
return t ? n === null || n === 1014 || n === 1020 ? r = e.DEPTH24_STENCIL8 : n === 1015 ? r = e.DEPTH32F_STENCIL8 : n === 1012 && (r = e.DEPTH24_STENCIL8,
|
|
3814
|
+
return t ? n === null || n === 1014 || n === 1020 ? r = e.DEPTH24_STENCIL8 : n === 1015 ? r = e.DEPTH32F_STENCIL8 : n === 1012 && (r = e.DEPTH24_STENCIL8, A("DepthTexture: 16 bit depth attachment is not supported with stencil. Using 24-bit attachment.")) : n === null || n === 1014 || n === 1020 ? r = e.DEPTH_COMPONENT24 : n === 1015 ? r = e.DEPTH_COMPONENT32F : n === 1012 && (r = e.DEPTH_COMPONENT16), r;
|
|
3815
3815
|
}
|
|
3816
3816
|
function D(e, t) {
|
|
3817
3817
|
return x(e) === !0 || e.isFramebufferTexture && e.minFilter !== 1003 && e.minFilter !== 1006 ? Math.log2(Math.max(t.width, t.height)) + 1 : e.mipmaps !== void 0 && e.mipmaps.length > 0 ? e.mipmaps.length : e.isCompressedTexture && Array.isArray(e.image) ? t.mipmaps.length : 1;
|
|
3818
3818
|
}
|
|
3819
3819
|
function O(e) {
|
|
3820
3820
|
let t = e.target;
|
|
3821
|
-
t.removeEventListener("dispose", O),
|
|
3821
|
+
t.removeEventListener("dispose", O), k(t), t.isVideoTexture && p.delete(t), t.isHTMLTexture && m.delete(t);
|
|
3822
3822
|
}
|
|
3823
|
-
function
|
|
3823
|
+
function ee(e) {
|
|
3824
3824
|
let t = e.target;
|
|
3825
|
-
t.removeEventListener("dispose",
|
|
3825
|
+
t.removeEventListener("dispose", ee), ne(t);
|
|
3826
3826
|
}
|
|
3827
|
-
function
|
|
3827
|
+
function k(e) {
|
|
3828
3828
|
let t = r.get(e);
|
|
3829
3829
|
if (t.__webglInit === void 0) return;
|
|
3830
3830
|
let n = e.source, i = g.get(n);
|
|
3831
3831
|
if (i) {
|
|
3832
3832
|
let r = i[t.__cacheKey];
|
|
3833
|
-
r.usedTimes--, r.usedTimes === 0 &&
|
|
3833
|
+
r.usedTimes--, r.usedTimes === 0 && j(e), Object.keys(i).length === 0 && g.delete(n);
|
|
3834
3834
|
}
|
|
3835
3835
|
r.remove(e);
|
|
3836
3836
|
}
|
|
3837
|
-
function
|
|
3837
|
+
function j(t) {
|
|
3838
3838
|
let n = r.get(t);
|
|
3839
3839
|
e.deleteTexture(n.__webglTexture);
|
|
3840
3840
|
let i = t.source, a = g.get(i);
|
|
3841
3841
|
delete a[n.__cacheKey], o.memory.textures--;
|
|
3842
3842
|
}
|
|
3843
|
-
function
|
|
3843
|
+
function ne(t) {
|
|
3844
3844
|
let n = r.get(t);
|
|
3845
3845
|
if (t.depthTexture && (t.depthTexture.dispose(), r.remove(t.depthTexture)), t.isWebGLCubeRenderTarget) for (let t = 0; t < 6; t++) {
|
|
3846
3846
|
if (Array.isArray(n.__webglFramebuffer[t])) for (let r = 0; r < n.__webglFramebuffer[t].length; r++) e.deleteFramebuffer(n.__webglFramebuffer[t][r]);
|
|
@@ -3860,30 +3860,30 @@ function Ei(e, t, n, r, i, a, o) {
|
|
|
3860
3860
|
}
|
|
3861
3861
|
r.remove(t);
|
|
3862
3862
|
}
|
|
3863
|
-
let
|
|
3864
|
-
function ne() {
|
|
3865
|
-
N = 0;
|
|
3866
|
-
}
|
|
3863
|
+
let M = 0;
|
|
3867
3864
|
function re() {
|
|
3868
|
-
|
|
3869
|
-
}
|
|
3870
|
-
function P(e) {
|
|
3871
|
-
N = e;
|
|
3865
|
+
M = 0;
|
|
3872
3866
|
}
|
|
3873
3867
|
function ie() {
|
|
3874
|
-
|
|
3875
|
-
|
|
3868
|
+
return M;
|
|
3869
|
+
}
|
|
3870
|
+
function N(e) {
|
|
3871
|
+
M = e;
|
|
3872
|
+
}
|
|
3873
|
+
function ae() {
|
|
3874
|
+
let e = M;
|
|
3875
|
+
return e >= i.maxTextures && A("WebGLTextures: Trying to use " + (e + 1) + " texture units while this GPU supports only " + i.maxTextures), M += 1, e;
|
|
3876
3876
|
}
|
|
3877
|
-
function
|
|
3877
|
+
function oe(e) {
|
|
3878
3878
|
let t = [];
|
|
3879
3879
|
return t.push(e.wrapS), t.push(e.wrapT), t.push(e.wrapR || 0), t.push(e.magFilter), t.push(e.minFilter), t.push(e.anisotropy), t.push(e.internalFormat), t.push(e.format), t.push(e.type), t.push(e.generateMipmaps), t.push(e.premultiplyAlpha), t.push(e.flipY), t.push(e.unpackAlignment), t.push(e.colorSpace), t.join();
|
|
3880
3880
|
}
|
|
3881
|
-
function
|
|
3881
|
+
function se(t, i) {
|
|
3882
3882
|
let a = r.get(t);
|
|
3883
3883
|
if (t.isVideoTexture && Me(t), t.isRenderTargetTexture === !1 && t.isExternalTexture !== !0 && t.version > 0 && a.__version !== t.version) {
|
|
3884
3884
|
let e = t.image;
|
|
3885
|
-
if (e === null)
|
|
3886
|
-
else if (e.complete === !1)
|
|
3885
|
+
if (e === null) A("WebGLRenderer: Texture marked for update but no image data found.");
|
|
3886
|
+
else if (e.complete === !1) A("WebGLRenderer: Texture marked for update but image is incomplete");
|
|
3887
3887
|
else {
|
|
3888
3888
|
_e(a, t, i);
|
|
3889
3889
|
return;
|
|
@@ -3891,7 +3891,7 @@ function Ei(e, t, n, r, i, a, o) {
|
|
|
3891
3891
|
} else t.isExternalTexture && (a.__webglTexture = t.sourceTexture ? t.sourceTexture : null);
|
|
3892
3892
|
n.bindTexture(e.TEXTURE_2D, a.__webglTexture, e.TEXTURE0 + i);
|
|
3893
3893
|
}
|
|
3894
|
-
function
|
|
3894
|
+
function P(t, i) {
|
|
3895
3895
|
let a = r.get(t);
|
|
3896
3896
|
if (t.isRenderTargetTexture === !1 && t.version > 0 && a.__version !== t.version) {
|
|
3897
3897
|
_e(a, t, i);
|
|
@@ -3899,7 +3899,7 @@ function Ei(e, t, n, r, i, a, o) {
|
|
|
3899
3899
|
}
|
|
3900
3900
|
t.isExternalTexture && (a.__webglTexture = t.sourceTexture ? t.sourceTexture : null), n.bindTexture(e.TEXTURE_2D_ARRAY, a.__webglTexture, e.TEXTURE0 + i);
|
|
3901
3901
|
}
|
|
3902
|
-
function
|
|
3902
|
+
function I(t, i) {
|
|
3903
3903
|
let a = r.get(t);
|
|
3904
3904
|
if (t.isRenderTargetTexture === !1 && t.version > 0 && a.__version !== t.version) {
|
|
3905
3905
|
_e(a, t, i);
|
|
@@ -3937,7 +3937,7 @@ function Ei(e, t, n, r, i, a, o) {
|
|
|
3937
3937
|
517: e.NOTEQUAL
|
|
3938
3938
|
};
|
|
3939
3939
|
function pe(n, a) {
|
|
3940
|
-
if (a.type === 1015 && t.has("OES_texture_float_linear") === !1 && (a.magFilter === 1006 || a.magFilter === 1007 || a.magFilter === 1005 || a.magFilter === 1008 || a.minFilter === 1006 || a.minFilter === 1007 || a.minFilter === 1005 || a.minFilter === 1008) &&
|
|
3940
|
+
if (a.type === 1015 && t.has("OES_texture_float_linear") === !1 && (a.magFilter === 1006 || a.magFilter === 1007 || a.magFilter === 1005 || a.magFilter === 1008 || a.minFilter === 1006 || a.minFilter === 1007 || a.minFilter === 1005 || a.minFilter === 1008) && A("WebGLRenderer: Unable to use linear filtering with floating point textures. OES_texture_float_linear not supported on this device."), e.texParameteri(n, e.TEXTURE_WRAP_S, L[a.wrapS]), e.texParameteri(n, e.TEXTURE_WRAP_T, L[a.wrapT]), (n === e.TEXTURE_3D || n === e.TEXTURE_2D_ARRAY) && e.texParameteri(n, e.TEXTURE_WRAP_R, L[a.wrapR]), e.texParameteri(n, e.TEXTURE_MAG_FILTER, le[a.magFilter]), e.texParameteri(n, e.TEXTURE_MIN_FILTER, le[a.minFilter]), a.compareFunction && (e.texParameteri(n, e.TEXTURE_COMPARE_MODE, e.COMPARE_REF_TO_TEXTURE), e.texParameteri(n, e.TEXTURE_COMPARE_FUNC, de[a.compareFunction])), t.has("EXT_texture_filter_anisotropic") === !0) {
|
|
3941
3941
|
if (a.magFilter === 1003 || a.minFilter !== 1005 && a.minFilter !== 1008 || a.type === 1015 && t.has("OES_texture_float_linear") === !1) return;
|
|
3942
3942
|
if (a.anisotropy > 1 || r.get(a).__currentAnisotropy) {
|
|
3943
3943
|
let o = t.get("EXT_texture_filter_anisotropic");
|
|
@@ -3950,14 +3950,14 @@ function Ei(e, t, n, r, i, a, o) {
|
|
|
3950
3950
|
t.__webglInit === void 0 && (t.__webglInit = !0, n.addEventListener("dispose", O));
|
|
3951
3951
|
let i = n.source, a = g.get(i);
|
|
3952
3952
|
a === void 0 && (a = {}, g.set(i, a));
|
|
3953
|
-
let s =
|
|
3953
|
+
let s = oe(n);
|
|
3954
3954
|
if (s !== t.__cacheKey) {
|
|
3955
3955
|
a[s] === void 0 && (a[s] = {
|
|
3956
3956
|
texture: e.createTexture(),
|
|
3957
3957
|
usedTimes: 0
|
|
3958
3958
|
}, o.memory.textures++, r = !0), a[s].usedTimes++;
|
|
3959
3959
|
let i = a[t.__cacheKey];
|
|
3960
|
-
i !== void 0 && (a[t.__cacheKey].usedTimes--, i.usedTimes === 0 &&
|
|
3960
|
+
i !== void 0 && (a[t.__cacheKey].usedTimes--, i.usedTimes === 0 && j(n)), t.__cacheKey = s, t.__webglTexture = a[s].texture;
|
|
3961
3961
|
}
|
|
3962
3962
|
return r;
|
|
3963
3963
|
}
|
|
@@ -4016,7 +4016,7 @@ function Ei(e, t, n, r, i, a, o) {
|
|
|
4016
4016
|
if (v) {
|
|
4017
4017
|
if (C) {
|
|
4018
4018
|
if (o.layerUpdates.size > 0) {
|
|
4019
|
-
let t =
|
|
4019
|
+
let t = te(h.width, h.height, o.format, o.type);
|
|
4020
4020
|
for (let a of o.layerUpdates) {
|
|
4021
4021
|
let o = h.data.subarray(a * t / h.data.BYTES_PER_ELEMENT, (a + 1) * t / h.data.BYTES_PER_ELEMENT);
|
|
4022
4022
|
n.compressedTexSubImage3D(e.TEXTURE_2D_ARRAY, i, 0, 0, a, h.width, h.height, 1, r, o);
|
|
@@ -4024,18 +4024,18 @@ function Ei(e, t, n, r, i, a, o) {
|
|
|
4024
4024
|
} else n.compressedTexSubImage3D(e.TEXTURE_2D_ARRAY, i, 0, 0, 0, h.width, h.height, t.depth, r, h.data);
|
|
4025
4025
|
}
|
|
4026
4026
|
} else n.compressedTexImage3D(e.TEXTURE_2D_ARRAY, i, p, h.width, h.height, t.depth, 0, h.data, 0, 0);
|
|
4027
|
-
} else
|
|
4027
|
+
} else A("WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()");
|
|
4028
4028
|
} else v ? C && n.texSubImage3D(e.TEXTURE_2D_ARRAY, i, 0, 0, 0, h.width, h.height, t.depth, r, f, h.data) : n.texImage3D(e.TEXTURE_2D_ARRAY, i, p, h.width, h.height, t.depth, 0, r, f, h.data);
|
|
4029
4029
|
o.layerUpdates.size > 0 && o.clearLayerUpdates();
|
|
4030
4030
|
} else {
|
|
4031
4031
|
v && y && n.texStorage2D(e.TEXTURE_2D, w, p, g[0].width, g[0].height);
|
|
4032
|
-
for (let t = 0, i = g.length; t < i; t++) h = g[t], o.format === 1023 ? v ? C && n.texSubImage2D(e.TEXTURE_2D, t, 0, 0, h.width, h.height, r, f, h.data) : n.texImage2D(e.TEXTURE_2D, t, p, h.width, h.height, 0, r, f, h.data) : r === null ?
|
|
4032
|
+
for (let t = 0, i = g.length; t < i; t++) h = g[t], o.format === 1023 ? v ? C && n.texSubImage2D(e.TEXTURE_2D, t, 0, 0, h.width, h.height, r, f, h.data) : n.texImage2D(e.TEXTURE_2D, t, p, h.width, h.height, 0, r, f, h.data) : r === null ? A("WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()") : v ? C && n.compressedTexSubImage2D(e.TEXTURE_2D, t, 0, 0, h.width, h.height, r, h.data) : n.compressedTexImage2D(e.TEXTURE_2D, t, p, h.width, h.height, 0, h.data);
|
|
4033
4033
|
}
|
|
4034
4034
|
} else if (o.isDataArrayTexture) {
|
|
4035
4035
|
if (v) {
|
|
4036
4036
|
if (y && n.texStorage3D(e.TEXTURE_2D_ARRAY, w, p, t.width, t.height, t.depth), C) {
|
|
4037
4037
|
if (o.layerUpdates.size > 0) {
|
|
4038
|
-
let i =
|
|
4038
|
+
let i = te(t.width, t.height, o.format, o.type);
|
|
4039
4039
|
for (let a of o.layerUpdates) {
|
|
4040
4040
|
let o = t.data.subarray(a * i / t.data.BYTES_PER_ELEMENT, (a + 1) * i / t.data.BYTES_PER_ELEMENT);
|
|
4041
4041
|
n.texSubImage3D(e.TEXTURE_2D_ARRAY, 0, 0, 0, a, t.width, t.height, 1, r, f, o);
|
|
@@ -4108,7 +4108,7 @@ function Ei(e, t, n, r, i, a, o) {
|
|
|
4108
4108
|
O = m[t].mipmaps;
|
|
4109
4109
|
for (let r = 0; r < O.length; r++) {
|
|
4110
4110
|
let i = O[r];
|
|
4111
|
-
o.format === 1023 ? y ? w && n.texSubImage2D(e.TEXTURE_CUBE_MAP_POSITIVE_X + t, r, 0, 0, i.width, i.height, g, _, i.data) : n.texImage2D(e.TEXTURE_CUBE_MAP_POSITIVE_X + t, r, v, i.width, i.height, 0, g, _, i.data) : g === null ?
|
|
4111
|
+
o.format === 1023 ? y ? w && n.texSubImage2D(e.TEXTURE_CUBE_MAP_POSITIVE_X + t, r, 0, 0, i.width, i.height, g, _, i.data) : n.texImage2D(e.TEXTURE_CUBE_MAP_POSITIVE_X + t, r, v, i.width, i.height, 0, g, _, i.data) : g === null ? A("WebGLRenderer: Attempt to load unsupported compressed texture format in .setTextureCube()") : y ? w && n.compressedTexSubImage2D(e.TEXTURE_CUBE_MAP_POSITIVE_X + t, r, 0, 0, i.width, i.height, g, i.data) : n.compressedTexImage2D(e.TEXTURE_CUBE_MAP_POSITIVE_X + t, r, v, i.width, i.height, 0, i.data);
|
|
4112
4112
|
}
|
|
4113
4113
|
}
|
|
4114
4114
|
} else {
|
|
@@ -4167,7 +4167,7 @@ function Ei(e, t, n, r, i, a, o) {
|
|
|
4167
4167
|
i.depthTexture.format === 1026 ? o = e.DEPTH_COMPONENT24 : i.depthTexture.format === 1027 && (o = e.DEPTH24_STENCIL8);
|
|
4168
4168
|
for (let n = 0; n < 6; n++) e.texImage2D(e.TEXTURE_CUBE_MAP_POSITIVE_X + n, 0, o, i.width, i.height, 0, t, r, null);
|
|
4169
4169
|
}
|
|
4170
|
-
} else
|
|
4170
|
+
} else se(i.depthTexture, 0);
|
|
4171
4171
|
let u = l.__webglTexture, d = ke(i), f = c ? e.TEXTURE_CUBE_MAP_POSITIVE_X + o : e.TEXTURE_2D, p = i.depthTexture.format === 1027 ? e.DEPTH_STENCIL_ATTACHMENT : e.DEPTH_ATTACHMENT;
|
|
4172
4172
|
if (i.depthTexture.format === 1026) je(i) ? s.framebufferTexture2DMultisampleEXT(e.FRAMEBUFFER, p, f, u, 0, d) : e.framebufferTexture2D(e.FRAMEBUFFER, p, f, u, 0);
|
|
4173
4173
|
else if (i.depthTexture.format === 1027) je(i) ? s.framebufferTexture2DMultisampleEXT(e.FRAMEBUFFER, p, f, u, 0, d) : e.framebufferTexture2D(e.FRAMEBUFFER, p, f, u, 0);
|
|
@@ -4214,7 +4214,7 @@ function Ei(e, t, n, r, i, a, o) {
|
|
|
4214
4214
|
}
|
|
4215
4215
|
function we(t) {
|
|
4216
4216
|
let i = t.texture, s = r.get(t), c = r.get(i);
|
|
4217
|
-
t.addEventListener("dispose",
|
|
4217
|
+
t.addEventListener("dispose", ee);
|
|
4218
4218
|
let l = t.textures, u = t.isWebGLCubeRenderTarget === !0, d = l.length > 1;
|
|
4219
4219
|
if (d || (c.__webglTexture === void 0 && (c.__webglTexture = e.createTexture()), c.__version = i.version, o.memory.textures++), u) {
|
|
4220
4220
|
s.__webglFramebuffer = [];
|
|
@@ -4313,12 +4313,12 @@ function Ei(e, t, n, r, i, a, o) {
|
|
|
4313
4313
|
}
|
|
4314
4314
|
function Ne(e, t) {
|
|
4315
4315
|
let n = e.colorSpace, r = e.format, i = e.type;
|
|
4316
|
-
return e.isCompressedTexture === !0 || e.isVideoTexture === !0 || n !== "srgb-linear" && n !== "" && (z.getTransfer(n) === "srgb" ? (r !== 1023 || i !== 1009) &&
|
|
4316
|
+
return e.isCompressedTexture === !0 || e.isVideoTexture === !0 || n !== "srgb-linear" && n !== "" && (z.getTransfer(n) === "srgb" ? (r !== 1023 || i !== 1009) && A("WebGLTextures: sRGB encoded textures have to use RGBAFormat and UnsignedByteType.") : H("WebGLTextures: Unsupported texture color space:", n)), t;
|
|
4317
4317
|
}
|
|
4318
4318
|
function V(e) {
|
|
4319
4319
|
return typeof HTMLImageElement < "u" && e instanceof HTMLImageElement ? (u.width = e.naturalWidth || e.width, u.height = e.naturalHeight || e.height) : typeof VideoFrame < "u" && e instanceof VideoFrame ? (u.width = e.displayWidth, u.height = e.displayHeight) : (u.width = e.width, u.height = e.height), u;
|
|
4320
4320
|
}
|
|
4321
|
-
this.allocateTextureUnit =
|
|
4321
|
+
this.allocateTextureUnit = ae, this.resetTextureUnits = re, this.getTextureUnits = ie, this.setTextureUnits = N, this.setTexture2D = se, this.setTexture2DArray = P, this.setTexture3D = I, this.setTextureCube = ce, this.rebindTextures = Ce, this.setupRenderTarget = we, this.updateRenderTargetMipmap = Te, this.updateMultisampleRenderTarget = B, this.setupDepthRenderbuffer = Se, this.setupFrameBufferTexture = ye, this.useMultisampledRTT = je, this.isReversedDepthBuffer = function() {
|
|
4322
4322
|
return n.buffers.depth.getReversed();
|
|
4323
4323
|
};
|
|
4324
4324
|
}
|
|
@@ -4451,11 +4451,11 @@ var Oi = "\nvoid main() {\n\n gl_Position = vec4( position, 1.0 );\n\n}", ki = "
|
|
|
4451
4451
|
}, ji = class extends Fe {
|
|
4452
4452
|
constructor(e, t) {
|
|
4453
4453
|
super();
|
|
4454
|
-
let n = this, r = null, i = 1, a = null, o = "local-floor", s = 1, c = null, l = null, d = null, f = null, p = null, y = null, b = typeof XRWebGLBinding < "u", x = new Ai(), S = {}, C = t.getContextAttributes(), w = null, T = null, E = [], D = [], O = new
|
|
4455
|
-
|
|
4456
|
-
let
|
|
4457
|
-
|
|
4458
|
-
let
|
|
4454
|
+
let n = this, r = null, i = 1, a = null, o = "local-floor", s = 1, c = null, l = null, d = null, f = null, p = null, y = null, b = typeof XRWebGLBinding < "u", x = new Ai(), S = {}, C = t.getContextAttributes(), w = null, T = null, E = [], D = [], O = new F(), ee = null, k = null, j = new V();
|
|
4455
|
+
j.viewport = new nt();
|
|
4456
|
+
let te = new V();
|
|
4457
|
+
te.viewport = new nt();
|
|
4458
|
+
let ne = [j, te], M = new Xe(), re = null, ie = null;
|
|
4459
4459
|
this.cameraAutoUpdate = !0, this.enabled = !1, this.isPresenting = !1, this.getController = function(e) {
|
|
4460
4460
|
let t = E[e];
|
|
4461
4461
|
return t === void 0 && (t = new g(), E[e] = t), t.getTargetRaySpace();
|
|
@@ -4466,7 +4466,7 @@ var Oi = "\nvoid main() {\n\n gl_Position = vec4( position, 1.0 );\n\n}", ki = "
|
|
|
4466
4466
|
let t = E[e];
|
|
4467
4467
|
return t === void 0 && (t = new g(), E[e] = t), t.getHandSpace();
|
|
4468
4468
|
};
|
|
4469
|
-
function
|
|
4469
|
+
function N(e) {
|
|
4470
4470
|
let t = D.indexOf(e.inputSource);
|
|
4471
4471
|
if (t === -1) return;
|
|
4472
4472
|
let n = E[t];
|
|
@@ -4475,24 +4475,24 @@ var Oi = "\nvoid main() {\n\n gl_Position = vec4( position, 1.0 );\n\n}", ki = "
|
|
|
4475
4475
|
data: e.inputSource
|
|
4476
4476
|
}));
|
|
4477
4477
|
}
|
|
4478
|
-
function
|
|
4479
|
-
r.removeEventListener("select",
|
|
4478
|
+
function ae() {
|
|
4479
|
+
r.removeEventListener("select", N), r.removeEventListener("selectstart", N), r.removeEventListener("selectend", N), r.removeEventListener("squeeze", N), r.removeEventListener("squeezestart", N), r.removeEventListener("squeezeend", N), r.removeEventListener("end", ae), r.removeEventListener("inputsourceschange", oe);
|
|
4480
4480
|
for (let e = 0; e < E.length; e++) {
|
|
4481
4481
|
let t = D[e];
|
|
4482
4482
|
t !== null && (D[e] = null, E[e].disconnect(t));
|
|
4483
4483
|
}
|
|
4484
|
-
|
|
4484
|
+
re = null, ie = null, x.reset();
|
|
4485
4485
|
for (let e in S) delete S[e];
|
|
4486
|
-
if (e.setRenderTarget(w), p = null, f = null, d = null, r = null, T = null, fe.stop(), n.isPresenting = !1, e.setPixelRatio(
|
|
4487
|
-
let e =
|
|
4488
|
-
e.fov =
|
|
4486
|
+
if (e.setRenderTarget(w), p = null, f = null, d = null, r = null, T = null, fe.stop(), n.isPresenting = !1, e.setPixelRatio(ee), e.setSize(O.width, O.height, !1), k !== null) {
|
|
4487
|
+
let e = k.camera;
|
|
4488
|
+
e.fov = k.fov, e.zoom = k.zoom, e.updateProjectionMatrix(), k = null;
|
|
4489
4489
|
}
|
|
4490
4490
|
n.dispatchEvent({ type: "sessionend" });
|
|
4491
4491
|
}
|
|
4492
4492
|
this.setFramebufferScaleFactor = function(e) {
|
|
4493
|
-
i = e, n.isPresenting === !0 &&
|
|
4493
|
+
i = e, n.isPresenting === !0 && A("WebXRManager: Cannot change framebuffer scale while presenting.");
|
|
4494
4494
|
}, this.setReferenceSpaceType = function(e) {
|
|
4495
|
-
o = e, n.isPresenting === !0 &&
|
|
4495
|
+
o = e, n.isPresenting === !0 && A("WebXRManager: Cannot change reference space type while presenting.");
|
|
4496
4496
|
}, this.getReferenceSpace = function() {
|
|
4497
4497
|
return c || a;
|
|
4498
4498
|
}, this.setReferenceSpace = function(e) {
|
|
@@ -4507,9 +4507,9 @@ var Oi = "\nvoid main() {\n\n gl_Position = vec4( position, 1.0 );\n\n}", ki = "
|
|
|
4507
4507
|
return r;
|
|
4508
4508
|
}, this.setSession = async function(l) {
|
|
4509
4509
|
if (r = l, r !== null) {
|
|
4510
|
-
if (w = e.getRenderTarget(), r.addEventListener("select",
|
|
4510
|
+
if (w = e.getRenderTarget(), r.addEventListener("select", N), r.addEventListener("selectstart", N), r.addEventListener("selectend", N), r.addEventListener("squeeze", N), r.addEventListener("squeezestart", N), r.addEventListener("squeezeend", N), r.addEventListener("end", ae), r.addEventListener("inputsourceschange", oe), C.xrCompatible !== !0 && await t.makeXRCompatible(), ee = e.getPixelRatio(), e.getSize(O), b && "createProjectionLayer" in XRWebGLBinding.prototype) {
|
|
4511
4511
|
let n = null, a = null, o = null;
|
|
4512
|
-
C.depth && (o = C.stencil ? t.DEPTH24_STENCIL8 : t.DEPTH_COMPONENT24, n = C.stencil ? _ :
|
|
4512
|
+
C.depth && (o = C.stencil ? t.DEPTH24_STENCIL8 : t.DEPTH_COMPONENT24, n = C.stencil ? _ : I, a = C.stencil ? ke : et);
|
|
4513
4513
|
let s = {
|
|
4514
4514
|
colorFormat: t.RGBA8,
|
|
4515
4515
|
depthFormat: o,
|
|
@@ -4553,7 +4553,7 @@ var Oi = "\nvoid main() {\n\n gl_Position = vec4( position, 1.0 );\n\n}", ki = "
|
|
|
4553
4553
|
}, this.getDepthTexture = function() {
|
|
4554
4554
|
return x.getDepthTexture();
|
|
4555
4555
|
};
|
|
4556
|
-
function
|
|
4556
|
+
function oe(e) {
|
|
4557
4557
|
for (let t = 0; t < e.removed.length; t++) {
|
|
4558
4558
|
let n = e.removed[t], r = D.indexOf(n);
|
|
4559
4559
|
r >= 0 && (D[r] = null, E[r].disconnect(n));
|
|
@@ -4574,10 +4574,10 @@ var Oi = "\nvoid main() {\n\n gl_Position = vec4( position, 1.0 );\n\n}", ki = "
|
|
|
4574
4574
|
i && i.connect(n);
|
|
4575
4575
|
}
|
|
4576
4576
|
}
|
|
4577
|
-
let
|
|
4577
|
+
let se = new m(), P = new m();
|
|
4578
4578
|
function ce(e, t, n) {
|
|
4579
|
-
|
|
4580
|
-
let r =
|
|
4579
|
+
se.setFromMatrixPosition(t.matrixWorld), P.setFromMatrixPosition(n.matrixWorld);
|
|
4580
|
+
let r = se.distanceTo(P), i = t.projectionMatrix.elements, a = n.projectionMatrix.elements, o = i[14] / (i[10] - 1), s = i[14] / (i[10] + 1), c = (i[9] + 1) / i[5], l = (i[9] - 1) / i[5], u = (i[8] - 1) / i[0], d = (a[8] + 1) / a[0], f = o * u, p = o * d, m = r / (-u + d), h = m * -u;
|
|
4581
4581
|
if (t.matrixWorld.decompose(e.position, e.quaternion, e.scale), e.translateX(h), e.translateZ(m), e.matrixWorld.compose(e.position, e.quaternion, e.scale), e.matrixWorldInverse.copy(e.matrixWorld).invert(), i[10] === -1) e.projectionMatrix.copy(t.projectionMatrix), e.projectionMatrixInverse.copy(t.projectionMatrixInverse);
|
|
4582
4582
|
else {
|
|
4583
4583
|
let t = o + m, n = s + m, i = f - h, a = p + (r - h), u = c * s / n * t, d = l * s / n * t;
|
|
@@ -4590,24 +4590,24 @@ var Oi = "\nvoid main() {\n\n gl_Position = vec4( position, 1.0 );\n\n}", ki = "
|
|
|
4590
4590
|
this.updateCamera = function(e) {
|
|
4591
4591
|
if (r === null) return;
|
|
4592
4592
|
let t = e.near, n = e.far;
|
|
4593
|
-
x.texture !== null && (x.depthNear > 0 && (t = x.depthNear), x.depthFar > 0 && (n = x.depthFar)),
|
|
4594
|
-
depthNear:
|
|
4595
|
-
depthFar:
|
|
4596
|
-
}),
|
|
4597
|
-
let i = e.parent, a =
|
|
4598
|
-
L(
|
|
4593
|
+
x.texture !== null && (x.depthNear > 0 && (t = x.depthNear), x.depthFar > 0 && (n = x.depthFar)), M.near = te.near = j.near = t, M.far = te.far = j.far = n, (re !== M.near || ie !== M.far) && (r.updateRenderState({
|
|
4594
|
+
depthNear: M.near,
|
|
4595
|
+
depthFar: M.far
|
|
4596
|
+
}), re = M.near, ie = M.far), M.layers.mask = e.layers.mask | 6, j.layers.mask = M.layers.mask & -5, te.layers.mask = M.layers.mask & -3;
|
|
4597
|
+
let i = e.parent, a = M.cameras;
|
|
4598
|
+
L(M, i);
|
|
4599
4599
|
for (let e = 0; e < a.length; e++) L(a[e], i);
|
|
4600
|
-
a.length === 2 ? ce(
|
|
4600
|
+
a.length === 2 ? ce(M, j, te) : M.projectionMatrix.copy(j.projectionMatrix), k === null && e.isPerspectiveCamera && (k = {
|
|
4601
4601
|
camera: e,
|
|
4602
4602
|
fov: e.fov,
|
|
4603
4603
|
zoom: e.zoom
|
|
4604
|
-
}), le(e,
|
|
4604
|
+
}), le(e, M, i);
|
|
4605
4605
|
};
|
|
4606
4606
|
function le(e, t, n) {
|
|
4607
4607
|
n === null ? e.matrix.copy(t.matrixWorld) : (e.matrix.copy(n.matrixWorld), e.matrix.invert(), e.matrix.multiply(t.matrixWorld)), e.matrix.decompose(e.position, e.quaternion, e.scale), e.updateMatrixWorld(!0), e.projectionMatrix.copy(t.projectionMatrix), e.projectionMatrixInverse.copy(t.projectionMatrixInverse), e.isPerspectiveCamera && (e.fov = Qe * 2 * Math.atan(1 / e.projectionMatrix.elements[5]), e.zoom = 1);
|
|
4608
4608
|
}
|
|
4609
4609
|
this.getCamera = function() {
|
|
4610
|
-
return
|
|
4610
|
+
return M;
|
|
4611
4611
|
}, this.getFoveation = function() {
|
|
4612
4612
|
if (f !== null || p !== null) return s;
|
|
4613
4613
|
}, this.setFoveation = function(e) {
|
|
@@ -4615,7 +4615,7 @@ var Oi = "\nvoid main() {\n\n gl_Position = vec4( position, 1.0 );\n\n}", ki = "
|
|
|
4615
4615
|
}, this.hasDepthSensing = function() {
|
|
4616
4616
|
return x.texture !== null;
|
|
4617
4617
|
}, this.getDepthSensingMesh = function() {
|
|
4618
|
-
return x.getMesh(
|
|
4618
|
+
return x.getMesh(M);
|
|
4619
4619
|
}, this.getCameraTexture = function(e) {
|
|
4620
4620
|
return S[e];
|
|
4621
4621
|
};
|
|
@@ -4625,7 +4625,7 @@ var Oi = "\nvoid main() {\n\n gl_Position = vec4( position, 1.0 );\n\n}", ki = "
|
|
|
4625
4625
|
let t = l.views;
|
|
4626
4626
|
p !== null && (e.setRenderTargetFramebuffer(T, p.framebuffer), e.setRenderTarget(T));
|
|
4627
4627
|
let i = !1;
|
|
4628
|
-
t.length !==
|
|
4628
|
+
t.length !== M.cameras.length && (M.cameras.length = 0, i = !0);
|
|
4629
4629
|
for (let n = 0; n < t.length; n++) {
|
|
4630
4630
|
let r = t[n], a = null;
|
|
4631
4631
|
if (p !== null) a = p.getViewport(r);
|
|
@@ -4633,8 +4633,8 @@ var Oi = "\nvoid main() {\n\n gl_Position = vec4( position, 1.0 );\n\n}", ki = "
|
|
|
4633
4633
|
let t = d.getViewSubImage(f, r);
|
|
4634
4634
|
a = t.viewport, n === 0 && (e.setRenderTargetTextures(T, t.colorTexture, t.depthStencilTexture), e.setRenderTarget(T));
|
|
4635
4635
|
}
|
|
4636
|
-
let o =
|
|
4637
|
-
o === void 0 && (o = new V(), o.layers.enable(n), o.viewport = new nt(),
|
|
4636
|
+
let o = ne[n];
|
|
4637
|
+
o === void 0 && (o = new V(), o.layers.enable(n), o.viewport = new nt(), ne[n] = o), o.matrix.fromArray(r.transform.matrix), o.matrix.decompose(o.position, o.quaternion, o.scale), o.projectionMatrix.fromArray(r.projectionMatrix), o.projectionMatrixInverse.copy(o.projectionMatrix).invert(), o.viewport.set(a.x, a.y, a.width, a.height), n === 0 && (M.matrix.copy(o.matrix), M.matrix.decompose(M.position, M.quaternion, M.scale)), i === !0 && M.cameras.push(o);
|
|
4638
4638
|
}
|
|
4639
4639
|
let a = r.enabledFeatures;
|
|
4640
4640
|
if (a && a.includes("depth-sensing") && r.depthUsage == "gpu-optimized" && b) {
|
|
@@ -4676,7 +4676,7 @@ function Pi(e, t) {
|
|
|
4676
4676
|
e.matrixAutoUpdate === !0 && e.updateMatrix(), t.value.copy(e.matrix);
|
|
4677
4677
|
}
|
|
4678
4678
|
function r(t, n) {
|
|
4679
|
-
n.color.getRGB(t.fogColor.value,
|
|
4679
|
+
n.color.getRGB(t.fogColor.value, M(e)), n.isFog ? (t.fogNear.value = n.near, t.fogFar.value = n.far) : n.isFogExp2 && (t.fogDensity.value = n.density);
|
|
4680
4680
|
}
|
|
4681
4681
|
function i(e, t, n, r, i) {
|
|
4682
4682
|
t.isNodeMaterial ? t.uniformsNeedUpdate = !1 : t.isMeshBasicMaterial ? a(e, t) : t.isMeshLambertMaterial ? (a(e, t), t.envMap && (e.envMapIntensity.value = t.envMapIntensity)) : t.isMeshToonMaterial ? (a(e, t), d(e, t)) : t.isMeshPhongMaterial ? (a(e, t), u(e, t), t.envMap && (e.envMapIntensity.value = t.envMapIntensity)) : t.isMeshStandardMaterial ? (a(e, t), f(e, t), t.isMeshPhysicalMaterial && p(e, t, i)) : t.isMeshMatcapMaterial ? (a(e, t), m(e, t)) : t.isMeshDepthMaterial ? a(e, t) : t.isMeshDistanceMaterial ? (a(e, t), h(e, t)) : t.isMeshNormalMaterial ? a(e, t) : t.isLineBasicMaterial ? (o(e, t), t.isLineDashedMaterial && s(e, t)) : t.isPointsMaterial ? c(e, t, n, r) : t.isSpriteMaterial ? l(e, t) : t.isShadowMaterial ? (e.color.value.copy(t.color), e.opacity.value = t.opacity) : t.isShaderMaterial && (t.uniformsNeedUpdate = !1);
|
|
@@ -4804,7 +4804,7 @@ function Fi(e, t, n, r) {
|
|
|
4804
4804
|
boundary: 0,
|
|
4805
4805
|
storage: 0
|
|
4806
4806
|
};
|
|
4807
|
-
return typeof e == "number" || typeof e == "boolean" ? (t.boundary = 4, t.storage = 4) : e.isVector2 ? (t.boundary = 8, t.storage = 8) : e.isVector3 || e.isColor ? (t.boundary = 16, t.storage = 12) : e.isVector4 ? (t.boundary = 16, t.storage = 16) : e.isMatrix3 ? (t.boundary = 48, t.storage = 48) : e.isMatrix4 ? (t.boundary = 64, t.storage = 64) : e.isTexture ?
|
|
4807
|
+
return typeof e == "number" || typeof e == "boolean" ? (t.boundary = 4, t.storage = 4) : e.isVector2 ? (t.boundary = 8, t.storage = 8) : e.isVector3 || e.isColor ? (t.boundary = 16, t.storage = 12) : e.isVector4 ? (t.boundary = 16, t.storage = 16) : e.isMatrix3 ? (t.boundary = 48, t.storage = 48) : e.isMatrix4 ? (t.boundary = 64, t.storage = 64) : e.isTexture ? A("WebGLRenderer: Texture samplers can not be part of an uniforms group.") : ArrayBuffer.isView(e) ? (t.boundary = 16, t.storage = e.byteLength) : A("WebGLRenderer: Unsupported uniform value type.", e), t;
|
|
4808
4808
|
}
|
|
4809
4809
|
function v(t) {
|
|
4810
4810
|
let n = t.target;
|
|
@@ -5337,7 +5337,7 @@ var Ii = new Uint16Array([
|
|
|
5337
5337
|
1183
|
|
5338
5338
|
]), Li = null;
|
|
5339
5339
|
function Ri() {
|
|
5340
|
-
return Li === null && (Li = new tt(Ii, 16, 16, S,
|
|
5340
|
+
return Li === null && (Li = new tt(Ii, 16, 16, S, k), Li.name = "DFG_LUT", Li.minFilter = f, Li.magFilter = f, Li.wrapS = Ae, Li.wrapT = Ae, Li.generateMipmaps = !1, Li.needsUpdate = !0), Li;
|
|
5341
5341
|
}
|
|
5342
5342
|
var zi = class {
|
|
5343
5343
|
constructor(e = {}) {
|
|
@@ -5350,7 +5350,7 @@ var zi = class {
|
|
|
5350
5350
|
} else p = a;
|
|
5351
5351
|
let h = f, g = /* @__PURE__ */ new Set([
|
|
5352
5352
|
je,
|
|
5353
|
-
|
|
5353
|
+
ee,
|
|
5354
5354
|
me
|
|
5355
5355
|
]), _ = /* @__PURE__ */ new Set([
|
|
5356
5356
|
Re,
|
|
@@ -5365,9 +5365,9 @@ var zi = class {
|
|
|
5365
5365
|
diagnostics: { keywords: !1 },
|
|
5366
5366
|
onShaderError: null
|
|
5367
5367
|
}, this.autoClear = !0, this.autoClearColor = !0, this.autoClearDepth = !0, this.autoClearStencil = !0, this.sortObjects = !0, this.clippingPlanes = [], this.localClippingEnabled = !1, this.toneMapping = 0, this.toneMappingExposure = 1, this.transmissionResolutionScale = 1;
|
|
5368
|
-
let
|
|
5368
|
+
let j = this, te = !1, M = null, re = null, ie = null, ae = null;
|
|
5369
5369
|
this._outputColorSpace = Ke;
|
|
5370
|
-
let
|
|
5370
|
+
let oe = 0, se = 0, P = null, F = -1, I = null, L = new nt(), le = new nt(), de = null, fe = new B(0), pe = 0, R = t.width, he = t.height, ge = 1, _e = null, ve = null, ye = new nt(0, 0, R, he), be = new nt(0, 0, R, he), Se = !1, Ce = new ne(), we = !1, Te = !1, Ee = new E(), De = new m(), Oe = new nt(), Ae = {
|
|
5371
5371
|
background: null,
|
|
5372
5372
|
fog: null,
|
|
5373
5373
|
environment: null,
|
|
@@ -5375,7 +5375,7 @@ var zi = class {
|
|
|
5375
5375
|
isScene: !0
|
|
5376
5376
|
}, Me = !1;
|
|
5377
5377
|
function Ne() {
|
|
5378
|
-
return
|
|
5378
|
+
return P === null ? ge : 1;
|
|
5379
5379
|
}
|
|
5380
5380
|
let V = n;
|
|
5381
5381
|
function Pe(e, n) {
|
|
@@ -5402,10 +5402,10 @@ var zi = class {
|
|
|
5402
5402
|
throw t.removeEventListener("webglcontextlost", ct, !1), t.removeEventListener("webglcontextrestored", lt, !1), t.removeEventListener("webglcontextcreationerror", J, !1), H("WebGLRenderer: " + e.message), e;
|
|
5403
5403
|
}
|
|
5404
5404
|
function st() {
|
|
5405
|
-
Fe = new nn(V), Fe.init(), tt = new Di(V, Fe), Le = new jt(V, Fe, e, tt), U = new Ti(V, Fe), Le.reversedDepthBuffer && d && U.buffers.depth.setReversed(!0),
|
|
5405
|
+
Fe = new nn(V), Fe.init(), tt = new Di(V, Fe), Le = new jt(V, Fe, e, tt), U = new Ti(V, Fe), Le.reversedDepthBuffer && d && U.buffers.depth.setReversed(!0), re = V.createFramebuffer(), ie = V.createFramebuffer(), ae = V.createFramebuffer(), ze = new on(V), W = new ai(), G = new Ei(V, Fe, U, W, Le, tt, ze), Be = new tn(j), Ve = new Ct(V), rt = new kt(V, Ve), He = new rn(V, Ve, ze, rt), Ue = new cn(V, He, Ve, rt, ze), Ze = new sn(V, Le, G), Je = new Mt(W), K = new ii(j, Be, Fe, Le, rt, Je), We = new Pi(j, W), Ge = new li(), qe = new gi(Fe), Xe = new Ot(j, Be, U, Ue, p, s), Ye = new wi(j, Ue, Le), at = new Fi(V, ze, Le, U), Qe = new At(V, Fe, ze), $e = new an(V, Fe, ze), ze.programs = K.programs, j.capabilities = Le, j.extensions = Fe, j.properties = W, j.renderLists = Ge, j.shadowMap = Ye, j.state = U, j.info = ze;
|
|
5406
5406
|
}
|
|
5407
5407
|
h !== 1009 && (O = new un(h, t.width, t.height, o, r, i));
|
|
5408
|
-
let q = new ji(
|
|
5408
|
+
let q = new ji(j, V);
|
|
5409
5409
|
this.xr = q, this.getContext = function() {
|
|
5410
5410
|
return V;
|
|
5411
5411
|
}, this.getContextAttributes = function() {
|
|
@@ -5424,7 +5424,7 @@ var zi = class {
|
|
|
5424
5424
|
return e.set(R, he);
|
|
5425
5425
|
}, this.setSize = function(e, n, r = !0) {
|
|
5426
5426
|
if (q.isPresenting) {
|
|
5427
|
-
|
|
5427
|
+
A("WebGLRenderer: Can't change size while VR device is presenting.");
|
|
5428
5428
|
return;
|
|
5429
5429
|
}
|
|
5430
5430
|
R = e, he = n, t.width = Math.floor(e * ge), t.height = Math.floor(n * ge), r === !0 && (t.style.width = e + "px", t.style.height = n + "px"), O !== null && O.setSize(t.width, t.height), this.setViewport(0, 0, e, n);
|
|
@@ -5439,7 +5439,7 @@ var zi = class {
|
|
|
5439
5439
|
}
|
|
5440
5440
|
if (e) {
|
|
5441
5441
|
for (let t = 0; t < e.length; t++) if (e[t].isOutputPass === !0) {
|
|
5442
|
-
|
|
5442
|
+
A("WebGLRenderer: OutputPass is not needed in setEffects(). Tone mapping and color space conversion are applied automatically.");
|
|
5443
5443
|
break;
|
|
5444
5444
|
}
|
|
5445
5445
|
}
|
|
@@ -5474,12 +5474,12 @@ var zi = class {
|
|
|
5474
5474
|
let r = 0;
|
|
5475
5475
|
if (e) {
|
|
5476
5476
|
let e = !1;
|
|
5477
|
-
if (
|
|
5478
|
-
let t =
|
|
5477
|
+
if (P !== null) {
|
|
5478
|
+
let t = P.texture.format;
|
|
5479
5479
|
e = g.has(t);
|
|
5480
5480
|
}
|
|
5481
5481
|
if (e) {
|
|
5482
|
-
let e =
|
|
5482
|
+
let e = P.texture.type, t = _.has(e), n = Xe.getClearColor(), r = Xe.getClearAlpha(), i = n.r, a = n.g, o = n.b;
|
|
5483
5483
|
t ? (y[0] = i, y[1] = a, y[2] = o, y[3] = r, V.clearBufferuiv(V.COLOR, 0, y)) : (b[0] = i, b[1] = a, b[2] = o, b[3] = r, V.clearBufferiv(V.COLOR, 0, b));
|
|
5484
5484
|
} else r |= V.COLOR_BUFFER_BIT;
|
|
5485
5485
|
}
|
|
@@ -5491,15 +5491,15 @@ var zi = class {
|
|
|
5491
5491
|
}, this.clearStencil = function() {
|
|
5492
5492
|
this.clear(!1, !1, !0);
|
|
5493
5493
|
}, this.setNodesHandler = function(e) {
|
|
5494
|
-
e.setRenderer(this),
|
|
5494
|
+
e.setRenderer(this), M = e;
|
|
5495
5495
|
}, this.dispose = function() {
|
|
5496
5496
|
t.removeEventListener("webglcontextlost", ct, !1), t.removeEventListener("webglcontextrestored", lt, !1), t.removeEventListener("webglcontextcreationerror", J, !1), Xe.dispose(), Ge.dispose(), qe.dispose(), W.dispose(), Be.dispose(), Ue.dispose(), rt.dispose(), at.dispose(), K.dispose(), q.dispose(), q.removeEventListener("sessionstart", gt), q.removeEventListener("sessionend", Y), X.stop();
|
|
5497
5497
|
};
|
|
5498
5498
|
function ct(e) {
|
|
5499
|
-
e.preventDefault(),
|
|
5499
|
+
e.preventDefault(), N("WebGLRenderer: Context Lost."), te = !0;
|
|
5500
5500
|
}
|
|
5501
5501
|
function lt() {
|
|
5502
|
-
|
|
5502
|
+
N("WebGLRenderer: Context Restored."), te = !1;
|
|
5503
5503
|
let e = ze.autoReset, t = Ye.enabled, n = Ye.autoUpdate, r = Ye.needsUpdate, i = Ye.type;
|
|
5504
5504
|
st(), ze.autoReset = e, Ye.enabled = t, Ye.autoUpdate = n, Ye.needsUpdate = r, Ye.type = i;
|
|
5505
5505
|
}
|
|
@@ -5552,14 +5552,14 @@ var zi = class {
|
|
|
5552
5552
|
} else g.render(f, m);
|
|
5553
5553
|
};
|
|
5554
5554
|
function pt(e, t, n, r) {
|
|
5555
|
-
|
|
5555
|
+
M !== null && e.isNodeMaterial && M.setObject(r, e), we === !0 && Je.setState(e, n, !1), e.transparent === !0 && e.side === 2 && e.forceSinglePass === !1 ? (e.side = 1, e.needsUpdate = !0, Z(e, t, r), e.side = 0, e.needsUpdate = !0, Z(e, t, r), e.side = 2) : Z(e, t, r);
|
|
5556
5556
|
}
|
|
5557
5557
|
this.compile = function(e, t, n = null) {
|
|
5558
|
-
n === null && (n = e),
|
|
5558
|
+
n === null && (n = e), M !== null && M.renderStart(e, t, n), C = qe.get(n), C.init(t), D.push(C), n.traverseVisible(function(e) {
|
|
5559
5559
|
e.isLight && e.layers.test(t.layers) && (C.pushLight(e), e.castShadow && C.pushShadow(e));
|
|
5560
5560
|
}), e !== n && e.traverseVisible(function(e) {
|
|
5561
5561
|
e.isLight && e.layers.test(t.layers) && (C.pushLight(e), e.castShadow && C.pushShadow(e));
|
|
5562
|
-
}), C.setupLights(),
|
|
5562
|
+
}), C.setupLights(), M !== null && M.updateLights(C.state.lightsArray), Te = this.localClippingEnabled, we = Je.init(this.clippingPlanes, Te), we === !0 && Je.setGlobalState(this.clippingPlanes, t), M !== null && Ye.render(C.state.shadowsArray, n, t);
|
|
5563
5563
|
let r = /* @__PURE__ */ new Set();
|
|
5564
5564
|
return e.traverse(function(e) {
|
|
5565
5565
|
if (!(e.isMesh || e.isPoints || e.isLine || e.isSprite)) return;
|
|
@@ -5571,7 +5571,7 @@ var zi = class {
|
|
|
5571
5571
|
}
|
|
5572
5572
|
else pt(i, n, t, e), r.add(i);
|
|
5573
5573
|
}
|
|
5574
|
-
}), C = D.pop(),
|
|
5574
|
+
}), C = D.pop(), M !== null && M.renderEnd(), r;
|
|
5575
5575
|
}, this.compileAsync = function(e, t, n = null) {
|
|
5576
5576
|
let r = this.compile(e, t, n);
|
|
5577
5577
|
return new Promise((t) => {
|
|
@@ -5606,14 +5606,14 @@ var zi = class {
|
|
|
5606
5606
|
H("WebGLRenderer.render: camera is not an instance of THREE.Camera.");
|
|
5607
5607
|
return;
|
|
5608
5608
|
}
|
|
5609
|
-
if (
|
|
5610
|
-
|
|
5611
|
-
let n = q.enabled === !0 && q.isPresenting === !0, r = O !== null && (
|
|
5612
|
-
if (e.matrixWorldAutoUpdate === !0 && e.updateMatrixWorld(), t.parent === null && t.matrixWorldAutoUpdate === !0 && t.updateMatrixWorld(), q.enabled === !0 && q.isPresenting === !0 && (O === null || O.isCompositing() === !1) && (q.cameraAutoUpdate === !0 && q.updateCamera(t), t = q.getCamera()), e.isScene === !0 && e.onBeforeRender(
|
|
5613
|
-
let e =
|
|
5614
|
-
e !== null && _t(e, t, -Infinity,
|
|
5609
|
+
if (te === !0) return;
|
|
5610
|
+
M !== null && M.renderStart(e, t);
|
|
5611
|
+
let n = q.enabled === !0 && q.isPresenting === !0, r = O !== null && (P === null || n) && O.begin(j, P);
|
|
5612
|
+
if (e.matrixWorldAutoUpdate === !0 && e.updateMatrixWorld(), t.parent === null && t.matrixWorldAutoUpdate === !0 && t.updateMatrixWorld(), q.enabled === !0 && q.isPresenting === !0 && (O === null || O.isCompositing() === !1) && (q.cameraAutoUpdate === !0 && q.updateCamera(t), t = q.getCamera()), e.isScene === !0 && e.onBeforeRender(j, e, t, P), C = qe.get(e, D.length), C.init(t), C.state.textureUnits = G.getTextureUnits(), D.push(C), Ee.multiplyMatrices(t.projectionMatrix, t.matrixWorldInverse), Ce.setFromProjectionMatrix(Ee, ce, t.reversedDepth), Te = this.localClippingEnabled, we = Je.init(this.clippingPlanes, Te), S = Ge.get(e, w.length), S.init(), w.push(S), q.enabled === !0 && q.isPresenting === !0) {
|
|
5613
|
+
let e = j.xr.getDepthSensingMesh();
|
|
5614
|
+
e !== null && _t(e, t, -Infinity, j.sortObjects);
|
|
5615
5615
|
}
|
|
5616
|
-
_t(e, t, 0,
|
|
5616
|
+
_t(e, t, 0, j.sortObjects), S.finish(), M !== null && M.updateLights(C.state.lightsArray), j.sortObjects === !0 && S.sort(_e, ve), Me = q.enabled === !1 || q.isPresenting === !1 || q.hasDepthSensing() === !1, Me && Xe.addToRenderList(S, e), this.info.render.frame++, this.info.autoReset === !0 && this.info.reset(), we === !0 && Je.beginShadows();
|
|
5617
5617
|
let i = C.state.shadowsArray;
|
|
5618
5618
|
if (Ye.render(i, e, t), we === !0 && Je.endShadows(), (r && O.hasRenderPass()) === !1) {
|
|
5619
5619
|
let n = S.opaque, r = S.transmissive;
|
|
@@ -5630,7 +5630,7 @@ var zi = class {
|
|
|
5630
5630
|
}
|
|
5631
5631
|
} else r.length > 0 && yt(n, r, e, t), Me && Xe.render(e), vt(S, e, t);
|
|
5632
5632
|
}
|
|
5633
|
-
|
|
5633
|
+
P !== null && se === 0 && (G.updateMultisampleRenderTarget(P), G.updateRenderTargetMipmap(P)), r && O.end(j), e.isScene === !0 && e.onAfterRender(j, e, t), rt.resetDefaultState(), F = -1, I = null, D.pop(), D.length > 0 ? (C = D[D.length - 1], G.setTextureUnits(C.state.textureUnits), we === !0 && Je.setGlobalState(j.clippingPlanes, C.state.camera)) : C = null, w.pop(), S = w.length > 0 ? w[w.length - 1] : null, M !== null && M.renderEnd();
|
|
5634
5634
|
};
|
|
5635
5635
|
function _t(e, t, n, r) {
|
|
5636
5636
|
if (e.visible === !1) return;
|
|
@@ -5661,7 +5661,7 @@ var zi = class {
|
|
|
5661
5661
|
}
|
|
5662
5662
|
function vt(e, t, n, r) {
|
|
5663
5663
|
let { opaque: i, transmissive: a, transparent: o } = e;
|
|
5664
|
-
C.setupLightsView(n), we === !0 && Je.setGlobalState(
|
|
5664
|
+
C.setupLightsView(n), we === !0 && Je.setGlobalState(j.clippingPlanes, n), r && U.viewport(L.copy(r)), i.length > 0 && bt(i, t, n), a.length > 0 && bt(a, t, n), o.length > 0 && bt(o, t, n), U.buffers.depth.setTest(!0), U.buffers.depth.setMask(!0), U.buffers.color.setMask(!0), U.setPolygonOffset(!1);
|
|
5665
5665
|
}
|
|
5666
5666
|
function yt(e, t, n, r) {
|
|
5667
5667
|
if ((n.isScene === !0 ? n.overrideMaterial : null) !== null) return;
|
|
@@ -5669,7 +5669,7 @@ var zi = class {
|
|
|
5669
5669
|
let e = Fe.has("EXT_color_buffer_half_float") || Fe.has("EXT_color_buffer_float");
|
|
5670
5670
|
C.state.transmissionRenderTarget[r.id] = new v(1, 1, {
|
|
5671
5671
|
generateMipmaps: !0,
|
|
5672
|
-
type: e ?
|
|
5672
|
+
type: e ? k : Re,
|
|
5673
5673
|
minFilter: ue,
|
|
5674
5674
|
samples: Math.max(4, Le.samples),
|
|
5675
5675
|
stencilBuffer: i,
|
|
@@ -5681,13 +5681,13 @@ var zi = class {
|
|
|
5681
5681
|
});
|
|
5682
5682
|
}
|
|
5683
5683
|
let a = C.state.transmissionRenderTarget[r.id], o = r.viewport || L;
|
|
5684
|
-
a.setSize(o.z *
|
|
5685
|
-
let s =
|
|
5686
|
-
|
|
5687
|
-
let u =
|
|
5688
|
-
|
|
5684
|
+
a.setSize(o.z * j.transmissionResolutionScale, o.w * j.transmissionResolutionScale);
|
|
5685
|
+
let s = j.getRenderTarget(), c = j.getActiveCubeFace(), l = j.getActiveMipmapLevel();
|
|
5686
|
+
j.setRenderTarget(a), j.getClearColor(fe), pe = j.getClearAlpha(), pe < 1 && j.setClearColor(16777215, .5), j.clear(), Me && Xe.render(n);
|
|
5687
|
+
let u = j.toneMapping;
|
|
5688
|
+
j.toneMapping = 0;
|
|
5689
5689
|
let d = r.viewport;
|
|
5690
|
-
if (r.viewport !== void 0 && (r.viewport = void 0), C.setupLightsView(r), we === !0 && Je.setGlobalState(
|
|
5690
|
+
if (r.viewport !== void 0 && (r.viewport = void 0), C.setupLightsView(r), we === !0 && Je.setGlobalState(j.clippingPlanes, r), bt(e, n, r), G.updateMultisampleRenderTarget(a), G.updateRenderTargetMipmap(a), Fe.has("WEBGL_multisampled_render_to_texture") === !1) {
|
|
5691
5691
|
let e = !1;
|
|
5692
5692
|
for (let i = 0, a = t.length; i < a; i++) {
|
|
5693
5693
|
let { object: a, geometry: o, material: s, group: c } = t[i];
|
|
@@ -5698,7 +5698,7 @@ var zi = class {
|
|
|
5698
5698
|
}
|
|
5699
5699
|
e === !0 && (G.updateMultisampleRenderTarget(a), G.updateRenderTargetMipmap(a));
|
|
5700
5700
|
}
|
|
5701
|
-
|
|
5701
|
+
j.setRenderTarget(s, c, l), j.setClearColor(fe, pe), d !== void 0 && (r.viewport = d), j.toneMapping = u;
|
|
5702
5702
|
}
|
|
5703
5703
|
function bt(e, t, n) {
|
|
5704
5704
|
let r = t.isScene === !0 ? t.overrideMaterial : null;
|
|
@@ -5708,7 +5708,7 @@ var zi = class {
|
|
|
5708
5708
|
}
|
|
5709
5709
|
}
|
|
5710
5710
|
function xt(e, t, n, r, i, a) {
|
|
5711
|
-
|
|
5711
|
+
M !== null && i.isNodeMaterial && M.setObject(e, i), e.onBeforeRender(j, t, n, r, i, a), e.modelViewMatrix.multiplyMatrices(n.matrixWorldInverse, e.matrixWorld), e.normalMatrix.getNormalMatrix(e.modelViewMatrix), i.onBeforeRender(j, t, n, r, e, a), i.transparent === !0 && i.side === 2 && i.forceSinglePass === !1 ? (i.side = 1, i.needsUpdate = !0, j.renderBufferDirect(n, t, r, i, e, a), i.side = 0, i.needsUpdate = !0, j.renderBufferDirect(n, t, r, i, e, a), i.side = 2) : j.renderBufferDirect(n, t, r, i, e, a), e.onAfterRender(j, t, n, r, i, a);
|
|
5712
5712
|
}
|
|
5713
5713
|
function Z(e, t, n) {
|
|
5714
5714
|
t.isScene !== !0 && (t = Ae);
|
|
@@ -5719,7 +5719,7 @@ var zi = class {
|
|
|
5719
5719
|
let d = l.get(c);
|
|
5720
5720
|
if (d !== void 0) {
|
|
5721
5721
|
if (r.currentProgram === d && r.lightsStateVersion === o) return wt(e, s), d;
|
|
5722
|
-
} else s.uniforms = K.getUniforms(e),
|
|
5722
|
+
} else s.uniforms = K.getUniforms(e), M !== null && e.isNodeMaterial && M.build(e, n, s), e.onBeforeCompile(s, j), d = K.acquireProgram(s, c), l.set(c, d), r.uniforms = s.uniforms;
|
|
5723
5723
|
let f = r.uniforms;
|
|
5724
5724
|
return (!e.isShaderMaterial && !e.isRawShaderMaterial || e.clipping === !0) && (f.clippingPlanes = Je.uniform), wt(e, s), r.needsLights = Nt(e), r.lightsStateVersion = o, r.needsLights && (f.ambientLightColor.value = i.state.ambient, f.lightProbe.value = i.state.probe, f.sunLights.value = i.state.sun, f.sunLightShadows.value = i.state.sunShadow, f.directionalLights.value = i.state.directional, f.directionalLightShadows.value = i.state.directionalShadow, f.spotLights.value = i.state.spot, f.spotLightShadows.value = i.state.spotShadow, f.rectAreaLights.value = i.state.rectArea, f.ltc_1.value = i.state.rectAreaLTC1, f.ltc_2.value = i.state.rectAreaLTC2, f.pointLights.value = i.state.point, f.pointLightShadows.value = i.state.pointShadow, f.hemisphereLights.value = i.state.hemi, f.sunShadowMatrix.value = i.state.sunShadowMatrix, f.sunShadowCascade.value = i.state.sunShadowCascade, f.directionalShadowMatrix.value = i.state.directionalShadowMatrix, f.spotLightMatrix.value = i.state.spotLightMatrix, f.spotLightMap.value = i.state.spotLightMap, f.pointShadowMatrix.value = i.state.pointShadowMatrix), r.lightProbeGrid = C.state.lightProbeGridArray.length > 0, r.currentProgram = d, r.uniformsList = null, d;
|
|
5725
5725
|
}
|
|
@@ -5746,26 +5746,26 @@ var zi = class {
|
|
|
5746
5746
|
}
|
|
5747
5747
|
function Et(e, t, n, r, i) {
|
|
5748
5748
|
t.isScene !== !0 && (t = Ae), G.resetTextureUnits();
|
|
5749
|
-
let a = t.fog, o = r.isMeshStandardMaterial || r.isMeshLambertMaterial || r.isMeshPhongMaterial ? t.environment : null, s =
|
|
5750
|
-
r.toneMapped && (
|
|
5749
|
+
let a = t.fog, o = r.isMeshStandardMaterial || r.isMeshLambertMaterial || r.isMeshPhongMaterial ? t.environment : null, s = P === null ? j.outputColorSpace : P.isXRRenderTarget === !0 ? P.texture.colorSpace : z.workingColorSpace, c = r.isMeshStandardMaterial || r.isMeshLambertMaterial && !r.envMap || r.isMeshPhongMaterial && !r.envMap, l = Be.get(r.envMap || o, c), u = r.vertexColors === !0 && !!n.attributes.color && n.attributes.color.itemSize === 4, d = !!n.attributes.tangent && (!!r.normalMap || r.anisotropy > 0), f = !!n.morphAttributes.position, p = !!n.morphAttributes.normal, m = !!n.morphAttributes.color, h = 0;
|
|
5750
|
+
r.toneMapped && (P === null || P.isXRRenderTarget === !0) && (h = j.toneMapping);
|
|
5751
5751
|
let g = n.morphAttributes.position || n.morphAttributes.normal || n.morphAttributes.color, _ = g === void 0 ? 0 : g.length, v = W.get(r), y = C.state.lights;
|
|
5752
|
-
if (we === !0 && (Te === !0 || e !==
|
|
5753
|
-
let t = e ===
|
|
5752
|
+
if (we === !0 && (Te === !0 || e !== I)) {
|
|
5753
|
+
let t = e === I && r.id === F;
|
|
5754
5754
|
Je.setState(r, e, t);
|
|
5755
5755
|
}
|
|
5756
5756
|
let b = !1;
|
|
5757
5757
|
r.version === v.__version ? v.needsLights && v.lightsStateVersion !== y.state.version ? b = !0 : v.outputColorSpace === s ? i.isBatchedMesh && v.batching === !1 || !i.isBatchedMesh && v.batching === !0 || i.isBatchedMesh && v.batchingColor === !0 && i._colorsTexture === null || i.isBatchedMesh && v.batchingColor === !1 && i._colorsTexture !== null || i.isInstancedMesh && v.instancing === !1 || !i.isInstancedMesh && v.instancing === !0 || i.isSkinnedMesh && v.skinning === !1 || !i.isSkinnedMesh && v.skinning === !0 || i.isInstancedMesh && v.instancingColor === !0 && i.instanceColor === null || i.isInstancedMesh && v.instancingColor === !1 && i.instanceColor !== null || i.isInstancedMesh && v.instancingMorph === !0 && i.morphTexture === null || i.isInstancedMesh && v.instancingMorph === !1 && i.morphTexture !== null ? b = !0 : v.envMap === l ? r.fog === !0 && v.fog !== a || v.numClippingPlanes !== void 0 && (v.numClippingPlanes !== Je.numPlanes || v.numIntersection !== Je.numIntersection) ? b = !0 : v.vertexAlphas === u && v.vertexTangents === d && v.morphTargets === f && v.morphNormals === p && v.morphColors === m && v.toneMapping === h && v.morphTargetsCount === _ ? !!v.lightProbeGrid != C.state.lightProbeGridArray.length > 0 && (b = !0) : b = !0 : b = !0 : b = !0 : (b = !0, v.__version = r.version);
|
|
5758
5758
|
let x = v.currentProgram;
|
|
5759
|
-
b === !0 && (x = Z(r, t, i),
|
|
5759
|
+
b === !0 && (x = Z(r, t, i), M && r.isNodeMaterial && M.onUpdateProgram(r, x, v));
|
|
5760
5760
|
let S = !1, w = !1, T = !1, E = x.getUniforms(), D = v.uniforms;
|
|
5761
|
-
if (U.useProgram(x.program) && (S = !0, w = !0, T = !0), r.id !==
|
|
5761
|
+
if (U.useProgram(x.program) && (S = !0, w = !0, T = !0), r.id !== F && (F = r.id, w = !0), v.needsLights) {
|
|
5762
5762
|
let e = Tt(C.state.lightProbeGridArray, i);
|
|
5763
5763
|
v.lightProbeGrid !== e && (v.lightProbeGrid = e, w = !0);
|
|
5764
5764
|
}
|
|
5765
|
-
if (S ||
|
|
5765
|
+
if (S || I !== e) {
|
|
5766
5766
|
U.buffers.depth.getReversed() && e.reversedDepth !== !0 && (e._reversedDepth = !0, e.updateProjectionMatrix()), E.setValue(V, "projectionMatrix", e.projectionMatrix), E.setValue(V, "viewMatrix", e.matrixWorldInverse);
|
|
5767
5767
|
let t = E.map.cameraPosition;
|
|
5768
|
-
t !== void 0 && t.setValue(V, De.setFromMatrixPosition(e.matrixWorld)), Le.logarithmicDepthBuffer && E.setValue(V, "logDepthBufFC", 2 / (Math.log(e.far + 1) / Math.LN2)), (r.isMeshPhongMaterial || r.isMeshToonMaterial || r.isMeshLambertMaterial || r.isMeshBasicMaterial || r.isMeshStandardMaterial || r.isShaderMaterial) && E.setValue(V, "isOrthographic", e.isOrthographicCamera === !0),
|
|
5768
|
+
t !== void 0 && t.setValue(V, De.setFromMatrixPosition(e.matrixWorld)), Le.logarithmicDepthBuffer && E.setValue(V, "logDepthBufFC", 2 / (Math.log(e.far + 1) / Math.LN2)), (r.isMeshPhongMaterial || r.isMeshToonMaterial || r.isMeshLambertMaterial || r.isMeshBasicMaterial || r.isMeshStandardMaterial || r.isShaderMaterial) && E.setValue(V, "isOrthographic", e.isOrthographicCamera === !0), I !== e && (I = e, w = !0, T = !0);
|
|
5769
5769
|
}
|
|
5770
5770
|
if (v.needsLights && (y.state.sunShadowMap.length > 0 && E.setValue(V, "sunShadowMap", y.state.sunShadowMap, G), y.state.directionalShadowMap.length > 0 && E.setValue(V, "directionalShadowMap", y.state.directionalShadowMap, G), y.state.spotShadowMap.length > 0 && E.setValue(V, "spotShadowMap", y.state.spotShadowMap, G), y.state.pointShadowMap.length > 0 && E.setValue(V, "pointShadowMap", y.state.pointShadowMap, G)), i.isSkinnedMesh) {
|
|
5771
5771
|
E.setOptional(V, i, "bindMatrix"), E.setOptional(V, i, "bindMatrixInverse");
|
|
@@ -5775,7 +5775,7 @@ var zi = class {
|
|
|
5775
5775
|
i.isBatchedMesh && (E.setOptional(V, i, "batchingTexture"), E.setValue(V, "batchingTexture", i._matricesTexture, G), E.setOptional(V, i, "batchingIdTexture"), E.setValue(V, "batchingIdTexture", i._indirectTexture, G), E.setOptional(V, i, "batchingColorTexture"), i._colorsTexture !== null && E.setValue(V, "batchingColorTexture", i._colorsTexture, G));
|
|
5776
5776
|
let O = n.morphAttributes;
|
|
5777
5777
|
if ((O.position !== void 0 || O.normal !== void 0 || O.color !== void 0) && Ze.update(i, n, x), (w || v.receiveShadow !== i.receiveShadow) && (v.receiveShadow = i.receiveShadow, E.setValue(V, "receiveShadow", i.receiveShadow)), (r.isMeshStandardMaterial || r.isMeshLambertMaterial || r.isMeshPhongMaterial) && r.envMap === null && t.environment !== null && (D.envMapIntensity.value = t.environmentIntensity), D.dfgLUT !== void 0 && (D.dfgLUT.value = Ri()), w) {
|
|
5778
|
-
if (E.setValue(V, "toneMappingExposure",
|
|
5778
|
+
if (E.setValue(V, "toneMappingExposure", j.toneMappingExposure), v.needsLights && Dt(D, T), a && r.fog === !0 && We.refreshFogUniforms(D, a), We.refreshMaterialUniforms(D, r, ge, he, C.state.transmissionRenderTarget[e.id]), v.needsLights && v.lightProbeGrid) {
|
|
5779
5779
|
let e = v.lightProbeGrid;
|
|
5780
5780
|
D.probesSH.value = e.texture, D.probesMin.value.copy(e.boundingBox.min), D.probesMax.value.copy(e.boundingBox.max), D.probesResolution.value.copy(e.resolution);
|
|
5781
5781
|
}
|
|
@@ -5797,11 +5797,11 @@ var zi = class {
|
|
|
5797
5797
|
return e.isMeshLambertMaterial || e.isMeshToonMaterial || e.isMeshPhongMaterial || e.isMeshStandardMaterial || e.isShadowMaterial || e.isShaderMaterial && e.lights === !0;
|
|
5798
5798
|
}
|
|
5799
5799
|
this.getActiveCubeFace = function() {
|
|
5800
|
-
return ae;
|
|
5801
|
-
}, this.getActiveMipmapLevel = function() {
|
|
5802
5800
|
return oe;
|
|
5801
|
+
}, this.getActiveMipmapLevel = function() {
|
|
5802
|
+
return se;
|
|
5803
5803
|
}, this.getRenderTarget = function() {
|
|
5804
|
-
return
|
|
5804
|
+
return P;
|
|
5805
5805
|
}, this.setRenderTargetTextures = function(e, t, n) {
|
|
5806
5806
|
let r = W.get(e);
|
|
5807
5807
|
r.__autoAllocateDepthBuffer = e.resolveDepthBuffer === !1, r.__autoAllocateDepthBuffer === !1 && (r.__useRenderToTexture = !1), W.get(e.texture).__webglTexture = t, W.get(e.depthTexture).__webglTexture = r.__autoAllocateDepthBuffer ? void 0 : n, r.__hasExternalTextures = !0;
|
|
@@ -5809,12 +5809,12 @@ var zi = class {
|
|
|
5809
5809
|
let n = W.get(e);
|
|
5810
5810
|
n.__webglFramebuffer = t, n.__useDefaultFramebuffer = t === void 0;
|
|
5811
5811
|
}, this.setRenderTarget = function(e, t = 0, n = 0) {
|
|
5812
|
-
|
|
5812
|
+
P = e, oe = t, se = n;
|
|
5813
5813
|
let r = null, i = !1, a = !1;
|
|
5814
5814
|
if (e) {
|
|
5815
5815
|
let o = W.get(e);
|
|
5816
5816
|
if (o.__useDefaultFramebuffer !== void 0) {
|
|
5817
|
-
U.bindFramebuffer(V.FRAMEBUFFER, o.__webglFramebuffer), L.copy(e.viewport), le.copy(e.scissor), de = e.scissorTest, U.viewport(L), U.scissor(le), U.setScissorTest(de),
|
|
5817
|
+
U.bindFramebuffer(V.FRAMEBUFFER, o.__webglFramebuffer), L.copy(e.viewport), le.copy(e.scissor), de = e.scissorTest, U.viewport(L), U.scissor(le), U.setScissorTest(de), F = -1;
|
|
5818
5818
|
return;
|
|
5819
5819
|
}
|
|
5820
5820
|
if (o.__webglFramebuffer === void 0) G.setupRenderTarget(e);
|
|
@@ -5831,7 +5831,7 @@ var zi = class {
|
|
|
5831
5831
|
let c = W.get(e).__webglFramebuffer;
|
|
5832
5832
|
e.isWebGLCubeRenderTarget ? (r = Array.isArray(c[t]) ? c[t][n] : c[t], i = !0) : r = e.samples > 0 && G.useMultisampledRTT(e) === !1 ? W.get(e).__webglMultisampledFramebuffer : Array.isArray(c) ? c[n] : c, L.copy(e.viewport), le.copy(e.scissor), de = e.scissorTest;
|
|
5833
5833
|
} else L.copy(ye).multiplyScalar(ge).floor(), le.copy(be).multiplyScalar(ge).floor(), de = Se;
|
|
5834
|
-
if (n !== 0 && (r =
|
|
5834
|
+
if (n !== 0 && (r = re), U.bindFramebuffer(V.FRAMEBUFFER, r) && U.drawBuffers(e, r), U.viewport(L), U.scissor(le), U.setScissorTest(de), i) {
|
|
5835
5835
|
let r = W.get(e.texture);
|
|
5836
5836
|
V.framebufferTexture2D(V.FRAMEBUFFER, V.COLOR_ATTACHMENT0, V.TEXTURE_CUBE_MAP_POSITIVE_X + t, r.__webglTexture, n);
|
|
5837
5837
|
} else if (a) {
|
|
@@ -5844,7 +5844,7 @@ var zi = class {
|
|
|
5844
5844
|
let t = W.get(e.texture);
|
|
5845
5845
|
V.framebufferTexture2D(V.FRAMEBUFFER, V.COLOR_ATTACHMENT0, V.TEXTURE_2D, t.__webglTexture, n);
|
|
5846
5846
|
}
|
|
5847
|
-
|
|
5847
|
+
F = -1;
|
|
5848
5848
|
};
|
|
5849
5849
|
function Pt(e) {
|
|
5850
5850
|
let t = W.get(e);
|
|
@@ -5872,7 +5872,7 @@ var zi = class {
|
|
|
5872
5872
|
}
|
|
5873
5873
|
t >= 0 && t <= e.width - r && n >= 0 && n <= e.height - i && V.readPixels(t, n, r, i, tt.convert(c), tt.convert(l), a);
|
|
5874
5874
|
} finally {
|
|
5875
|
-
let e =
|
|
5875
|
+
let e = P === null ? null : W.get(P).__webglFramebuffer;
|
|
5876
5876
|
U.bindFramebuffer(V.FRAMEBUFFER, e);
|
|
5877
5877
|
}
|
|
5878
5878
|
}
|
|
@@ -5889,7 +5889,7 @@ var zi = class {
|
|
|
5889
5889
|
if (d.__typeReadable === !1) throw Error("THREE.WebGLRenderer.readRenderTargetPixelsAsync: renderTarget is not in UnsignedByteType or implementation defined type.");
|
|
5890
5890
|
let f = V.createBuffer();
|
|
5891
5891
|
V.bindBuffer(V.PIXEL_PACK_BUFFER, f), V.bufferData(V.PIXEL_PACK_BUFFER, a.byteLength, V.STREAM_READ), V.readPixels(t, n, r, i, tt.convert(l), tt.convert(u), 0), V.bindBuffer(V.PIXEL_PACK_BUFFER, null);
|
|
5892
|
-
let p =
|
|
5892
|
+
let p = P === null ? null : W.get(P).__webglFramebuffer;
|
|
5893
5893
|
U.bindFramebuffer(V.FRAMEBUFFER, p);
|
|
5894
5894
|
let m = V.fenceSync(V.SYNC_GPU_COMMANDS_COMPLETE, 0);
|
|
5895
5895
|
return V.flush(), await T(V, m, 4), V.bindBuffer(V.PIXEL_PACK_BUFFER, f), V.getBufferSubData(V.PIXEL_PACK_BUFFER, 0, a), V.bindBuffer(V.PIXEL_PACK_BUFFER, null), V.deleteBuffer(f), V.deleteSync(m), a;
|
|
@@ -5919,7 +5919,7 @@ var zi = class {
|
|
|
5919
5919
|
U.bindFramebuffer(V.READ_FRAMEBUFFER, null), U.bindFramebuffer(V.DRAW_FRAMEBUFFER, null);
|
|
5920
5920
|
} else if (i !== 0 || e.isRenderTargetTexture || W.has(e)) {
|
|
5921
5921
|
let n = W.get(e), r = W.get(t);
|
|
5922
|
-
U.bindFramebuffer(V.READ_FRAMEBUFFER,
|
|
5922
|
+
U.bindFramebuffer(V.READ_FRAMEBUFFER, ie), U.bindFramebuffer(V.DRAW_FRAMEBUFFER, ae);
|
|
5923
5923
|
for (let e = 0; e < c; e++) w ? V.framebufferTextureLayer(V.READ_FRAMEBUFFER, V.COLOR_ATTACHMENT0, n.__webglTexture, i, d + e) : V.framebufferTexture2D(V.READ_FRAMEBUFFER, V.COLOR_ATTACHMENT0, V.TEXTURE_2D, n.__webglTexture, i), T ? V.framebufferTextureLayer(V.DRAW_FRAMEBUFFER, V.COLOR_ATTACHMENT0, r.__webglTexture, a, m + e) : V.framebufferTexture2D(V.DRAW_FRAMEBUFFER, V.COLOR_ATTACHMENT0, V.TEXTURE_2D, r.__webglTexture, a), i === 0 ? T ? V.copyTexSubImage3D(v, a, f, p, m + e, l, u, o, s) : V.copyTexSubImage2D(v, a, f, p, l, u, o, s) : V.blitFramebuffer(l, u, o, s, f, p, o, s, V.COLOR_BUFFER_BIT, V.NEAREST);
|
|
5924
5924
|
U.bindFramebuffer(V.READ_FRAMEBUFFER, null), U.bindFramebuffer(V.DRAW_FRAMEBUFFER, null);
|
|
5925
5925
|
} else T ? e.isDataTexture || e.isData3DTexture ? V.texSubImage3D(v, a, f, p, m, o, s, c, g, _, h.data) : t.isCompressedArrayTexture ? V.compressedTexSubImage3D(v, a, f, p, m, o, s, c, g, h.data) : V.texSubImage3D(v, a, f, p, m, o, s, c, g, _, h) : e.isDataTexture ? V.texSubImage2D(V.TEXTURE_2D, a, f, p, o, s, g, _, h.data) : e.isCompressedTexture ? V.compressedTexSubImage2D(V.TEXTURE_2D, a, f, p, h.width, h.height, g, h.data) : V.texSubImage2D(V.TEXTURE_2D, a, f, p, o, s, g, _, h);
|
|
@@ -5929,7 +5929,7 @@ var zi = class {
|
|
|
5929
5929
|
}, this.initTexture = function(e) {
|
|
5930
5930
|
e.isCubeTexture ? G.setTextureCube(e, 0) : e.isData3DTexture ? G.setTexture3D(e, 0) : e.isDataArrayTexture || e.isCompressedArrayTexture ? G.setTexture2DArray(e, 0) : G.setTexture2D(e, 0), U.unbindTexture();
|
|
5931
5931
|
}, this.resetState = function() {
|
|
5932
|
-
|
|
5932
|
+
oe = 0, se = 0, P = null, U.reset(), rt.reset();
|
|
5933
5933
|
}, typeof __THREE_DEVTOOLS__ < "u" && __THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe", { detail: this }));
|
|
5934
5934
|
}
|
|
5935
5935
|
get coordinateSystem() {
|
|
@@ -5966,7 +5966,7 @@ var zi = class {
|
|
|
5966
5966
|
}, this.touches = {
|
|
5967
5967
|
ONE: U.ROTATE,
|
|
5968
5968
|
TWO: U.DOLLY_PAN
|
|
5969
|
-
}, this.target0 = this.target.clone(), this.position0 = this.object.position.clone(), this.zoom0 = this.object.zoom, this._cursorStyle = "auto", this._domElementKeyEvents = null, this._lastPosition = new m(), this._lastQuaternion = new Ce(), this._lastTargetPosition = new m(), this._quat = new Ce().setFromUnitVectors(e.up, new m(0, 1, 0)), this._quatInverse = this._quat.clone().invert(), this._spherical = new Se(), this._sphericalDelta = new Se(), this._scale = 1, this._panOffset = new m(), this._rotateStart = new
|
|
5969
|
+
}, this.target0 = this.target.clone(), this.position0 = this.object.position.clone(), this.zoom0 = this.object.zoom, this._cursorStyle = "auto", this._domElementKeyEvents = null, this._lastPosition = new m(), this._lastQuaternion = new Ce(), this._lastTargetPosition = new m(), this._quat = new Ce().setFromUnitVectors(e.up, new m(0, 1, 0)), this._quatInverse = this._quat.clone().invert(), this._spherical = new Se(), this._sphericalDelta = new Se(), this._scale = 1, this._panOffset = new m(), this._rotateStart = new F(), this._rotateEnd = new F(), this._rotateDelta = new F(), this._panStart = new F(), this._panEnd = new F(), this._panDelta = new F(), this._dollyStart = new F(), this._dollyEnd = new F(), this._dollyDelta = new F(), this._dollyDirection = new m(), this._mouse = new F(), this._performCursorZoom = !1, this._pointers = [], this._pointerPositions = {}, this._controlActive = !1, this._onPointerMove = Zi.bind(this), this._onPointerDown = Xi.bind(this), this._onPointerUp = Qi.bind(this), this._onContextMenu = aa.bind(this), this._onMouseWheel = ta.bind(this), this._onKeyDown = na.bind(this), this._onTouchStart = ra.bind(this), this._onTouchMove = ia.bind(this), this._onMouseDown = $i.bind(this), this._onMouseMove = ea.bind(this), this._interceptControlDown = oa.bind(this), this._interceptControlUp = sa.bind(this), this.domElement !== null && this.connect(this.domElement), this.update();
|
|
5970
5970
|
}
|
|
5971
5971
|
set cursorStyle(e) {
|
|
5972
5972
|
this._cursorStyle = e, e === "grab" ? this.domElement.style.cursor = "grab" : this.domElement.style.cursor = "auto";
|
|
@@ -6209,7 +6209,7 @@ var zi = class {
|
|
|
6209
6209
|
}
|
|
6210
6210
|
_trackPointer(e) {
|
|
6211
6211
|
let t = this._pointerPositions[e.pointerId];
|
|
6212
|
-
t === void 0 && (t = new
|
|
6212
|
+
t === void 0 && (t = new F(), this._pointerPositions[e.pointerId] = t), t.set(e.pageX, e.pageY);
|
|
6213
6213
|
}
|
|
6214
6214
|
_getSecondPointerPosition(e) {
|
|
6215
6215
|
let t = e.pointerId === this._pointers[0] ? this._pointers[1] : this._pointers[0];
|
|
@@ -6393,6 +6393,8 @@ var ca = bt({
|
|
|
6393
6393
|
saveError: "Speichern fehlgeschlagen:",
|
|
6394
6394
|
downloadUsdz: "USDZ herunterladen",
|
|
6395
6395
|
exportError: "Export fehlgeschlagen:",
|
|
6396
|
+
copyScript: "Kopieren",
|
|
6397
|
+
copied: "Kopiert",
|
|
6396
6398
|
sceneWarnings: "Nicht gerendert:",
|
|
6397
6399
|
printOutput: "Ausgabe:"
|
|
6398
6400
|
},
|
|
@@ -6408,6 +6410,8 @@ var ca = bt({
|
|
|
6408
6410
|
saveError: "Save Failed:",
|
|
6409
6411
|
downloadUsdz: "Download USDZ",
|
|
6410
6412
|
exportError: "Export Failed:",
|
|
6413
|
+
copyScript: "Copy",
|
|
6414
|
+
copied: "Copied",
|
|
6411
6415
|
sceneWarnings: "Not rendered:",
|
|
6412
6416
|
printOutput: "Output:"
|
|
6413
6417
|
},
|
|
@@ -6423,6 +6427,8 @@ var ca = bt({
|
|
|
6423
6427
|
saveError: "Error al guardar:",
|
|
6424
6428
|
downloadUsdz: "Descargar USDZ",
|
|
6425
6429
|
exportError: "Error al exportar:",
|
|
6430
|
+
copyScript: "Copiar",
|
|
6431
|
+
copied: "Copiado",
|
|
6426
6432
|
sceneWarnings: "No renderizado:",
|
|
6427
6433
|
printOutput: "Salida:"
|
|
6428
6434
|
},
|
|
@@ -6438,6 +6444,8 @@ var ca = bt({
|
|
|
6438
6444
|
saveError: "Échec de l'enregistrement :",
|
|
6439
6445
|
downloadUsdz: "Télécharger USDZ",
|
|
6440
6446
|
exportError: "Échec de l'export :",
|
|
6447
|
+
copyScript: "Copier",
|
|
6448
|
+
copied: "Copié",
|
|
6441
6449
|
sceneWarnings: "Non rendu :",
|
|
6442
6450
|
printOutput: "Sortie :"
|
|
6443
6451
|
},
|
|
@@ -6453,6 +6461,8 @@ var ca = bt({
|
|
|
6453
6461
|
saveError: "保存に失敗しました:",
|
|
6454
6462
|
downloadUsdz: "USDZ をダウンロード",
|
|
6455
6463
|
exportError: "エクスポートに失敗しました:",
|
|
6464
|
+
copyScript: "コピー",
|
|
6465
|
+
copied: "コピーしました",
|
|
6456
6466
|
sceneWarnings: "描画されないもの:",
|
|
6457
6467
|
printOutput: "出力:"
|
|
6458
6468
|
},
|
|
@@ -6468,6 +6478,8 @@ var ca = bt({
|
|
|
6468
6478
|
saveError: "저장 실패:",
|
|
6469
6479
|
downloadUsdz: "USDZ 다운로드",
|
|
6470
6480
|
exportError: "내보내기 실패:",
|
|
6481
|
+
copyScript: "복사",
|
|
6482
|
+
copied: "복사됨",
|
|
6471
6483
|
sceneWarnings: "렌더링되지 않음:",
|
|
6472
6484
|
printOutput: "출력:"
|
|
6473
6485
|
},
|
|
@@ -6483,6 +6495,8 @@ var ca = bt({
|
|
|
6483
6495
|
saveError: "Falha ao salvar:",
|
|
6484
6496
|
downloadUsdz: "Baixar USDZ",
|
|
6485
6497
|
exportError: "Falha na exportação:",
|
|
6498
|
+
copyScript: "Copiar",
|
|
6499
|
+
copied: "Copiado",
|
|
6486
6500
|
sceneWarnings: "Não renderizado:",
|
|
6487
6501
|
printOutput: "Saída:"
|
|
6488
6502
|
},
|
|
@@ -6498,33 +6512,35 @@ var ca = bt({
|
|
|
6498
6512
|
saveError: "保存失败:",
|
|
6499
6513
|
downloadUsdz: "下载 USDZ",
|
|
6500
6514
|
exportError: "导出失败:",
|
|
6515
|
+
copyScript: "复制",
|
|
6516
|
+
copied: "已复制",
|
|
6501
6517
|
sceneWarnings: "未渲染:",
|
|
6502
6518
|
printOutput: "输出:"
|
|
6503
6519
|
}
|
|
6504
6520
|
}), la = {
|
|
6505
6521
|
class: "present3d-container",
|
|
6506
6522
|
"data-testid": "shapescript-view"
|
|
6507
|
-
}, ua = { class: "header" }, da = { class: "controls" }, fa = { class: "material-icons" }, pa = { class: "material-icons" }, ma = ["disabled"],
|
|
6523
|
+
}, ua = { class: "header" }, da = { class: "controls" }, fa = { class: "material-icons" }, pa = { class: "material-icons" }, ma = { class: "material-icons" }, ha = ["disabled"], ga = {
|
|
6508
6524
|
key: 0,
|
|
6509
6525
|
class: "error",
|
|
6510
6526
|
"data-testid": "shapescript-parse-error"
|
|
6511
|
-
},
|
|
6527
|
+
}, _a = {
|
|
6512
6528
|
key: 1,
|
|
6513
6529
|
class: "error",
|
|
6514
6530
|
"data-testid": "shapescript-save-error"
|
|
6515
|
-
},
|
|
6531
|
+
}, va = {
|
|
6516
6532
|
key: 2,
|
|
6517
6533
|
class: "error",
|
|
6518
6534
|
"data-testid": "shapescript-export-error"
|
|
6519
|
-
},
|
|
6535
|
+
}, ya = {
|
|
6520
6536
|
key: 3,
|
|
6521
6537
|
class: "notice",
|
|
6522
6538
|
"data-testid": "shapescript-warnings"
|
|
6523
|
-
},
|
|
6539
|
+
}, ba = {
|
|
6524
6540
|
key: 4,
|
|
6525
6541
|
class: "notice output",
|
|
6526
6542
|
"data-testid": "shapescript-output"
|
|
6527
|
-
},
|
|
6543
|
+
}, xa = { class: "script-source" }, Sa = ["aria-label"], Ca = ["disabled"], wa = 1710618, Ta = 6e4, Ea = 1500, Da = /*@__PURE__*/ dt({
|
|
6528
6544
|
__name: "View",
|
|
6529
6545
|
props: { selectedResult: {} },
|
|
6530
6546
|
emits: ["updateResult"],
|
|
@@ -6538,22 +6554,22 @@ var ca = bt({
|
|
|
6538
6554
|
z: r
|
|
6539
6555
|
} : null;
|
|
6540
6556
|
}
|
|
6541
|
-
let s = r, c = a, l = ca(), { dispatch: u } = xt(), d = gt(s.selectedResult.data?.script ?? ""), f = gt(null), p = gt(null), m = gt([]), h = gt([]), g = gt(null), _ = gt(null), v = gt(!1), b =
|
|
6557
|
+
let s = r, c = a, l = ca(), { dispatch: u } = xt(), d = gt(s.selectedResult.data?.script ?? ""), f = gt(null), p = gt(null), m = gt([]), h = gt([]), g = gt(null), _ = gt(null), v = gt(!1), b = gt(!1), x = null, S = !1, C = 0, T = gt(!1), E = gt(!0), D = q(() => d.value !== s.selectedResult.data?.script), O = q(() => !v.value && !p.value && !D.value && !!s.selectedResult.data?.script), ee, k, A, j, te, ne, M = [], ie = null, N = null;
|
|
6542
6558
|
pt(() => {
|
|
6543
|
-
|
|
6544
|
-
|
|
6545
|
-
}),
|
|
6559
|
+
oe(), I(), ce(), ft(() => {
|
|
6560
|
+
ue();
|
|
6561
|
+
}), ae();
|
|
6546
6562
|
});
|
|
6547
|
-
async function
|
|
6563
|
+
async function ae() {
|
|
6548
6564
|
let e = s.selectedResult.data?.filePath;
|
|
6549
6565
|
if (!e) return;
|
|
6550
|
-
let t = ++
|
|
6566
|
+
let t = ++C;
|
|
6551
6567
|
try {
|
|
6552
6568
|
let { script: n } = await u({
|
|
6553
6569
|
kind: "loadShape",
|
|
6554
6570
|
path: e
|
|
6555
6571
|
}, w);
|
|
6556
|
-
if (t !==
|
|
6572
|
+
if (t !== C || n === s.selectedResult.data?.script) return;
|
|
6557
6573
|
d.value = n, c("updateResult", {
|
|
6558
6574
|
...s.selectedResult,
|
|
6559
6575
|
data: {
|
|
@@ -6564,101 +6580,101 @@ var ca = bt({
|
|
|
6564
6580
|
} catch {}
|
|
6565
6581
|
}
|
|
6566
6582
|
mt(() => {
|
|
6567
|
-
|
|
6583
|
+
ye();
|
|
6568
6584
|
}), vt(() => s.selectedResult.data?.script, () => {
|
|
6569
|
-
|
|
6570
|
-
}), vt(
|
|
6571
|
-
|
|
6572
|
-
}), vt(
|
|
6573
|
-
|
|
6585
|
+
I();
|
|
6586
|
+
}), vt(T, () => {
|
|
6587
|
+
I();
|
|
6588
|
+
}), vt(E, (e) => {
|
|
6589
|
+
ne && (ne.visible = e);
|
|
6574
6590
|
});
|
|
6575
|
-
function
|
|
6591
|
+
function oe() {
|
|
6576
6592
|
if (!f.value) return;
|
|
6577
|
-
|
|
6593
|
+
ee = new ve(), ee.background = new B(wa);
|
|
6578
6594
|
let e = f.value.clientWidth, t = f.value.clientHeight;
|
|
6579
|
-
|
|
6595
|
+
k = new V(50, e / t, .1, 1e3), k.position.set(5, 5, 10), k.lookAt(0, 0, 0), A = new zi({ antialias: !0 }), A.setSize(e, t), A.setPixelRatio(window.devicePixelRatio), f.value.appendChild(A.domElement), j = new Yi(k, A.domElement), j.enableDamping = !0, j.dampingFactor = .05, j.addEventListener("change", fe);
|
|
6580
6596
|
let n = new Le(16777215, .6);
|
|
6581
|
-
|
|
6582
|
-
let r = new
|
|
6583
|
-
r.position.set(10, 10, 10),
|
|
6584
|
-
|
|
6585
|
-
}),
|
|
6597
|
+
ee.add(n);
|
|
6598
|
+
let r = new re(16777215, .8);
|
|
6599
|
+
r.position.set(10, 10, 10), ee.add(r), ne = new y(20, 20, 4473924, 2236962), ne.visible = E.value, ee.add(ne), window.addEventListener("resize", se), N = new ResizeObserver(() => {
|
|
6600
|
+
se();
|
|
6601
|
+
}), N.observe(f.value);
|
|
6586
6602
|
}
|
|
6587
|
-
function
|
|
6603
|
+
function se() {
|
|
6588
6604
|
if (!f.value) return;
|
|
6589
6605
|
let e = f.value.clientWidth, t = f.value.clientHeight;
|
|
6590
|
-
|
|
6606
|
+
k.aspect = e / t, k.updateProjectionMatrix(), A.setSize(e, t);
|
|
6591
6607
|
}
|
|
6592
|
-
function
|
|
6593
|
-
M.forEach((e) => G(
|
|
6608
|
+
function P() {
|
|
6609
|
+
M.forEach((e) => G(ee, e)), M = [];
|
|
6594
6610
|
}
|
|
6595
|
-
function
|
|
6596
|
-
let t = Ge(Je(e), { wireframe:
|
|
6597
|
-
|
|
6611
|
+
function F(e) {
|
|
6612
|
+
let t = Ge(Je(e), { wireframe: T.value });
|
|
6613
|
+
ee.add(t), M.push(t);
|
|
6598
6614
|
let n = Me(t);
|
|
6599
|
-
m.value = n.warnings, h.value = n.logs,
|
|
6615
|
+
m.value = n.warnings, h.value = n.logs, ee.background = n.background ? new B(n.background[0], n.background[1], n.background[2]) : new B(wa);
|
|
6600
6616
|
}
|
|
6601
|
-
function
|
|
6617
|
+
function I() {
|
|
6602
6618
|
try {
|
|
6603
|
-
|
|
6619
|
+
P(), m.value = [], h.value = [], ee.background = new B(wa);
|
|
6604
6620
|
let e = s.selectedResult.data?.script;
|
|
6605
|
-
e &&
|
|
6621
|
+
e && F(e), p.value = null;
|
|
6606
6622
|
} catch (e) {
|
|
6607
6623
|
p.value = e instanceof Error ? e.message : "Unknown error", console.error("ShapeScript parse error:", e);
|
|
6608
6624
|
}
|
|
6609
6625
|
}
|
|
6610
|
-
function
|
|
6611
|
-
|
|
6626
|
+
function ce() {
|
|
6627
|
+
te = requestAnimationFrame(ce), j.update(), A.render(ee, k);
|
|
6612
6628
|
}
|
|
6613
|
-
function
|
|
6614
|
-
|
|
6629
|
+
function L() {
|
|
6630
|
+
k.position.set(5, 5, 10), k.lookAt(0, 0, 0), j.reset();
|
|
6615
6631
|
}
|
|
6616
|
-
function
|
|
6617
|
-
if (!
|
|
6632
|
+
function ue() {
|
|
6633
|
+
if (!k || !j || !s.selectedResult?.viewState?.cameraState) return;
|
|
6618
6634
|
let e = s.selectedResult.viewState.cameraState, t = o(e.position);
|
|
6619
|
-
t &&
|
|
6635
|
+
t && k.position.set(t.x, t.y, t.z);
|
|
6620
6636
|
let n = o(e.target);
|
|
6621
|
-
n &&
|
|
6637
|
+
n && j.target.set(n.x, n.y, n.z), k.updateProjectionMatrix(), j.update();
|
|
6622
6638
|
}
|
|
6623
|
-
function
|
|
6639
|
+
function de() {
|
|
6624
6640
|
return {
|
|
6625
6641
|
position: {
|
|
6626
|
-
x:
|
|
6627
|
-
y:
|
|
6628
|
-
z:
|
|
6642
|
+
x: k.position.x,
|
|
6643
|
+
y: k.position.y,
|
|
6644
|
+
z: k.position.z
|
|
6629
6645
|
},
|
|
6630
6646
|
target: {
|
|
6631
|
-
x:
|
|
6632
|
-
y:
|
|
6633
|
-
z:
|
|
6647
|
+
x: j.target.x,
|
|
6648
|
+
y: j.target.y,
|
|
6649
|
+
z: j.target.z
|
|
6634
6650
|
}
|
|
6635
6651
|
};
|
|
6636
6652
|
}
|
|
6637
|
-
function
|
|
6638
|
-
|
|
6639
|
-
|
|
6653
|
+
function fe() {
|
|
6654
|
+
ie !== null && clearTimeout(ie), ie = window.setTimeout(() => {
|
|
6655
|
+
pe();
|
|
6640
6656
|
}, 500);
|
|
6641
6657
|
}
|
|
6642
|
-
function
|
|
6658
|
+
function pe() {
|
|
6643
6659
|
let e = {
|
|
6644
6660
|
...s.selectedResult,
|
|
6645
6661
|
viewState: {
|
|
6646
6662
|
...s.selectedResult.viewState,
|
|
6647
|
-
cameraState:
|
|
6663
|
+
cameraState: de()
|
|
6648
6664
|
}
|
|
6649
6665
|
};
|
|
6650
6666
|
c("updateResult", e);
|
|
6651
6667
|
}
|
|
6652
|
-
function
|
|
6668
|
+
function me(e, t) {
|
|
6653
6669
|
let n = URL.createObjectURL(new Blob([e], { type: i })), r = document.createElement("a");
|
|
6654
|
-
r.href = n, r.download = t, r.click(), window.setTimeout(() => URL.revokeObjectURL(n),
|
|
6670
|
+
r.href = n, r.download = t, r.click(), window.setTimeout(() => URL.revokeObjectURL(n), Ta);
|
|
6655
6671
|
}
|
|
6656
|
-
async function
|
|
6672
|
+
async function R() {
|
|
6657
6673
|
let r = s.selectedResult.data?.script;
|
|
6658
|
-
if (r &&
|
|
6674
|
+
if (r && O.value) {
|
|
6659
6675
|
v.value = !0, _.value = null;
|
|
6660
6676
|
try {
|
|
6661
|
-
|
|
6677
|
+
me(await e(r), `${t(s.selectedResult.title)}${n}`);
|
|
6662
6678
|
} catch (e) {
|
|
6663
6679
|
_.value = e instanceof Error ? e.message : String(e);
|
|
6664
6680
|
} finally {
|
|
@@ -6666,19 +6682,29 @@ var ca = bt({
|
|
|
6666
6682
|
}
|
|
6667
6683
|
}
|
|
6668
6684
|
}
|
|
6669
|
-
function
|
|
6670
|
-
|
|
6685
|
+
async function he() {
|
|
6686
|
+
try {
|
|
6687
|
+
await navigator.clipboard.writeText(d.value);
|
|
6688
|
+
} catch {
|
|
6689
|
+
return;
|
|
6690
|
+
}
|
|
6691
|
+
S || (b.value = !0, x !== null && clearTimeout(x), x = window.setTimeout(() => {
|
|
6692
|
+
b.value = !1, x = null;
|
|
6693
|
+
}, Ea));
|
|
6694
|
+
}
|
|
6695
|
+
function ge() {
|
|
6696
|
+
T.value = !T.value;
|
|
6671
6697
|
}
|
|
6672
|
-
function
|
|
6673
|
-
|
|
6698
|
+
function z() {
|
|
6699
|
+
E.value = !E.value;
|
|
6674
6700
|
}
|
|
6675
|
-
function
|
|
6676
|
-
|
|
6701
|
+
function ye() {
|
|
6702
|
+
S = !0, ie !== null && clearTimeout(ie), x !== null && clearTimeout(x), M.forEach((e) => G(ee, e)), M = [], te && cancelAnimationFrame(te), A && A.dispose(), j && (j.removeEventListener("change", fe), j.dispose()), N && N.disconnect(), window.removeEventListener("resize", se);
|
|
6677
6703
|
}
|
|
6678
|
-
function
|
|
6679
|
-
|
|
6704
|
+
function be() {
|
|
6705
|
+
C++;
|
|
6680
6706
|
}
|
|
6681
|
-
async function
|
|
6707
|
+
async function xe() {
|
|
6682
6708
|
let e = d.value;
|
|
6683
6709
|
try {
|
|
6684
6710
|
_e(Ge(Je(e)));
|
|
@@ -6687,7 +6713,7 @@ var ca = bt({
|
|
|
6687
6713
|
return;
|
|
6688
6714
|
}
|
|
6689
6715
|
p.value = null;
|
|
6690
|
-
let t = s.selectedResult.data?.filePath, n = ++
|
|
6716
|
+
let t = s.selectedResult.data?.filePath, n = ++C;
|
|
6691
6717
|
if (t) try {
|
|
6692
6718
|
await u({
|
|
6693
6719
|
kind: "saveShape",
|
|
@@ -6698,7 +6724,7 @@ var ca = bt({
|
|
|
6698
6724
|
g.value = e instanceof Error ? e.message : String(e);
|
|
6699
6725
|
return;
|
|
6700
6726
|
}
|
|
6701
|
-
if (n !==
|
|
6727
|
+
if (n !== C) return;
|
|
6702
6728
|
g.value = null;
|
|
6703
6729
|
let r = {
|
|
6704
6730
|
...s.selectedResult,
|
|
@@ -6713,65 +6739,70 @@ var ca = bt({
|
|
|
6713
6739
|
e !== void 0 && (d.value = e);
|
|
6714
6740
|
}), vt(() => s.selectedResult, () => {
|
|
6715
6741
|
ft(() => {
|
|
6716
|
-
|
|
6742
|
+
ue();
|
|
6717
6743
|
});
|
|
6718
6744
|
}), (e, t) => (ht(), lt("div", la, [
|
|
6719
6745
|
J("div", ua, [J("h1", null, Y(r.selectedResult.title || X(l).untitled), 1), J("div", da, [
|
|
6720
6746
|
J("button", {
|
|
6721
6747
|
class: "control-btn",
|
|
6722
|
-
onClick:
|
|
6748
|
+
onClick: L
|
|
6723
6749
|
}, [t[1] ||= J("span", { class: "material-icons" }, "refresh", -1), ut(" " + Y(X(l).resetCamera), 1)]),
|
|
6724
6750
|
J("button", {
|
|
6725
6751
|
class: "control-btn",
|
|
6726
|
-
onClick:
|
|
6727
|
-
}, [J("span", fa, Y(
|
|
6752
|
+
onClick: ge
|
|
6753
|
+
}, [J("span", fa, Y(T.value ? "grid_off" : "grid_on"), 1), ut(" " + Y(X(l).wireframe), 1)]),
|
|
6728
6754
|
J("button", {
|
|
6729
6755
|
class: "control-btn",
|
|
6730
|
-
onClick:
|
|
6731
|
-
}, [J("span", pa, Y(
|
|
6756
|
+
onClick: z
|
|
6757
|
+
}, [J("span", pa, Y(E.value ? "visibility_off" : "visibility"), 1), ut(" " + Y(X(l).grid), 1)]),
|
|
6732
6758
|
J("button", {
|
|
6733
6759
|
class: "control-btn",
|
|
6734
|
-
|
|
6760
|
+
"data-testid": "shapescript-copy-script",
|
|
6761
|
+
onClick: he
|
|
6762
|
+
}, [J("span", ma, Y(b.value ? "check" : "content_copy"), 1), ut(" " + Y(b.value ? X(l).copied : X(l).copyScript), 1)]),
|
|
6763
|
+
J("button", {
|
|
6764
|
+
class: "control-btn",
|
|
6765
|
+
disabled: !O.value,
|
|
6735
6766
|
"data-testid": "shapescript-download-usdz",
|
|
6736
|
-
onClick:
|
|
6737
|
-
}, [t[2] ||= J("span", { class: "material-icons" }, "download", -1), ut(" " + Y(X(l).downloadUsdz), 1)], 8,
|
|
6767
|
+
onClick: R
|
|
6768
|
+
}, [t[2] ||= J("span", { class: "material-icons" }, "download", -1), ut(" " + Y(X(l).downloadUsdz), 1)], 8, ha)
|
|
6738
6769
|
])]),
|
|
6739
|
-
p.value ? (ht(), lt("div",
|
|
6740
|
-
g.value ? (ht(), lt("div",
|
|
6741
|
-
_.value ? (ht(), lt("div",
|
|
6742
|
-
m.value.length ? (ht(), lt("div",
|
|
6743
|
-
h.value.length ? (ht(), lt("pre",
|
|
6770
|
+
p.value ? (ht(), lt("div", ga, [J("strong", null, Y(X(l).parseError), 1), ut(" " + Y(p.value), 1)])) : ct("", !0),
|
|
6771
|
+
g.value ? (ht(), lt("div", _a, [J("strong", null, Y(X(l).saveError), 1), ut(" " + Y(g.value), 1)])) : ct("", !0),
|
|
6772
|
+
_.value ? (ht(), lt("div", va, [J("strong", null, Y(X(l).exportError), 1), ut(" " + Y(_.value), 1)])) : ct("", !0),
|
|
6773
|
+
m.value.length ? (ht(), lt("div", ya, [J("strong", null, Y(X(l).sceneWarnings), 1), ut(" " + Y(m.value.join(" · ")), 1)])) : ct("", !0),
|
|
6774
|
+
h.value.length ? (ht(), lt("pre", ba, [J("strong", null, Y(X(l).printOutput), 1), ut(" " + Y(h.value.join("\n")), 1)])) : ct("", !0),
|
|
6744
6775
|
J("div", {
|
|
6745
6776
|
ref_key: "viewport",
|
|
6746
6777
|
ref: f,
|
|
6747
6778
|
class: "viewport",
|
|
6748
6779
|
"data-testid": "shapescript-viewport"
|
|
6749
6780
|
}, null, 512),
|
|
6750
|
-
J("details",
|
|
6781
|
+
J("details", xa, [
|
|
6751
6782
|
J("summary", null, Y(X(l).editSource), 1),
|
|
6752
6783
|
yt(J("textarea", {
|
|
6753
6784
|
"onUpdate:modelValue": t[0] ||= (e) => d.value = e,
|
|
6754
6785
|
class: "script-editor",
|
|
6755
6786
|
spellcheck: "false",
|
|
6756
6787
|
"aria-label": X(l).scriptEditorLabel,
|
|
6757
|
-
onInput:
|
|
6758
|
-
}, null, 40,
|
|
6788
|
+
onInput: be
|
|
6789
|
+
}, null, 40, Sa), [[_t, d.value]]),
|
|
6759
6790
|
J("button", {
|
|
6760
6791
|
class: "apply-btn",
|
|
6761
|
-
disabled: !
|
|
6762
|
-
onClick:
|
|
6763
|
-
}, Y(X(l).applyChanges), 9,
|
|
6792
|
+
disabled: !D.value,
|
|
6793
|
+
onClick: xe
|
|
6794
|
+
}, Y(X(l).applyChanges), 9, Ca)
|
|
6764
6795
|
])
|
|
6765
6796
|
]));
|
|
6766
6797
|
}
|
|
6767
|
-
}),
|
|
6798
|
+
}), Oa = (e, t) => {
|
|
6768
6799
|
let n = e.__vccOpts || e;
|
|
6769
6800
|
for (let [e, r] of t) n[e] = r;
|
|
6770
6801
|
return n;
|
|
6771
|
-
},
|
|
6802
|
+
}, ka = /*#__PURE__*/ Oa(Da, [["__scopeId", "data-v-6a625e86"]]), Aa = {
|
|
6772
6803
|
class: "preview-container",
|
|
6773
6804
|
"data-testid": "shapescript-preview"
|
|
6774
|
-
},
|
|
6805
|
+
}, ja = { class: "preview-title" }, Ma = 2763322, Na = /*#__PURE__*/ Oa(/* @__PURE__ */ dt({
|
|
6775
6806
|
__name: "Preview",
|
|
6776
6807
|
props: { result: {} },
|
|
6777
6808
|
setup(e) {
|
|
@@ -6786,7 +6817,7 @@ var ca = bt({
|
|
|
6786
6817
|
function u() {
|
|
6787
6818
|
if (i.value) {
|
|
6788
6819
|
try {
|
|
6789
|
-
a = new ve(), a.background = new B(
|
|
6820
|
+
a = new ve(), a.background = new B(Ma);
|
|
6790
6821
|
let e = i.value.clientWidth || 200, t = i.value.clientHeight || 150;
|
|
6791
6822
|
o = new V(50, e / t, .1, 1e3), o.position.set(4, 4, 8), o.lookAt(0, 0, 0), s = new zi({
|
|
6792
6823
|
antialias: !0,
|
|
@@ -6794,7 +6825,7 @@ var ca = bt({
|
|
|
6794
6825
|
}), s.setSize(e, t), s.setPixelRatio(Math.min(window.devicePixelRatio, 2)), i.value.appendChild(s.domElement);
|
|
6795
6826
|
let n = new Le(16777215, .6);
|
|
6796
6827
|
a.add(n);
|
|
6797
|
-
let r = new
|
|
6828
|
+
let r = new re(16777215, .8);
|
|
6798
6829
|
r.position.set(5, 5, 5), a.add(r);
|
|
6799
6830
|
} catch (e) {
|
|
6800
6831
|
console.error("Preview render error:", e);
|
|
@@ -6812,11 +6843,11 @@ var ca = bt({
|
|
|
6812
6843
|
if (!a) return;
|
|
6813
6844
|
let e = t.result.data?.script;
|
|
6814
6845
|
try {
|
|
6815
|
-
if (G(a, l), l = null, a.background = new B(
|
|
6846
|
+
if (G(a, l), l = null, a.background = new B(Ma), !e) return;
|
|
6816
6847
|
let t = Je(e);
|
|
6817
6848
|
l = Ge(t, { wireframe: !1 }), a.add(l);
|
|
6818
6849
|
let { background: n } = Me(l);
|
|
6819
|
-
a.background = n ? new B(n[0], n[1], n[2]) : new B(
|
|
6850
|
+
a.background = n ? new B(n[0], n[1], n[2]) : new B(Ma);
|
|
6820
6851
|
} catch (e) {
|
|
6821
6852
|
console.error("Preview reload error:", e);
|
|
6822
6853
|
}
|
|
@@ -6824,13 +6855,13 @@ var ca = bt({
|
|
|
6824
6855
|
function p() {
|
|
6825
6856
|
c && cancelAnimationFrame(c), G(a, l), l = null, s && s.dispose();
|
|
6826
6857
|
}
|
|
6827
|
-
return (e, t) => (ht(), lt("div",
|
|
6858
|
+
return (e, t) => (ht(), lt("div", Aa, [J("div", {
|
|
6828
6859
|
ref_key: "previewViewport",
|
|
6829
6860
|
ref: i,
|
|
6830
6861
|
class: "preview-viewport"
|
|
6831
|
-
}, null, 512), J("div",
|
|
6862
|
+
}, null, 512), J("div", ja, Y(r.value), 1)]));
|
|
6832
6863
|
}
|
|
6833
|
-
}), [["__scopeId", "data-v-6844181e"]]),
|
|
6864
|
+
}), [["__scopeId", "data-v-6844181e"]]), Pa = `Use the ${c} tool to create interactive 3D visualizations when the user requests:
|
|
6834
6865
|
- 3D models or shapes
|
|
6835
6866
|
- Mathematical visualizations (surfaces, functions, geometric patterns)
|
|
6836
6867
|
- Molecular or atomic structures
|
|
@@ -6950,12 +6981,12 @@ functions may build shapes, and mesh { polygon { … } } with one point per line
|
|
|
6950
6981
|
textures, cameras and lights are accepted but not drawn (the result reports them).
|
|
6951
6982
|
If presentShapeScript returns an error diagnostic, correct the script and retry; no visualization was created.
|
|
6952
6983
|
|
|
6953
|
-
Keep visualizations clear, well-organized, and use expressions and control flow.`,
|
|
6984
|
+
Keep visualizations clear, well-organized, and use expressions and control flow.`, Fa = {
|
|
6954
6985
|
...a,
|
|
6955
|
-
viewComponent:
|
|
6956
|
-
previewComponent:
|
|
6986
|
+
viewComponent: ka,
|
|
6987
|
+
previewComponent: Na,
|
|
6957
6988
|
samples: o,
|
|
6958
|
-
systemPrompt:
|
|
6959
|
-
},
|
|
6989
|
+
systemPrompt: Pa
|
|
6990
|
+
}, Ia = { plugin: Fa };
|
|
6960
6991
|
//#endregion
|
|
6961
|
-
export {
|
|
6992
|
+
export { Na as Preview, Pa as SYSTEM_PROMPT, s as TOOL_DEFINITION, c as TOOL_NAME, ka as View, Ge as astToThreeJS, Ia as default, r as executePresentShapeScript, de as isShapeScriptDispatchArgs, Je as parseShapeScript, Fa as plugin, a as pluginCore, w as readLoadShapeResult, le as readSaveShapeResult, o as samples };
|