endset_three_editor 0.10.7 → 0.10.9
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/three-editor.cjs.js +13 -13
- package/dist/three-editor.cjs.js.map +1 -1
- package/dist/three-editor.es.js +419 -416
- package/dist/three-editor.es.js.map +1 -1
- package/package.json +1 -1
package/dist/three-editor.es.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
var Gi = Object.defineProperty;
|
|
2
2
|
var Bi = (r, e, t) => e in r ? Gi(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t;
|
|
3
3
|
var Je = (r, e, t) => Bi(r, typeof e != "symbol" ? e + "" : e, t);
|
|
4
|
-
import { toRaw as us, reactive as
|
|
4
|
+
import { toRaw as us, reactive as ts, defineComponent as Ze, ref as G, inject as Xi, computed as tt, watchEffect as Vi, resolveComponent as qi, openBlock as H, createElementBlock as k, createElementVNode as y, normalizeClass as Pe, withModifiers as ss, unref as ns, toDisplayString as fe, Fragment as Ee, renderList as At, createBlock as vt, createCommentVNode as re, watch as Me, withDirectives as j, vModelText as W, createTextVNode as ms, withKeys as ut, vModelCheckbox as Yi, toRef as Ki, provide as Zi, createVNode as gs, vShow as st, shallowRef as Qs, onMounted as Qi, onBeforeUnmount as Ji } from "vue";
|
|
5
5
|
import * as O from "three";
|
|
6
|
-
import { Controls as Fn, Vector3 as P, MOUSE as ht, TOUCH as dt, Quaternion as Ae, Spherical as Js, Vector2 as ue, Ray as _i, Plane as Un, MathUtils as Pt, Raycaster as $i, Object3D as mt, MeshBasicMaterial as nt, LineBasicMaterial as Mt, CylinderGeometry as ge, BoxGeometry as pe, BufferGeometry as rt, Float32BufferAttribute as
|
|
6
|
+
import { Controls as Fn, Vector3 as P, MOUSE as ht, TOUCH as dt, Quaternion as Ae, Spherical as Js, Vector2 as ue, Ray as _i, Plane as Un, MathUtils as Pt, Raycaster as $i, Object3D as mt, MeshBasicMaterial as nt, LineBasicMaterial as Mt, CylinderGeometry as ge, BoxGeometry as pe, BufferGeometry as rt, Float32BufferAttribute as ke, Mesh as L, OctahedronGeometry as Ft, Line as We, TorusGeometry as gt, SphereGeometry as eo, Euler as to, Matrix4 as Ce, PlaneGeometry as so, DoubleSide as zs, OrthographicCamera as zn, ShaderMaterial as Rs, UniformsUtils as is, WebGLRenderTarget as Wn, HalfFloatType as Gn, NoBlending as no, Timer as io, Color as le, RawShaderMaterial as oo, ColorManagement as os, SRGBTransfer as ro, LinearToneMapping as ao, ReinhardToneMapping as lo, CineonToneMapping as co, ACESFilmicToneMapping as uo, AgXToneMapping as fo, NeutralToneMapping as ho, CustomToneMapping as po, BufferAttribute as De, REVISION as Ao, CompressedTexture as ys, Source as mo, NoColorSpace as go, RGBAFormat as yo, ImageUtils as bo, PropertyBinding as St, InterpolateDiscrete as Bn, Scene as _s, SRGBColorSpace as je, NearestFilter as Ws, NearestMipmapNearestFilter as Xn, NearestMipmapLinearFilter as Vn, LinearFilter as rs, LinearMipmapNearestFilter as qn, LinearMipmapLinearFilter as Gs, ClampToEdgeWrapping as Yn, RepeatWrapping as it, MirroredRepeatWrapping as Kn, InterpolateLinear as Bs, TrianglesDrawMode as xo, TriangleFanDrawMode as Ps, TriangleStripDrawMode as Zn, Loader as Xs, LoaderUtils as Tt, FileLoader as Lt, MeshPhysicalMaterial as Ue, LinearSRGBColorSpace as Fe, SpotLight as Io, PointLight as Co, DirectionalLight as wo, InstancedMesh as vo, InstancedBufferAttribute as Mo, TextureLoader as Yt, ImageBitmapLoader as To, InterleavedBuffer as Qn, InterleavedBufferAttribute as Jn, PointsMaterial as It, Material as Et, MeshStandardMaterial as _n, SkinnedMesh as Eo, LineSegments as Ss, LineLoop as Do, Points as Kt, Group as Zt, PerspectiveCamera as $n, Skeleton as Oo, AnimationClip as Ro, Bone as Po, Texture as $s, VectorKeyframeTrack as en, NumberKeyframeTrack as tn, QuaternionKeyframeTrack as sn, FrontSide as ei, Interpolant as So, Box3 as Lo, Sphere as No, MeshPhongMaterial as Ho, Vector4 as nn, UniformsLib as on } from "three";
|
|
7
7
|
import de from "@tweenjs/tween.js";
|
|
8
|
-
const rn = { type: "change" }, Vs = { type: "start" }, ti = { type: "end" },
|
|
8
|
+
const rn = { type: "change" }, Vs = { type: "start" }, ti = { type: "end" }, Ut = new _i(), an = new Un(), ko = Math.cos(70 * Pt.DEG2RAD), ce = new P(), ye = 2 * Math.PI, ee = {
|
|
9
9
|
NONE: -1,
|
|
10
10
|
ROTATE: 0,
|
|
11
11
|
DOLLY: 1,
|
|
@@ -167,7 +167,7 @@ class jo extends Fn {
|
|
|
167
167
|
c.unproject(this.object), this.object.position.sub(c).add(a), this.object.updateMatrixWorld(), o = ce.length();
|
|
168
168
|
} else
|
|
169
169
|
console.warn("WARNING: OrbitControls.js encountered an unknown camera type - zoom to cursor disabled."), this.zoomToCursor = !1;
|
|
170
|
-
o !== null && (this.screenSpacePanning ? this.target.set(0, 0, -1).transformDirection(this.object.matrix).multiplyScalar(o).add(this.object.position) : (
|
|
170
|
+
o !== null && (this.screenSpacePanning ? this.target.set(0, 0, -1).transformDirection(this.object.matrix).multiplyScalar(o).add(this.object.position) : (Ut.origin.copy(this.object.position), Ut.direction.set(0, 0, -1).transformDirection(this.object.matrix), Math.abs(this.object.up.dot(Ut.direction)) < ko ? this.object.lookAt(this.target) : (an.setFromNormalAndCoplanarPoint(this.object.up, this.target), Ut.intersectPlane(an, this.target))));
|
|
171
171
|
} else if (this.object.isOrthographicCamera) {
|
|
172
172
|
const o = this.object.zoom;
|
|
173
173
|
this.object.zoom = Math.max(this.minZoom, Math.min(this.maxZoom, this.object.zoom / this._scale)), o !== this.object.zoom && (this.object.updateProjectionMatrix(), i = !0);
|
|
@@ -749,7 +749,7 @@ function Is(r, e, t) {
|
|
|
749
749
|
return n[s];
|
|
750
750
|
return !1;
|
|
751
751
|
}
|
|
752
|
-
const
|
|
752
|
+
const zt = new to(), te = new P(0, 1, 0), fn = new P(0, 0, 0), hn = new Ce(), Wt = new Ae(), Qt = new Ae(), Ne = new P(), pn = new Ce(), Ct = new P(1, 0, 0), et = new P(0, 1, 0), wt = new P(0, 0, 1), Gt = new P(), yt = new P(), bt = new P();
|
|
753
753
|
class sr extends mt {
|
|
754
754
|
constructor(e) {
|
|
755
755
|
super(), this.isTransformControlsRoot = !0, this.controls = e, this.visible = !1;
|
|
@@ -818,7 +818,7 @@ class nr extends mt {
|
|
|
818
818
|
const A = new pe(0.08, 0.08, 0.08);
|
|
819
819
|
A.translate(0, 0.04, 0);
|
|
820
820
|
const I = new rt();
|
|
821
|
-
I.setAttribute("position", new
|
|
821
|
+
I.setAttribute("position", new ke([0, 0, 0, 1, 0, 0], 3));
|
|
822
822
|
const w = new ge(75e-4, 75e-4, 0.5, 3);
|
|
823
823
|
w.translate(0, 0.25, 0);
|
|
824
824
|
function f(N, U) {
|
|
@@ -827,7 +827,7 @@ class nr extends mt {
|
|
|
827
827
|
}
|
|
828
828
|
function h() {
|
|
829
829
|
const N = new rt();
|
|
830
|
-
return N.setAttribute("position", new
|
|
830
|
+
return N.setAttribute("position", new ke([0, 0, 0, 1, 1, 1], 3)), N;
|
|
831
831
|
}
|
|
832
832
|
const v = {
|
|
833
833
|
X: [
|
|
@@ -846,7 +846,7 @@ class nr extends mt {
|
|
|
846
846
|
[new L(w, a), null, [Math.PI / 2, 0, 0]]
|
|
847
847
|
],
|
|
848
848
|
XYZ: [
|
|
849
|
-
[new L(new
|
|
849
|
+
[new L(new Ft(0.1, 0), u), [0, 0, 0]]
|
|
850
850
|
],
|
|
851
851
|
XY: [
|
|
852
852
|
[new L(new pe(0.15, 0.15, 0.01), d), [0.15, 0.15, 0]]
|
|
@@ -871,7 +871,7 @@ class nr extends mt {
|
|
|
871
871
|
[new L(new ge(0.2, 0, 0.6, 4), n), [0, 0, -0.3], [-Math.PI / 2, 0, 0]]
|
|
872
872
|
],
|
|
873
873
|
XYZ: [
|
|
874
|
-
[new L(new
|
|
874
|
+
[new L(new Ft(0.2, 0), n)]
|
|
875
875
|
],
|
|
876
876
|
XY: [
|
|
877
877
|
[new L(new pe(0.2, 0.2, 0.01), n), [0.15, 0.15, 0]]
|
|
@@ -884,10 +884,10 @@ class nr extends mt {
|
|
|
884
884
|
]
|
|
885
885
|
}, R = {
|
|
886
886
|
START: [
|
|
887
|
-
[new L(new
|
|
887
|
+
[new L(new Ft(0.01, 2), s), null, null, null, "helper"]
|
|
888
888
|
],
|
|
889
889
|
END: [
|
|
890
|
-
[new L(new
|
|
890
|
+
[new L(new Ft(0.01, 2), s), null, null, null, "helper"]
|
|
891
891
|
],
|
|
892
892
|
DELTA: [
|
|
893
893
|
[new We(h(), s), null, null, null, "helper"]
|
|
@@ -1007,8 +1007,8 @@ class nr extends mt {
|
|
|
1007
1007
|
for (let _ = N[z].length; _--; ) {
|
|
1008
1008
|
const B = N[z][_][0].clone(), be = N[z][_][1], Oe = N[z][_][2], Re = N[z][_][3], Xe = N[z][_][4];
|
|
1009
1009
|
B.name = z, B.tag = Xe, be && B.position.set(be[0], be[1], be[2]), Oe && B.rotation.set(Oe[0], Oe[1], Oe[2]), Re && B.scale.set(Re[0], Re[1], Re[2]), B.updateMatrix();
|
|
1010
|
-
const
|
|
1011
|
-
|
|
1010
|
+
const Le = B.geometry.clone();
|
|
1011
|
+
Le.applyMatrix4(B.matrix), B.geometry = Le, B.renderOrder = 1 / 0, B.position.set(0, 0, 0), B.rotation.set(0, 0, 0), B.scale.set(1, 1, 1), U.add(B);
|
|
1012
1012
|
}
|
|
1013
1013
|
return U;
|
|
1014
1014
|
}
|
|
@@ -1016,7 +1016,7 @@ class nr extends mt {
|
|
|
1016
1016
|
}
|
|
1017
1017
|
// updateMatrixWorld will update transformations and appearance of individual handles
|
|
1018
1018
|
updateMatrixWorld(e) {
|
|
1019
|
-
const n = (this.mode === "scale" ? "local" : this.space) === "local" ? this.worldQuaternion :
|
|
1019
|
+
const n = (this.mode === "scale" ? "local" : this.space) === "local" ? this.worldQuaternion : Qt;
|
|
1020
1020
|
this.gizmo.translate.visible = this.mode === "translate", this.gizmo.rotate.visible = this.mode === "rotate", this.gizmo.scale.visible = this.mode === "scale", this.helper.translate.visible = this.mode === "translate", this.helper.rotate.visible = this.mode === "rotate", this.helper.scale.visible = this.mode === "scale";
|
|
1021
1021
|
let s = [];
|
|
1022
1022
|
s = s.concat(this.picker[this.mode].children), s = s.concat(this.gizmo[this.mode].children), s = s.concat(this.helper[this.mode].children);
|
|
@@ -1025,10 +1025,10 @@ class nr extends mt {
|
|
|
1025
1025
|
o.visible = !0, o.rotation.set(0, 0, 0), o.position.copy(this.worldPosition);
|
|
1026
1026
|
let a;
|
|
1027
1027
|
if (this.camera.isOrthographicCamera ? a = (this.camera.top - this.camera.bottom) / this.camera.zoom : a = this.worldPosition.distanceTo(this.cameraPosition) * Math.min(1.9 * Math.tan(Math.PI * this.camera.fov / 360) / this.camera.zoom, 7), o.scale.set(1, 1, 1).multiplyScalar(a * this.size / 4), o.tag === "helper") {
|
|
1028
|
-
o.visible = !1, o.name === "AXIS" ? (o.visible = !!this.axis, this.axis === "X" && (ie.setFromEuler(
|
|
1028
|
+
o.visible = !1, o.name === "AXIS" ? (o.visible = !!this.axis, this.axis === "X" && (ie.setFromEuler(zt.set(0, 0, 0)), o.quaternion.copy(n).multiply(ie), Math.abs(te.copy(Ct).applyQuaternion(n).dot(this.eye)) > 0.9 && (o.visible = !1)), this.axis === "Y" && (ie.setFromEuler(zt.set(0, 0, Math.PI / 2)), o.quaternion.copy(n).multiply(ie), Math.abs(te.copy(et).applyQuaternion(n).dot(this.eye)) > 0.9 && (o.visible = !1)), this.axis === "Z" && (ie.setFromEuler(zt.set(0, Math.PI / 2, 0)), o.quaternion.copy(n).multiply(ie), Math.abs(te.copy(wt).applyQuaternion(n).dot(this.eye)) > 0.9 && (o.visible = !1)), this.axis === "XYZE" && (ie.setFromEuler(zt.set(0, Math.PI / 2, 0)), te.copy(this.rotationAxis), o.quaternion.setFromRotationMatrix(hn.lookAt(fn, te, et)), o.quaternion.multiply(ie), o.visible = this.dragging), this.axis === "E" && (o.visible = !1)) : o.name === "START" ? (o.position.copy(this.worldPositionStart), o.visible = this.dragging) : o.name === "END" ? (o.position.copy(this.worldPosition), o.visible = this.dragging) : o.name === "DELTA" ? (o.position.copy(this.worldPositionStart), o.quaternion.copy(this.worldQuaternionStart), he.set(1e-10, 1e-10, 1e-10).add(this.worldPositionStart).sub(this.worldPosition).multiplyScalar(-1), he.applyQuaternion(this.worldQuaternionStart.clone().invert()), o.scale.copy(he), o.visible = this.dragging) : (o.quaternion.copy(n), this.dragging ? o.position.copy(this.worldPositionStart) : o.position.copy(this.worldPosition), this.axis && (o.visible = this.axis.search(o.name) !== -1));
|
|
1029
1029
|
continue;
|
|
1030
1030
|
}
|
|
1031
|
-
o.quaternion.copy(n), this.mode === "translate" || this.mode === "scale" ? (o.name === "X" && Math.abs(te.copy(Ct).applyQuaternion(n).dot(this.eye)) > 0.99 && (o.scale.set(1e-10, 1e-10, 1e-10), o.visible = !1), o.name === "Y" && Math.abs(te.copy(et).applyQuaternion(n).dot(this.eye)) > 0.99 && (o.scale.set(1e-10, 1e-10, 1e-10), o.visible = !1), o.name === "Z" && Math.abs(te.copy(wt).applyQuaternion(n).dot(this.eye)) > 0.99 && (o.scale.set(1e-10, 1e-10, 1e-10), o.visible = !1), o.name === "XY" && Math.abs(te.copy(wt).applyQuaternion(n).dot(this.eye)) < 0.2 && (o.scale.set(1e-10, 1e-10, 1e-10), o.visible = !1), o.name === "YZ" && Math.abs(te.copy(Ct).applyQuaternion(n).dot(this.eye)) < 0.2 && (o.scale.set(1e-10, 1e-10, 1e-10), o.visible = !1), o.name === "XZ" && Math.abs(te.copy(et).applyQuaternion(n).dot(this.eye)) < 0.2 && (o.scale.set(1e-10, 1e-10, 1e-10), o.visible = !1)) : this.mode === "rotate" && (
|
|
1031
|
+
o.quaternion.copy(n), this.mode === "translate" || this.mode === "scale" ? (o.name === "X" && Math.abs(te.copy(Ct).applyQuaternion(n).dot(this.eye)) > 0.99 && (o.scale.set(1e-10, 1e-10, 1e-10), o.visible = !1), o.name === "Y" && Math.abs(te.copy(et).applyQuaternion(n).dot(this.eye)) > 0.99 && (o.scale.set(1e-10, 1e-10, 1e-10), o.visible = !1), o.name === "Z" && Math.abs(te.copy(wt).applyQuaternion(n).dot(this.eye)) > 0.99 && (o.scale.set(1e-10, 1e-10, 1e-10), o.visible = !1), o.name === "XY" && Math.abs(te.copy(wt).applyQuaternion(n).dot(this.eye)) < 0.2 && (o.scale.set(1e-10, 1e-10, 1e-10), o.visible = !1), o.name === "YZ" && Math.abs(te.copy(Ct).applyQuaternion(n).dot(this.eye)) < 0.2 && (o.scale.set(1e-10, 1e-10, 1e-10), o.visible = !1), o.name === "XZ" && Math.abs(te.copy(et).applyQuaternion(n).dot(this.eye)) < 0.2 && (o.scale.set(1e-10, 1e-10, 1e-10), o.visible = !1)) : this.mode === "rotate" && (Wt.copy(n), te.copy(this.eye).applyQuaternion(ie.copy(n).invert()), o.name.search("E") !== -1 && o.quaternion.setFromRotationMatrix(hn.lookAt(this.eye, fn, et)), o.name === "X" && (ie.setFromAxisAngle(Ct, Math.atan2(-te.y, te.z)), ie.multiplyQuaternions(Wt, ie), o.quaternion.copy(ie)), o.name === "Y" && (ie.setFromAxisAngle(et, Math.atan2(te.x, te.z)), ie.multiplyQuaternions(Wt, ie), o.quaternion.copy(ie)), o.name === "Z" && (ie.setFromAxisAngle(wt, Math.atan2(te.y, te.x)), ie.multiplyQuaternions(Wt, ie), o.quaternion.copy(ie))), o.visible = o.visible && (o.name.indexOf("X") === -1 || this.showX), o.visible = o.visible && (o.name.indexOf("Y") === -1 || this.showY), o.visible = o.visible && (o.name.indexOf("Z") === -1 || this.showZ), o.visible = o.visible && (o.name.indexOf("E") === -1 || this.showX && this.showY && this.showZ), o.visible = o.visible && (o.name.indexOf("XY") === -1 || this.showXY), o.visible = o.visible && (o.name.indexOf("YZ") === -1 || this.showYZ), o.visible = o.visible && (o.name.indexOf("XZ") === -1 || this.showXZ), o.material._color = o.material._color || o.material.color.clone(), o.material._opacity = o.material._opacity || o.material.opacity, o.material.color.copy(o.material._color), o.material.opacity = o.material._opacity, this.enabled && this.axis && (o.name === this.axis ? (o.material.color.copy(this.materialLib.active.color), o.material.opacity = 1) : this.axis.split("").some(function(l) {
|
|
1032
1032
|
return o.name === l;
|
|
1033
1033
|
}) && (o.material.color.copy(this.materialLib.active.color), o.material.opacity = 1));
|
|
1034
1034
|
}
|
|
@@ -1044,39 +1044,39 @@ class ir extends L {
|
|
|
1044
1044
|
}
|
|
1045
1045
|
updateMatrixWorld(e) {
|
|
1046
1046
|
let t = this.space;
|
|
1047
|
-
switch (this.position.copy(this.worldPosition), this.mode === "scale" && (t = "local"),
|
|
1047
|
+
switch (this.position.copy(this.worldPosition), this.mode === "scale" && (t = "local"), Gt.copy(Ct).applyQuaternion(t === "local" ? this.worldQuaternion : Qt), yt.copy(et).applyQuaternion(t === "local" ? this.worldQuaternion : Qt), bt.copy(wt).applyQuaternion(t === "local" ? this.worldQuaternion : Qt), te.copy(yt), this.mode) {
|
|
1048
1048
|
case "translate":
|
|
1049
1049
|
case "scale":
|
|
1050
1050
|
switch (this.axis) {
|
|
1051
1051
|
case "X":
|
|
1052
|
-
te.copy(this.eye).cross(
|
|
1052
|
+
te.copy(this.eye).cross(Gt), Ne.copy(Gt).cross(te);
|
|
1053
1053
|
break;
|
|
1054
1054
|
case "Y":
|
|
1055
|
-
te.copy(this.eye).cross(yt),
|
|
1055
|
+
te.copy(this.eye).cross(yt), Ne.copy(yt).cross(te);
|
|
1056
1056
|
break;
|
|
1057
1057
|
case "Z":
|
|
1058
|
-
te.copy(this.eye).cross(bt),
|
|
1058
|
+
te.copy(this.eye).cross(bt), Ne.copy(bt).cross(te);
|
|
1059
1059
|
break;
|
|
1060
1060
|
case "XY":
|
|
1061
|
-
|
|
1061
|
+
Ne.copy(bt);
|
|
1062
1062
|
break;
|
|
1063
1063
|
case "YZ":
|
|
1064
|
-
|
|
1064
|
+
Ne.copy(Gt);
|
|
1065
1065
|
break;
|
|
1066
1066
|
case "XZ":
|
|
1067
|
-
te.copy(bt),
|
|
1067
|
+
te.copy(bt), Ne.copy(yt);
|
|
1068
1068
|
break;
|
|
1069
1069
|
case "XYZ":
|
|
1070
1070
|
case "E":
|
|
1071
|
-
|
|
1071
|
+
Ne.set(0, 0, 0);
|
|
1072
1072
|
break;
|
|
1073
1073
|
}
|
|
1074
1074
|
break;
|
|
1075
1075
|
case "rotate":
|
|
1076
1076
|
default:
|
|
1077
|
-
|
|
1077
|
+
Ne.set(0, 0, 0);
|
|
1078
1078
|
}
|
|
1079
|
-
|
|
1079
|
+
Ne.length() === 0 ? this.quaternion.copy(this.cameraQuaternion) : (pn.lookAt(he.set(0, 0, 0), Ne, te), this.quaternion.setFromRotationMatrix(pn)), super.updateMatrixWorld(e);
|
|
1080
1080
|
}
|
|
1081
1081
|
}
|
|
1082
1082
|
const or = {
|
|
@@ -1117,7 +1117,7 @@ const or = {
|
|
|
1117
1117
|
}`
|
|
1118
1118
|
)
|
|
1119
1119
|
};
|
|
1120
|
-
class
|
|
1120
|
+
class kt {
|
|
1121
1121
|
/**
|
|
1122
1122
|
* Constructs a new pass.
|
|
1123
1123
|
*/
|
|
@@ -1160,7 +1160,7 @@ class Ht {
|
|
|
1160
1160
|
const rr = new zn(-1, 1, 1, -1, 0, 1);
|
|
1161
1161
|
class ar extends rt {
|
|
1162
1162
|
constructor() {
|
|
1163
|
-
super(), this.setAttribute("position", new
|
|
1163
|
+
super(), this.setAttribute("position", new ke([-1, 3, 0, -1, -1, 0, 3, -1, 0], 3)), this.setAttribute("uv", new ke([0, 2, 0, 0, 2, 0], 2));
|
|
1164
1164
|
}
|
|
1165
1165
|
}
|
|
1166
1166
|
const lr = new ar();
|
|
@@ -1200,7 +1200,7 @@ class si {
|
|
|
1200
1200
|
this._mesh.material = e;
|
|
1201
1201
|
}
|
|
1202
1202
|
}
|
|
1203
|
-
class cr extends
|
|
1203
|
+
class cr extends kt {
|
|
1204
1204
|
/**
|
|
1205
1205
|
* Constructs a new shader pass.
|
|
1206
1206
|
*
|
|
@@ -1210,7 +1210,7 @@ class cr extends Ht {
|
|
|
1210
1210
|
* the read buffer.
|
|
1211
1211
|
*/
|
|
1212
1212
|
constructor(e, t = "tDiffuse") {
|
|
1213
|
-
super(), this.textureID = t, this.uniforms = null, this.material = null, e instanceof Rs ? (this.uniforms = e.uniforms, this.material = e) : e && (this.uniforms =
|
|
1213
|
+
super(), this.textureID = t, this.uniforms = null, this.material = null, e instanceof Rs ? (this.uniforms = e.uniforms, this.material = e) : e && (this.uniforms = is.clone(e.uniforms), this.material = new Rs({
|
|
1214
1214
|
name: e.name !== void 0 ? e.name : "unspecified",
|
|
1215
1215
|
defines: Object.assign({}, e.defines),
|
|
1216
1216
|
uniforms: this.uniforms,
|
|
@@ -1240,7 +1240,7 @@ class cr extends Ht {
|
|
|
1240
1240
|
this.material.dispose(), this._fsQuad.dispose();
|
|
1241
1241
|
}
|
|
1242
1242
|
}
|
|
1243
|
-
class An extends
|
|
1243
|
+
class An extends kt {
|
|
1244
1244
|
/**
|
|
1245
1245
|
* Constructs a new mask pass.
|
|
1246
1246
|
*
|
|
@@ -1268,7 +1268,7 @@ class An extends Ht {
|
|
|
1268
1268
|
this.inverse ? (o = 0, a = 1) : (o = 1, a = 0), i.buffers.stencil.setTest(!0), i.buffers.stencil.setOp(s.REPLACE, s.REPLACE, s.REPLACE), i.buffers.stencil.setFunc(s.ALWAYS, o, 4294967295), i.buffers.stencil.setClear(a), i.buffers.stencil.setLocked(!0), e.setRenderTarget(n), this.clear && e.clear(), e.render(this.scene, this.camera), e.setRenderTarget(t), this.clear && e.clear(), e.render(this.scene, this.camera), i.buffers.color.setLocked(!1), i.buffers.depth.setLocked(!1), i.buffers.color.setMask(!0), i.buffers.depth.setMask(!0), i.buffers.stencil.setLocked(!1), i.buffers.stencil.setFunc(s.EQUAL, 1, 4294967295), i.buffers.stencil.setOp(s.KEEP, s.KEEP, s.KEEP), i.buffers.stencil.setLocked(!0);
|
|
1269
1269
|
}
|
|
1270
1270
|
}
|
|
1271
|
-
class ur extends
|
|
1271
|
+
class ur extends kt {
|
|
1272
1272
|
/**
|
|
1273
1273
|
* Constructs a new clear mask pass.
|
|
1274
1274
|
*/
|
|
@@ -1421,7 +1421,7 @@ class dr {
|
|
|
1421
1421
|
this.renderTarget1.dispose(), this.renderTarget2.dispose(), this.copyPass.dispose();
|
|
1422
1422
|
}
|
|
1423
1423
|
}
|
|
1424
|
-
class fr extends
|
|
1424
|
+
class fr extends kt {
|
|
1425
1425
|
/**
|
|
1426
1426
|
* Constructs a new render pass.
|
|
1427
1427
|
*
|
|
@@ -1453,7 +1453,7 @@ class fr extends Ht {
|
|
|
1453
1453
|
this.overrideMaterial !== null && (o = this.scene.overrideMaterial, this.scene.overrideMaterial = this.overrideMaterial), this.clearColor !== null && (e.getClearColor(this._oldClearColor), e.setClearColor(this.clearColor, e.getClearAlpha())), this.clearAlpha !== null && (i = e.getClearAlpha(), e.setClearAlpha(this.clearAlpha)), this.clearDepth == !0 && e.clearDepth(), e.setRenderTarget(this.renderToScreen ? null : n), this.clear === !0 && e.clear(e.autoClearColor, e.autoClearDepth, e.autoClearStencil), e.render(this.scene, this.camera), this.clearColor !== null && e.setClearColor(this._oldClearColor), this.clearAlpha !== null && e.setClearAlpha(i), this.overrideMaterial !== null && (this.scene.overrideMaterial = o), e.autoClear = s;
|
|
1454
1454
|
}
|
|
1455
1455
|
}
|
|
1456
|
-
const
|
|
1456
|
+
const Bt = {
|
|
1457
1457
|
name: "OutputShader",
|
|
1458
1458
|
uniforms: {
|
|
1459
1459
|
tDiffuse: { value: null },
|
|
@@ -1539,16 +1539,16 @@ const Gt = {
|
|
|
1539
1539
|
}`
|
|
1540
1540
|
)
|
|
1541
1541
|
};
|
|
1542
|
-
class hr extends
|
|
1542
|
+
class hr extends kt {
|
|
1543
1543
|
/**
|
|
1544
1544
|
* Constructs a new output pass.
|
|
1545
1545
|
*/
|
|
1546
1546
|
constructor() {
|
|
1547
|
-
super(), this.isOutputPass = !0, this.uniforms =
|
|
1548
|
-
name:
|
|
1547
|
+
super(), this.isOutputPass = !0, this.uniforms = is.clone(Bt.uniforms), this.material = new oo({
|
|
1548
|
+
name: Bt.name,
|
|
1549
1549
|
uniforms: this.uniforms,
|
|
1550
|
-
vertexShader:
|
|
1551
|
-
fragmentShader:
|
|
1550
|
+
vertexShader: Bt.vertexShader,
|
|
1551
|
+
fragmentShader: Bt.fragmentShader
|
|
1552
1552
|
}), this._fsQuad = new si(this.material), this._outputColorSpace = null, this._toneMapping = null;
|
|
1553
1553
|
}
|
|
1554
1554
|
/**
|
|
@@ -1563,7 +1563,7 @@ class hr extends Ht {
|
|
|
1563
1563
|
* @param {boolean} maskActive - Whether masking is active or not.
|
|
1564
1564
|
*/
|
|
1565
1565
|
render(e, t, n) {
|
|
1566
|
-
this.uniforms.tDiffuse.value = n.texture, this.uniforms.toneMappingExposure.value = e.toneMappingExposure, (this._outputColorSpace !== e.outputColorSpace || this._toneMapping !== e.toneMapping) && (this._outputColorSpace = e.outputColorSpace, this._toneMapping = e.toneMapping, this.material.defines = {},
|
|
1566
|
+
this.uniforms.tDiffuse.value = n.texture, this.uniforms.toneMappingExposure.value = e.toneMappingExposure, (this._outputColorSpace !== e.outputColorSpace || this._toneMapping !== e.toneMapping) && (this._outputColorSpace = e.outputColorSpace, this._toneMapping = e.toneMapping, this.material.defines = {}, os.getTransfer(this._outputColorSpace) === ro && (this.material.defines.SRGB_TRANSFER = ""), this._toneMapping === ao ? this.material.defines.LINEAR_TONE_MAPPING = "" : this._toneMapping === lo ? this.material.defines.REINHARD_TONE_MAPPING = "" : this._toneMapping === co ? this.material.defines.CINEON_TONE_MAPPING = "" : this._toneMapping === uo ? this.material.defines.ACES_FILMIC_TONE_MAPPING = "" : this._toneMapping === fo ? this.material.defines.AGX_TONE_MAPPING = "" : this._toneMapping === ho ? this.material.defines.NEUTRAL_TONE_MAPPING = "" : this._toneMapping === po && (this.material.defines.CUSTOM_TONE_MAPPING = ""), this.material.needsUpdate = !0), this.renderToScreen === !0 ? (e.setRenderTarget(null), this._fsQuad.render(e)) : (e.setRenderTarget(t), this.clear && e.clear(e.autoClearColor, e.autoClearDepth, e.autoClearStencil), this._fsQuad.render(e));
|
|
1567
1567
|
}
|
|
1568
1568
|
/**
|
|
1569
1569
|
* Frees the GPU-related resources allocated by this instance. Call this
|
|
@@ -1658,7 +1658,7 @@ class Ar {
|
|
|
1658
1658
|
}
|
|
1659
1659
|
const mr = 1920, gr = 13, yr = 0.6, br = 4, xr = window.innerWidth / mr, Ir = Math.min(Math.max(xr, yr), br), Cr = Math.round(gr * Ir);
|
|
1660
1660
|
document.documentElement.style.setProperty("--sl-css2d-base-font-size", Cr + "px");
|
|
1661
|
-
const
|
|
1661
|
+
const Xt = {
|
|
1662
1662
|
panel: "sl-css2d-data-panel",
|
|
1663
1663
|
title: "sl-css2d-data-panel-title",
|
|
1664
1664
|
list: "sl-css2d-data-panel-list",
|
|
@@ -1703,7 +1703,7 @@ const Bt = {
|
|
|
1703
1703
|
}
|
|
1704
1704
|
buildPanel() {
|
|
1705
1705
|
const e = this.options, t = document.createElement("div");
|
|
1706
|
-
t.className = `${
|
|
1706
|
+
t.className = `${Xt.panel} ${e.className}`.trim();
|
|
1707
1707
|
let n = e.backgroundColor || "rgba(0, 12, 30, 0.55)";
|
|
1708
1708
|
if (n.includes("gradient")) {
|
|
1709
1709
|
const c = n.match(/rgba?\([^)]+\)/);
|
|
@@ -1746,7 +1746,7 @@ const Bt = {
|
|
|
1746
1746
|
const a = `position:absolute; width:0.62em; height:0.62em; border-radius:50%; background:#ffffff; box-shadow:0 0 0.46em ${i}, 0 0 0.92em ${i}; pointer-events:none; z-index:2;`;
|
|
1747
1747
|
if (t.appendChild(this.createEl("div", `${a} top:0.69em; left:0.69em;`)), t.appendChild(this.createEl("div", `${a} top:0.69em; right:0.69em;`)), t.appendChild(this.createEl("div", `${a} bottom:0.69em; left:0.69em;`)), t.appendChild(this.createEl("div", `${a} bottom:0.69em; right:0.69em;`)), e.title) {
|
|
1748
1748
|
const c = document.createElement("div");
|
|
1749
|
-
c.className =
|
|
1749
|
+
c.className = Xt.title, c.style.cssText = `
|
|
1750
1750
|
font-weight: 700;
|
|
1751
1751
|
font-size: 1.15em;
|
|
1752
1752
|
color: #c8f4ff;
|
|
@@ -1759,12 +1759,12 @@ const Bt = {
|
|
|
1759
1759
|
`, c.textContent = e.title, c.setAttribute("data-panel-title", ""), t.appendChild(c);
|
|
1760
1760
|
}
|
|
1761
1761
|
const l = document.createElement("div");
|
|
1762
|
-
l.className =
|
|
1762
|
+
l.className = Xt.list, l.setAttribute("data-panel-list", ""), t.appendChild(l), this.renderItems(l, e.items), this.container = t, this.css2dObject && (this.css2dObject.element = t);
|
|
1763
1763
|
}
|
|
1764
1764
|
renderItems(e, t) {
|
|
1765
1765
|
e.innerHTML = "", t.forEach((n, s) => {
|
|
1766
1766
|
const i = document.createElement("div");
|
|
1767
|
-
i.className = `${
|
|
1767
|
+
i.className = `${Xt.item} ${n.className || ""}`.trim(), i.style.cssText = `
|
|
1768
1768
|
display: flex;
|
|
1769
1769
|
justify-content: space-between;
|
|
1770
1770
|
align-items: center;
|
|
@@ -1911,24 +1911,24 @@ const Bt = {
|
|
|
1911
1911
|
}
|
|
1912
1912
|
};
|
|
1913
1913
|
Je(ft, "_breathInjected", !1);
|
|
1914
|
-
let
|
|
1915
|
-
const
|
|
1914
|
+
let as = ft;
|
|
1915
|
+
const ls = /* @__PURE__ */ new WeakMap();
|
|
1916
1916
|
function ni(r, e) {
|
|
1917
1917
|
const t = us(r);
|
|
1918
|
-
|
|
1918
|
+
ls.set(t, e), t.userData._hasDataPanel = !0;
|
|
1919
1919
|
}
|
|
1920
|
-
function
|
|
1921
|
-
return
|
|
1920
|
+
function jt(r) {
|
|
1921
|
+
return ls.get(us(r)) || null;
|
|
1922
1922
|
}
|
|
1923
1923
|
function ii(r) {
|
|
1924
|
-
const e = us(r), t =
|
|
1925
|
-
t && (t.dispose(),
|
|
1924
|
+
const e = us(r), t = ls.get(e);
|
|
1925
|
+
t && (t.dispose(), ls.delete(e)), e.userData._hasDataPanel = void 0;
|
|
1926
1926
|
}
|
|
1927
1927
|
let oe = null;
|
|
1928
1928
|
function vr(r) {
|
|
1929
1929
|
return oe ? (oe.domElement.parentNode !== r && r.appendChild(oe.domElement), oe) : (oe = new Ar(), oe.setSize(r.clientWidth, r.clientHeight), oe.domElement.style.position = "absolute", oe.domElement.style.top = "0", oe.domElement.style.left = "0", oe.domElement.style.pointerEvents = "none", r.appendChild(oe.domElement), oe);
|
|
1930
1930
|
}
|
|
1931
|
-
function
|
|
1931
|
+
function od() {
|
|
1932
1932
|
return oe;
|
|
1933
1933
|
}
|
|
1934
1934
|
function Mr(r, e) {
|
|
@@ -1971,7 +1971,7 @@ function Dr() {
|
|
|
1971
1971
|
const b = new O.Mesh(e, l(100));
|
|
1972
1972
|
return b.position.set(0, 20, 0), b.scale.set(1, 0.1, 1), r.add(b), r;
|
|
1973
1973
|
}
|
|
1974
|
-
function
|
|
1974
|
+
function Jt(r) {
|
|
1975
1975
|
try {
|
|
1976
1976
|
const e = new O.PMREMGenerator(r), t = Dr(), n = e.fromScene(t).texture;
|
|
1977
1977
|
return t.traverse((s) => {
|
|
@@ -2136,7 +2136,7 @@ const q = {
|
|
|
2136
2136
|
Ie[Ws] = q.NEAREST;
|
|
2137
2137
|
Ie[Xn] = q.NEAREST_MIPMAP_NEAREST;
|
|
2138
2138
|
Ie[Vn] = q.NEAREST_MIPMAP_LINEAR;
|
|
2139
|
-
Ie[
|
|
2139
|
+
Ie[rs] = q.LINEAR;
|
|
2140
2140
|
Ie[qn] = q.LINEAR_MIPMAP_NEAREST;
|
|
2141
2141
|
Ie[Gs] = q.LINEAR_MIPMAP_LINEAR;
|
|
2142
2142
|
Ie[Yn] = q.CLAMP_TO_EDGE;
|
|
@@ -2350,7 +2350,7 @@ class Fr {
|
|
|
2350
2350
|
async buildMetalRoughTextureAsync(e, t) {
|
|
2351
2351
|
if (e === t) return e;
|
|
2352
2352
|
function n(p) {
|
|
2353
|
-
return p.colorSpace ===
|
|
2353
|
+
return p.colorSpace === je ? function(m) {
|
|
2354
2354
|
return m < 0.04045 ? m * 0.0773993808 : Math.pow(m * 0.9478672986 + 0.0521327014, 2.4);
|
|
2355
2355
|
} : function(m) {
|
|
2356
2356
|
return m;
|
|
@@ -3606,7 +3606,7 @@ class ta {
|
|
|
3606
3606
|
const i = t.json, l = ((i.extensions && i.extensions[this.name] || {}).lights || [])[e];
|
|
3607
3607
|
let c;
|
|
3608
3608
|
const d = new le(16777215);
|
|
3609
|
-
l.color !== void 0 && d.setRGB(l.color[0], l.color[1], l.color[2],
|
|
3609
|
+
l.color !== void 0 && d.setRGB(l.color[0], l.color[1], l.color[2], Fe);
|
|
3610
3610
|
const u = l.range !== void 0 ? l.range : 0;
|
|
3611
3611
|
switch (l.type) {
|
|
3612
3612
|
case "directional":
|
|
@@ -3621,7 +3621,7 @@ class ta {
|
|
|
3621
3621
|
default:
|
|
3622
3622
|
throw new Error("THREE.GLTFLoader: Unexpected light type: " + l.type);
|
|
3623
3623
|
}
|
|
3624
|
-
return c.position.set(0, 0, 0),
|
|
3624
|
+
return c.position.set(0, 0, 0), He(c, l), l.intensity !== void 0 && (c.intensity = l.intensity), c.name = t.createUniqueName(l.name || "light_" + e), s = Promise.resolve(c), t.cache.add(n, s), s;
|
|
3625
3625
|
}
|
|
3626
3626
|
getDependency(e, t) {
|
|
3627
3627
|
if (e === "light")
|
|
@@ -3648,9 +3648,9 @@ class sa {
|
|
|
3648
3648
|
if (i) {
|
|
3649
3649
|
if (Array.isArray(i.baseColorFactor)) {
|
|
3650
3650
|
const o = i.baseColorFactor;
|
|
3651
|
-
e.color.setRGB(o[0], o[1], o[2],
|
|
3651
|
+
e.color.setRGB(o[0], o[1], o[2], Fe), e.opacity = o[3];
|
|
3652
3652
|
}
|
|
3653
|
-
i.baseColorTexture !== void 0 && s.push(n.assignTexture(e, "map", i.baseColorTexture,
|
|
3653
|
+
i.baseColorTexture !== void 0 && s.push(n.assignTexture(e, "map", i.baseColorTexture, je));
|
|
3654
3654
|
}
|
|
3655
3655
|
return Promise.all(s);
|
|
3656
3656
|
}
|
|
@@ -3721,9 +3721,9 @@ class aa {
|
|
|
3721
3721
|
const s = [];
|
|
3722
3722
|
if (t.sheenColor = new le(0, 0, 0), t.sheenRoughness = 0, t.sheen = 1, n.sheenColorFactor !== void 0) {
|
|
3723
3723
|
const i = n.sheenColorFactor;
|
|
3724
|
-
t.sheenColor.setRGB(i[0], i[1], i[2],
|
|
3724
|
+
t.sheenColor.setRGB(i[0], i[1], i[2], Fe);
|
|
3725
3725
|
}
|
|
3726
|
-
return n.sheenRoughnessFactor !== void 0 && (t.sheenRoughness = n.sheenRoughnessFactor), n.sheenColorTexture !== void 0 && s.push(this.parser.assignTexture(t, "sheenColorMap", n.sheenColorTexture,
|
|
3726
|
+
return n.sheenRoughnessFactor !== void 0 && (t.sheenRoughness = n.sheenRoughnessFactor), n.sheenColorTexture !== void 0 && s.push(this.parser.assignTexture(t, "sheenColorMap", n.sheenColorTexture, je)), n.sheenRoughnessTexture !== void 0 && s.push(this.parser.assignTexture(t, "sheenRoughnessMap", n.sheenRoughnessTexture)), Promise.all(s);
|
|
3727
3727
|
}
|
|
3728
3728
|
}
|
|
3729
3729
|
class la {
|
|
@@ -3753,7 +3753,7 @@ class ca {
|
|
|
3753
3753
|
const s = [];
|
|
3754
3754
|
t.thickness = n.thicknessFactor !== void 0 ? n.thicknessFactor : 0, n.thicknessTexture !== void 0 && s.push(this.parser.assignTexture(t, "thicknessMap", n.thicknessTexture)), t.attenuationDistance = n.attenuationDistance || 1 / 0;
|
|
3755
3755
|
const i = n.attenuationColor || [1, 1, 1];
|
|
3756
|
-
return t.attenuationColor = new le().setRGB(i[0], i[1], i[2],
|
|
3756
|
+
return t.attenuationColor = new le().setRGB(i[0], i[1], i[2], Fe), Promise.all(s);
|
|
3757
3757
|
}
|
|
3758
3758
|
}
|
|
3759
3759
|
class ua {
|
|
@@ -3781,7 +3781,7 @@ class da {
|
|
|
3781
3781
|
const s = [];
|
|
3782
3782
|
t.specularIntensity = n.specularFactor !== void 0 ? n.specularFactor : 1, n.specularTexture !== void 0 && s.push(this.parser.assignTexture(t, "specularIntensityMap", n.specularTexture));
|
|
3783
3783
|
const i = n.specularColorFactor || [1, 1, 1];
|
|
3784
|
-
return t.specularColor = new le().setRGB(i[0], i[1], i[2],
|
|
3784
|
+
return t.specularColor = new le().setRGB(i[0], i[1], i[2], Fe), n.specularColorTexture !== void 0 && s.push(this.parser.assignTexture(t, "specularColorMap", n.specularColorTexture, je)), Promise.all(s);
|
|
3785
3785
|
}
|
|
3786
3786
|
}
|
|
3787
3787
|
class fa {
|
|
@@ -3980,7 +3980,7 @@ class ba {
|
|
|
3980
3980
|
A !== void 0 && (m.normalized = A);
|
|
3981
3981
|
}
|
|
3982
3982
|
u(p);
|
|
3983
|
-
}, a, c,
|
|
3983
|
+
}, a, c, Fe, g);
|
|
3984
3984
|
});
|
|
3985
3985
|
});
|
|
3986
3986
|
}
|
|
@@ -4041,7 +4041,7 @@ const ve = {
|
|
|
4041
4041
|
5126: Float32Array
|
|
4042
4042
|
}, Dn = {
|
|
4043
4043
|
9728: Ws,
|
|
4044
|
-
9729:
|
|
4044
|
+
9729: rs,
|
|
4045
4045
|
9984: Xn,
|
|
4046
4046
|
9985: qn,
|
|
4047
4047
|
9986: Vn,
|
|
@@ -4100,7 +4100,7 @@ function $e(r, e, t) {
|
|
|
4100
4100
|
for (const n in t.extensions)
|
|
4101
4101
|
r[n] === void 0 && (e.userData.gltfExtensions = e.userData.gltfExtensions || {}, e.userData.gltfExtensions[n] = t.extensions[n]);
|
|
4102
4102
|
}
|
|
4103
|
-
function
|
|
4103
|
+
function He(r, e) {
|
|
4104
4104
|
e.extras !== void 0 && (typeof e.extras == "object" ? Object.assign(r.userData, e.extras) : console.warn("THREE.GLTFLoader: Ignoring primitive type .extras, " + e.extras));
|
|
4105
4105
|
}
|
|
4106
4106
|
function Ta(r, e, t) {
|
|
@@ -4192,7 +4192,7 @@ class Pa {
|
|
|
4192
4192
|
const l = a.match(/Version\/(\d+)/);
|
|
4193
4193
|
s = n && l ? parseInt(l[1], 10) : -1, i = a.indexOf("Firefox") > -1, o = i ? a.match(/Firefox\/([0-9]+)\./)[1] : -1;
|
|
4194
4194
|
}
|
|
4195
|
-
typeof createImageBitmap > "u" || n && s < 17 || i && o < 98 ? this.textureLoader = new
|
|
4195
|
+
typeof createImageBitmap > "u" || n && s < 17 || i && o < 98 ? this.textureLoader = new Yt(this.options.manager) : this.textureLoader = new To(this.options.manager), this.textureLoader.setCrossOrigin(this.options.crossOrigin), this.textureLoader.setRequestHeader(this.options.requestHeader), this.fileLoader = new Lt(this.options.manager), this.fileLoader.setResponseType("arraybuffer"), this.options.crossOrigin === "use-credentials" && this.fileLoader.setWithCredentials(!0);
|
|
4196
4196
|
}
|
|
4197
4197
|
setExtensions(e) {
|
|
4198
4198
|
this.extensions = e;
|
|
@@ -4222,7 +4222,7 @@ class Pa {
|
|
|
4222
4222
|
parser: n,
|
|
4223
4223
|
userData: {}
|
|
4224
4224
|
};
|
|
4225
|
-
return $e(i, a, s),
|
|
4225
|
+
return $e(i, a, s), He(a, s), Promise.all(n._invokeAll(function(l) {
|
|
4226
4226
|
return l.afterRoot && l.afterRoot(a);
|
|
4227
4227
|
})).then(function() {
|
|
4228
4228
|
for (const l of a.scenes)
|
|
@@ -4480,7 +4480,7 @@ class Pa {
|
|
|
4480
4480
|
const c = this.loadImageSource(t, n).then(function(d) {
|
|
4481
4481
|
d.flipY = !1, d.name = o.name || a.name || "", d.name === "" && typeof a.uri == "string" && a.uri.startsWith("data:image/") === !1 && (d.name = a.uri);
|
|
4482
4482
|
const g = (i.samplers || {})[o.sampler] || {};
|
|
4483
|
-
return d.magFilter = Dn[g.magFilter] ||
|
|
4483
|
+
return d.magFilter = Dn[g.magFilter] || rs, d.minFilter = Dn[g.minFilter] || Gs, d.wrapS = On[g.wrapS] || it, d.wrapT = On[g.wrapT] || it, d.generateMipmaps = !d.isCompressedTexture && d.minFilter !== Ws && d.minFilter !== rs, s.associations.set(d, { textures: e }), d;
|
|
4484
4484
|
}).catch(function() {
|
|
4485
4485
|
return null;
|
|
4486
4486
|
});
|
|
@@ -4509,7 +4509,7 @@ class Pa {
|
|
|
4509
4509
|
}), t.load(Tt.resolveURL(u, i.path), b, void 0, p);
|
|
4510
4510
|
});
|
|
4511
4511
|
}).then(function(u) {
|
|
4512
|
-
return c === !0 && a.revokeObjectURL(l),
|
|
4512
|
+
return c === !0 && a.revokeObjectURL(l), He(u, o), u.userData.mimeType = o.mimeType || Oa(o.uri), u;
|
|
4513
4513
|
}).catch(function(u) {
|
|
4514
4514
|
throw console.error("THREE.GLTFLoader: Couldn't load texture", l), u;
|
|
4515
4515
|
});
|
|
@@ -4591,9 +4591,9 @@ class Pa {
|
|
|
4591
4591
|
const u = i.pbrMetallicRoughness || {};
|
|
4592
4592
|
if (a.color = new le(1, 1, 1), a.opacity = 1, Array.isArray(u.baseColorFactor)) {
|
|
4593
4593
|
const g = u.baseColorFactor;
|
|
4594
|
-
a.color.setRGB(g[0], g[1], g[2],
|
|
4594
|
+
a.color.setRGB(g[0], g[1], g[2], Fe), a.opacity = g[3];
|
|
4595
4595
|
}
|
|
4596
|
-
u.baseColorTexture !== void 0 && c.push(t.assignTexture(a, "map", u.baseColorTexture,
|
|
4596
|
+
u.baseColorTexture !== void 0 && c.push(t.assignTexture(a, "map", u.baseColorTexture, je)), a.metalness = u.metallicFactor !== void 0 ? u.metallicFactor : 1, a.roughness = u.roughnessFactor !== void 0 ? u.roughnessFactor : 1, u.metallicRoughnessTexture !== void 0 && (c.push(t.assignTexture(a, "metalnessMap", u.metallicRoughnessTexture)), c.push(t.assignTexture(a, "roughnessMap", u.metallicRoughnessTexture))), o = this._invokeOne(function(g) {
|
|
4597
4597
|
return g.getMaterialType && g.getMaterialType(e);
|
|
4598
4598
|
}), c.push(Promise.all(this._invokeAll(function(g) {
|
|
4599
4599
|
return g.extendMaterialParams && g.extendMaterialParams(e, a);
|
|
@@ -4607,11 +4607,11 @@ class Pa {
|
|
|
4607
4607
|
}
|
|
4608
4608
|
if (i.occlusionTexture !== void 0 && o !== nt && (c.push(t.assignTexture(a, "aoMap", i.occlusionTexture)), i.occlusionTexture.strength !== void 0 && (a.aoMapIntensity = i.occlusionTexture.strength)), i.emissiveFactor !== void 0 && o !== nt) {
|
|
4609
4609
|
const u = i.emissiveFactor;
|
|
4610
|
-
a.emissive = new le().setRGB(u[0], u[1], u[2],
|
|
4610
|
+
a.emissive = new le().setRGB(u[0], u[1], u[2], Fe);
|
|
4611
4611
|
}
|
|
4612
|
-
return i.emissiveTexture !== void 0 && o !== nt && c.push(t.assignTexture(a, "emissiveMap", i.emissiveTexture,
|
|
4612
|
+
return i.emissiveTexture !== void 0 && o !== nt && c.push(t.assignTexture(a, "emissiveMap", i.emissiveTexture, je)), Promise.all(c).then(function() {
|
|
4613
4613
|
const u = new o(a);
|
|
4614
|
-
return i.name && (u.name = i.name),
|
|
4614
|
+
return i.name && (u.name = i.name), He(u, i), t.associations.set(u, { materials: e }), i.extensions && $e(s, u, i), u;
|
|
4615
4615
|
});
|
|
4616
4616
|
}
|
|
4617
4617
|
/**
|
|
@@ -4681,10 +4681,10 @@ class Pa {
|
|
|
4681
4681
|
else if (A.mode === ve.LINE_LOOP)
|
|
4682
4682
|
I = new Do(m, w);
|
|
4683
4683
|
else if (A.mode === ve.POINTS)
|
|
4684
|
-
I = new
|
|
4684
|
+
I = new Kt(m, w);
|
|
4685
4685
|
else
|
|
4686
4686
|
throw new Error("THREE.GLTFLoader: Primitive mode unsupported: " + A.mode);
|
|
4687
|
-
Object.keys(I.geometry.morphAttributes).length > 0 && Ea(I, i), I.name = t.createUniqueName(i.name || "mesh_" + e),
|
|
4687
|
+
Object.keys(I.geometry.morphAttributes).length > 0 && Ea(I, i), I.name = t.createUniqueName(i.name || "mesh_" + e), He(I, i), A.extensions && $e(s, I, A), t.assignFinalMaterial(I), u.push(I);
|
|
4688
4688
|
}
|
|
4689
4689
|
for (let p = 0, b = u.length; p < b; p++)
|
|
4690
4690
|
t.associations.set(u[p], {
|
|
@@ -4693,7 +4693,7 @@ class Pa {
|
|
|
4693
4693
|
});
|
|
4694
4694
|
if (u.length === 1)
|
|
4695
4695
|
return i.extensions && $e(s, u[0], i), u[0];
|
|
4696
|
-
const g = new
|
|
4696
|
+
const g = new Zt();
|
|
4697
4697
|
i.extensions && $e(s, g, i), t.associations.set(g, { meshes: e });
|
|
4698
4698
|
for (let p = 0, b = u.length; p < b; p++)
|
|
4699
4699
|
g.add(u[p]);
|
|
@@ -4714,7 +4714,7 @@ class Pa {
|
|
|
4714
4714
|
console.warn("THREE.GLTFLoader: Missing camera parameters.");
|
|
4715
4715
|
return;
|
|
4716
4716
|
}
|
|
4717
|
-
return n.type === "perspective" ? t = new $n(Pt.radToDeg(s.yfov), s.aspectRatio || 1, s.znear || 1, s.zfar || 2e6) : n.type === "orthographic" && (t = new zn(-s.xmag, s.xmag, s.ymag, -s.ymag, s.znear, s.zfar)), n.name && (t.name = this.createUniqueName(n.name)),
|
|
4717
|
+
return n.type === "perspective" ? t = new $n(Pt.radToDeg(s.yfov), s.aspectRatio || 1, s.znear || 1, s.zfar || 2e6) : n.type === "orthographic" && (t = new zn(-s.xmag, s.xmag, s.ymag, -s.ymag, s.znear, s.zfar)), n.name && (t.name = this.createUniqueName(n.name)), He(t, n), Promise.resolve(t);
|
|
4718
4718
|
}
|
|
4719
4719
|
/**
|
|
4720
4720
|
* Specification: https://github.com/KhronosGroup/glTF/tree/master/specification/2.0#skins
|
|
@@ -4772,7 +4772,7 @@ class Pa {
|
|
|
4772
4772
|
I.push($[se]);
|
|
4773
4773
|
}
|
|
4774
4774
|
const w = new Ro(i, void 0, I);
|
|
4775
|
-
return
|
|
4775
|
+
return He(w, s), w;
|
|
4776
4776
|
});
|
|
4777
4777
|
}
|
|
4778
4778
|
createNodeMesh(e) {
|
|
@@ -4833,10 +4833,10 @@ class Pa {
|
|
|
4833
4833
|
a.push(c);
|
|
4834
4834
|
}), this.nodeCache[e] = Promise.all(a).then(function(c) {
|
|
4835
4835
|
let d;
|
|
4836
|
-
if (i.isBone === !0 ? d = new Po() : c.length > 1 ? d = new
|
|
4836
|
+
if (i.isBone === !0 ? d = new Po() : c.length > 1 ? d = new Zt() : c.length === 1 ? d = c[0] : d = new mt(), d !== c[0])
|
|
4837
4837
|
for (let u = 0, g = c.length; u < g; u++)
|
|
4838
4838
|
d.add(c[u]);
|
|
4839
|
-
if (i.name && (d.userData.name = i.name, d.name = o),
|
|
4839
|
+
if (i.name && (d.userData.name = i.name, d.name = o), He(d, i), i.extensions && $e(n, d, i), i.matrix !== void 0) {
|
|
4840
4840
|
const u = new Ce();
|
|
4841
4841
|
u.fromArray(i.matrix), d.applyMatrix4(u);
|
|
4842
4842
|
} else
|
|
@@ -4858,8 +4858,8 @@ class Pa {
|
|
|
4858
4858
|
* @return {Promise<Group>}
|
|
4859
4859
|
*/
|
|
4860
4860
|
loadScene(e) {
|
|
4861
|
-
const t = this.extensions, n = this.json.scenes[e], s = this, i = new
|
|
4862
|
-
n.name && (i.name = s.createUniqueName(n.name)),
|
|
4861
|
+
const t = this.extensions, n = this.json.scenes[e], s = this, i = new Zt();
|
|
4862
|
+
n.name && (i.name = s.createUniqueName(n.name)), He(i, n), n.extensions && $e(t, i, n);
|
|
4863
4863
|
const o = n.nodes || [], a = [];
|
|
4864
4864
|
for (let l = 0, c = o.length; l < c; l++)
|
|
4865
4865
|
a.push(s.getDependency("node", o[l]));
|
|
@@ -4998,7 +4998,7 @@ function Rn(r, e, t) {
|
|
|
4998
4998
|
});
|
|
4999
4999
|
s.push(o);
|
|
5000
5000
|
}
|
|
5001
|
-
return
|
|
5001
|
+
return os.workingColorSpace !== Fe && "COLOR_0" in n && console.warn(`THREE.GLTFLoader: Converting vertex colors from "srgb-linear" to "${os.workingColorSpace}" not supported.`), He(r, e), Sa(r, e, t), Promise.all(s).then(function() {
|
|
5002
5002
|
return e.targets !== void 0 ? Ta(r, e.targets, t) : r;
|
|
5003
5003
|
});
|
|
5004
5004
|
}
|
|
@@ -5006,7 +5006,7 @@ let Hs = null;
|
|
|
5006
5006
|
function La(r) {
|
|
5007
5007
|
Hs = r;
|
|
5008
5008
|
}
|
|
5009
|
-
const
|
|
5009
|
+
const Se = ts({
|
|
5010
5010
|
scripts: []
|
|
5011
5011
|
});
|
|
5012
5012
|
function ui() {
|
|
@@ -5019,21 +5019,24 @@ function Na(r) {
|
|
|
5019
5019
|
name: ((t = r == null ? void 0 : r.name) == null ? void 0 : t.trim()) ?? "",
|
|
5020
5020
|
code: r == null ? void 0 : r.code
|
|
5021
5021
|
};
|
|
5022
|
-
return
|
|
5022
|
+
return Se.scripts.push(e), e;
|
|
5023
5023
|
}
|
|
5024
5024
|
function Ha(r) {
|
|
5025
|
-
const e =
|
|
5026
|
-
e !== -1 &&
|
|
5025
|
+
const e = Se.scripts.findIndex((t) => t.id === r);
|
|
5026
|
+
e !== -1 && Se.scripts.splice(e, 1);
|
|
5027
5027
|
}
|
|
5028
5028
|
function ka(r) {
|
|
5029
|
-
|
|
5029
|
+
Se.scripts = (r || []).map((e) => ({
|
|
5030
5030
|
id: (e == null ? void 0 : e.id) || ui(),
|
|
5031
5031
|
name: (e == null ? void 0 : e.name) ?? "",
|
|
5032
5032
|
code: (e == null ? void 0 : e.code) ?? ""
|
|
5033
5033
|
}));
|
|
5034
5034
|
}
|
|
5035
|
-
function ja(
|
|
5036
|
-
|
|
5035
|
+
function ja() {
|
|
5036
|
+
Se.scripts = [];
|
|
5037
|
+
}
|
|
5038
|
+
function Fa(r) {
|
|
5039
|
+
const e = Se.scripts.find((t) => t.id === r);
|
|
5037
5040
|
if (e) {
|
|
5038
5041
|
if (!Hs) {
|
|
5039
5042
|
console.warn("[脚本] 执行器尚未注册,请先初始化编辑器(initEditor)");
|
|
@@ -5050,7 +5053,7 @@ function di(r) {
|
|
|
5050
5053
|
var e;
|
|
5051
5054
|
return !!r && ((e = r.name) == null ? void 0 : e.trim()) === "初始化";
|
|
5052
5055
|
}
|
|
5053
|
-
function
|
|
5056
|
+
function Ua(r, e = 0) {
|
|
5054
5057
|
var s, i;
|
|
5055
5058
|
if (r.name && r.name.trim()) return r.name.trim();
|
|
5056
5059
|
const t = (s = r.code) == null ? void 0 : s.match(/function\s+([A-Za-z_$][\w$]*)\s*\(/);
|
|
@@ -5084,24 +5087,24 @@ const C = {
|
|
|
5084
5087
|
/** 当前选中的物体 */
|
|
5085
5088
|
selectedObject: null
|
|
5086
5089
|
};
|
|
5087
|
-
let
|
|
5088
|
-
const
|
|
5089
|
-
let ks = [],
|
|
5090
|
+
let _t = !1, at = !1, Ye = null;
|
|
5091
|
+
const za = 16755200;
|
|
5092
|
+
let ks = [], Vt = [], Nt = !0, ot = null, Te = null, $t = null, Ke = [];
|
|
5090
5093
|
const lt = /* @__PURE__ */ new Map();
|
|
5091
|
-
let
|
|
5092
|
-
async function
|
|
5093
|
-
C.container = r, C.mode = e,
|
|
5094
|
+
let Ht, es = null, Ot = null, Rt = null;
|
|
5095
|
+
async function Wa(r, e = "edit", t) {
|
|
5096
|
+
C.container = r, C.mode = e, Ba(), Va(), Ya(), t && (await wl(t.scene, e, t.dataPanels, t.waters, t.textures, t.ambientLight, t.scripts), t != null && t.camera && (C.defaultMainCamera = t.camera, fi(!0))), Za(), Ka(), Ht && C.orbitControls && (C.orbitControls.target.fromArray(Ht), C.orbitControls.update()), Xa(), Ci(), pi(), Ot = (n) => $a(n), Rt = () => Ja(), e === "edit" && r.addEventListener("click", Ot), window.addEventListener("resize", Rt), t || Qa(), e === "edit" && qa(), yl();
|
|
5094
5097
|
}
|
|
5095
|
-
function
|
|
5098
|
+
function Ga() {
|
|
5096
5099
|
return window.devicePixelRatio;
|
|
5097
5100
|
}
|
|
5098
|
-
function
|
|
5099
|
-
const r =
|
|
5101
|
+
function Ba() {
|
|
5102
|
+
const r = Ga(), e = new O.WebGLRenderer({ antialias: !0, alpha: !0 });
|
|
5100
5103
|
e.setSize(C.container.clientWidth, C.container.clientHeight), e.setPixelRatio(r), e.toneMapping = O.NeutralToneMapping, e.toneMappingExposure = 1, console.log(
|
|
5101
5104
|
`[Renderer] css=${C.container.clientWidth}×${C.container.clientHeight}, dpr=${window.devicePixelRatio}, targetRatio=${r}, antialias=true`
|
|
5102
5105
|
), C.container.appendChild(e.domElement), C.renderer = e;
|
|
5103
5106
|
}
|
|
5104
|
-
function
|
|
5107
|
+
function Xa() {
|
|
5105
5108
|
if (!C.renderer || !C.scene || !C.camera) return;
|
|
5106
5109
|
const r = C.renderer.getPixelRatio(), e = C.container.clientWidth * r, t = C.container.clientHeight * r, n = new O.WebGLRenderTarget(e, t, {
|
|
5107
5110
|
type: O.HalfFloatType,
|
|
@@ -5111,17 +5114,17 @@ function Ba() {
|
|
|
5111
5114
|
const s = new dr(C.renderer, n);
|
|
5112
5115
|
s.addPass(new fr(C.scene, C.camera)), s.addPass(new hr()), Ye = s;
|
|
5113
5116
|
}
|
|
5114
|
-
function
|
|
5117
|
+
function Va() {
|
|
5115
5118
|
if (C.scene = new O.Scene(), C.scene.name = "sl_scene", C.renderer) {
|
|
5116
|
-
const r =
|
|
5119
|
+
const r = Jt(C.renderer);
|
|
5117
5120
|
r ? (C.scene.environment = r, C.scene.environmentIntensity = 1) : console.warn("[初始化] 环境贴图生成失败,场景将没有 IBL 间接光照");
|
|
5118
5121
|
}
|
|
5119
5122
|
}
|
|
5120
|
-
function
|
|
5123
|
+
function qa() {
|
|
5121
5124
|
const r = new O.GridHelper(30, 30, 8956671, 3364232);
|
|
5122
5125
|
r.name = "地板", r.userData.type = "initFloor", C.scene.add(r), C.gridHelper = r;
|
|
5123
5126
|
}
|
|
5124
|
-
function
|
|
5127
|
+
function Ya() {
|
|
5125
5128
|
const r = C.container, e = r.clientWidth / r.clientHeight, t = new O.PerspectiveCamera(45, e, 0.1, 1e3);
|
|
5126
5129
|
t.position.set(0, 6, 15), t.lookAt(0, 0, 0), C.camera = t;
|
|
5127
5130
|
}
|
|
@@ -5137,7 +5140,7 @@ function fi(r = !1) {
|
|
|
5137
5140
|
e.rotation[0],
|
|
5138
5141
|
e.rotation[1],
|
|
5139
5142
|
e.rotation[2]
|
|
5140
|
-
), C.camera.updateProjectionMatrix(),
|
|
5143
|
+
), C.camera.updateProjectionMatrix(), Ht = e.target;
|
|
5141
5144
|
return;
|
|
5142
5145
|
} else
|
|
5143
5146
|
gi(""), cs();
|
|
@@ -5167,22 +5170,22 @@ function fi(r = !1) {
|
|
|
5167
5170
|
).easing(de.Easing.Quadratic.InOut).onUpdate((o) => {
|
|
5168
5171
|
C.camera.position.set(o.x, o.y, o.z), C.orbitControls.target.set(o.tx, o.ty, o.tz), C.orbitControls.update();
|
|
5169
5172
|
}).onComplete(() => {
|
|
5170
|
-
|
|
5173
|
+
Ht = e.target, C.orbitControls.enabled = !0;
|
|
5171
5174
|
}).start();
|
|
5172
5175
|
}
|
|
5173
|
-
function
|
|
5176
|
+
function Ka() {
|
|
5174
5177
|
const r = new jo(C.camera, C.renderer.domElement);
|
|
5175
5178
|
r.minDistance = 0, r.maxDistance = 1 / 0, r.addEventListener("start", () => {
|
|
5176
|
-
|
|
5179
|
+
_t = !1;
|
|
5177
5180
|
}), r.addEventListener("change", () => {
|
|
5178
|
-
|
|
5181
|
+
_t = !0;
|
|
5179
5182
|
}), r.addEventListener("end", () => {
|
|
5180
|
-
|
|
5183
|
+
_t && (at = !0, setTimeout(() => {
|
|
5181
5184
|
at = !1;
|
|
5182
5185
|
}, 200));
|
|
5183
5186
|
}), C.orbitControls = r;
|
|
5184
5187
|
}
|
|
5185
|
-
function
|
|
5188
|
+
function Za() {
|
|
5186
5189
|
const r = new Qo(
|
|
5187
5190
|
C.camera,
|
|
5188
5191
|
C.renderer.domElement
|
|
@@ -5202,21 +5205,21 @@ function Ka() {
|
|
|
5202
5205
|
function hi(r = C.scene) {
|
|
5203
5206
|
if (!r || r.children.some((t) => t.type === "AmbientLight")) return null;
|
|
5204
5207
|
const e = new O.AmbientLight(
|
|
5205
|
-
|
|
5206
|
-
|
|
5208
|
+
bl,
|
|
5209
|
+
xl
|
|
5207
5210
|
);
|
|
5208
5211
|
return e.name = "环境光", r.add(e), e;
|
|
5209
5212
|
}
|
|
5210
|
-
function
|
|
5213
|
+
function Qa() {
|
|
5211
5214
|
hi(C.scene);
|
|
5212
5215
|
}
|
|
5213
5216
|
function pi() {
|
|
5214
5217
|
var e, t;
|
|
5215
|
-
|
|
5216
|
-
n.userData.isWater && n.type === "Mesh" &&
|
|
5218
|
+
es = requestAnimationFrame(pi), de.update(), (e = C.orbitControls) == null || e.update(), C.mode === "run" && Ye && C.scene && C.camera ? Ye.render() : (t = C.renderer) == null || t.render(C.scene, C.camera), C.scene && C.camera && Mr(C.scene, C.camera), Nt && C.scene && (Vt = [], C.scene.traverse((n) => {
|
|
5219
|
+
n.userData.isWater && n.type === "Mesh" && Vt.push(n);
|
|
5217
5220
|
}), Nt = !1);
|
|
5218
|
-
for (let n = 0; n <
|
|
5219
|
-
const s =
|
|
5221
|
+
for (let n = 0; n < Vt.length; n++) {
|
|
5222
|
+
const s = Vt[n], i = s.material;
|
|
5220
5223
|
if (i.uniforms && i.uniforms.time) {
|
|
5221
5224
|
const o = s.userData.waterTimeScale ?? 1;
|
|
5222
5225
|
i.uniforms.time.value += 1 / 60 * o, C.camera && i.uniforms.eye && i.uniforms.eye.value.copy(C.camera.position);
|
|
@@ -5228,7 +5231,7 @@ function pi() {
|
|
|
5228
5231
|
}
|
|
5229
5232
|
}
|
|
5230
5233
|
}
|
|
5231
|
-
function
|
|
5234
|
+
function Ja() {
|
|
5232
5235
|
if (!C.container || !C.camera || !C.renderer) return;
|
|
5233
5236
|
const r = C.container.clientWidth, e = C.container.clientHeight;
|
|
5234
5237
|
r === 0 || e === 0 || (C.camera.aspect = r / e, C.camera.updateProjectionMatrix(), C.renderer.setSize(r, e), Ye && Ye.setSize(r, e), Tr(r, e));
|
|
@@ -5237,7 +5240,7 @@ function ds(r) {
|
|
|
5237
5240
|
C.selectedObject !== r && (C.selectedObject && C.transformControls.detach(), C.selectedObject = r, C.transformControls.attach(r), C.transformControls.setMode(C.transformControlsMode), C.transformControls.showX = !0, C.transformControls.showY = !0, C.transformControls.showZ = !0, mi(r), ot == null || ot(r));
|
|
5238
5241
|
}
|
|
5239
5242
|
let xe = null;
|
|
5240
|
-
function
|
|
5243
|
+
function _a(r) {
|
|
5241
5244
|
xe = r;
|
|
5242
5245
|
}
|
|
5243
5246
|
function Es(r) {
|
|
@@ -5254,7 +5257,7 @@ function mi(r) {
|
|
|
5254
5257
|
cs(), r.traverse((e) => {
|
|
5255
5258
|
if (e.isMesh) {
|
|
5256
5259
|
const t = e, n = new O.EdgesGeometry(t.geometry), s = new O.LineBasicMaterial({
|
|
5257
|
-
color:
|
|
5260
|
+
color: za,
|
|
5258
5261
|
depthTest: !0
|
|
5259
5262
|
}), i = new O.LineSegments(n, s);
|
|
5260
5263
|
e.add(i), ks.push(i);
|
|
@@ -5281,15 +5284,15 @@ function gi(r) {
|
|
|
5281
5284
|
yi(e);
|
|
5282
5285
|
}, 500));
|
|
5283
5286
|
}
|
|
5284
|
-
function
|
|
5287
|
+
function $a(r) {
|
|
5285
5288
|
if (at) {
|
|
5286
5289
|
at = !1;
|
|
5287
5290
|
return;
|
|
5288
5291
|
}
|
|
5289
|
-
const e =
|
|
5292
|
+
const e = el(r);
|
|
5290
5293
|
e ? ds(e) : qs();
|
|
5291
5294
|
}
|
|
5292
|
-
function
|
|
5295
|
+
function el(r) {
|
|
5293
5296
|
const e = C.renderer.domElement.getBoundingClientRect(), t = new O.Vector2(
|
|
5294
5297
|
(r.clientX - e.left) / e.width * 2 - 1,
|
|
5295
5298
|
-((r.clientY - e.top) / e.height) * 2 + 1
|
|
@@ -5377,13 +5380,13 @@ function yi(r, e = 500) {
|
|
|
5377
5380
|
);
|
|
5378
5381
|
}
|
|
5379
5382
|
}
|
|
5380
|
-
function
|
|
5383
|
+
function tl(r) {
|
|
5381
5384
|
r.userData.id && lt.set(String(r.userData.id), r);
|
|
5382
5385
|
}
|
|
5383
|
-
function
|
|
5386
|
+
function sl(r) {
|
|
5384
5387
|
r.userData.id && lt.delete(String(r.userData.id));
|
|
5385
5388
|
}
|
|
5386
|
-
function
|
|
5389
|
+
function nl(r, e) {
|
|
5387
5390
|
const t = e || r.userData.id;
|
|
5388
5391
|
if (t)
|
|
5389
5392
|
lt.set(String(t), r);
|
|
@@ -5392,7 +5395,7 @@ function sl(r, e) {
|
|
|
5392
5395
|
r.userData.id = n, lt.set(n, r);
|
|
5393
5396
|
}
|
|
5394
5397
|
}
|
|
5395
|
-
function
|
|
5398
|
+
function il(r) {
|
|
5396
5399
|
r.traverse((e) => {
|
|
5397
5400
|
if (e.name && e.name.startsWith("DataPanel_")) {
|
|
5398
5401
|
const t = e;
|
|
@@ -5416,19 +5419,19 @@ function bi(r) {
|
|
|
5416
5419
|
});
|
|
5417
5420
|
}
|
|
5418
5421
|
function Be(r, e = !1) {
|
|
5419
|
-
C.scene.add(r), bi(r), Nt = !0, r.userData.isMovable && (
|
|
5422
|
+
C.scene.add(r), bi(r), Nt = !0, r.userData.isMovable && (ol(r), fs()), e && C.mode === "edit" && ds(r);
|
|
5420
5423
|
}
|
|
5421
5424
|
function xi(r) {
|
|
5422
|
-
C.selectedObject === r && qs(), Nt = !0,
|
|
5425
|
+
C.selectedObject === r && qs(), Nt = !0, il(r), sl(r), r.userData.helper && C.scene.remove(r.userData.helper), r.parent ? r.parent.remove(r) : C.scene.remove(r), rl(r), fs();
|
|
5423
5426
|
}
|
|
5424
5427
|
function Ii(r) {
|
|
5425
5428
|
const e = C.scene.getObjectByProperty("uuid", r);
|
|
5426
5429
|
e && xi(e);
|
|
5427
5430
|
}
|
|
5428
|
-
function
|
|
5431
|
+
function ol(r) {
|
|
5429
5432
|
r.userData.isMovable && r.parent === C.scene && (Ke.includes(r) || Ke.push(r));
|
|
5430
5433
|
}
|
|
5431
|
-
function
|
|
5434
|
+
function rl(r) {
|
|
5432
5435
|
const e = Ke.indexOf(r);
|
|
5433
5436
|
e !== -1 && Ke.splice(e, 1);
|
|
5434
5437
|
}
|
|
@@ -5439,16 +5442,16 @@ function Ci() {
|
|
|
5439
5442
|
}), Ke = r, fs();
|
|
5440
5443
|
}
|
|
5441
5444
|
function fs() {
|
|
5442
|
-
|
|
5445
|
+
$t == null || $t([...Ke]);
|
|
5443
5446
|
}
|
|
5444
|
-
function
|
|
5447
|
+
function al(r) {
|
|
5445
5448
|
ot = r;
|
|
5446
5449
|
}
|
|
5447
|
-
function
|
|
5450
|
+
function ll(r) {
|
|
5448
5451
|
Te = r;
|
|
5449
5452
|
}
|
|
5450
|
-
function
|
|
5451
|
-
|
|
5453
|
+
function cl(r) {
|
|
5454
|
+
$t = r;
|
|
5452
5455
|
}
|
|
5453
5456
|
function wi() {
|
|
5454
5457
|
return Ke;
|
|
@@ -5456,11 +5459,11 @@ function wi() {
|
|
|
5456
5459
|
function js() {
|
|
5457
5460
|
return C.selectedObject;
|
|
5458
5461
|
}
|
|
5459
|
-
function
|
|
5462
|
+
function ul(r, e, t) {
|
|
5460
5463
|
if (!C.scene) return;
|
|
5461
5464
|
const n = lt.get(r);
|
|
5462
5465
|
if (n) {
|
|
5463
|
-
const s =
|
|
5466
|
+
const s = jt(n);
|
|
5464
5467
|
s && s.updateItemByCode(e, t);
|
|
5465
5468
|
}
|
|
5466
5469
|
}
|
|
@@ -5493,7 +5496,7 @@ function Mi(r) {
|
|
|
5493
5496
|
opacity: /* @__PURE__ */ new Set()
|
|
5494
5497
|
}, Us.set(r, e)), e;
|
|
5495
5498
|
}
|
|
5496
|
-
function
|
|
5499
|
+
function dl(r, e, t, n) {
|
|
5497
5500
|
const s = Mi(r);
|
|
5498
5501
|
for (const o of t)
|
|
5499
5502
|
s[o].forEach((a) => a.stop()), s[o].clear(), s[o].add(e);
|
|
@@ -5512,7 +5515,7 @@ function Ys(r, e = []) {
|
|
|
5512
5515
|
for (const s of n)
|
|
5513
5516
|
t[s].forEach((i) => i.stop()), t[s].clear();
|
|
5514
5517
|
}
|
|
5515
|
-
function
|
|
5518
|
+
function fl(r) {
|
|
5516
5519
|
return r * Math.PI / 180;
|
|
5517
5520
|
}
|
|
5518
5521
|
function hs(r, e = {}) {
|
|
@@ -5523,21 +5526,21 @@ function hs(r, e = {}) {
|
|
|
5523
5526
|
const o = new de.Tween(r).to(i, t).easing(n).onUpdate(() => {
|
|
5524
5527
|
r === C.selectedObject && (Te == null || Te(r));
|
|
5525
5528
|
}).start();
|
|
5526
|
-
return
|
|
5529
|
+
return dl(r, o, s, () => {
|
|
5527
5530
|
var a;
|
|
5528
5531
|
(a = e.onComplete) == null || a.call(e), r === C.selectedObject && (Te == null || Te(r));
|
|
5529
5532
|
}), o;
|
|
5530
5533
|
}
|
|
5531
|
-
function
|
|
5534
|
+
function hl(r, e, t = 1e3, n) {
|
|
5532
5535
|
return hs(r, { position: e, duration: t, easing: n });
|
|
5533
5536
|
}
|
|
5534
|
-
function
|
|
5537
|
+
function pl(r, e, t = 1e3, n) {
|
|
5535
5538
|
return hs(r, { rotation: e, duration: t, easing: n });
|
|
5536
5539
|
}
|
|
5537
|
-
function
|
|
5540
|
+
function Al(r, e, t = 1e3, n) {
|
|
5538
5541
|
return hs(r, { scale: e, duration: t, easing: n });
|
|
5539
5542
|
}
|
|
5540
|
-
function
|
|
5543
|
+
function ml(r, e, t = 1e3, n, s) {
|
|
5541
5544
|
if (!r)
|
|
5542
5545
|
return console.warn("[脚本动画] 目标对象为空,无法执行透明度动画"), null;
|
|
5543
5546
|
const i = /* @__PURE__ */ new Set();
|
|
@@ -5563,7 +5566,7 @@ function Al(r, e, t = 1e3, n, s) {
|
|
|
5563
5566
|
}) : p.onComplete(() => u.opacity.delete(p)), p.onStop(() => u.opacity.delete(p));
|
|
5564
5567
|
}), g[0] ?? null;
|
|
5565
5568
|
}
|
|
5566
|
-
function
|
|
5569
|
+
function gl() {
|
|
5567
5570
|
return {
|
|
5568
5571
|
THREE: O,
|
|
5569
5572
|
scene: Sn(),
|
|
@@ -5579,17 +5582,17 @@ function ml() {
|
|
|
5579
5582
|
removeModel: xi,
|
|
5580
5583
|
removeModelById: Ii,
|
|
5581
5584
|
selectObject: ds,
|
|
5582
|
-
updateDataPanelValue:
|
|
5585
|
+
updateDataPanelValue: ul,
|
|
5583
5586
|
setTransformMode: Ai,
|
|
5584
5587
|
focusOnObject: yi,
|
|
5585
5588
|
// ── 动画 API(供脚本使用)──
|
|
5586
5589
|
animateTo: hs,
|
|
5587
|
-
moveTo:
|
|
5588
|
-
rotateTo:
|
|
5589
|
-
scaleTo:
|
|
5590
|
-
fadeTo:
|
|
5590
|
+
moveTo: hl,
|
|
5591
|
+
rotateTo: pl,
|
|
5592
|
+
scaleTo: Al,
|
|
5593
|
+
fadeTo: ml,
|
|
5591
5594
|
stopAnimations: Ys,
|
|
5592
|
-
degToRad:
|
|
5595
|
+
degToRad: fl,
|
|
5593
5596
|
console,
|
|
5594
5597
|
window,
|
|
5595
5598
|
document,
|
|
@@ -5602,7 +5605,7 @@ function Ti(r) {
|
|
|
5602
5605
|
var a;
|
|
5603
5606
|
const e = (a = r == null ? void 0 : r.code) == null ? void 0 : a.trim();
|
|
5604
5607
|
if (!e) return;
|
|
5605
|
-
const t =
|
|
5608
|
+
const t = gl(), n = Object.keys(t), s = Object.values(t), i = /^\s*(?:async\s+)?function\s+[A-Za-z_$][\w$]*\s*\(/.test(e) || /^\s*(?:const|let|var)\s+[A-Za-z_$][\w$]*\s*=\s*(?:async\s*)?(?:function\b|\([^)]*\)\s*=>|[A-Za-z_$][\w$]*\s*=>)/.test(
|
|
5606
5609
|
e
|
|
5607
5610
|
) || /^\s*[A-Za-z_$][\w$]*\s*=\s*(?:async\s*)?(?:function\b|\([^)]*\)\s*=>|[A-Za-z_$][\w$]*\s*=>)/.test(
|
|
5608
5611
|
e
|
|
@@ -5637,12 +5640,12 @@ function Ti(r) {
|
|
|
5637
5640
|
}
|
|
5638
5641
|
}
|
|
5639
5642
|
La(Ti);
|
|
5640
|
-
function
|
|
5641
|
-
for (const r of
|
|
5643
|
+
function yl() {
|
|
5644
|
+
for (const r of Se.scripts)
|
|
5642
5645
|
di(r) && (console.log("[初始化] 自动执行脚本:", r.name), Ti(r));
|
|
5643
5646
|
}
|
|
5644
|
-
const
|
|
5645
|
-
async function
|
|
5647
|
+
const bl = 16777215, xl = 1;
|
|
5648
|
+
async function Il() {
|
|
5646
5649
|
var h, v, D, R;
|
|
5647
5650
|
xe == null || xe(!0), await new Promise((T) => setTimeout(T, 50)), qs();
|
|
5648
5651
|
const r = C.scene;
|
|
@@ -5705,13 +5708,13 @@ async function xl() {
|
|
|
5705
5708
|
var be, Oe, Re;
|
|
5706
5709
|
const _ = z.querySelector(".item-label"), B = z.querySelector(".item-value");
|
|
5707
5710
|
if (_ && B) {
|
|
5708
|
-
const Xe = (_.textContent || "").trim(),
|
|
5711
|
+
const Xe = (_.textContent || "").trim(), Le = ((Oe = (be = B.childNodes[0]) == null ? void 0 : be.textContent) == null ? void 0 : Oe.trim()) || "", ze = B.querySelector(
|
|
5709
5712
|
"span"
|
|
5710
5713
|
), ps = ze ? (ze.textContent || "").trim() : void 0, As = ((Re = z.getAttribute("data-item-code")) == null ? void 0 : Re.trim()) || void 0;
|
|
5711
|
-
N.push({ label: Xe, value:
|
|
5714
|
+
N.push({ label: Xe, value: Le, unit: ps, code: As });
|
|
5712
5715
|
}
|
|
5713
5716
|
}), T.parent) {
|
|
5714
|
-
const z = J.element.style.width || "", _ = J.element.style.fontSize || "", B =
|
|
5717
|
+
const z = J.element.style.width || "", _ = J.element.style.fontSize || "", B = jt(T.parent), be = B ? B.getOffsetY() : 0.1;
|
|
5715
5718
|
n.set(
|
|
5716
5719
|
T.parent.userData.id ? T.parent.userData.id : T.parent.uuid,
|
|
5717
5720
|
{
|
|
@@ -5798,7 +5801,7 @@ async function xl() {
|
|
|
5798
5801
|
waters: i,
|
|
5799
5802
|
textures: s,
|
|
5800
5803
|
ambientLight: a,
|
|
5801
|
-
scripts:
|
|
5804
|
+
scripts: Se.scripts.map((T) => ({
|
|
5802
5805
|
id: T.id,
|
|
5803
5806
|
name: T.name,
|
|
5804
5807
|
code: T.code
|
|
@@ -5806,7 +5809,7 @@ async function xl() {
|
|
|
5806
5809
|
};
|
|
5807
5810
|
return xe == null || xe(!1), f;
|
|
5808
5811
|
}
|
|
5809
|
-
function
|
|
5812
|
+
function Cl(r) {
|
|
5810
5813
|
if (r instanceof ArrayBuffer || ArrayBuffer.isView(r)) {
|
|
5811
5814
|
if (r instanceof ArrayBuffer) return r;
|
|
5812
5815
|
const e = r;
|
|
@@ -5829,9 +5832,9 @@ function Il(r) {
|
|
|
5829
5832
|
}
|
|
5830
5833
|
return r && typeof r == "object" && r.type === "Buffer" && Array.isArray(r.data) ? new Uint8Array(r.data).buffer : null;
|
|
5831
5834
|
}
|
|
5832
|
-
async function
|
|
5835
|
+
async function wl(r, e = "edit", t, n, s, i, o) {
|
|
5833
5836
|
var l, c, d, u, g, p, b;
|
|
5834
|
-
const a =
|
|
5837
|
+
const a = Cl(r);
|
|
5835
5838
|
if (a) {
|
|
5836
5839
|
const m = await new ai().parseAsync(a, ""), A = m.scene || ((l = m.scenes) == null ? void 0 : l[0]), I = (c = C.scene) == null ? void 0 : c.environment;
|
|
5837
5840
|
if (C.scene = A, !A.children.some((w) => w.type === "AmbientLight"))
|
|
@@ -5843,11 +5846,11 @@ async function Cl(r, e = "edit", t, n, s, i, o) {
|
|
|
5843
5846
|
if (I)
|
|
5844
5847
|
C.scene.environment = I, C.scene.environmentIntensity = 1;
|
|
5845
5848
|
else if (C.renderer) {
|
|
5846
|
-
const w =
|
|
5849
|
+
const w = Jt(C.renderer);
|
|
5847
5850
|
w && (C.scene.environment = w, C.scene.environmentIntensity = 1);
|
|
5848
5851
|
}
|
|
5849
5852
|
if (!C.scene.environment && C.renderer) {
|
|
5850
|
-
const w =
|
|
5853
|
+
const w = Jt(C.renderer);
|
|
5851
5854
|
w ? (C.scene.environment = w, C.scene.environmentIntensity = 1, console.warn("[导入] 原环境贴图不可用,已重新生成")) : console.error("[导入] 环境贴图生成失败,场景将没有 IBL 间接光照,模型会偏暗");
|
|
5852
5855
|
}
|
|
5853
5856
|
bi(A), A.traverse((w) => {
|
|
@@ -5862,7 +5865,7 @@ async function Cl(r, e = "edit", t, n, s, i, o) {
|
|
|
5862
5865
|
if (C.scene = I, w)
|
|
5863
5866
|
C.scene.environment = w, C.scene.environmentIntensity = 1;
|
|
5864
5867
|
else if (C.renderer) {
|
|
5865
|
-
const f =
|
|
5868
|
+
const f = Jt(C.renderer);
|
|
5866
5869
|
f && (C.scene.environment = f, C.scene.environmentIntensity = 1);
|
|
5867
5870
|
}
|
|
5868
5871
|
} else
|
|
@@ -5871,14 +5874,14 @@ async function Cl(r, e = "edit", t, n, s, i, o) {
|
|
|
5871
5874
|
if (t && ((g = C.scene) == null || g.traverse((m) => {
|
|
5872
5875
|
const A = m.userData.id || m.userData._sourceUuid || m.uuid, I = t[A];
|
|
5873
5876
|
if (I && m.userData.isMovable) {
|
|
5874
|
-
|
|
5875
|
-
const w = new
|
|
5877
|
+
tl(m);
|
|
5878
|
+
const w = new as({
|
|
5876
5879
|
title: I.title,
|
|
5877
5880
|
items: I.items
|
|
5878
5881
|
});
|
|
5879
5882
|
w.attachTo(m), w.visible = !1, I.width && w.setWidth(I.width), I.fontSize && w.setFontSize(I.fontSize), I.offsetY !== void 0 && w.setOffsetY(I.offsetY), I.offsetX !== void 0 && w.setOffsetX(I.offsetX), I.offsetZ !== void 0 && w.setOffsetZ(I.offsetZ), ni(m, w);
|
|
5880
5883
|
}
|
|
5881
|
-
})), n && n.length > 0 && Promise.resolve().then(() =>
|
|
5884
|
+
})), n && n.length > 0 && Promise.resolve().then(() => Nl).then(({ addWater: m, addWaterCylinder: A }) => {
|
|
5882
5885
|
for (const I of n) {
|
|
5883
5886
|
const w = I.geometryType || "box";
|
|
5884
5887
|
let f;
|
|
@@ -5949,11 +5952,11 @@ function Ei(r) {
|
|
|
5949
5952
|
for (const t of e)
|
|
5950
5953
|
Ei(t);
|
|
5951
5954
|
}
|
|
5952
|
-
function
|
|
5953
|
-
|
|
5955
|
+
function vl() {
|
|
5956
|
+
es !== null && (cancelAnimationFrame(es), es = null), Ot && C.container && (C.container.removeEventListener("click", Ot), Ot = null), Rt && (window.removeEventListener("resize", Rt), Rt = null), C.orbitControls && (C.orbitControls.dispose(), C.orbitControls = null), C.transformControls && (C.transformControls.dispose(), C.transformControls = null), Ye && (Ye.dispose(), Ye = null), C.scene && (Ei(C.scene), C.scene = null), C.renderer && (C.renderer.dispose(), C.renderer.domElement && C.container && C.container.removeChild(C.renderer.domElement), C.renderer = null), Er(), C.camera = null, C.gridHelper = null, C.selectedObject = null, C.container = null, C.mode = "", C.defaultMainCamera = null, Ht = void 0, Ke = [], lt.clear(), fs(), ja(), _t = !1, at = !1;
|
|
5954
5957
|
}
|
|
5955
|
-
const
|
|
5956
|
-
function
|
|
5958
|
+
const Ml = /^[og]\s*(.+)?/, Tl = /^mtllib /, El = /^usemtl /, Dl = /^usemap /, Nn = /\s+/, Hn = new P(), Ds = new P(), kn = new P(), jn = new P(), we = new P(), qt = new le();
|
|
5959
|
+
function Ol() {
|
|
5957
5960
|
const r = {
|
|
5958
5961
|
objects: [],
|
|
5959
5962
|
object: {},
|
|
@@ -6113,7 +6116,7 @@ function Dl() {
|
|
|
6113
6116
|
};
|
|
6114
6117
|
return r.startObject("", !1), r;
|
|
6115
6118
|
}
|
|
6116
|
-
class
|
|
6119
|
+
class Rl extends Xs {
|
|
6117
6120
|
/**
|
|
6118
6121
|
* Constructs a new OBJ loader.
|
|
6119
6122
|
*
|
|
@@ -6157,7 +6160,7 @@ class Ol extends Xs {
|
|
|
6157
6160
|
* @return {Group} The parsed OBJ.
|
|
6158
6161
|
*/
|
|
6159
6162
|
parse(e) {
|
|
6160
|
-
const t = new
|
|
6163
|
+
const t = new Ol();
|
|
6161
6164
|
e.indexOf(`\r
|
|
6162
6165
|
`) !== -1 && (e = e.replace(/\r\n/g, `
|
|
6163
6166
|
`)), e.indexOf(`\\
|
|
@@ -6178,12 +6181,12 @@ class Ol extends Xs {
|
|
|
6178
6181
|
parseFloat(u[1]),
|
|
6179
6182
|
parseFloat(u[2]),
|
|
6180
6183
|
parseFloat(u[3])
|
|
6181
|
-
), u.length >= 7 ? (
|
|
6184
|
+
), u.length >= 7 ? (qt.setRGB(
|
|
6182
6185
|
parseFloat(u[4]),
|
|
6183
6186
|
parseFloat(u[5]),
|
|
6184
6187
|
parseFloat(u[6]),
|
|
6185
|
-
|
|
6186
|
-
), t.colors.push(
|
|
6188
|
+
je
|
|
6189
|
+
), t.colors.push(qt.r, qt.g, qt.b)) : t.colors.push(void 0, void 0, void 0);
|
|
6187
6190
|
break;
|
|
6188
6191
|
case "vn":
|
|
6189
6192
|
t.normals.push(
|
|
@@ -6238,14 +6241,14 @@ class Ol extends Xs {
|
|
|
6238
6241
|
} else if (d === "p") {
|
|
6239
6242
|
const g = c.slice(1).trim().split(" ");
|
|
6240
6243
|
t.addPointGeometry(g);
|
|
6241
|
-
} else if ((s =
|
|
6244
|
+
} else if ((s = Ml.exec(c)) !== null) {
|
|
6242
6245
|
const u = (" " + s[0].slice(1).trim()).slice(1);
|
|
6243
6246
|
t.startObject(u);
|
|
6244
|
-
} else if (
|
|
6247
|
+
} else if (El.test(c))
|
|
6245
6248
|
t.object.startMaterial(c.substring(7).trim(), t.materialLibraries);
|
|
6246
|
-
else if (
|
|
6249
|
+
else if (Tl.test(c))
|
|
6247
6250
|
t.materialLibraries.push(c.substring(7).trim());
|
|
6248
|
-
else if (
|
|
6251
|
+
else if (Dl.test(c))
|
|
6249
6252
|
console.warn('THREE.OBJLoader: Rendering identifier "usemap" not supported. Textures must be defined in MTL files.');
|
|
6250
6253
|
else if (d === "s") {
|
|
6251
6254
|
if (s = c.split(" "), s.length > 1) {
|
|
@@ -6261,14 +6264,14 @@ class Ol extends Xs {
|
|
|
6261
6264
|
}
|
|
6262
6265
|
}
|
|
6263
6266
|
t.finalize();
|
|
6264
|
-
const i = new
|
|
6267
|
+
const i = new Zt();
|
|
6265
6268
|
if (i.materialLibraries = [].concat(t.materialLibraries), !(t.objects.length === 1 && t.objects[0].geometry.vertices.length === 0) === !0)
|
|
6266
6269
|
for (let a = 0, l = t.objects.length; a < l; a++) {
|
|
6267
6270
|
const c = t.objects[a], d = c.geometry, u = c.materials, g = d.type === "Line", p = d.type === "Points";
|
|
6268
6271
|
let b = !1;
|
|
6269
6272
|
if (d.vertices.length === 0) continue;
|
|
6270
6273
|
const m = new rt();
|
|
6271
|
-
m.setAttribute("position", new
|
|
6274
|
+
m.setAttribute("position", new ke(d.vertices, 3)), d.normals.length > 0 && m.setAttribute("normal", new ke(d.normals, 3)), d.colors.length > 0 && (b = !0, m.setAttribute("color", new ke(d.colors, 3))), d.hasUVIndices === !0 && m.setAttribute("uv", new ke(d.uvs, 2));
|
|
6272
6275
|
const A = [];
|
|
6273
6276
|
for (let w = 0, f = u.length; w < f; w++) {
|
|
6274
6277
|
const h = u[w], v = h.name + "_" + h.smooth + "_" + b;
|
|
@@ -6290,22 +6293,22 @@ class Ol extends Xs {
|
|
|
6290
6293
|
const h = u[w];
|
|
6291
6294
|
m.addGroup(h.groupStart, h.groupCount, w);
|
|
6292
6295
|
}
|
|
6293
|
-
g ? I = new Ss(m, A) : p ? I = new
|
|
6296
|
+
g ? I = new Ss(m, A) : p ? I = new Kt(m, A) : I = new L(m, A);
|
|
6294
6297
|
} else
|
|
6295
|
-
g ? I = new Ss(m, A[0]) : p ? I = new
|
|
6298
|
+
g ? I = new Ss(m, A[0]) : p ? I = new Kt(m, A[0]) : I = new L(m, A[0]);
|
|
6296
6299
|
I.name = c.name, i.add(I);
|
|
6297
6300
|
}
|
|
6298
6301
|
else if (t.vertices.length > 0) {
|
|
6299
6302
|
const a = new It({ size: 1, sizeAttenuation: !1 }), l = new rt();
|
|
6300
|
-
l.setAttribute("position", new
|
|
6301
|
-
const c = new
|
|
6303
|
+
l.setAttribute("position", new ke(t.vertices, 3)), t.colors.length > 0 && t.colors[0] !== void 0 && (l.setAttribute("color", new ke(t.colors, 3)), a.vertexColors = !0);
|
|
6304
|
+
const c = new Kt(l, a);
|
|
6302
6305
|
i.add(c);
|
|
6303
6306
|
}
|
|
6304
6307
|
return i;
|
|
6305
6308
|
}
|
|
6306
6309
|
}
|
|
6307
6310
|
const Os = /* @__PURE__ */ new WeakMap();
|
|
6308
|
-
class
|
|
6311
|
+
class Pl extends Xs {
|
|
6309
6312
|
/**
|
|
6310
6313
|
* Constructs a new Draco loader.
|
|
6311
6314
|
*
|
|
@@ -6376,10 +6379,10 @@ class Rl extends Xs {
|
|
|
6376
6379
|
*/
|
|
6377
6380
|
parse(e, t, n = () => {
|
|
6378
6381
|
}) {
|
|
6379
|
-
this.decodeDracoFile(e, t, null, null,
|
|
6382
|
+
this.decodeDracoFile(e, t, null, null, je, n).catch(n);
|
|
6380
6383
|
}
|
|
6381
6384
|
//
|
|
6382
|
-
decodeDracoFile(e, t, n, s, i =
|
|
6385
|
+
decodeDracoFile(e, t, n, s, i = Fe, o = () => {
|
|
6383
6386
|
}) {
|
|
6384
6387
|
const a = {
|
|
6385
6388
|
attributeIDs: n || this.defaultAttributeIDs,
|
|
@@ -6428,10 +6431,10 @@ class Rl extends Xs {
|
|
|
6428
6431
|
return t;
|
|
6429
6432
|
}
|
|
6430
6433
|
_assignVertexColorSpace(e, t) {
|
|
6431
|
-
if (t !==
|
|
6434
|
+
if (t !== je) return;
|
|
6432
6435
|
const n = new le();
|
|
6433
6436
|
for (let s = 0, i = e.count; s < i; s++)
|
|
6434
|
-
n.fromBufferAttribute(e, s),
|
|
6437
|
+
n.fromBufferAttribute(e, s), os.colorSpaceToWorking(n, je), e.setXYZ(s, n.r, n.g, n.b);
|
|
6435
6438
|
}
|
|
6436
6439
|
_loadLibrary(e, t) {
|
|
6437
6440
|
const n = new Lt(this.manager);
|
|
@@ -6448,7 +6451,7 @@ class Rl extends Xs {
|
|
|
6448
6451
|
return e ? t.push(this._loadLibrary("draco_decoder.js", "text")) : (t.push(this._loadLibrary("draco_wasm_wrapper.js", "text")), t.push(this._loadLibrary("draco_decoder.wasm", "arraybuffer"))), this.decoderPending = Promise.all(t).then((n) => {
|
|
6449
6452
|
const s = n[0];
|
|
6450
6453
|
e || (this.decoderConfig.wasmBinary = n[1]);
|
|
6451
|
-
const i =
|
|
6454
|
+
const i = Sl.toString(), o = [
|
|
6452
6455
|
"/* draco decoder */",
|
|
6453
6456
|
s,
|
|
6454
6457
|
"",
|
|
@@ -6496,7 +6499,7 @@ class Rl extends Xs {
|
|
|
6496
6499
|
return this.workerPool.length = 0, this.workerSourceURL !== "" && URL.revokeObjectURL(this.workerSourceURL), this;
|
|
6497
6500
|
}
|
|
6498
6501
|
}
|
|
6499
|
-
function
|
|
6502
|
+
function Sl() {
|
|
6500
6503
|
let r, e;
|
|
6501
6504
|
onmessage = function(o) {
|
|
6502
6505
|
const a = o.data;
|
|
@@ -6600,7 +6603,7 @@ function Pl() {
|
|
|
6600
6603
|
}
|
|
6601
6604
|
}
|
|
6602
6605
|
}
|
|
6603
|
-
class
|
|
6606
|
+
class Ll extends L {
|
|
6604
6607
|
/**
|
|
6605
6608
|
* Constructs a new water instance.
|
|
6606
6609
|
*
|
|
@@ -6611,7 +6614,7 @@ class Sl extends L {
|
|
|
6611
6614
|
super(e), this.isWater = !0;
|
|
6612
6615
|
const n = this, s = t.textureWidth !== void 0 ? t.textureWidth : 512, i = t.textureHeight !== void 0 ? t.textureHeight : 512, o = t.clipBias !== void 0 ? t.clipBias : 0, a = t.alpha !== void 0 ? t.alpha : 1, l = t.time !== void 0 ? t.time : 0, c = t.waterNormals !== void 0 ? t.waterNormals : null, d = t.sunDirection !== void 0 ? t.sunDirection : new P(0.70707, 0.70707, 0), u = new le(t.sunColor !== void 0 ? t.sunColor : 16777215), g = new le(t.waterColor !== void 0 ? t.waterColor : 8355711), p = t.eye !== void 0 ? t.eye : new P(0, 0, 0), b = t.distortionScale !== void 0 ? t.distortionScale : 20, m = t.side !== void 0 ? t.side : ei, A = t.fog !== void 0 ? t.fog : !1, I = new Un(), w = new P(), f = new P(), h = new P(), v = new Ce(), D = new P(0, 0, -1), R = new nn(), T = new P(), Y = new P(), $ = new nn(), se = new Ce(), ne = new $n(), J = new Wn(s, i, { type: Gn }), Z = {
|
|
6613
6616
|
name: "MirrorShader",
|
|
6614
|
-
uniforms:
|
|
6617
|
+
uniforms: is.merge([
|
|
6615
6618
|
on.fog,
|
|
6616
6619
|
on.lights,
|
|
6617
6620
|
{
|
|
@@ -6734,7 +6737,7 @@ class Sl extends L {
|
|
|
6734
6737
|
)
|
|
6735
6738
|
}, N = new Rs({
|
|
6736
6739
|
name: Z.name,
|
|
6737
|
-
uniforms:
|
|
6740
|
+
uniforms: is.clone(Z.uniforms),
|
|
6738
6741
|
vertexShader: Z.vertexShader,
|
|
6739
6742
|
fragmentShader: Z.fragmentShader,
|
|
6740
6743
|
lights: !0,
|
|
@@ -6811,7 +6814,7 @@ function Li(r) {
|
|
|
6811
6814
|
function Ni(r, e, t, n, s, i = "水体(Water)") {
|
|
6812
6815
|
const a = new O.TextureLoader().load(Di, (d) => {
|
|
6813
6816
|
d.wrapS = d.wrapT = O.RepeatWrapping, d.repeat.set(s, s), d.generateMipmaps = !0, d.minFilter = O.LinearMipmapLinearFilter, d.magFilter = O.LinearFilter;
|
|
6814
|
-
}), l = Math.min(1024, Math.max(256, Math.round(Math.sqrt(e * t) * 64))), c = new
|
|
6817
|
+
}), l = Math.min(1024, Math.max(256, Math.round(Math.sqrt(e * t) * 64))), c = new Ll(r, {
|
|
6815
6818
|
textureWidth: l,
|
|
6816
6819
|
textureHeight: l,
|
|
6817
6820
|
waterNormals: a,
|
|
@@ -6855,18 +6858,18 @@ function ki(r) {
|
|
|
6855
6858
|
const e = js();
|
|
6856
6859
|
if (!e)
|
|
6857
6860
|
return console.warn("请先选中一个模型,再添加数据面板"), null;
|
|
6858
|
-
const t =
|
|
6861
|
+
const t = jt(e);
|
|
6859
6862
|
t && (t.dispose(), ii(e));
|
|
6860
6863
|
const n = [
|
|
6861
6864
|
{ label: "温度", value: "30", unit: "℃" },
|
|
6862
6865
|
{ label: "湿度", value: "65", unit: "%" },
|
|
6863
6866
|
{ label: "压力", value: "101.3", unit: "kPa" },
|
|
6864
6867
|
{ label: "名称", value: e.name || "未命名" }
|
|
6865
|
-
], s = new
|
|
6868
|
+
], s = new as({
|
|
6866
6869
|
title: (r == null ? void 0 : r.title) || "数据面板",
|
|
6867
6870
|
items: (r == null ? void 0 : r.items) || n
|
|
6868
6871
|
});
|
|
6869
|
-
return s.attachTo(e), ni(e, s),
|
|
6872
|
+
return s.attachTo(e), ni(e, s), nl(e), s;
|
|
6870
6873
|
}
|
|
6871
6874
|
function ji(r) {
|
|
6872
6875
|
return Es(!0), new Promise((e, t) => {
|
|
@@ -6874,9 +6877,9 @@ function ji(r) {
|
|
|
6874
6877
|
const n = (o = r.name.split(".").pop()) == null ? void 0 : o.toLowerCase(), s = URL.createObjectURL(r);
|
|
6875
6878
|
let i;
|
|
6876
6879
|
if (n === "obj")
|
|
6877
|
-
i = new
|
|
6880
|
+
i = new Rl();
|
|
6878
6881
|
else if (n === "gltf" || n === "glb") {
|
|
6879
|
-
const a = new
|
|
6882
|
+
const a = new Pl();
|
|
6880
6883
|
a.setDecoderPath(
|
|
6881
6884
|
"https://www.gstatic.com/draco/versioned/decoders/1.5.7/"
|
|
6882
6885
|
);
|
|
@@ -6928,7 +6931,7 @@ function Fi(r) {
|
|
|
6928
6931
|
break;
|
|
6929
6932
|
}
|
|
6930
6933
|
}
|
|
6931
|
-
const
|
|
6934
|
+
const Nl = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
6932
6935
|
__proto__: null,
|
|
6933
6936
|
addBox: Oi,
|
|
6934
6937
|
addDataPanel: ki,
|
|
@@ -6938,16 +6941,16 @@ const Ll = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
6938
6941
|
addWater: Si,
|
|
6939
6942
|
addWaterCylinder: Li,
|
|
6940
6943
|
addWaterPlane: Hi,
|
|
6941
|
-
getDataPanel:
|
|
6944
|
+
getDataPanel: jt,
|
|
6942
6945
|
importModelFromFile: ji,
|
|
6943
6946
|
removeDataPanel: ii
|
|
6944
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
6947
|
+
}, Symbol.toStringTag, { value: "Module" })), Hl = {
|
|
6945
6948
|
key: 1,
|
|
6946
6949
|
class: "toggle-placeholder"
|
|
6947
|
-
},
|
|
6950
|
+
}, kl = { class: "tree-icon" }, jl = { class: "tree-name" }, Fl = {
|
|
6948
6951
|
key: 0,
|
|
6949
6952
|
class: "tree-children"
|
|
6950
|
-
},
|
|
6953
|
+
}, Ul = /* @__PURE__ */ Ze({
|
|
6951
6954
|
__name: "TreeItem",
|
|
6952
6955
|
props: {
|
|
6953
6956
|
node: {},
|
|
@@ -6994,16 +6997,16 @@ const Ll = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
6994
6997
|
l.value ? (H(), k("span", {
|
|
6995
6998
|
key: 0,
|
|
6996
6999
|
class: "toggle-icon",
|
|
6997
|
-
onClick: A[0] || (A[0] =
|
|
6998
|
-
}, fe(a.value ? "▼" : "▶"), 1)) : (H(), k("span",
|
|
6999
|
-
y("span",
|
|
7000
|
-
y("span",
|
|
7000
|
+
onClick: A[0] || (A[0] = ss((w) => ns(o)(m.node.uuid), ["stop"]))
|
|
7001
|
+
}, fe(a.value ? "▼" : "▶"), 1)) : (H(), k("span", Hl)),
|
|
7002
|
+
y("span", kl, fe(p(m.node)), 1),
|
|
7003
|
+
y("span", jl, fe(b(m.node)), 1),
|
|
7001
7004
|
y("button", {
|
|
7002
7005
|
class: "tree-delete",
|
|
7003
|
-
onClick:
|
|
7006
|
+
onClick: ss(g, ["stop"])
|
|
7004
7007
|
}, "×")
|
|
7005
7008
|
], 2),
|
|
7006
|
-
a.value && l.value ? (H(), k("div",
|
|
7009
|
+
a.value && l.value ? (H(), k("div", Fl, [
|
|
7007
7010
|
(H(!0), k(Ee, null, At(c.value, (w) => (H(), vt(I, {
|
|
7008
7011
|
key: w.uuid,
|
|
7009
7012
|
node: w,
|
|
@@ -7021,46 +7024,46 @@ const Ll = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
7021
7024
|
for (const [n, s] of e)
|
|
7022
7025
|
t[n] = s;
|
|
7023
7026
|
return t;
|
|
7024
|
-
},
|
|
7027
|
+
}, zl = /* @__PURE__ */ Qe(Ul, [["__scopeId", "data-v-5ad9c842"]]), Wl = { class: "property-group" }, Gl = { class: "row" }, Bl = { class: "property-group" }, Xl = { class: "row" }, Vl = { class: "property-group" }, ql = { class: "row" }, Yl = {
|
|
7025
7028
|
key: 0,
|
|
7026
7029
|
class: "property-group light-group"
|
|
7027
|
-
},
|
|
7030
|
+
}, Kl = { class: "slider-row" }, Zl = {
|
|
7028
7031
|
key: 1,
|
|
7029
7032
|
class: "property-group material-group"
|
|
7030
|
-
},
|
|
7033
|
+
}, Ql = { class: "color-row" }, Jl = ["value"], _l = ["value"], $l = { class: "slider-row" }, ec = { class: "slider-value" }, tc = { class: "slider-row" }, sc = { class: "slider-value" }, nc = { class: "slider-row" }, ic = { class: "slider-value" }, oc = { class: "texture-row" }, rc = { class: "texture-controls" }, ac = {
|
|
7031
7034
|
key: 0,
|
|
7032
7035
|
class: "texture-upload-btn",
|
|
7033
7036
|
title: "上传法线贴图"
|
|
7034
|
-
},
|
|
7037
|
+
}, lc = {
|
|
7035
7038
|
class: "texture-modify-btn",
|
|
7036
7039
|
title: "点击修改法线贴图"
|
|
7037
|
-
},
|
|
7040
|
+
}, cc = { class: "texture-filename" }, uc = {
|
|
7038
7041
|
key: 0,
|
|
7039
7042
|
class: "slider-row"
|
|
7040
|
-
},
|
|
7043
|
+
}, dc = { class: "slider-value" }, fc = { class: "texture-row" }, hc = { class: "texture-controls" }, pc = {
|
|
7041
7044
|
key: 0,
|
|
7042
7045
|
class: "texture-upload-btn",
|
|
7043
7046
|
title: "上传环境光遮蔽贴图"
|
|
7044
|
-
},
|
|
7047
|
+
}, Ac = {
|
|
7045
7048
|
class: "texture-modify-btn",
|
|
7046
7049
|
title: "点击修改 AO 贴图"
|
|
7047
|
-
},
|
|
7050
|
+
}, mc = { class: "texture-filename" }, gc = {
|
|
7048
7051
|
key: 1,
|
|
7049
7052
|
class: "slider-row"
|
|
7050
|
-
},
|
|
7053
|
+
}, yc = { class: "slider-value" }, bc = { class: "texture-row" }, xc = { class: "texture-controls" }, Ic = {
|
|
7051
7054
|
key: 0,
|
|
7052
7055
|
class: "texture-upload-btn",
|
|
7053
7056
|
title: "上传模型贴图"
|
|
7054
|
-
},
|
|
7057
|
+
}, Cc = {
|
|
7055
7058
|
class: "texture-modify-btn",
|
|
7056
7059
|
title: "点击修改模型贴图"
|
|
7057
|
-
},
|
|
7060
|
+
}, wc = { class: "texture-filename" }, vc = {
|
|
7058
7061
|
key: 2,
|
|
7059
7062
|
class: "material-hint"
|
|
7060
|
-
},
|
|
7063
|
+
}, Mc = {
|
|
7061
7064
|
key: 2,
|
|
7062
7065
|
class: "property-group water-group"
|
|
7063
|
-
},
|
|
7066
|
+
}, Tc = { class: "color-row" }, Ec = ["value"], Dc = ["value"], Oc = { class: "slider-row" }, Rc = /* @__PURE__ */ Ze({
|
|
7064
7067
|
__name: "TransformTab",
|
|
7065
7068
|
props: {
|
|
7066
7069
|
transform: {},
|
|
@@ -7068,7 +7071,7 @@ const Ll = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
7068
7071
|
},
|
|
7069
7072
|
emits: ["propertyChange"],
|
|
7070
7073
|
setup(r, { emit: e }) {
|
|
7071
|
-
const t = r, n = e, s = () => n("propertyChange"), i =
|
|
7074
|
+
const t = r, n = e, s = () => n("propertyChange"), i = ts({
|
|
7072
7075
|
color: 16777215,
|
|
7073
7076
|
metalness: 0,
|
|
7074
7077
|
roughness: 0.5,
|
|
@@ -7081,7 +7084,7 @@ const Ll = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
7081
7084
|
let p = null;
|
|
7082
7085
|
const b = G(!1), m = G("");
|
|
7083
7086
|
let A = null;
|
|
7084
|
-
const I =
|
|
7087
|
+
const I = ts({
|
|
7085
7088
|
intensity: 1
|
|
7086
7089
|
});
|
|
7087
7090
|
function w() {
|
|
@@ -7170,7 +7173,7 @@ const Ll = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
7170
7173
|
}, S.readAsDataURL(M), x.value = "";
|
|
7171
7174
|
}
|
|
7172
7175
|
function se(E, x, M) {
|
|
7173
|
-
const F = new
|
|
7176
|
+
const F = new Yt().load(x);
|
|
7174
7177
|
F.wrapS = F.wrapT = it, F.repeat.set(1, 1), E.traverse((Q) => {
|
|
7175
7178
|
if (Q.type === "Mesh") {
|
|
7176
7179
|
const K = Q, me = Array.isArray(K.material) ? K.material : [K.material];
|
|
@@ -7216,7 +7219,7 @@ const Ll = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
7216
7219
|
}, S.readAsDataURL(M), x.value = "";
|
|
7217
7220
|
}
|
|
7218
7221
|
function U(E, x, M) {
|
|
7219
|
-
const F = new
|
|
7222
|
+
const F = new Yt().load(x);
|
|
7220
7223
|
F.wrapS = F.wrapT = it, F.repeat.set(1, 1), E.traverse((Q) => {
|
|
7221
7224
|
if (Q.type === "Mesh") {
|
|
7222
7225
|
const K = Q, me = Array.isArray(K.material) ? K.material : [K.material];
|
|
@@ -7251,7 +7254,7 @@ const Ll = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
7251
7254
|
}, S.readAsDataURL(M), x.value = "";
|
|
7252
7255
|
}
|
|
7253
7256
|
function be(E, x, M) {
|
|
7254
|
-
const F = new
|
|
7257
|
+
const F = new Yt().load(x);
|
|
7255
7258
|
F.wrapS = F.wrapT = it, F.repeat.set(1, 1), E.traverse((Q) => {
|
|
7256
7259
|
if (Q.type === "Mesh") {
|
|
7257
7260
|
const K = Q, me = Array.isArray(K.material) ? K.material : [K.material];
|
|
@@ -7290,14 +7293,14 @@ const Ll = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
7290
7293
|
S.uniforms && S.uniforms.waterColor && (x = !0);
|
|
7291
7294
|
}
|
|
7292
7295
|
}), x;
|
|
7293
|
-
}),
|
|
7296
|
+
}), Le = G("#4fc3f7"), ze = G(0.3);
|
|
7294
7297
|
function ps(E) {
|
|
7295
7298
|
E.traverse((x) => {
|
|
7296
7299
|
if (x.type === "Mesh") {
|
|
7297
7300
|
const M = x.material;
|
|
7298
7301
|
if (M.uniforms && M.uniforms.waterColor) {
|
|
7299
7302
|
const S = M.uniforms.waterColor.value;
|
|
7300
|
-
|
|
7303
|
+
Le.value = "#" + S.getHexString();
|
|
7301
7304
|
}
|
|
7302
7305
|
}
|
|
7303
7306
|
});
|
|
@@ -7332,11 +7335,11 @@ const Ll = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
7332
7335
|
}
|
|
7333
7336
|
function zi(E) {
|
|
7334
7337
|
const M = E.target.value;
|
|
7335
|
-
|
|
7338
|
+
Le.value = M, t.selectedObject && Ks(t.selectedObject, M);
|
|
7336
7339
|
}
|
|
7337
7340
|
function Wi(E) {
|
|
7338
7341
|
let M = E.target.value.trim();
|
|
7339
|
-
M.startsWith("#") || (M = "#" + M), /^#[0-9a-fA-F]{6}$/.test(M) && (
|
|
7342
|
+
M.startsWith("#") || (M = "#" + M), /^#[0-9a-fA-F]{6}$/.test(M) && (Le.value = M, t.selectedObject && Ks(t.selectedObject, M));
|
|
7340
7343
|
}
|
|
7341
7344
|
return Me(
|
|
7342
7345
|
() => t.selectedObject,
|
|
@@ -7349,9 +7352,9 @@ const Ll = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
7349
7352
|
},
|
|
7350
7353
|
{ immediate: !0 }
|
|
7351
7354
|
), (E, x) => (H(), k("div", null, [
|
|
7352
|
-
y("div",
|
|
7355
|
+
y("div", Wl, [
|
|
7353
7356
|
x[21] || (x[21] = y("label", null, "位置", -1)),
|
|
7354
|
-
y("div",
|
|
7357
|
+
y("div", Gl, [
|
|
7355
7358
|
x[18] || (x[18] = y("span", null, "X:", -1)),
|
|
7356
7359
|
j(y("input", {
|
|
7357
7360
|
type: "number",
|
|
@@ -7396,9 +7399,9 @@ const Ll = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
7396
7399
|
])
|
|
7397
7400
|
])
|
|
7398
7401
|
]),
|
|
7399
|
-
y("div",
|
|
7402
|
+
y("div", Bl, [
|
|
7400
7403
|
x[25] || (x[25] = y("label", null, "旋转 (弧度)", -1)),
|
|
7401
|
-
y("div",
|
|
7404
|
+
y("div", Xl, [
|
|
7402
7405
|
x[22] || (x[22] = y("span", null, "X:", -1)),
|
|
7403
7406
|
j(y("input", {
|
|
7404
7407
|
type: "number",
|
|
@@ -7443,9 +7446,9 @@ const Ll = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
7443
7446
|
])
|
|
7444
7447
|
])
|
|
7445
7448
|
]),
|
|
7446
|
-
y("div",
|
|
7449
|
+
y("div", Vl, [
|
|
7447
7450
|
x[29] || (x[29] = y("label", null, "缩放", -1)),
|
|
7448
|
-
y("div",
|
|
7451
|
+
y("div", ql, [
|
|
7449
7452
|
x[26] || (x[26] = y("span", null, "X:", -1)),
|
|
7450
7453
|
j(y("input", {
|
|
7451
7454
|
type: "number",
|
|
@@ -7490,9 +7493,9 @@ const Ll = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
7490
7493
|
])
|
|
7491
7494
|
])
|
|
7492
7495
|
]),
|
|
7493
|
-
E.selectedObject && E.selectedObject.type === "DirectionalLight" ? (H(), k("div",
|
|
7496
|
+
E.selectedObject && E.selectedObject.type === "DirectionalLight" ? (H(), k("div", Yl, [
|
|
7494
7497
|
x[31] || (x[31] = y("label", null, "光源属性", -1)),
|
|
7495
|
-
y("div",
|
|
7498
|
+
y("div", Kl, [
|
|
7496
7499
|
x[30] || (x[30] = y("span", { class: "slider-label" }, "强度", -1)),
|
|
7497
7500
|
j(y("input", {
|
|
7498
7501
|
type: "range",
|
|
@@ -7527,25 +7530,25 @@ const Ll = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
7527
7530
|
])
|
|
7528
7531
|
])
|
|
7529
7532
|
])) : re("", !0),
|
|
7530
|
-
E.selectedObject ? (H(), k("div",
|
|
7533
|
+
E.selectedObject ? (H(), k("div", Zl, [
|
|
7531
7534
|
x[47] || (x[47] = y("label", null, "材质", -1)),
|
|
7532
|
-
y("div",
|
|
7535
|
+
y("div", Ql, [
|
|
7533
7536
|
x[32] || (x[32] = y("span", { class: "slider-label" }, "颜色", -1)),
|
|
7534
7537
|
y("input", {
|
|
7535
7538
|
type: "color",
|
|
7536
7539
|
value: o.value,
|
|
7537
7540
|
onInput: R,
|
|
7538
7541
|
class: "color-picker"
|
|
7539
|
-
}, null, 40,
|
|
7542
|
+
}, null, 40, Jl),
|
|
7540
7543
|
y("input", {
|
|
7541
7544
|
type: "text",
|
|
7542
7545
|
value: o.value,
|
|
7543
7546
|
onInput: T,
|
|
7544
7547
|
class: "color-text-input",
|
|
7545
7548
|
placeholder: "#ffffff"
|
|
7546
|
-
}, null, 40,
|
|
7549
|
+
}, null, 40, _l)
|
|
7547
7550
|
]),
|
|
7548
|
-
y("div",
|
|
7551
|
+
y("div", $l, [
|
|
7549
7552
|
x[33] || (x[33] = y("span", { class: "slider-label" }, "金属度", -1)),
|
|
7550
7553
|
j(y("input", {
|
|
7551
7554
|
type: "range",
|
|
@@ -7562,9 +7565,9 @@ const Ll = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
7562
7565
|
{ number: !0 }
|
|
7563
7566
|
]
|
|
7564
7567
|
]),
|
|
7565
|
-
y("span",
|
|
7568
|
+
y("span", ec, fe(i.metalness.toFixed(2)), 1)
|
|
7566
7569
|
]),
|
|
7567
|
-
y("div",
|
|
7570
|
+
y("div", tc, [
|
|
7568
7571
|
x[34] || (x[34] = y("span", { class: "slider-label" }, "粗糙度", -1)),
|
|
7569
7572
|
j(y("input", {
|
|
7570
7573
|
type: "range",
|
|
@@ -7581,9 +7584,9 @@ const Ll = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
7581
7584
|
{ number: !0 }
|
|
7582
7585
|
]
|
|
7583
7586
|
]),
|
|
7584
|
-
y("span",
|
|
7587
|
+
y("span", sc, fe(i.roughness.toFixed(2)), 1)
|
|
7585
7588
|
]),
|
|
7586
|
-
y("div",
|
|
7589
|
+
y("div", nc, [
|
|
7587
7590
|
x[35] || (x[35] = y("span", { class: "slider-label" }, "透明度", -1)),
|
|
7588
7591
|
j(y("input", {
|
|
7589
7592
|
type: "range",
|
|
@@ -7600,20 +7603,20 @@ const Ll = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
7600
7603
|
{ number: !0 }
|
|
7601
7604
|
]
|
|
7602
7605
|
]),
|
|
7603
|
-
y("span",
|
|
7606
|
+
y("span", ic, fe(i.opacity.toFixed(2)), 1)
|
|
7604
7607
|
]),
|
|
7605
|
-
y("div",
|
|
7608
|
+
y("div", oc, [
|
|
7606
7609
|
x[38] || (x[38] = y("span", { class: "slider-label" }, "法线贴图", -1)),
|
|
7607
|
-
y("div",
|
|
7610
|
+
y("div", rc, [
|
|
7608
7611
|
l.value ? (H(), k(Ee, { key: 1 }, [
|
|
7609
|
-
y("label",
|
|
7612
|
+
y("label", lc, [
|
|
7610
7613
|
y("input", {
|
|
7611
7614
|
type: "file",
|
|
7612
7615
|
accept: "image/*",
|
|
7613
7616
|
onChange: $,
|
|
7614
7617
|
class: "texture-file-input"
|
|
7615
7618
|
}, null, 32),
|
|
7616
|
-
y("span",
|
|
7619
|
+
y("span", cc, fe(c.value), 1),
|
|
7617
7620
|
x[37] || (x[37] = y("span", { class: "modify-hint" }, "修改", -1))
|
|
7618
7621
|
]),
|
|
7619
7622
|
y("button", {
|
|
@@ -7621,7 +7624,7 @@ const Ll = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
7621
7624
|
title: "移除法线贴图",
|
|
7622
7625
|
onClick: ne
|
|
7623
7626
|
}, " ✕ ")
|
|
7624
|
-
], 64)) : (H(), k("label",
|
|
7627
|
+
], 64)) : (H(), k("label", ac, [
|
|
7625
7628
|
y("input", {
|
|
7626
7629
|
type: "file",
|
|
7627
7630
|
accept: "image/*",
|
|
@@ -7632,7 +7635,7 @@ const Ll = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
7632
7635
|
]))
|
|
7633
7636
|
])
|
|
7634
7637
|
]),
|
|
7635
|
-
l.value ? (H(), k("div",
|
|
7638
|
+
l.value ? (H(), k("div", uc, [
|
|
7636
7639
|
x[39] || (x[39] = y("span", { class: "slider-label" }, "法线强度", -1)),
|
|
7637
7640
|
j(y("input", {
|
|
7638
7641
|
type: "range",
|
|
@@ -7649,20 +7652,20 @@ const Ll = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
7649
7652
|
{ number: !0 }
|
|
7650
7653
|
]
|
|
7651
7654
|
]),
|
|
7652
|
-
y("span",
|
|
7655
|
+
y("span", dc, fe(i.normalScale.toFixed(2)), 1)
|
|
7653
7656
|
])) : re("", !0),
|
|
7654
|
-
y("div",
|
|
7657
|
+
y("div", fc, [
|
|
7655
7658
|
x[42] || (x[42] = y("span", { class: "slider-label" }, "AO 贴图", -1)),
|
|
7656
|
-
y("div",
|
|
7659
|
+
y("div", hc, [
|
|
7657
7660
|
b.value ? (H(), k(Ee, { key: 1 }, [
|
|
7658
|
-
y("label",
|
|
7661
|
+
y("label", Ac, [
|
|
7659
7662
|
y("input", {
|
|
7660
7663
|
type: "file",
|
|
7661
7664
|
accept: "image/*",
|
|
7662
7665
|
onChange: B,
|
|
7663
7666
|
class: "texture-file-input"
|
|
7664
7667
|
}, null, 32),
|
|
7665
|
-
y("span",
|
|
7668
|
+
y("span", mc, fe(m.value), 1),
|
|
7666
7669
|
x[41] || (x[41] = y("span", { class: "modify-hint" }, "修改", -1))
|
|
7667
7670
|
]),
|
|
7668
7671
|
y("button", {
|
|
@@ -7670,7 +7673,7 @@ const Ll = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
7670
7673
|
title: "移除 AO 贴图",
|
|
7671
7674
|
onClick: Oe
|
|
7672
7675
|
}, " ✕ ")
|
|
7673
|
-
], 64)) : (H(), k("label",
|
|
7676
|
+
], 64)) : (H(), k("label", pc, [
|
|
7674
7677
|
y("input", {
|
|
7675
7678
|
type: "file",
|
|
7676
7679
|
accept: "image/*",
|
|
@@ -7681,7 +7684,7 @@ const Ll = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
7681
7684
|
]))
|
|
7682
7685
|
])
|
|
7683
7686
|
]),
|
|
7684
|
-
b.value ? (H(), k("div",
|
|
7687
|
+
b.value ? (H(), k("div", gc, [
|
|
7685
7688
|
x[43] || (x[43] = y("span", { class: "slider-label" }, "AO 强度", -1)),
|
|
7686
7689
|
j(y("input", {
|
|
7687
7690
|
type: "range",
|
|
@@ -7698,20 +7701,20 @@ const Ll = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
7698
7701
|
{ number: !0 }
|
|
7699
7702
|
]
|
|
7700
7703
|
]),
|
|
7701
|
-
y("span",
|
|
7704
|
+
y("span", yc, fe(i.aoIntensity.toFixed(2)), 1)
|
|
7702
7705
|
])) : re("", !0),
|
|
7703
|
-
y("div",
|
|
7706
|
+
y("div", bc, [
|
|
7704
7707
|
x[46] || (x[46] = y("span", { class: "slider-label" }, "模型贴图", -1)),
|
|
7705
|
-
y("div",
|
|
7708
|
+
y("div", xc, [
|
|
7706
7709
|
u.value ? (H(), k(Ee, { key: 1 }, [
|
|
7707
|
-
y("label",
|
|
7710
|
+
y("label", Cc, [
|
|
7708
7711
|
y("input", {
|
|
7709
7712
|
type: "file",
|
|
7710
7713
|
accept: "image/*",
|
|
7711
7714
|
onChange: N,
|
|
7712
7715
|
class: "texture-file-input"
|
|
7713
7716
|
}, null, 32),
|
|
7714
|
-
y("span",
|
|
7717
|
+
y("span", wc, fe(g.value), 1),
|
|
7715
7718
|
x[45] || (x[45] = y("span", { class: "modify-hint" }, "修改", -1))
|
|
7716
7719
|
]),
|
|
7717
7720
|
y("button", {
|
|
@@ -7719,7 +7722,7 @@ const Ll = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
7719
7722
|
title: "移除模型贴图",
|
|
7720
7723
|
onClick: z
|
|
7721
7724
|
}, " ✕ ")
|
|
7722
|
-
], 64)) : (H(), k("label",
|
|
7725
|
+
], 64)) : (H(), k("label", Ic, [
|
|
7723
7726
|
y("input", {
|
|
7724
7727
|
type: "file",
|
|
7725
7728
|
accept: "image/*",
|
|
@@ -7730,27 +7733,27 @@ const Ll = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
7730
7733
|
]))
|
|
7731
7734
|
])
|
|
7732
7735
|
]),
|
|
7733
|
-
a.value ? re("", !0) : (H(), k("div",
|
|
7736
|
+
a.value ? re("", !0) : (H(), k("div", vc, " ⚠️ 当前材质不支持金属度/粗糙度(仅支持 Standard/Phong) "))
|
|
7734
7737
|
])) : re("", !0),
|
|
7735
|
-
Xe.value ? (H(), k("div",
|
|
7738
|
+
Xe.value ? (H(), k("div", Mc, [
|
|
7736
7739
|
x[50] || (x[50] = y("label", null, "水体属性", -1)),
|
|
7737
|
-
y("div",
|
|
7740
|
+
y("div", Tc, [
|
|
7738
7741
|
x[48] || (x[48] = y("span", { class: "slider-label" }, "水体颜色", -1)),
|
|
7739
7742
|
y("input", {
|
|
7740
7743
|
type: "color",
|
|
7741
|
-
value:
|
|
7744
|
+
value: Le.value,
|
|
7742
7745
|
onInput: zi,
|
|
7743
7746
|
class: "color-picker"
|
|
7744
|
-
}, null, 40,
|
|
7747
|
+
}, null, 40, Ec),
|
|
7745
7748
|
y("input", {
|
|
7746
7749
|
type: "text",
|
|
7747
|
-
value:
|
|
7750
|
+
value: Le.value,
|
|
7748
7751
|
onInput: Wi,
|
|
7749
7752
|
class: "color-text-input",
|
|
7750
7753
|
placeholder: "#4fc3f7"
|
|
7751
|
-
}, null, 40,
|
|
7754
|
+
}, null, 40, Dc)
|
|
7752
7755
|
]),
|
|
7753
|
-
y("div",
|
|
7756
|
+
y("div", Oc, [
|
|
7754
7757
|
x[49] || (x[49] = y("span", { class: "slider-label" }, "浑浊度", -1)),
|
|
7755
7758
|
j(y("input", {
|
|
7756
7759
|
type: "range",
|
|
@@ -7788,20 +7791,20 @@ const Ll = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
7788
7791
|
])) : re("", !0)
|
|
7789
7792
|
]));
|
|
7790
7793
|
}
|
|
7791
|
-
}),
|
|
7794
|
+
}), Pc = /* @__PURE__ */ Qe(Rc, [["__scopeId", "data-v-8fbf1e41"]]), Sc = { class: "userdata-tab" }, Lc = { class: "property-group userdata-group" }, Nc = { class: "userdata-add-row" }, Hc = ["onKeyup"], kc = {
|
|
7792
7795
|
key: 0,
|
|
7793
7796
|
class: "userdata-list"
|
|
7794
|
-
},
|
|
7797
|
+
}, jc = { class: "ud-key" }, Fc = {
|
|
7795
7798
|
key: 0,
|
|
7796
7799
|
class: "ud-value-readonly",
|
|
7797
7800
|
title: "isMovable 为系统属性,不可修改"
|
|
7798
|
-
},
|
|
7801
|
+
}, Uc = { class: "ud-value-json-preview" }, zc = ["onClick"], Wc = {
|
|
7799
7802
|
key: 0,
|
|
7800
7803
|
class: "ud-json-error"
|
|
7801
|
-
},
|
|
7804
|
+
}, Gc = { class: "ud-json-actions" }, Bc = ["onClick"], Xc = ["onClick"], Vc = {
|
|
7802
7805
|
key: 1,
|
|
7803
7806
|
class: "userdata-empty"
|
|
7804
|
-
},
|
|
7807
|
+
}, qc = /* @__PURE__ */ Ze({
|
|
7805
7808
|
__name: "UserDataTab",
|
|
7806
7809
|
props: {
|
|
7807
7810
|
selectedObject: {}
|
|
@@ -7916,10 +7919,10 @@ const Ll = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
7916
7919
|
f ? c(f) : a.value = [], s.value = null, i.value = "";
|
|
7917
7920
|
},
|
|
7918
7921
|
{ immediate: !0 }
|
|
7919
|
-
), (f, h) => (H(), k("div",
|
|
7920
|
-
y("div",
|
|
7922
|
+
), (f, h) => (H(), k("div", Sc, [
|
|
7923
|
+
y("div", Lc, [
|
|
7921
7924
|
h[3] || (h[3] = y("label", null, "userData 属性", -1)),
|
|
7922
|
-
y("div",
|
|
7925
|
+
y("div", Nc, [
|
|
7923
7926
|
j(y("input", {
|
|
7924
7927
|
type: "text",
|
|
7925
7928
|
"onUpdate:modelValue": h[0] || (h[0] = (v) => t.value = v),
|
|
@@ -7933,8 +7936,8 @@ const Ll = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
7933
7936
|
"onUpdate:modelValue": h[1] || (h[1] = (v) => n.value = v),
|
|
7934
7937
|
placeholder: "值",
|
|
7935
7938
|
class: "ud-input ud-textarea",
|
|
7936
|
-
onKeyup: ut(
|
|
7937
|
-
}, null, 40,
|
|
7939
|
+
onKeyup: ut(ss(u, ["prevent"]), ["enter"])
|
|
7940
|
+
}, null, 40, Hc), [
|
|
7938
7941
|
[W, n.value]
|
|
7939
7942
|
]),
|
|
7940
7943
|
y("button", {
|
|
@@ -7943,7 +7946,7 @@ const Ll = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
7943
7946
|
onClick: u
|
|
7944
7947
|
}, " + ")
|
|
7945
7948
|
]),
|
|
7946
|
-
a.value.length > 0 ? (H(), k("div",
|
|
7949
|
+
a.value.length > 0 ? (H(), k("div", kc, [
|
|
7947
7950
|
(H(!0), k(Ee, null, At(a.value, (v, D) => (H(), k("div", {
|
|
7948
7951
|
key: v.key,
|
|
7949
7952
|
class: Pe(["userdata-item", {
|
|
@@ -7951,17 +7954,17 @@ const Ll = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
7951
7954
|
"editing-json": s.value === v.key
|
|
7952
7955
|
}])
|
|
7953
7956
|
}, [
|
|
7954
|
-
y("span",
|
|
7955
|
-
v.key === "isMovable" ? (H(), k("span",
|
|
7957
|
+
y("span", jc, fe(v.key), 1),
|
|
7958
|
+
v.key === "isMovable" ? (H(), k("span", Fc, fe(String(v.value)) + " 🔒 ", 1)) : v.key !== "isMovable" ? (H(), k(Ee, { key: 1 }, [
|
|
7956
7959
|
s.value !== v.key ? (H(), k(Ee, { key: 0 }, [
|
|
7957
|
-
y("span",
|
|
7960
|
+
y("span", Uc, fe(p(v.value)), 1),
|
|
7958
7961
|
y("button", {
|
|
7959
7962
|
class: "ud-btn edit-json-btn",
|
|
7960
7963
|
title: "编辑对象",
|
|
7961
7964
|
onClick: (R) => b(v.key)
|
|
7962
|
-
}, " ✎ ", 8,
|
|
7965
|
+
}, " ✎ ", 8, zc)
|
|
7963
7966
|
], 64)) : (H(), k(Ee, { key: 1 }, [
|
|
7964
|
-
o.value ? (H(), k("div",
|
|
7967
|
+
o.value ? (H(), k("div", Wc, " ⚠ " + fe(o.value), 1)) : re("", !0),
|
|
7965
7968
|
j(y("textarea", {
|
|
7966
7969
|
"onUpdate:modelValue": h[2] || (h[2] = (R) => i.value = R),
|
|
7967
7970
|
class: Pe(["ud-json-textarea", { "has-error": o.value }]),
|
|
@@ -7970,12 +7973,12 @@ const Ll = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
7970
7973
|
}, null, 34), [
|
|
7971
7974
|
[W, i.value]
|
|
7972
7975
|
]),
|
|
7973
|
-
y("div",
|
|
7976
|
+
y("div", Gc, [
|
|
7974
7977
|
y("button", {
|
|
7975
7978
|
class: "ud-btn apply-btn",
|
|
7976
7979
|
title: "应用修改",
|
|
7977
7980
|
onClick: (R) => A(v.key)
|
|
7978
|
-
}, " ✓ ", 8,
|
|
7981
|
+
}, " ✓ ", 8, Bc),
|
|
7979
7982
|
y("button", {
|
|
7980
7983
|
class: "ud-btn cancel-btn",
|
|
7981
7984
|
title: "取消编辑",
|
|
@@ -7988,10 +7991,10 @@ const Ll = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
7988
7991
|
class: "ud-btn del-btn",
|
|
7989
7992
|
title: "删除",
|
|
7990
7993
|
onClick: (R) => g(v.key)
|
|
7991
|
-
}, " ✕ ", 8,
|
|
7994
|
+
}, " ✕ ", 8, Xc)) : re("", !0)
|
|
7992
7995
|
], 64)) : re("", !0)
|
|
7993
7996
|
], 2))), 128))
|
|
7994
|
-
])) : (H(), k("div",
|
|
7997
|
+
])) : (H(), k("div", Vc, "暂无自定义数据")),
|
|
7995
7998
|
y("button", {
|
|
7996
7999
|
class: "get-camera-btn",
|
|
7997
8000
|
onClick: w
|
|
@@ -7999,7 +8002,7 @@ const Ll = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
7999
8002
|
])
|
|
8000
8003
|
]));
|
|
8001
8004
|
}
|
|
8002
|
-
}),
|
|
8005
|
+
}), Yc = /* @__PURE__ */ Qe(qc, [["__scopeId", "data-v-4e117415"]]), Kc = { class: "datapanel-tab" }, Zc = { class: "property-group" }, Qc = { class: "dp-section" }, Jc = { class: "dp-visibility-row" }, _c = { class: "dp-toggle" }, $c = { class: "dp-visibility-text" }, eu = { class: "dp-section" }, tu = { class: "dp-section" }, su = { class: "dp-size-row" }, nu = { class: "dp-size-value" }, iu = { class: "dp-section" }, ou = { class: "dp-size-row" }, ru = { class: "dp-section" }, au = { class: "dp-size-row" }, lu = { class: "dp-section" }, cu = { class: "dp-size-row" }, uu = { class: "dp-section" }, du = { class: "dp-list" }, fu = ["onUpdate:modelValue"], hu = ["onUpdate:modelValue"], pu = ["onUpdate:modelValue"], Au = ["onUpdate:modelValue"], mu = ["onClick"], gu = { class: "dp-add-row" }, yu = /* @__PURE__ */ Ze({
|
|
8003
8006
|
__name: "DataPanelTab",
|
|
8004
8007
|
props: {
|
|
8005
8008
|
selectedObject: {}
|
|
@@ -8009,7 +8012,7 @@ const Ll = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
8009
8012
|
let p = m(), b = !1;
|
|
8010
8013
|
function m() {
|
|
8011
8014
|
const f = e.selectedObject;
|
|
8012
|
-
return f ?
|
|
8015
|
+
return f ? jt(us(f)) : null;
|
|
8013
8016
|
}
|
|
8014
8017
|
Me(s, (f) => {
|
|
8015
8018
|
b || !p || (p.visible = f);
|
|
@@ -8048,13 +8051,13 @@ const Ll = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
8048
8051
|
}, 0);
|
|
8049
8052
|
},
|
|
8050
8053
|
{ immediate: !0 }
|
|
8051
|
-
), (f, h) => (H(), k("div",
|
|
8052
|
-
y("div",
|
|
8054
|
+
), (f, h) => (H(), k("div", Kc, [
|
|
8055
|
+
y("div", Zc, [
|
|
8053
8056
|
h[29] || (h[29] = y("label", null, "📊 数据面板", -1)),
|
|
8054
|
-
y("div",
|
|
8057
|
+
y("div", Qc, [
|
|
8055
8058
|
h[14] || (h[14] = y("span", { class: "dp-label-sm" }, "可见性", -1)),
|
|
8056
|
-
y("div",
|
|
8057
|
-
y("label",
|
|
8059
|
+
y("div", Jc, [
|
|
8060
|
+
y("label", _c, [
|
|
8058
8061
|
j(y("input", {
|
|
8059
8062
|
type: "checkbox",
|
|
8060
8063
|
"onUpdate:modelValue": h[0] || (h[0] = (v) => s.value = v)
|
|
@@ -8063,10 +8066,10 @@ const Ll = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
8063
8066
|
]),
|
|
8064
8067
|
h[13] || (h[13] = y("span", { class: "dp-toggle-slider" }, null, -1))
|
|
8065
8068
|
]),
|
|
8066
|
-
y("span",
|
|
8069
|
+
y("span", $c, fe(s.value ? "显示中" : "已隐藏"), 1)
|
|
8067
8070
|
])
|
|
8068
8071
|
]),
|
|
8069
|
-
y("div",
|
|
8072
|
+
y("div", eu, [
|
|
8070
8073
|
h[15] || (h[15] = y("span", { class: "dp-label-sm" }, "标题", -1)),
|
|
8071
8074
|
j(y("input", {
|
|
8072
8075
|
type: "text",
|
|
@@ -8077,9 +8080,9 @@ const Ll = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
8077
8080
|
[W, t.value]
|
|
8078
8081
|
])
|
|
8079
8082
|
]),
|
|
8080
|
-
y("div",
|
|
8083
|
+
y("div", tu, [
|
|
8081
8084
|
h[18] || (h[18] = y("span", { class: "dp-label-sm" }, "面板宽度", -1)),
|
|
8082
|
-
y("div",
|
|
8085
|
+
y("div", su, [
|
|
8083
8086
|
h[16] || (h[16] = y("span", { class: "dp-range-label" }, "窄", -1)),
|
|
8084
8087
|
j(y("input", {
|
|
8085
8088
|
type: "range",
|
|
@@ -8097,12 +8100,12 @@ const Ll = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
8097
8100
|
]
|
|
8098
8101
|
]),
|
|
8099
8102
|
h[17] || (h[17] = y("span", { class: "dp-range-label" }, "宽", -1)),
|
|
8100
|
-
y("span",
|
|
8103
|
+
y("span", nu, fe(l.value) + "em", 1)
|
|
8101
8104
|
])
|
|
8102
8105
|
]),
|
|
8103
|
-
y("div",
|
|
8106
|
+
y("div", iu, [
|
|
8104
8107
|
h[21] || (h[21] = y("span", { class: "dp-label-sm" }, "面板左右位置", -1)),
|
|
8105
|
-
y("div",
|
|
8108
|
+
y("div", ou, [
|
|
8106
8109
|
h[19] || (h[19] = y("span", { class: "dp-range-label" }, "偏左", -1)),
|
|
8107
8110
|
j(y("input", {
|
|
8108
8111
|
type: "range",
|
|
@@ -8135,9 +8138,9 @@ const Ll = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
8135
8138
|
])
|
|
8136
8139
|
])
|
|
8137
8140
|
]),
|
|
8138
|
-
y("div",
|
|
8141
|
+
y("div", ru, [
|
|
8139
8142
|
h[24] || (h[24] = y("span", { class: "dp-label-sm" }, "面板上下位置", -1)),
|
|
8140
|
-
y("div",
|
|
8143
|
+
y("div", au, [
|
|
8141
8144
|
h[22] || (h[22] = y("span", { class: "dp-range-label" }, "偏下", -1)),
|
|
8142
8145
|
j(y("input", {
|
|
8143
8146
|
type: "range",
|
|
@@ -8170,9 +8173,9 @@ const Ll = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
8170
8173
|
])
|
|
8171
8174
|
])
|
|
8172
8175
|
]),
|
|
8173
|
-
y("div",
|
|
8176
|
+
y("div", lu, [
|
|
8174
8177
|
h[27] || (h[27] = y("span", { class: "dp-label-sm" }, "面板前后位置", -1)),
|
|
8175
|
-
y("div",
|
|
8178
|
+
y("div", cu, [
|
|
8176
8179
|
h[25] || (h[25] = y("span", { class: "dp-range-label" }, "近", -1)),
|
|
8177
8180
|
j(y("input", {
|
|
8178
8181
|
type: "range",
|
|
@@ -8205,9 +8208,9 @@ const Ll = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
8205
8208
|
])
|
|
8206
8209
|
])
|
|
8207
8210
|
]),
|
|
8208
|
-
y("div",
|
|
8211
|
+
y("div", uu, [
|
|
8209
8212
|
h[28] || (h[28] = y("span", { class: "dp-label-sm" }, "数据项", -1)),
|
|
8210
|
-
y("div",
|
|
8213
|
+
y("div", du, [
|
|
8211
8214
|
(H(!0), k(Ee, null, At(n.value, (v, D) => (H(), k("div", {
|
|
8212
8215
|
key: D,
|
|
8213
8216
|
class: "dp-item"
|
|
@@ -8217,7 +8220,7 @@ const Ll = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
8217
8220
|
class: "dp-input dp-input-sm",
|
|
8218
8221
|
"onUpdate:modelValue": (R) => v.label = R,
|
|
8219
8222
|
placeholder: "标签"
|
|
8220
|
-
}, null, 8,
|
|
8223
|
+
}, null, 8, fu), [
|
|
8221
8224
|
[W, v.label]
|
|
8222
8225
|
]),
|
|
8223
8226
|
j(y("input", {
|
|
@@ -8225,7 +8228,7 @@ const Ll = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
8225
8228
|
class: "dp-input dp-input-sm",
|
|
8226
8229
|
"onUpdate:modelValue": (R) => v.value = R,
|
|
8227
8230
|
placeholder: "值"
|
|
8228
|
-
}, null, 8,
|
|
8231
|
+
}, null, 8, hu), [
|
|
8229
8232
|
[W, v.value]
|
|
8230
8233
|
]),
|
|
8231
8234
|
j(y("input", {
|
|
@@ -8233,7 +8236,7 @@ const Ll = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
8233
8236
|
class: "dp-input dp-input-xs",
|
|
8234
8237
|
"onUpdate:modelValue": (R) => v.unit = R,
|
|
8235
8238
|
placeholder: "单位"
|
|
8236
|
-
}, null, 8,
|
|
8239
|
+
}, null, 8, pu), [
|
|
8237
8240
|
[W, v.unit]
|
|
8238
8241
|
]),
|
|
8239
8242
|
j(y("input", {
|
|
@@ -8241,17 +8244,17 @@ const Ll = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
8241
8244
|
class: "dp-input dp-input-xs",
|
|
8242
8245
|
"onUpdate:modelValue": (R) => v.code = R,
|
|
8243
8246
|
placeholder: "编码"
|
|
8244
|
-
}, null, 8,
|
|
8247
|
+
}, null, 8, Au), [
|
|
8245
8248
|
[W, v.code]
|
|
8246
8249
|
]),
|
|
8247
8250
|
y("button", {
|
|
8248
8251
|
class: "dp-btn dp-btn-del",
|
|
8249
8252
|
onClick: (R) => I(D),
|
|
8250
8253
|
title: "删除此项"
|
|
8251
|
-
}, "✕", 8,
|
|
8254
|
+
}, "✕", 8, mu)
|
|
8252
8255
|
]))), 128))
|
|
8253
8256
|
]),
|
|
8254
|
-
y("div",
|
|
8257
|
+
y("div", gu, [
|
|
8255
8258
|
j(y("input", {
|
|
8256
8259
|
type: "text",
|
|
8257
8260
|
class: "dp-input dp-input-sm",
|
|
@@ -8298,8 +8301,8 @@ const Ll = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
8298
8301
|
])
|
|
8299
8302
|
]));
|
|
8300
8303
|
}
|
|
8301
|
-
}),
|
|
8302
|
-
function
|
|
8304
|
+
}), bu = /* @__PURE__ */ Qe(yu, [["__scopeId", "data-v-b4c7c7dc"]]);
|
|
8305
|
+
function xu(r) {
|
|
8303
8306
|
const e = G(/* @__PURE__ */ new Set()), t = (s) => {
|
|
8304
8307
|
const i = new Set(e.value);
|
|
8305
8308
|
i.has(s) ? i.delete(s) : i.add(s), e.value = i;
|
|
@@ -8319,28 +8322,28 @@ function bu(r) {
|
|
|
8319
8322
|
{ immediate: !0 }
|
|
8320
8323
|
), { expandedSet: e, toggleExpand: t };
|
|
8321
8324
|
}
|
|
8322
|
-
const
|
|
8325
|
+
const Iu = {
|
|
8323
8326
|
key: 0,
|
|
8324
8327
|
class: "property-panel"
|
|
8325
|
-
},
|
|
8328
|
+
}, Cu = { class: "property-group tree-group" }, wu = { class: "tree-container" }, vu = {
|
|
8326
8329
|
key: 0,
|
|
8327
8330
|
class: "tree-empty"
|
|
8328
|
-
},
|
|
8331
|
+
}, Mu = { class: "property-group" }, Tu = { class: "transform-mode-row" }, Eu = { class: "script-editor" }, Du = { class: "script-item-header" }, Ou = ["onUpdate:modelValue"], Ru = ["onClick"], Pu = ["onUpdate:modelValue"], Su = {
|
|
8329
8332
|
key: 0,
|
|
8330
8333
|
class: "script-empty"
|
|
8331
|
-
},
|
|
8334
|
+
}, Lu = {
|
|
8332
8335
|
key: 0,
|
|
8333
8336
|
class: "object-name-row"
|
|
8334
|
-
},
|
|
8337
|
+
}, Nu = {
|
|
8335
8338
|
key: 1,
|
|
8336
8339
|
class: "tabs"
|
|
8337
|
-
},
|
|
8340
|
+
}, Hu = {
|
|
8338
8341
|
key: 2,
|
|
8339
8342
|
class: "tab-content"
|
|
8340
|
-
},
|
|
8343
|
+
}, ku = {
|
|
8341
8344
|
key: 1,
|
|
8342
8345
|
class: "property-panel empty"
|
|
8343
|
-
},
|
|
8346
|
+
}, ju = /* @__PURE__ */ Ze({
|
|
8344
8347
|
__name: "index",
|
|
8345
8348
|
props: {
|
|
8346
8349
|
transform: {},
|
|
@@ -8356,7 +8359,7 @@ const xu = {
|
|
|
8356
8359
|
const o = () => n("propertyChange"), a = G("transform"), l = tt(() => {
|
|
8357
8360
|
var w;
|
|
8358
8361
|
return !!(t.selectedObject && ((w = t.selectedObject.userData) != null && w._hasDataPanel));
|
|
8359
|
-
}), c = G(0), d = Ki(t, "selectedObject"), { expandedSet: u, toggleExpand: g } =
|
|
8362
|
+
}), c = G(0), d = Ki(t, "selectedObject"), { expandedSet: u, toggleExpand: g } = xu(d);
|
|
8360
8363
|
Zi("treeExpand", { expandedSet: u, toggleExpand: g });
|
|
8361
8364
|
const p = (w) => {
|
|
8362
8365
|
c.value++, n("treeDelete", w);
|
|
@@ -8382,11 +8385,11 @@ if (selectedObject) {
|
|
|
8382
8385
|
const w = A.value.trim();
|
|
8383
8386
|
t.selectedObject.name = w || "未命名", A.value = t.selectedObject.name, c.value++;
|
|
8384
8387
|
};
|
|
8385
|
-
return (w, f) => w.transform ? (H(), k("div",
|
|
8386
|
-
y("div",
|
|
8388
|
+
return (w, f) => w.transform ? (H(), k("div", Iu, [
|
|
8389
|
+
y("div", Cu, [
|
|
8387
8390
|
f[8] || (f[8] = y("label", null, "场景物体", -1)),
|
|
8388
|
-
y("div",
|
|
8389
|
-
(H(!0), k(Ee, null, At(w.treeData, (h) => (H(), vt(
|
|
8391
|
+
y("div", wu, [
|
|
8392
|
+
(H(!0), k(Ee, null, At(w.treeData, (h) => (H(), vt(zl, {
|
|
8390
8393
|
key: h.uuid,
|
|
8391
8394
|
node: h,
|
|
8392
8395
|
"selected-object": w.selectedObject,
|
|
@@ -8394,12 +8397,12 @@ if (selectedObject) {
|
|
|
8394
8397
|
onSelect: f[0] || (f[0] = (v) => n("treeSelect", v)),
|
|
8395
8398
|
onDelete: p
|
|
8396
8399
|
}, null, 8, ["node", "selected-object", "version"]))), 128)),
|
|
8397
|
-
w.treeData.length === 0 ? (H(), k("div",
|
|
8400
|
+
w.treeData.length === 0 ? (H(), k("div", vu, "暂无物体")) : re("", !0)
|
|
8398
8401
|
])
|
|
8399
8402
|
]),
|
|
8400
|
-
y("div",
|
|
8403
|
+
y("div", Mu, [
|
|
8401
8404
|
f[10] || (f[10] = y("label", null, "全局属性", -1)),
|
|
8402
|
-
y("div",
|
|
8405
|
+
y("div", Tu, [
|
|
8403
8406
|
y("button", {
|
|
8404
8407
|
class: Pe(["mode-btn", { active: s.value === "translate" }]),
|
|
8405
8408
|
title: "移动 (W)",
|
|
@@ -8416,7 +8419,7 @@ if (selectedObject) {
|
|
|
8416
8419
|
onClick: f[3] || (f[3] = (h) => i("scale"))
|
|
8417
8420
|
}, " ⤡ 缩放 ", 2)
|
|
8418
8421
|
]),
|
|
8419
|
-
y("div",
|
|
8422
|
+
y("div", Eu, [
|
|
8420
8423
|
y("div", { class: "script-editor-header" }, [
|
|
8421
8424
|
f[9] || (f[9] = y("span", { class: "script-title" }, "脚本(按钮显示在画布底部)", -1)),
|
|
8422
8425
|
y("button", {
|
|
@@ -8425,24 +8428,24 @@ if (selectedObject) {
|
|
|
8425
8428
|
title: "新增一个脚本"
|
|
8426
8429
|
}, " + 添加脚本 ")
|
|
8427
8430
|
]),
|
|
8428
|
-
(H(!0), k(Ee, null, At(
|
|
8431
|
+
(H(!0), k(Ee, null, At(ns(Se).scripts, (h) => (H(), k("div", {
|
|
8429
8432
|
key: h.id,
|
|
8430
8433
|
class: "script-item"
|
|
8431
8434
|
}, [
|
|
8432
|
-
y("div",
|
|
8435
|
+
y("div", Du, [
|
|
8433
8436
|
j(y("input", {
|
|
8434
8437
|
"onUpdate:modelValue": (v) => h.name = v,
|
|
8435
8438
|
class: "script-name-input",
|
|
8436
8439
|
placeholder: "函数名称(按钮显示文字)",
|
|
8437
8440
|
spellcheck: "false"
|
|
8438
|
-
}, null, 8,
|
|
8441
|
+
}, null, 8, Ou), [
|
|
8439
8442
|
[W, h.name]
|
|
8440
8443
|
]),
|
|
8441
8444
|
y("button", {
|
|
8442
8445
|
class: "script-del-btn",
|
|
8443
8446
|
title: "删除该脚本",
|
|
8444
8447
|
onClick: (v) => m(h.id)
|
|
8445
|
-
}, "✕", 8,
|
|
8448
|
+
}, "✕", 8, Ru)
|
|
8446
8449
|
]),
|
|
8447
8450
|
j(y("textarea", {
|
|
8448
8451
|
"onUpdate:modelValue": (v) => h.code = v,
|
|
@@ -8472,14 +8475,14 @@ function myFunc() {
|
|
|
8472
8475
|
脚本内可直接使用:THREE、scene、camera、renderer、selectedObject
|
|
8473
8476
|
动画 API:animateTo / moveTo / rotateTo / scaleTo / fadeTo / stopAnimations / degToRad
|
|
8474
8477
|
其他:addModel/removeModel/selectObject 等编辑器 API`
|
|
8475
|
-
}, null, 8,
|
|
8478
|
+
}, null, 8, Pu), [
|
|
8476
8479
|
[W, h.code]
|
|
8477
8480
|
])
|
|
8478
8481
|
]))), 128)),
|
|
8479
|
-
|
|
8482
|
+
ns(Se).scripts.length === 0 ? (H(), k("div", Su, " 暂无脚本,点击“+ 添加脚本”创建(画布底部会为每个脚本生成一个触发按钮) ")) : re("", !0)
|
|
8480
8483
|
])
|
|
8481
8484
|
]),
|
|
8482
|
-
w.selectedObject ? (H(), k("div",
|
|
8485
|
+
w.selectedObject ? (H(), k("div", Lu, [
|
|
8483
8486
|
f[11] || (f[11] = y("label", null, "物体名称", -1)),
|
|
8484
8487
|
j(y("input", {
|
|
8485
8488
|
"onUpdate:modelValue": f[4] || (f[4] = (h) => A.value = h),
|
|
@@ -8491,7 +8494,7 @@ function myFunc() {
|
|
|
8491
8494
|
[W, A.value]
|
|
8492
8495
|
])
|
|
8493
8496
|
])) : re("", !0),
|
|
8494
|
-
w.selectedObject ? (H(), k("div",
|
|
8497
|
+
w.selectedObject ? (H(), k("div", Nu, [
|
|
8495
8498
|
y("button", {
|
|
8496
8499
|
class: Pe(["tab-btn", { active: a.value === "transform" }]),
|
|
8497
8500
|
onClick: f[5] || (f[5] = (h) => a.value = "transform")
|
|
@@ -8506,26 +8509,26 @@ function myFunc() {
|
|
|
8506
8509
|
onClick: f[7] || (f[7] = (h) => a.value = "datapanel")
|
|
8507
8510
|
}, " 📊 数据面板 ", 2)) : re("", !0)
|
|
8508
8511
|
])) : re("", !0),
|
|
8509
|
-
w.selectedObject ? (H(), k("div",
|
|
8510
|
-
j(gs(
|
|
8512
|
+
w.selectedObject ? (H(), k("div", Hu, [
|
|
8513
|
+
j(gs(Pc, {
|
|
8511
8514
|
transform: w.transform,
|
|
8512
8515
|
"selected-object": w.selectedObject,
|
|
8513
8516
|
onPropertyChange: o
|
|
8514
8517
|
}, null, 8, ["transform", "selected-object"]), [
|
|
8515
8518
|
[st, a.value === "transform"]
|
|
8516
8519
|
]),
|
|
8517
|
-
j(gs(
|
|
8520
|
+
j(gs(Yc, { "selected-object": w.selectedObject }, null, 8, ["selected-object"]), [
|
|
8518
8521
|
[st, a.value === "userdata"]
|
|
8519
8522
|
]),
|
|
8520
|
-
j(gs(
|
|
8523
|
+
j(gs(bu, { "selected-object": w.selectedObject }, null, 8, ["selected-object"]), [
|
|
8521
8524
|
[st, a.value === "datapanel"]
|
|
8522
8525
|
])
|
|
8523
8526
|
])) : re("", !0)
|
|
8524
|
-
])) : (H(), k("div",
|
|
8527
|
+
])) : (H(), k("div", ku, f[12] || (f[12] = [
|
|
8525
8528
|
y("p", null, "未选中任何模型", -1)
|
|
8526
8529
|
])));
|
|
8527
8530
|
}
|
|
8528
|
-
}),
|
|
8531
|
+
}), Fu = /* @__PURE__ */ Qe(ju, [["__scopeId", "data-v-30dd0f48"]]), Uu = { class: "top-bar" }, zu = { class: "left-section" }, Wu = { class: "dropdown-menu" }, Gu = { class: "dropdown-menu sub-menu" }, Bu = { class: "dropdown-menu sub-menu" }, Xu = { class: "dropdown-menu" }, Vu = /* @__PURE__ */ Ze({
|
|
8529
8532
|
__name: "TopBar",
|
|
8530
8533
|
emits: ["addModel", "importModel"],
|
|
8531
8534
|
setup(r, { emit: e }) {
|
|
@@ -8536,21 +8539,21 @@ function myFunc() {
|
|
|
8536
8539
|
const A = m.target;
|
|
8537
8540
|
A.files && A.files.length > 0 && (o("importModel", A.files[0]), A.value = "");
|
|
8538
8541
|
}, d = () => console.log("撤销"), u = () => console.log("删除物体"), g = async () => {
|
|
8539
|
-
const m = await
|
|
8542
|
+
const m = await Il();
|
|
8540
8543
|
console.log("scene GLB 字节数:", m.scene.byteLength), console.log("camera:", m.camera), console.log("dataPanels:", m.dataPanels), console.log("waters:", m.waters), console.log("textures:", m.textures), console.log("ambientLight:", m.ambientLight);
|
|
8541
8544
|
}, p = () => {
|
|
8542
8545
|
if (!localStorage.getItem("test_id")) return localStorage.setItem("test_id", "123");
|
|
8543
8546
|
gi(localStorage.getItem("test_id"));
|
|
8544
8547
|
}, b = () => fi();
|
|
8545
|
-
return (m, A) => (H(), k("div",
|
|
8546
|
-
y("div",
|
|
8548
|
+
return (m, A) => (H(), k("div", Uu, [
|
|
8549
|
+
y("div", zu, [
|
|
8547
8550
|
y("div", {
|
|
8548
8551
|
class: "dropdown-wrapper",
|
|
8549
8552
|
onMouseenter: A[11] || (A[11] = (I) => n.value = !0),
|
|
8550
8553
|
onMouseleave: A[12] || (A[12] = (I) => n.value = !1)
|
|
8551
8554
|
}, [
|
|
8552
8555
|
A[17] || (A[17] = y("button", { class: "menu-btn" }, "添加", -1)),
|
|
8553
|
-
j(y("div",
|
|
8556
|
+
j(y("div", Wu, [
|
|
8554
8557
|
y("div", {
|
|
8555
8558
|
class: "menu-item",
|
|
8556
8559
|
onClick: d
|
|
@@ -8561,7 +8564,7 @@ function myFunc() {
|
|
|
8561
8564
|
onMouseleave: A[6] || (A[6] = (I) => s.value = !1)
|
|
8562
8565
|
}, [
|
|
8563
8566
|
A[15] || (A[15] = y("span", null, "网格", -1)),
|
|
8564
|
-
j(y("div",
|
|
8567
|
+
j(y("div", Gu, [
|
|
8565
8568
|
y("div", {
|
|
8566
8569
|
class: "menu-item",
|
|
8567
8570
|
onClick: A[0] || (A[0] = (I) => o("addModel", "box"))
|
|
@@ -8596,7 +8599,7 @@ function myFunc() {
|
|
|
8596
8599
|
onMouseleave: A[9] || (A[9] = (I) => i.value = !1)
|
|
8597
8600
|
}, [
|
|
8598
8601
|
A[16] || (A[16] = y("span", null, "光源", -1)),
|
|
8599
|
-
j(y("div",
|
|
8602
|
+
j(y("div", Bu, [
|
|
8600
8603
|
y("div", {
|
|
8601
8604
|
class: "menu-item",
|
|
8602
8605
|
onClick: A[7] || (A[7] = (I) => o("addModel", "directionalLight"))
|
|
@@ -8623,7 +8626,7 @@ function myFunc() {
|
|
|
8623
8626
|
onMouseleave: A[14] || (A[14] = (I) => t.value = !1)
|
|
8624
8627
|
}, [
|
|
8625
8628
|
A[19] || (A[19] = y("button", { class: "menu-btn" }, "帮助", -1)),
|
|
8626
|
-
j(y("div",
|
|
8629
|
+
j(y("div", Xu, [
|
|
8627
8630
|
y("div", {
|
|
8628
8631
|
class: "menu-item",
|
|
8629
8632
|
onClick: g
|
|
@@ -8655,10 +8658,10 @@ function myFunc() {
|
|
|
8655
8658
|
}, null, 544)
|
|
8656
8659
|
]));
|
|
8657
8660
|
}
|
|
8658
|
-
}),
|
|
8661
|
+
}), qu = /* @__PURE__ */ Qe(Vu, [["__scopeId", "data-v-9cee44a7"]]), Yu = { class: "bottom-bar" }, Ku = /* @__PURE__ */ Ze({
|
|
8659
8662
|
__name: "BottomBar",
|
|
8660
8663
|
setup(r) {
|
|
8661
|
-
return (e, t) => (H(), k("div",
|
|
8664
|
+
return (e, t) => (H(), k("div", Yu, t[0] || (t[0] = [
|
|
8662
8665
|
y("div", { class: "status-left" }, [
|
|
8663
8666
|
y("span", null, "就绪")
|
|
8664
8667
|
], -1),
|
|
@@ -8667,13 +8670,13 @@ function myFunc() {
|
|
|
8667
8670
|
], -1)
|
|
8668
8671
|
])));
|
|
8669
8672
|
}
|
|
8670
|
-
}),
|
|
8673
|
+
}), Zu = /* @__PURE__ */ Qe(Ku, [["__scopeId", "data-v-3427bb27"]]), Qu = { class: "app-layout" }, Ju = {
|
|
8671
8674
|
key: 0,
|
|
8672
8675
|
class: "loading-overlay"
|
|
8673
|
-
},
|
|
8676
|
+
}, _u = {
|
|
8674
8677
|
key: 0,
|
|
8675
8678
|
class: "script-bar"
|
|
8676
|
-
},
|
|
8679
|
+
}, $u = ["title", "onClick"], ed = /* @__PURE__ */ Ze({
|
|
8677
8680
|
__name: "DrawingBoard",
|
|
8678
8681
|
props: {
|
|
8679
8682
|
mode: { default: "edit" },
|
|
@@ -8681,10 +8684,10 @@ function myFunc() {
|
|
|
8681
8684
|
},
|
|
8682
8685
|
setup(r) {
|
|
8683
8686
|
const e = r, t = G(!1);
|
|
8684
|
-
|
|
8687
|
+
_a((f) => {
|
|
8685
8688
|
t.value = f;
|
|
8686
8689
|
});
|
|
8687
|
-
const n = Qs(null), s =
|
|
8690
|
+
const n = Qs(null), s = ts({
|
|
8688
8691
|
position: { x: 0, y: 0, z: 0 },
|
|
8689
8692
|
rotation: { x: 0, y: 0, z: 0 },
|
|
8690
8693
|
scale: { x: 1, y: 1, z: 1 }
|
|
@@ -8701,9 +8704,9 @@ function myFunc() {
|
|
|
8701
8704
|
s.rotation.z
|
|
8702
8705
|
), f.scale.set(s.scale.x, s.scale.y, s.scale.z);
|
|
8703
8706
|
};
|
|
8704
|
-
|
|
8707
|
+
al((f) => {
|
|
8705
8708
|
n.value = f, f && i(f);
|
|
8706
|
-
}),
|
|
8709
|
+
}), ll((f) => {
|
|
8707
8710
|
i(f);
|
|
8708
8711
|
});
|
|
8709
8712
|
const a = () => {
|
|
@@ -8718,7 +8721,7 @@ function myFunc() {
|
|
|
8718
8721
|
console.error("导入失败:", h), alert("导入失败:" + h.message);
|
|
8719
8722
|
}
|
|
8720
8723
|
}, d = Qs([]);
|
|
8721
|
-
|
|
8724
|
+
cl((f) => {
|
|
8722
8725
|
d.value = f;
|
|
8723
8726
|
});
|
|
8724
8727
|
const u = () => {
|
|
@@ -8726,21 +8729,21 @@ function myFunc() {
|
|
|
8726
8729
|
f && (d.value = f);
|
|
8727
8730
|
}, g = (f) => ds(f), p = (f) => Ii(f.uuid), b = (f) => {
|
|
8728
8731
|
Ai(f);
|
|
8729
|
-
}, m = (f) =>
|
|
8730
|
-
() =>
|
|
8732
|
+
}, m = (f) => Fa(f), A = tt(
|
|
8733
|
+
() => Se.scripts.filter((f) => !di(f))
|
|
8731
8734
|
), I = G(null), w = async () => {
|
|
8732
|
-
I.value && await
|
|
8735
|
+
I.value && await Wa(I.value, e.mode, e.sceneData), u();
|
|
8733
8736
|
};
|
|
8734
8737
|
return Qi(() => {
|
|
8735
8738
|
w(), I.value && vr(I.value);
|
|
8736
8739
|
}), Ji(() => {
|
|
8737
|
-
console.log("endset_three_editor destroy"),
|
|
8738
|
-
}), (f, h) => (H(), k("div",
|
|
8739
|
-
t.value ? (H(), k("div",
|
|
8740
|
+
console.log("endset_three_editor destroy"), vl();
|
|
8741
|
+
}), (f, h) => (H(), k("div", Qu, [
|
|
8742
|
+
t.value ? (H(), k("div", Ju, h[0] || (h[0] = [
|
|
8740
8743
|
y("div", { class: "loading-spinner" }, null, -1),
|
|
8741
8744
|
y("div", { class: "loading-text" }, "加载中...", -1)
|
|
8742
8745
|
]))) : re("", !0),
|
|
8743
|
-
f.mode === "edit" ? (H(), vt(
|
|
8746
|
+
f.mode === "edit" ? (H(), vt(qu, {
|
|
8744
8747
|
key: 1,
|
|
8745
8748
|
onAddModel: l,
|
|
8746
8749
|
onImportModel: c
|
|
@@ -8753,16 +8756,16 @@ function myFunc() {
|
|
|
8753
8756
|
ref_key: "containerRef",
|
|
8754
8757
|
ref: I
|
|
8755
8758
|
}, [
|
|
8756
|
-
A.value.length > 0 ? (H(), k("div",
|
|
8759
|
+
A.value.length > 0 ? (H(), k("div", _u, [
|
|
8757
8760
|
(H(!0), k(Ee, null, At(A.value, (v, D) => (H(), k("button", {
|
|
8758
8761
|
key: v.id,
|
|
8759
8762
|
class: "script-trigger-btn",
|
|
8760
8763
|
title: v.code,
|
|
8761
|
-
onClick:
|
|
8762
|
-
}, " ▶ " + fe(
|
|
8764
|
+
onClick: ss((R) => m(v.id), ["stop"])
|
|
8765
|
+
}, " ▶ " + fe(ns(Ua)(v, D)), 9, $u))), 128))
|
|
8763
8766
|
])) : re("", !0)
|
|
8764
8767
|
], 2),
|
|
8765
|
-
f.mode === "edit" ? (H(), vt(
|
|
8768
|
+
f.mode === "edit" ? (H(), vt(Fu, {
|
|
8766
8769
|
key: 0,
|
|
8767
8770
|
transform: s,
|
|
8768
8771
|
"tree-data": d.value,
|
|
@@ -8773,17 +8776,17 @@ function myFunc() {
|
|
|
8773
8776
|
onTransformModeChange: b
|
|
8774
8777
|
}, null, 8, ["transform", "tree-data", "selected-object"])) : re("", !0)
|
|
8775
8778
|
], 2),
|
|
8776
|
-
f.mode === "edit" ? (H(), vt(
|
|
8779
|
+
f.mode === "edit" ? (H(), vt(Zu, { key: 2 })) : re("", !0)
|
|
8777
8780
|
]));
|
|
8778
8781
|
}
|
|
8779
|
-
}),
|
|
8782
|
+
}), bd = /* @__PURE__ */ Qe(ed, [["__scopeId", "data-v-1237aaa7"]]);
|
|
8780
8783
|
export {
|
|
8781
|
-
|
|
8782
|
-
|
|
8783
|
-
|
|
8784
|
-
|
|
8785
|
-
|
|
8786
|
-
|
|
8784
|
+
Zu as BottomBar,
|
|
8785
|
+
as as DataPanel,
|
|
8786
|
+
bd as DrawingBoard,
|
|
8787
|
+
Fu as PropertyPanel,
|
|
8788
|
+
qu as TopBar,
|
|
8789
|
+
zl as TreeItem,
|
|
8787
8790
|
Oi as addBox,
|
|
8788
8791
|
ki as addDataPanel,
|
|
8789
8792
|
Pi as addDirectionalLight,
|
|
@@ -8794,23 +8797,23 @@ export {
|
|
|
8794
8797
|
Li as addWaterCylinder,
|
|
8795
8798
|
Hi as addWaterPlane,
|
|
8796
8799
|
vr as createCSS2DRenderer,
|
|
8797
|
-
|
|
8800
|
+
vl as destroyEditor,
|
|
8798
8801
|
Er as disposeCSS2DRenderer,
|
|
8799
|
-
|
|
8802
|
+
Il as exportSceneToJSON,
|
|
8800
8803
|
yi as focusOnObject,
|
|
8801
|
-
|
|
8804
|
+
od as getCSS2DRenderer,
|
|
8802
8805
|
Fs as getCamera,
|
|
8803
|
-
|
|
8806
|
+
jt as getDataPanel,
|
|
8804
8807
|
Ln as getRenderer,
|
|
8805
8808
|
Sn as getScene,
|
|
8806
8809
|
wi as getSceneObjects,
|
|
8807
8810
|
js as getSelectedObject,
|
|
8808
8811
|
ji as importModelFromFile,
|
|
8809
8812
|
fi as initDefaultMainCamera,
|
|
8810
|
-
|
|
8811
|
-
|
|
8812
|
-
|
|
8813
|
-
|
|
8813
|
+
Wa as initEditor,
|
|
8814
|
+
wl as loadSceneFromJSON,
|
|
8815
|
+
cl as onSceneObjectsChangeCallback,
|
|
8816
|
+
nl as registerModelDataPanel,
|
|
8814
8817
|
ii as removeDataPanel,
|
|
8815
8818
|
xi as removeModel,
|
|
8816
8819
|
Ii as removeModelById,
|
|
@@ -8819,11 +8822,11 @@ export {
|
|
|
8819
8822
|
gi as selectModelHandle,
|
|
8820
8823
|
ds as selectObject,
|
|
8821
8824
|
Es as setLoading,
|
|
8822
|
-
|
|
8823
|
-
|
|
8824
|
-
|
|
8825
|
+
_a as setLoadingCallback,
|
|
8826
|
+
al as setSelectedObjectCallback,
|
|
8827
|
+
ll as setTransformChangeCallback,
|
|
8825
8828
|
Ai as setTransformMode,
|
|
8826
|
-
|
|
8827
|
-
|
|
8829
|
+
ul as updateDataPanelValue,
|
|
8830
|
+
xu as useTreeExpand
|
|
8828
8831
|
};
|
|
8829
8832
|
//# sourceMappingURL=three-editor.es.js.map
|