endset_three_editor 0.1.7 → 0.1.8
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.es.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { defineComponent as Ge, ref as G, inject as Tn, computed as Ze, watchEffect as xn, resolveComponent as En, openBlock as N, createElementBlock as U, createElementVNode as g, normalizeClass as
|
|
2
|
-
import * as
|
|
3
|
-
import { Controls as on, Vector3 as M, MOUSE as Me, TOUCH as xe, Quaternion as K, Spherical as Pt, Vector2 as V, Ray as Ln, Plane as In, MathUtils as rn, Raycaster as On, Object3D as Ue, MeshBasicMaterial as _e, LineBasicMaterial as ke, CylinderGeometry as Y, BoxGeometry as z, BufferGeometry as ze, Float32BufferAttribute as ue, Mesh as
|
|
1
|
+
import { defineComponent as Ge, ref as G, inject as Tn, computed as Ze, watchEffect as xn, resolveComponent as En, openBlock as N, createElementBlock as U, createElementVNode as g, normalizeClass as He, withModifiers as At, unref as Mn, toDisplayString as Ee, Fragment as en, renderList as tn, createBlock as ot, createCommentVNode as de, watch as nn, toRef as vn, provide as Sn, reactive as sn, withDirectives as D, vModelText as Q, vShow as he, shallowRef as Rn, onMounted as An, createVNode as Pn } from "vue";
|
|
2
|
+
import * as F from "three";
|
|
3
|
+
import { Controls as on, Vector3 as M, MOUSE as Me, TOUCH as xe, Quaternion as K, Spherical as Pt, Vector2 as V, Ray as Ln, Plane as In, MathUtils as rn, Raycaster as On, Object3D as Ue, MeshBasicMaterial as _e, LineBasicMaterial as ke, CylinderGeometry as Y, BoxGeometry as z, BufferGeometry as ze, Float32BufferAttribute as ue, Mesh as T, OctahedronGeometry as Qe, Line as re, TorusGeometry as Pe, SphereGeometry as Cn, Euler as Dn, Matrix4 as Se, PlaneGeometry as Nn, DoubleSide as an, Loader as ln, FileLoader as xt, Color as pe, SRGBColorSpace as Re, Group as tt, Material as je, PointsMaterial as Ce, MeshPhongMaterial as kn, LineSegments as mt, Points as nt, TrianglesDrawMode as jn, TriangleFanDrawMode as gt, TriangleStripDrawMode as cn, LoaderUtils as Fe, MeshPhysicalMaterial as se, LinearSRGBColorSpace as ae, SpotLight as Fn, PointLight as Hn, DirectionalLight as Un, InstancedMesh as zn, InstancedBufferAttribute as Gn, TextureLoader as Xn, ImageBitmapLoader as Yn, BufferAttribute as rt, InterleavedBuffer as Bn, InterleavedBufferAttribute as Kn, LinearMipmapLinearFilter as hn, NearestMipmapLinearFilter as Vn, LinearMipmapNearestFilter as Zn, NearestMipmapNearestFilter as Qn, LinearFilter as yt, NearestFilter as un, RepeatWrapping as _t, MirroredRepeatWrapping as qn, ClampToEdgeWrapping as Wn, MeshStandardMaterial as dn, PropertyBinding as $n, SkinnedMesh as Jn, LineLoop as es, PerspectiveCamera as ts, OrthographicCamera as ns, Skeleton as ss, AnimationClip as is, Bone as os, InterpolateDiscrete as rs, InterpolateLinear as pn, Texture as Lt, VectorKeyframeTrack as It, NumberKeyframeTrack as Ot, QuaternionKeyframeTrack as Ct, ColorManagement as Dt, FrontSide as as, Interpolant as ls, Box3 as cs, Sphere as hs } from "three";
|
|
4
4
|
import us from "@tweenjs/tween.js";
|
|
5
|
-
const Nt = { type: "change" },
|
|
5
|
+
const Nt = { type: "change" }, Et = { type: "start" }, fn = { type: "end" }, qe = new Ln(), kt = new In(), ds = Math.cos(70 * rn.DEG2RAD), k = new M(), B = 2 * Math.PI, P = {
|
|
6
6
|
NONE: -1,
|
|
7
7
|
ROTATE: 0,
|
|
8
8
|
DOLLY: 1,
|
|
@@ -11,7 +11,7 @@ const Nt = { type: "change" }, Mt = { type: "start" }, fn = { type: "end" }, qe
|
|
|
11
11
|
TOUCH_PAN: 4,
|
|
12
12
|
TOUCH_DOLLY_PAN: 5,
|
|
13
13
|
TOUCH_DOLLY_ROTATE: 6
|
|
14
|
-
},
|
|
14
|
+
}, at = 1e-6;
|
|
15
15
|
class ps extends on {
|
|
16
16
|
/**
|
|
17
17
|
* Constructs a new controls instance.
|
|
@@ -138,7 +138,7 @@ class ps extends on {
|
|
|
138
138
|
}
|
|
139
139
|
update(e = null) {
|
|
140
140
|
const t = this.object.position;
|
|
141
|
-
|
|
141
|
+
k.copy(t).sub(this.target), k.applyQuaternion(this._quat), this._spherical.setFromVector3(k), this.autoRotate && this.state === P.NONE && this._rotateLeft(this._getAutoRotationAngle(e)), this.enableDamping ? (this._spherical.theta += this._sphericalDelta.theta * this.dampingFactor, this._spherical.phi += this._sphericalDelta.phi * this.dampingFactor) : (this._spherical.theta += this._sphericalDelta.theta, this._spherical.phi += this._sphericalDelta.phi);
|
|
142
142
|
let s = this.minAzimuthAngle, n = this.maxAzimuthAngle;
|
|
143
143
|
isFinite(s) && isFinite(n) && (s < -Math.PI ? s += B : s > Math.PI && (s -= B), n < -Math.PI ? n += B : n > Math.PI && (n -= B), s <= n ? this._spherical.theta = Math.max(s, Math.min(n, this._spherical.theta)) : this._spherical.theta = this._spherical.theta > (s + n) / 2 ? Math.max(s, this._spherical.theta) : Math.min(n, this._spherical.theta)), this._spherical.phi = Math.max(this.minPolarAngle, Math.min(this.maxPolarAngle, this._spherical.phi)), this._spherical.makeSafe(), this.enableDamping === !0 ? this.target.addScaledVector(this._panOffset, this.dampingFactor) : this.target.add(this._panOffset), this.target.sub(this.cursor), this.target.clampLength(this.minTargetRadius, this.maxTargetRadius), this.target.add(this.cursor);
|
|
144
144
|
let i = !1;
|
|
@@ -148,10 +148,10 @@ class ps extends on {
|
|
|
148
148
|
const o = this._spherical.radius;
|
|
149
149
|
this._spherical.radius = this._clampDistance(this._spherical.radius * this._scale), i = o != this._spherical.radius;
|
|
150
150
|
}
|
|
151
|
-
if (
|
|
151
|
+
if (k.setFromSpherical(this._spherical), k.applyQuaternion(this._quatInverse), t.copy(this.target).add(k), this.object.lookAt(this.target), this.enableDamping === !0 ? (this._sphericalDelta.theta *= 1 - this.dampingFactor, this._sphericalDelta.phi *= 1 - this.dampingFactor, this._panOffset.multiplyScalar(1 - this.dampingFactor)) : (this._sphericalDelta.set(0, 0, 0), this._panOffset.set(0, 0, 0)), this.zoomToCursor && this._performCursorZoom) {
|
|
152
152
|
let o = null;
|
|
153
153
|
if (this.object.isPerspectiveCamera) {
|
|
154
|
-
const a =
|
|
154
|
+
const a = k.length();
|
|
155
155
|
o = this._clampDistance(a * this._scale);
|
|
156
156
|
const l = a - o;
|
|
157
157
|
this.object.position.addScaledVector(this._dollyDirection, l), this.object.updateMatrixWorld(), i = !!l;
|
|
@@ -161,7 +161,7 @@ class ps extends on {
|
|
|
161
161
|
const l = this.object.zoom;
|
|
162
162
|
this.object.zoom = Math.max(this.minZoom, Math.min(this.maxZoom, this.object.zoom / this._scale)), this.object.updateProjectionMatrix(), i = l !== this.object.zoom;
|
|
163
163
|
const h = new M(this._mouse.x, this._mouse.y, 0);
|
|
164
|
-
h.unproject(this.object), this.object.position.sub(h).add(a), this.object.updateMatrixWorld(), o =
|
|
164
|
+
h.unproject(this.object), this.object.position.sub(h).add(a), this.object.updateMatrixWorld(), o = k.length();
|
|
165
165
|
} else
|
|
166
166
|
console.warn("WARNING: OrbitControls.js encountered an unknown camera type - zoom to cursor disabled."), this.zoomToCursor = !1;
|
|
167
167
|
o !== null && (this.screenSpacePanning ? this.target.set(0, 0, -1).transformDirection(this.object.matrix).multiplyScalar(o).add(this.object.position) : (qe.origin.copy(this.object.position), qe.direction.set(0, 0, -1).transformDirection(this.object.matrix), Math.abs(this.object.up.dot(qe.direction)) < ds ? this.object.lookAt(this.target) : (kt.setFromNormalAndCoplanarPoint(this.object.up, this.target), qe.intersectPlane(kt, this.target))));
|
|
@@ -169,7 +169,7 @@ class ps extends on {
|
|
|
169
169
|
const o = this.object.zoom;
|
|
170
170
|
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);
|
|
171
171
|
}
|
|
172
|
-
return this._scale = 1, this._performCursorZoom = !1, i || this._lastPosition.distanceToSquared(this.object.position) >
|
|
172
|
+
return this._scale = 1, this._performCursorZoom = !1, i || this._lastPosition.distanceToSquared(this.object.position) > at || 8 * (1 - this._lastQuaternion.dot(this.object.quaternion)) > at || this._lastTargetPosition.distanceToSquared(this.target) > at ? (this.dispatchEvent(Nt), this._lastPosition.copy(this.object.position), this._lastQuaternion.copy(this.object.quaternion), this._lastTargetPosition.copy(this.target), !0) : !1;
|
|
173
173
|
}
|
|
174
174
|
_getAutoRotationAngle(e) {
|
|
175
175
|
return e !== null ? B / 60 * this.autoRotateSpeed * e : B / 60 / 60 * this.autoRotateSpeed;
|
|
@@ -185,18 +185,18 @@ class ps extends on {
|
|
|
185
185
|
this._sphericalDelta.phi -= e;
|
|
186
186
|
}
|
|
187
187
|
_panLeft(e, t) {
|
|
188
|
-
|
|
188
|
+
k.setFromMatrixColumn(t, 0), k.multiplyScalar(-e), this._panOffset.add(k);
|
|
189
189
|
}
|
|
190
190
|
_panUp(e, t) {
|
|
191
|
-
this.screenSpacePanning === !0 ?
|
|
191
|
+
this.screenSpacePanning === !0 ? k.setFromMatrixColumn(t, 1) : (k.setFromMatrixColumn(t, 0), k.crossVectors(this.object.up, k)), k.multiplyScalar(e), this._panOffset.add(k);
|
|
192
192
|
}
|
|
193
193
|
// deltaX and deltaY are in pixels; right and down are positive
|
|
194
194
|
_pan(e, t) {
|
|
195
195
|
const s = this.domElement;
|
|
196
196
|
if (this.object.isPerspectiveCamera) {
|
|
197
197
|
const n = this.object.position;
|
|
198
|
-
|
|
199
|
-
let i =
|
|
198
|
+
k.copy(n).sub(this.target);
|
|
199
|
+
let i = k.length();
|
|
200
200
|
i *= Math.tan(this.object.fov / 2 * Math.PI / 180), this._panLeft(2 * e * i / s.clientHeight, this.object.matrix), this._panUp(2 * t * i / s.clientHeight, this.object.matrix);
|
|
201
201
|
} else this.object.isOrthographicCamera ? (this._panLeft(e * (this.object.right - this.object.left) / this.object.zoom / s.clientWidth, this.object.matrix), this._panUp(t * (this.object.top - this.object.bottom) / this.object.zoom / s.clientHeight, this.object.matrix)) : (console.warn("WARNING: OrbitControls.js encountered an unknown camera type - pan disabled."), this.enablePan = !1);
|
|
202
202
|
}
|
|
@@ -419,7 +419,7 @@ function ys(r) {
|
|
|
419
419
|
default:
|
|
420
420
|
this.state = P.NONE;
|
|
421
421
|
}
|
|
422
|
-
this.state !== P.NONE && this.dispatchEvent(
|
|
422
|
+
this.state !== P.NONE && this.dispatchEvent(Et);
|
|
423
423
|
}
|
|
424
424
|
function _s(r) {
|
|
425
425
|
switch (this.state) {
|
|
@@ -438,7 +438,7 @@ function _s(r) {
|
|
|
438
438
|
}
|
|
439
439
|
}
|
|
440
440
|
function bs(r) {
|
|
441
|
-
this.enabled === !1 || this.enableZoom === !1 || this.state !== P.NONE || (r.preventDefault(), this.dispatchEvent(
|
|
441
|
+
this.enabled === !1 || this.enableZoom === !1 || this.state !== P.NONE || (r.preventDefault(), this.dispatchEvent(Et), this._handleMouseWheel(this._customWheelEvent(r)), this.dispatchEvent(fn));
|
|
442
442
|
}
|
|
443
443
|
function ws(r) {
|
|
444
444
|
this.enabled !== !1 && this._handleKeyDown(r);
|
|
@@ -476,7 +476,7 @@ function Ts(r) {
|
|
|
476
476
|
default:
|
|
477
477
|
this.state = P.NONE;
|
|
478
478
|
}
|
|
479
|
-
this.state !== P.NONE && this.dispatchEvent(
|
|
479
|
+
this.state !== P.NONE && this.dispatchEvent(Et);
|
|
480
480
|
}
|
|
481
481
|
function xs(r) {
|
|
482
482
|
switch (this._trackPointer(r), this.state) {
|
|
@@ -509,11 +509,11 @@ function Ms(r) {
|
|
|
509
509
|
function vs(r) {
|
|
510
510
|
r.key === "Control" && (this._controlActive = !1, this.domElement.getRootNode().removeEventListener("keyup", this._interceptControlUp, { passive: !0, capture: !0 }));
|
|
511
511
|
}
|
|
512
|
-
const me = new On(),
|
|
512
|
+
const me = new On(), H = new M(), le = new M(), O = new K(), jt = {
|
|
513
513
|
X: new M(1, 0, 0),
|
|
514
514
|
Y: new M(0, 1, 0),
|
|
515
515
|
Z: new M(0, 0, 1)
|
|
516
|
-
},
|
|
516
|
+
}, lt = { type: "change" }, Ft = { type: "mouseDown", mode: null }, Ht = { type: "mouseUp", mode: null }, Ut = { type: "objectChange" };
|
|
517
517
|
class Ss extends on {
|
|
518
518
|
/**
|
|
519
519
|
* Constructs a new controls instance.
|
|
@@ -537,7 +537,7 @@ class Ss extends on {
|
|
|
537
537
|
return A !== void 0 ? A : S;
|
|
538
538
|
},
|
|
539
539
|
set: function(v) {
|
|
540
|
-
A !== v && (A = v, i[x] = v, n[x] = v, o.dispatchEvent({ type: x + "-changed", value: v }), o.dispatchEvent(
|
|
540
|
+
A !== v && (A = v, i[x] = v, n[x] = v, o.dispatchEvent({ type: x + "-changed", value: v }), o.dispatchEvent(lt));
|
|
541
541
|
}
|
|
542
542
|
}), o[x] = S, i[x] = S, n[x] = S;
|
|
543
543
|
}
|
|
@@ -563,14 +563,14 @@ class Ss extends on {
|
|
|
563
563
|
pointerHover(e) {
|
|
564
564
|
if (this.object === void 0 || this.dragging === !0) return;
|
|
565
565
|
e !== null && me.setFromCamera(e, this.camera);
|
|
566
|
-
const t =
|
|
566
|
+
const t = ct(this._gizmo.picker[this.mode], me);
|
|
567
567
|
t ? this.axis = t.object.name : this.axis = null;
|
|
568
568
|
}
|
|
569
569
|
pointerDown(e) {
|
|
570
570
|
if (!(this.object === void 0 || this.dragging === !0 || e != null && e.button !== 0) && this.axis !== null) {
|
|
571
571
|
e !== null && me.setFromCamera(e, this.camera);
|
|
572
|
-
const t =
|
|
573
|
-
t && (this.object.updateMatrixWorld(), this.object.parent.updateMatrixWorld(), this._positionStart.copy(this.object.position), this._quaternionStart.copy(this.object.quaternion), this._scaleStart.copy(this.object.scale), this.object.matrixWorld.decompose(this.worldPositionStart, this.worldQuaternionStart, this._worldScaleStart), this.pointStart.copy(t.point).sub(this.worldPositionStart)), this.dragging = !0,
|
|
572
|
+
const t = ct(this._plane, me, !0);
|
|
573
|
+
t && (this.object.updateMatrixWorld(), this.object.parent.updateMatrixWorld(), this._positionStart.copy(this.object.position), this._quaternionStart.copy(this.object.quaternion), this._scaleStart.copy(this.object.scale), this.object.matrixWorld.decompose(this.worldPositionStart, this.worldQuaternionStart, this._worldScaleStart), this.pointStart.copy(t.point).sub(this.worldPositionStart)), this.dragging = !0, Ft.mode = this.mode, this.dispatchEvent(Ft);
|
|
574
574
|
}
|
|
575
575
|
}
|
|
576
576
|
pointerMove(e) {
|
|
@@ -578,28 +578,28 @@ class Ss extends on {
|
|
|
578
578
|
let i = this.space;
|
|
579
579
|
if (s === "scale" ? i = "local" : (t === "E" || t === "XYZE" || t === "XYZ") && (i = "world"), n === void 0 || t === null || this.dragging === !1 || e !== null && e.button !== -1) return;
|
|
580
580
|
e !== null && me.setFromCamera(e, this.camera);
|
|
581
|
-
const o =
|
|
581
|
+
const o = ct(this._plane, me, !0);
|
|
582
582
|
if (o) {
|
|
583
583
|
if (this.pointEnd.copy(o.point).sub(this.worldPositionStart), s === "translate")
|
|
584
|
-
this._offset.copy(this.pointEnd).sub(this.pointStart), i === "local" && t !== "XYZ" && this._offset.applyQuaternion(this._worldQuaternionInv), t.indexOf("X") === -1 && (this._offset.x = 0), t.indexOf("Y") === -1 && (this._offset.y = 0), t.indexOf("Z") === -1 && (this._offset.z = 0), i === "local" && t !== "XYZ" ? this._offset.applyQuaternion(this._quaternionStart).divide(this._parentScale) : this._offset.applyQuaternion(this._parentQuaternionInv).divide(this._parentScale), n.position.copy(this._offset).add(this._positionStart), this.translationSnap && (i === "local" && (n.position.applyQuaternion(O.copy(this._quaternionStart).invert()), t.search("X") !== -1 && (n.position.x = Math.round(n.position.x / this.translationSnap) * this.translationSnap), t.search("Y") !== -1 && (n.position.y = Math.round(n.position.y / this.translationSnap) * this.translationSnap), t.search("Z") !== -1 && (n.position.z = Math.round(n.position.z / this.translationSnap) * this.translationSnap), n.position.applyQuaternion(this._quaternionStart)), i === "world" && (n.parent && n.position.add(
|
|
584
|
+
this._offset.copy(this.pointEnd).sub(this.pointStart), i === "local" && t !== "XYZ" && this._offset.applyQuaternion(this._worldQuaternionInv), t.indexOf("X") === -1 && (this._offset.x = 0), t.indexOf("Y") === -1 && (this._offset.y = 0), t.indexOf("Z") === -1 && (this._offset.z = 0), i === "local" && t !== "XYZ" ? this._offset.applyQuaternion(this._quaternionStart).divide(this._parentScale) : this._offset.applyQuaternion(this._parentQuaternionInv).divide(this._parentScale), n.position.copy(this._offset).add(this._positionStart), this.translationSnap && (i === "local" && (n.position.applyQuaternion(O.copy(this._quaternionStart).invert()), t.search("X") !== -1 && (n.position.x = Math.round(n.position.x / this.translationSnap) * this.translationSnap), t.search("Y") !== -1 && (n.position.y = Math.round(n.position.y / this.translationSnap) * this.translationSnap), t.search("Z") !== -1 && (n.position.z = Math.round(n.position.z / this.translationSnap) * this.translationSnap), n.position.applyQuaternion(this._quaternionStart)), i === "world" && (n.parent && n.position.add(H.setFromMatrixPosition(n.parent.matrixWorld)), t.search("X") !== -1 && (n.position.x = Math.round(n.position.x / this.translationSnap) * this.translationSnap), t.search("Y") !== -1 && (n.position.y = Math.round(n.position.y / this.translationSnap) * this.translationSnap), t.search("Z") !== -1 && (n.position.z = Math.round(n.position.z / this.translationSnap) * this.translationSnap), n.parent && n.position.sub(H.setFromMatrixPosition(n.parent.matrixWorld)))), n.position.x = Math.max(this.minX, Math.min(this.maxX, n.position.x)), n.position.y = Math.max(this.minY, Math.min(this.maxY, n.position.y)), n.position.z = Math.max(this.minZ, Math.min(this.maxZ, n.position.z));
|
|
585
585
|
else if (s === "scale") {
|
|
586
586
|
if (t.search("XYZ") !== -1) {
|
|
587
587
|
let a = this.pointEnd.length() / this.pointStart.length();
|
|
588
588
|
this.pointEnd.dot(this.pointStart) < 0 && (a *= -1), le.set(a, a, a);
|
|
589
589
|
} else
|
|
590
|
-
|
|
590
|
+
H.copy(this.pointStart), le.copy(this.pointEnd), H.applyQuaternion(this._worldQuaternionInv), le.applyQuaternion(this._worldQuaternionInv), le.divide(H), t.search("X") === -1 && (le.x = 1), t.search("Y") === -1 && (le.y = 1), t.search("Z") === -1 && (le.z = 1);
|
|
591
591
|
n.scale.copy(this._scaleStart).multiply(le), this.scaleSnap && (t.search("X") !== -1 && (n.scale.x = Math.round(n.scale.x / this.scaleSnap) * this.scaleSnap || this.scaleSnap), t.search("Y") !== -1 && (n.scale.y = Math.round(n.scale.y / this.scaleSnap) * this.scaleSnap || this.scaleSnap), t.search("Z") !== -1 && (n.scale.z = Math.round(n.scale.z / this.scaleSnap) * this.scaleSnap || this.scaleSnap));
|
|
592
592
|
} else if (s === "rotate") {
|
|
593
593
|
this._offset.copy(this.pointEnd).sub(this.pointStart);
|
|
594
|
-
const a = 20 / this.worldPosition.distanceTo(
|
|
594
|
+
const a = 20 / this.worldPosition.distanceTo(H.setFromMatrixPosition(this.camera.matrixWorld));
|
|
595
595
|
let l = !1;
|
|
596
|
-
t === "XYZE" ? (this.rotationAxis.copy(this._offset).cross(this.eye).normalize(), this.rotationAngle = this._offset.dot(
|
|
596
|
+
t === "XYZE" ? (this.rotationAxis.copy(this._offset).cross(this.eye).normalize(), this.rotationAngle = this._offset.dot(H.copy(this.rotationAxis).cross(this.eye)) * a) : (t === "X" || t === "Y" || t === "Z") && (this.rotationAxis.copy(jt[t]), H.copy(jt[t]), i === "local" && H.applyQuaternion(this.worldQuaternion), H.cross(this.eye), H.length() === 0 ? l = !0 : this.rotationAngle = this._offset.dot(H.normalize()) * a), (t === "E" || l) && (this.rotationAxis.copy(this.eye), this.rotationAngle = this.pointEnd.angleTo(this.pointStart), this._startNorm.copy(this.pointStart).normalize(), this._endNorm.copy(this.pointEnd).normalize(), this.rotationAngle *= this._endNorm.cross(this._startNorm).dot(this.eye) < 0 ? 1 : -1), this.rotationSnap && (this.rotationAngle = Math.round(this.rotationAngle / this.rotationSnap) * this.rotationSnap), i === "local" && t !== "E" && t !== "XYZE" ? (n.quaternion.copy(this._quaternionStart), n.quaternion.multiply(O.setFromAxisAngle(this.rotationAxis, this.rotationAngle)).normalize()) : (this.rotationAxis.applyQuaternion(this._parentQuaternionInv), n.quaternion.copy(O.setFromAxisAngle(this.rotationAxis, this.rotationAngle)), n.quaternion.multiply(this._quaternionStart).normalize());
|
|
597
597
|
}
|
|
598
|
-
this.dispatchEvent(
|
|
598
|
+
this.dispatchEvent(lt), this.dispatchEvent(Ut);
|
|
599
599
|
}
|
|
600
600
|
}
|
|
601
601
|
pointerUp(e) {
|
|
602
|
-
e !== null && e.button !== 0 || (this.dragging && this.axis !== null && (
|
|
602
|
+
e !== null && e.button !== 0 || (this.dragging && this.axis !== null && (Ht.mode = this.mode, this.dispatchEvent(Ht)), this.dragging = !1, this.axis = null);
|
|
603
603
|
}
|
|
604
604
|
dispose() {
|
|
605
605
|
this.disconnect(), this._root.dispose();
|
|
@@ -625,7 +625,7 @@ class Ss extends on {
|
|
|
625
625
|
* Resets the object's position, rotation and scale to when the current transform began.
|
|
626
626
|
*/
|
|
627
627
|
reset() {
|
|
628
|
-
this.enabled && this.dragging && (this.object.position.copy(this._positionStart), this.object.quaternion.copy(this._quaternionStart), this.object.scale.copy(this._scaleStart), this.dispatchEvent(
|
|
628
|
+
this.enabled && this.dragging && (this.object.position.copy(this._positionStart), this.object.quaternion.copy(this._quaternionStart), this.object.scale.copy(this._scaleStart), this.dispatchEvent(lt), this.dispatchEvent(Ut), this.pointStart.copy(this.pointEnd));
|
|
629
629
|
}
|
|
630
630
|
/**
|
|
631
631
|
* Returns the raycaster that is used for user interaction. This object is shared between all
|
|
@@ -739,7 +739,7 @@ function Ls(r) {
|
|
|
739
739
|
function Is(r) {
|
|
740
740
|
this.enabled && (this.domElement.releasePointerCapture(r.pointerId), this.domElement.removeEventListener("pointermove", this._onPointerMove), this.pointerUp(this._getPointer(r)));
|
|
741
741
|
}
|
|
742
|
-
function
|
|
742
|
+
function ct(r, e, t) {
|
|
743
743
|
const s = e.intersectObject(r, !0);
|
|
744
744
|
for (let n = 0; n < s.length; n++)
|
|
745
745
|
if (s[n].object.visible || t)
|
|
@@ -828,63 +828,63 @@ class Cs extends Ue {
|
|
|
828
828
|
}
|
|
829
829
|
const A = {
|
|
830
830
|
X: [
|
|
831
|
-
[new
|
|
832
|
-
[new
|
|
833
|
-
[new
|
|
831
|
+
[new T(f, i), [0.5, 0, 0], [0, 0, -Math.PI / 2]],
|
|
832
|
+
[new T(f, i), [-0.5, 0, 0], [0, 0, Math.PI / 2]],
|
|
833
|
+
[new T(_, i), [0, 0, 0], [0, 0, -Math.PI / 2]]
|
|
834
834
|
],
|
|
835
835
|
Y: [
|
|
836
|
-
[new
|
|
837
|
-
[new
|
|
838
|
-
[new
|
|
836
|
+
[new T(f, o), [0, 0.5, 0]],
|
|
837
|
+
[new T(f, o), [0, -0.5, 0], [Math.PI, 0, 0]],
|
|
838
|
+
[new T(_, o)]
|
|
839
839
|
],
|
|
840
840
|
Z: [
|
|
841
|
-
[new
|
|
842
|
-
[new
|
|
843
|
-
[new
|
|
841
|
+
[new T(f, a), [0, 0, 0.5], [Math.PI / 2, 0, 0]],
|
|
842
|
+
[new T(f, a), [0, 0, -0.5], [-Math.PI / 2, 0, 0]],
|
|
843
|
+
[new T(_, a), null, [Math.PI / 2, 0, 0]]
|
|
844
844
|
],
|
|
845
845
|
XYZ: [
|
|
846
|
-
[new
|
|
846
|
+
[new T(new Qe(0.1, 0), c), [0, 0, 0]]
|
|
847
847
|
],
|
|
848
848
|
XY: [
|
|
849
|
-
[new
|
|
849
|
+
[new T(new z(0.15, 0.15, 0.01), u), [0.15, 0.15, 0]]
|
|
850
850
|
],
|
|
851
851
|
YZ: [
|
|
852
|
-
[new
|
|
852
|
+
[new T(new z(0.15, 0.15, 0.01), l), [0, 0.15, 0.15], [0, Math.PI / 2, 0]]
|
|
853
853
|
],
|
|
854
854
|
XZ: [
|
|
855
|
-
[new
|
|
855
|
+
[new T(new z(0.15, 0.15, 0.01), h), [0.15, 0, 0.15], [-Math.PI / 2, 0, 0]]
|
|
856
856
|
]
|
|
857
857
|
}, v = {
|
|
858
858
|
X: [
|
|
859
|
-
[new
|
|
860
|
-
[new
|
|
859
|
+
[new T(new Y(0.2, 0, 0.6, 4), s), [0.3, 0, 0], [0, 0, -Math.PI / 2]],
|
|
860
|
+
[new T(new Y(0.2, 0, 0.6, 4), s), [-0.3, 0, 0], [0, 0, Math.PI / 2]]
|
|
861
861
|
],
|
|
862
862
|
Y: [
|
|
863
|
-
[new
|
|
864
|
-
[new
|
|
863
|
+
[new T(new Y(0.2, 0, 0.6, 4), s), [0, 0.3, 0]],
|
|
864
|
+
[new T(new Y(0.2, 0, 0.6, 4), s), [0, -0.3, 0], [0, 0, Math.PI]]
|
|
865
865
|
],
|
|
866
866
|
Z: [
|
|
867
|
-
[new
|
|
868
|
-
[new
|
|
867
|
+
[new T(new Y(0.2, 0, 0.6, 4), s), [0, 0, 0.3], [Math.PI / 2, 0, 0]],
|
|
868
|
+
[new T(new Y(0.2, 0, 0.6, 4), s), [0, 0, -0.3], [-Math.PI / 2, 0, 0]]
|
|
869
869
|
],
|
|
870
870
|
XYZ: [
|
|
871
|
-
[new
|
|
871
|
+
[new T(new Qe(0.2, 0), s)]
|
|
872
872
|
],
|
|
873
873
|
XY: [
|
|
874
|
-
[new
|
|
874
|
+
[new T(new z(0.2, 0.2, 0.01), s), [0.15, 0.15, 0]]
|
|
875
875
|
],
|
|
876
876
|
YZ: [
|
|
877
|
-
[new
|
|
877
|
+
[new T(new z(0.2, 0.2, 0.01), s), [0, 0.15, 0.15], [0, Math.PI / 2, 0]]
|
|
878
878
|
],
|
|
879
879
|
XZ: [
|
|
880
|
-
[new
|
|
880
|
+
[new T(new z(0.2, 0.2, 0.01), s), [0.15, 0, 0.15], [-Math.PI / 2, 0, 0]]
|
|
881
881
|
]
|
|
882
882
|
}, I = {
|
|
883
883
|
START: [
|
|
884
|
-
[new
|
|
884
|
+
[new T(new Qe(0.01, 2), n), null, null, null, "helper"]
|
|
885
885
|
],
|
|
886
886
|
END: [
|
|
887
|
-
[new
|
|
887
|
+
[new T(new Qe(0.01, 2), n), null, null, null, "helper"]
|
|
888
888
|
],
|
|
889
889
|
DELTA: [
|
|
890
890
|
[new re(S(), n), null, null, null, "helper"]
|
|
@@ -900,19 +900,19 @@ class Cs extends Ue {
|
|
|
900
900
|
]
|
|
901
901
|
}, ie = {
|
|
902
902
|
XYZE: [
|
|
903
|
-
[new
|
|
903
|
+
[new T(x(0.5, 1), b), null, [0, Math.PI / 2, 0]]
|
|
904
904
|
],
|
|
905
905
|
X: [
|
|
906
|
-
[new
|
|
906
|
+
[new T(x(0.5, 0.5), i)]
|
|
907
907
|
],
|
|
908
908
|
Y: [
|
|
909
|
-
[new
|
|
909
|
+
[new T(x(0.5, 0.5), o), null, [0, 0, -Math.PI / 2]]
|
|
910
910
|
],
|
|
911
911
|
Z: [
|
|
912
|
-
[new
|
|
912
|
+
[new T(x(0.5, 0.5), a), null, [0, Math.PI / 2, 0]]
|
|
913
913
|
],
|
|
914
914
|
E: [
|
|
915
|
-
[new
|
|
915
|
+
[new T(x(0.75, 1), p), null, [0, Math.PI / 2, 0]]
|
|
916
916
|
]
|
|
917
917
|
}, ee = {
|
|
918
918
|
AXIS: [
|
|
@@ -920,74 +920,74 @@ class Cs extends Ue {
|
|
|
920
920
|
]
|
|
921
921
|
}, fe = {
|
|
922
922
|
XYZE: [
|
|
923
|
-
[new
|
|
923
|
+
[new T(new Cn(0.25, 10, 8), s)]
|
|
924
924
|
],
|
|
925
925
|
X: [
|
|
926
|
-
[new
|
|
926
|
+
[new T(new Pe(0.5, 0.1, 4, 24), s), [0, 0, 0], [0, -Math.PI / 2, -Math.PI / 2]]
|
|
927
927
|
],
|
|
928
928
|
Y: [
|
|
929
|
-
[new
|
|
929
|
+
[new T(new Pe(0.5, 0.1, 4, 24), s), [0, 0, 0], [Math.PI / 2, 0, 0]]
|
|
930
930
|
],
|
|
931
931
|
Z: [
|
|
932
|
-
[new
|
|
932
|
+
[new T(new Pe(0.5, 0.1, 4, 24), s), [0, 0, 0], [0, 0, -Math.PI / 2]]
|
|
933
933
|
],
|
|
934
934
|
E: [
|
|
935
|
-
[new
|
|
935
|
+
[new T(new Pe(0.75, 0.1, 2, 24), s)]
|
|
936
936
|
]
|
|
937
937
|
}, $ = {
|
|
938
938
|
X: [
|
|
939
|
-
[new
|
|
940
|
-
[new
|
|
941
|
-
[new
|
|
939
|
+
[new T(y, i), [0.5, 0, 0], [0, 0, -Math.PI / 2]],
|
|
940
|
+
[new T(_, i), [0, 0, 0], [0, 0, -Math.PI / 2]],
|
|
941
|
+
[new T(y, i), [-0.5, 0, 0], [0, 0, Math.PI / 2]]
|
|
942
942
|
],
|
|
943
943
|
Y: [
|
|
944
|
-
[new
|
|
945
|
-
[new
|
|
946
|
-
[new
|
|
944
|
+
[new T(y, o), [0, 0.5, 0]],
|
|
945
|
+
[new T(_, o)],
|
|
946
|
+
[new T(y, o), [0, -0.5, 0], [0, 0, Math.PI]]
|
|
947
947
|
],
|
|
948
948
|
Z: [
|
|
949
|
-
[new
|
|
950
|
-
[new
|
|
951
|
-
[new
|
|
949
|
+
[new T(y, a), [0, 0, 0.5], [Math.PI / 2, 0, 0]],
|
|
950
|
+
[new T(_, a), [0, 0, 0], [Math.PI / 2, 0, 0]],
|
|
951
|
+
[new T(y, a), [0, 0, -0.5], [-Math.PI / 2, 0, 0]]
|
|
952
952
|
],
|
|
953
953
|
XY: [
|
|
954
|
-
[new
|
|
954
|
+
[new T(new z(0.15, 0.15, 0.01), u), [0.15, 0.15, 0]]
|
|
955
955
|
],
|
|
956
956
|
YZ: [
|
|
957
|
-
[new
|
|
957
|
+
[new T(new z(0.15, 0.15, 0.01), l), [0, 0.15, 0.15], [0, Math.PI / 2, 0]]
|
|
958
958
|
],
|
|
959
959
|
XZ: [
|
|
960
|
-
[new
|
|
960
|
+
[new T(new z(0.15, 0.15, 0.01), h), [0.15, 0, 0.15], [-Math.PI / 2, 0, 0]]
|
|
961
961
|
],
|
|
962
962
|
XYZ: [
|
|
963
|
-
[new
|
|
963
|
+
[new T(new z(0.1, 0.1, 0.1), c)]
|
|
964
964
|
]
|
|
965
965
|
}, E = {
|
|
966
966
|
X: [
|
|
967
|
-
[new
|
|
968
|
-
[new
|
|
967
|
+
[new T(new Y(0.2, 0, 0.6, 4), s), [0.3, 0, 0], [0, 0, -Math.PI / 2]],
|
|
968
|
+
[new T(new Y(0.2, 0, 0.6, 4), s), [-0.3, 0, 0], [0, 0, Math.PI / 2]]
|
|
969
969
|
],
|
|
970
970
|
Y: [
|
|
971
|
-
[new
|
|
972
|
-
[new
|
|
971
|
+
[new T(new Y(0.2, 0, 0.6, 4), s), [0, 0.3, 0]],
|
|
972
|
+
[new T(new Y(0.2, 0, 0.6, 4), s), [0, -0.3, 0], [0, 0, Math.PI]]
|
|
973
973
|
],
|
|
974
974
|
Z: [
|
|
975
|
-
[new
|
|
976
|
-
[new
|
|
975
|
+
[new T(new Y(0.2, 0, 0.6, 4), s), [0, 0, 0.3], [Math.PI / 2, 0, 0]],
|
|
976
|
+
[new T(new Y(0.2, 0, 0.6, 4), s), [0, 0, -0.3], [-Math.PI / 2, 0, 0]]
|
|
977
977
|
],
|
|
978
978
|
XY: [
|
|
979
|
-
[new
|
|
979
|
+
[new T(new z(0.2, 0.2, 0.01), s), [0.15, 0.15, 0]]
|
|
980
980
|
],
|
|
981
981
|
YZ: [
|
|
982
|
-
[new
|
|
982
|
+
[new T(new z(0.2, 0.2, 0.01), s), [0, 0.15, 0.15], [0, Math.PI / 2, 0]]
|
|
983
983
|
],
|
|
984
984
|
XZ: [
|
|
985
|
-
[new
|
|
985
|
+
[new T(new z(0.2, 0.2, 0.01), s), [0.15, 0, 0.15], [-Math.PI / 2, 0, 0]]
|
|
986
986
|
],
|
|
987
987
|
XYZ: [
|
|
988
|
-
[new
|
|
988
|
+
[new T(new z(0.2, 0.2, 0.2), s), [0, 0, 0]]
|
|
989
989
|
]
|
|
990
|
-
},
|
|
990
|
+
}, j = {
|
|
991
991
|
X: [
|
|
992
992
|
[new re(d, n), [-1e3, 0, 0], null, [1e6, 1, 1], "helper"]
|
|
993
993
|
],
|
|
@@ -1009,7 +1009,7 @@ class Cs extends Ue {
|
|
|
1009
1009
|
}
|
|
1010
1010
|
return Ye;
|
|
1011
1011
|
}
|
|
1012
|
-
this.gizmo = {}, this.picker = {}, this.helper = {}, this.add(this.gizmo.translate = oe(A)), this.add(this.gizmo.rotate = oe(ie)), this.add(this.gizmo.scale = oe($)), this.add(this.picker.translate = oe(v)), this.add(this.picker.rotate = oe(fe)), this.add(this.picker.scale = oe(E)), this.add(this.helper.translate = oe(I)), this.add(this.helper.rotate = oe(ee)), this.add(this.helper.scale = oe(
|
|
1012
|
+
this.gizmo = {}, this.picker = {}, this.helper = {}, this.add(this.gizmo.translate = oe(A)), this.add(this.gizmo.rotate = oe(ie)), this.add(this.gizmo.scale = oe($)), this.add(this.picker.translate = oe(v)), this.add(this.picker.rotate = oe(fe)), this.add(this.picker.scale = oe(E)), this.add(this.helper.translate = oe(I)), this.add(this.helper.rotate = oe(ee)), this.add(this.helper.scale = oe(j)), this.picker.translate.visible = !1, this.picker.rotate.visible = !1, this.picker.scale.visible = !1;
|
|
1013
1013
|
}
|
|
1014
1014
|
// updateMatrixWorld will update transformations and appearance of individual handles
|
|
1015
1015
|
updateMatrixWorld(e) {
|
|
@@ -1022,7 +1022,7 @@ class Cs extends Ue {
|
|
|
1022
1022
|
o.visible = !0, o.rotation.set(0, 0, 0), o.position.copy(this.worldPosition);
|
|
1023
1023
|
let a;
|
|
1024
1024
|
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") {
|
|
1025
|
-
o.visible = !1, o.name === "AXIS" ? (o.visible = !!this.axis, this.axis === "X" && (O.setFromEuler(We.set(0, 0, 0)), o.quaternion.copy(s).multiply(O), Math.abs(L.copy(De).applyQuaternion(s).dot(this.eye)) > 0.9 && (o.visible = !1)), this.axis === "Y" && (O.setFromEuler(We.set(0, 0, Math.PI / 2)), o.quaternion.copy(s).multiply(O), Math.abs(L.copy(ye).applyQuaternion(s).dot(this.eye)) > 0.9 && (o.visible = !1)), this.axis === "Z" && (O.setFromEuler(We.set(0, Math.PI / 2, 0)), o.quaternion.copy(s).multiply(O), Math.abs(L.copy(Ne).applyQuaternion(s).dot(this.eye)) > 0.9 && (o.visible = !1)), this.axis === "XYZE" && (O.setFromEuler(We.set(0, Math.PI / 2, 0)), L.copy(this.rotationAxis), o.quaternion.setFromRotationMatrix(Gt.lookAt(zt, L, ye)), o.quaternion.multiply(O), 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),
|
|
1025
|
+
o.visible = !1, o.name === "AXIS" ? (o.visible = !!this.axis, this.axis === "X" && (O.setFromEuler(We.set(0, 0, 0)), o.quaternion.copy(s).multiply(O), Math.abs(L.copy(De).applyQuaternion(s).dot(this.eye)) > 0.9 && (o.visible = !1)), this.axis === "Y" && (O.setFromEuler(We.set(0, 0, Math.PI / 2)), o.quaternion.copy(s).multiply(O), Math.abs(L.copy(ye).applyQuaternion(s).dot(this.eye)) > 0.9 && (o.visible = !1)), this.axis === "Z" && (O.setFromEuler(We.set(0, Math.PI / 2, 0)), o.quaternion.copy(s).multiply(O), Math.abs(L.copy(Ne).applyQuaternion(s).dot(this.eye)) > 0.9 && (o.visible = !1)), this.axis === "XYZE" && (O.setFromEuler(We.set(0, Math.PI / 2, 0)), L.copy(this.rotationAxis), o.quaternion.setFromRotationMatrix(Gt.lookAt(zt, L, ye)), o.quaternion.multiply(O), 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), H.set(1e-10, 1e-10, 1e-10).add(this.worldPositionStart).sub(this.worldPosition).multiplyScalar(-1), H.applyQuaternion(this.worldQuaternionStart.clone().invert()), o.scale.copy(H), o.visible = this.dragging) : (o.quaternion.copy(s), this.dragging ? o.position.copy(this.worldPositionStart) : o.position.copy(this.worldPosition), this.axis && (o.visible = this.axis.search(o.name) !== -1));
|
|
1026
1026
|
continue;
|
|
1027
1027
|
}
|
|
1028
1028
|
o.quaternion.copy(s), this.mode === "translate" || this.mode === "scale" ? (o.name === "X" && Math.abs(L.copy(De).applyQuaternion(s).dot(this.eye)) > 0.99 && (o.scale.set(1e-10, 1e-10, 1e-10), o.visible = !1), o.name === "Y" && Math.abs(L.copy(ye).applyQuaternion(s).dot(this.eye)) > 0.99 && (o.scale.set(1e-10, 1e-10, 1e-10), o.visible = !1), o.name === "Z" && Math.abs(L.copy(Ne).applyQuaternion(s).dot(this.eye)) > 0.99 && (o.scale.set(1e-10, 1e-10, 1e-10), o.visible = !1), o.name === "XY" && Math.abs(L.copy(Ne).applyQuaternion(s).dot(this.eye)) < 0.2 && (o.scale.set(1e-10, 1e-10, 1e-10), o.visible = !1), o.name === "YZ" && Math.abs(L.copy(De).applyQuaternion(s).dot(this.eye)) < 0.2 && (o.scale.set(1e-10, 1e-10, 1e-10), o.visible = !1), o.name === "XZ" && Math.abs(L.copy(ye).applyQuaternion(s).dot(this.eye)) < 0.2 && (o.scale.set(1e-10, 1e-10, 1e-10), o.visible = !1)) : this.mode === "rotate" && ($e.copy(s), L.copy(this.eye).applyQuaternion(O.copy(s).invert()), o.name.search("E") !== -1 && o.quaternion.setFromRotationMatrix(Gt.lookAt(this.eye, zt, ye)), o.name === "X" && (O.setFromAxisAngle(De, Math.atan2(-L.y, L.z)), O.multiplyQuaternions($e, O), o.quaternion.copy(O)), o.name === "Y" && (O.setFromAxisAngle(ye, Math.atan2(L.x, L.z)), O.multiplyQuaternions($e, O), o.quaternion.copy(O)), o.name === "Z" && (O.setFromAxisAngle(Ne, Math.atan2(L.y, L.x)), O.multiplyQuaternions($e, O), o.quaternion.copy(O))), 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,7 +1032,7 @@ class Cs extends Ue {
|
|
|
1032
1032
|
super.updateMatrixWorld(e);
|
|
1033
1033
|
}
|
|
1034
1034
|
}
|
|
1035
|
-
class Ds extends
|
|
1035
|
+
class Ds extends T {
|
|
1036
1036
|
constructor() {
|
|
1037
1037
|
super(
|
|
1038
1038
|
new Nn(1e5, 1e5, 2, 2),
|
|
@@ -1073,10 +1073,10 @@ class Ds extends w {
|
|
|
1073
1073
|
default:
|
|
1074
1074
|
te.set(0, 0, 0);
|
|
1075
1075
|
}
|
|
1076
|
-
te.length() === 0 ? this.quaternion.copy(this.cameraQuaternion) : (Xt.lookAt(
|
|
1076
|
+
te.length() === 0 ? this.quaternion.copy(this.cameraQuaternion) : (Xt.lookAt(H.set(0, 0, 0), te, L), this.quaternion.setFromRotationMatrix(Xt)), super.updateMatrixWorld(e);
|
|
1077
1077
|
}
|
|
1078
1078
|
}
|
|
1079
|
-
const
|
|
1079
|
+
const w = {
|
|
1080
1080
|
mode: "",
|
|
1081
1081
|
/** Three.js 场景 */
|
|
1082
1082
|
scene: null,
|
|
@@ -1095,102 +1095,100 @@ const T = {
|
|
|
1095
1095
|
/** 当前选中的物体 */
|
|
1096
1096
|
selectedObject: null
|
|
1097
1097
|
};
|
|
1098
|
-
let
|
|
1099
|
-
function Ns(r, e = "edit") {
|
|
1100
|
-
|
|
1098
|
+
let ht = !1, Ae = !1, be = null, bt = null, it = null, we = [];
|
|
1099
|
+
function Ns(r, e = "edit", t) {
|
|
1100
|
+
w.container = r, w.mode = e, ks(), js(), t ? ei(t, e) : Hs(), zs(), Us(), Qs(), mn(), e === "edit" && r.addEventListener("click", Ys), window.addEventListener("resize", Xs), t || Gs(), e === "edit" && Fs();
|
|
1101
1101
|
}
|
|
1102
1102
|
function ks() {
|
|
1103
|
-
const r = new
|
|
1104
|
-
r.setSize(
|
|
1103
|
+
const r = new F.WebGLRenderer({ antialias: !0, alpha: !0 });
|
|
1104
|
+
r.setSize(w.container.clientWidth, w.container.clientHeight), r.setPixelRatio(Math.min(window.devicePixelRatio, 2)), w.container.appendChild(r.domElement), w.renderer = r;
|
|
1105
1105
|
}
|
|
1106
1106
|
function js() {
|
|
1107
|
-
|
|
1108
|
-
}
|
|
1109
|
-
function Hs() {
|
|
1110
|
-
const r = new k.GridHelper(30, 30, 8956671, 3364232);
|
|
1111
|
-
r.name = "地板", T.scene.add(r), T.gridHelper = r;
|
|
1107
|
+
w.scene = new F.Scene(), w.scene.name = "sl_scene";
|
|
1112
1108
|
}
|
|
1113
1109
|
function Fs() {
|
|
1114
|
-
const r =
|
|
1115
|
-
|
|
1110
|
+
const r = new F.GridHelper(30, 30, 8956671, 3364232);
|
|
1111
|
+
r.name = "地板", r.userData.type = "initFloor", w.scene.add(r), w.gridHelper = r;
|
|
1112
|
+
}
|
|
1113
|
+
function Hs() {
|
|
1114
|
+
const r = w.container, e = r.clientWidth / r.clientHeight, t = new F.PerspectiveCamera(45, e, 0.1, 1e3);
|
|
1115
|
+
t.position.set(0, 6, 15), t.lookAt(0, 0, 0), w.camera = t;
|
|
1116
1116
|
}
|
|
1117
1117
|
function Us() {
|
|
1118
|
-
const r = new ps(
|
|
1118
|
+
const r = new ps(w.camera, w.renderer.domElement);
|
|
1119
1119
|
r.minDistance = 0, r.maxDistance = 1 / 0, r.addEventListener("start", () => {
|
|
1120
|
-
|
|
1120
|
+
ht = !1;
|
|
1121
1121
|
}), r.addEventListener("change", () => {
|
|
1122
|
-
|
|
1122
|
+
ht = !0;
|
|
1123
1123
|
}), r.addEventListener("end", () => {
|
|
1124
|
-
|
|
1124
|
+
ht && (Ae = !0, setTimeout(() => {
|
|
1125
1125
|
Ae = !1;
|
|
1126
1126
|
}, 200));
|
|
1127
|
-
}),
|
|
1127
|
+
}), w.orbitControls = r;
|
|
1128
1128
|
}
|
|
1129
1129
|
function zs() {
|
|
1130
1130
|
const r = new Ss(
|
|
1131
|
-
|
|
1132
|
-
|
|
1131
|
+
w.camera,
|
|
1132
|
+
w.renderer.domElement
|
|
1133
1133
|
);
|
|
1134
1134
|
r.addEventListener("dragging-changed", (e) => {
|
|
1135
|
-
|
|
1135
|
+
w.orbitControls.enabled = !e.value, e.value || (Ae = !0, setTimeout(() => {
|
|
1136
1136
|
Ae = !1;
|
|
1137
1137
|
}, 200));
|
|
1138
1138
|
}), r.addEventListener("objectChange", () => {
|
|
1139
|
-
|
|
1140
|
-
}),
|
|
1139
|
+
bt && w.selectedObject && bt(w.selectedObject);
|
|
1140
|
+
}), w.scene.add(r.getHelper()), w.transformControls = r;
|
|
1141
1141
|
}
|
|
1142
1142
|
function Gs() {
|
|
1143
|
-
const r = new
|
|
1144
|
-
|
|
1145
|
-
const e = new
|
|
1146
|
-
e.position.set(48, 104, 138),
|
|
1147
|
-
const t = new k.BoxGeometry(1, 1, 1), s = new k.MeshStandardMaterial({ color: 16777215 }), n = new k.Mesh(t, s);
|
|
1148
|
-
n.position.y = 1, n.userData.isMovable = !0, n.name = "默认立方体", rt(n, !0);
|
|
1143
|
+
const r = new F.AmbientLight(16777215, 2);
|
|
1144
|
+
w.scene.add(r);
|
|
1145
|
+
const e = new F.DirectionalLight(16777215, 3);
|
|
1146
|
+
e.position.set(48, 104, 138), w.scene.add(e);
|
|
1149
1147
|
}
|
|
1150
1148
|
function mn() {
|
|
1151
1149
|
var r, e;
|
|
1152
|
-
requestAnimationFrame(mn), us.update(), (r =
|
|
1150
|
+
requestAnimationFrame(mn), us.update(), (r = w.orbitControls) == null || r.update(), (e = w.renderer) == null || e.render(w.scene, w.camera);
|
|
1153
1151
|
}
|
|
1154
1152
|
function Xs() {
|
|
1155
|
-
if (!
|
|
1156
|
-
const r =
|
|
1157
|
-
r === 0 || e === 0 || (
|
|
1153
|
+
if (!w.container || !w.camera || !w.renderer) return;
|
|
1154
|
+
const r = w.container.clientWidth, e = w.container.clientHeight;
|
|
1155
|
+
r === 0 || e === 0 || (w.camera.aspect = r / e, w.camera.updateProjectionMatrix(), w.renderer.setSize(r, e));
|
|
1158
1156
|
}
|
|
1159
|
-
function
|
|
1160
|
-
|
|
1157
|
+
function Mt(r) {
|
|
1158
|
+
w.selectedObject !== r && (w.selectedObject && w.transformControls.detach(), w.selectedObject = r, w.transformControls.attach(r), w.transformControls.setMode("translate"), w.transformControls.showX = !0, w.transformControls.showY = !0, w.transformControls.showZ = !0, be == null || be(r));
|
|
1161
1159
|
}
|
|
1162
1160
|
function gn() {
|
|
1163
|
-
|
|
1161
|
+
w.selectedObject && (w.transformControls.detach(), w.selectedObject = null, be == null || be(null));
|
|
1164
1162
|
}
|
|
1165
1163
|
function Ys(r) {
|
|
1166
1164
|
if (Ae) {
|
|
1167
1165
|
Ae = !1;
|
|
1168
1166
|
return;
|
|
1169
1167
|
}
|
|
1170
|
-
const e =
|
|
1168
|
+
const e = w.renderer.domElement.getBoundingClientRect(), t = new F.Vector2(
|
|
1171
1169
|
(r.clientX - e.left) / e.width * 2 - 1,
|
|
1172
1170
|
-((r.clientY - e.top) / e.height) * 2 + 1
|
|
1173
|
-
), s = new
|
|
1174
|
-
s.setFromCamera(t,
|
|
1171
|
+
), s = new F.Raycaster();
|
|
1172
|
+
s.setFromCamera(t, w.camera);
|
|
1175
1173
|
const n = [];
|
|
1176
|
-
|
|
1174
|
+
w.scene.traverse((o) => {
|
|
1177
1175
|
o.type === "Mesh" && o.userData.isMovable && n.push(o);
|
|
1178
1176
|
});
|
|
1179
1177
|
const i = s.intersectObjects(n);
|
|
1180
|
-
i.length > 0 ?
|
|
1178
|
+
i.length > 0 ? Mt(i[0].object) : gn();
|
|
1181
1179
|
}
|
|
1182
|
-
function
|
|
1183
|
-
|
|
1180
|
+
function vt(r, e = !1) {
|
|
1181
|
+
w.scene.add(r), r.userData.isMovable && (Vs(r), St()), e && w.mode === "edit" && Mt(r);
|
|
1184
1182
|
}
|
|
1185
1183
|
function Bs(r) {
|
|
1186
|
-
|
|
1184
|
+
w.selectedObject === r && gn(), r.parent ? r.parent.remove(r) : w.scene.remove(r), Zs(r), St();
|
|
1187
1185
|
}
|
|
1188
1186
|
function Ks(r) {
|
|
1189
|
-
const e =
|
|
1187
|
+
const e = w.scene.getObjectByProperty("uuid", r);
|
|
1190
1188
|
e && Bs(e);
|
|
1191
1189
|
}
|
|
1192
1190
|
function Vs(r) {
|
|
1193
|
-
r.userData.isMovable && r.parent ===
|
|
1191
|
+
r.userData.isMovable && r.parent === w.scene && (we.includes(r) || we.push(r));
|
|
1194
1192
|
}
|
|
1195
1193
|
function Zs(r) {
|
|
1196
1194
|
const e = we.indexOf(r);
|
|
@@ -1198,7 +1196,7 @@ function Zs(r) {
|
|
|
1198
1196
|
}
|
|
1199
1197
|
function Qs() {
|
|
1200
1198
|
const r = [];
|
|
1201
|
-
|
|
1199
|
+
w.scene.children.forEach((e) => {
|
|
1202
1200
|
e.userData.isMovable && r.push(e);
|
|
1203
1201
|
}), we = r, St();
|
|
1204
1202
|
}
|
|
@@ -1209,7 +1207,7 @@ function qs(r) {
|
|
|
1209
1207
|
be = r;
|
|
1210
1208
|
}
|
|
1211
1209
|
function Ws(r) {
|
|
1212
|
-
|
|
1210
|
+
bt = r;
|
|
1213
1211
|
}
|
|
1214
1212
|
function $s(r) {
|
|
1215
1213
|
it = r;
|
|
@@ -1217,32 +1215,32 @@ function $s(r) {
|
|
|
1217
1215
|
function Js() {
|
|
1218
1216
|
return we;
|
|
1219
1217
|
}
|
|
1220
|
-
function zo() {
|
|
1221
|
-
return T.scene;
|
|
1222
|
-
}
|
|
1223
1218
|
function Go() {
|
|
1224
|
-
return
|
|
1219
|
+
return w.scene;
|
|
1225
1220
|
}
|
|
1226
1221
|
function Xo() {
|
|
1227
|
-
return
|
|
1228
|
-
}
|
|
1229
|
-
function Yo(
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
)
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
const
|
|
1245
|
-
|
|
1222
|
+
return w.camera;
|
|
1223
|
+
}
|
|
1224
|
+
function Yo() {
|
|
1225
|
+
return w.renderer;
|
|
1226
|
+
}
|
|
1227
|
+
function Bo() {
|
|
1228
|
+
const r = w.scene;
|
|
1229
|
+
if (!r) return "{}";
|
|
1230
|
+
let e = r;
|
|
1231
|
+
e = r.clone(), e.children = e.children.filter(
|
|
1232
|
+
(s) => s.userData.type === "initFloor"
|
|
1233
|
+
);
|
|
1234
|
+
const t = e.toJSON();
|
|
1235
|
+
return JSON.stringify(t, null);
|
|
1236
|
+
}
|
|
1237
|
+
function ei(r, e = "edit") {
|
|
1238
|
+
var i;
|
|
1239
|
+
const t = typeof r == "string" ? JSON.parse(r) : r, n = new F.ObjectLoader().parse(t);
|
|
1240
|
+
n.type === "scene" ? w.scene = n : (i = w.scene) == null || i.add(n);
|
|
1241
|
+
}
|
|
1242
|
+
const ti = /^[og]\s*(.+)?/, ni = /^mtllib /, si = /^usemtl /, ii = /^usemap /, Yt = /\s+/, Bt = new M(), ut = new M(), Kt = new M(), Vt = new M(), q = new M(), et = new pe();
|
|
1243
|
+
function oi() {
|
|
1246
1244
|
const r = {
|
|
1247
1245
|
objects: [],
|
|
1248
1246
|
object: {},
|
|
@@ -1351,7 +1349,7 @@ function ii() {
|
|
|
1351
1349
|
},
|
|
1352
1350
|
addFaceNormal: function(e, t, s) {
|
|
1353
1351
|
const n = this.vertices, i = this.object.geometry.normals;
|
|
1354
|
-
Bt.fromArray(n, e),
|
|
1352
|
+
Bt.fromArray(n, e), ut.fromArray(n, t), Kt.fromArray(n, s), q.subVectors(Kt, ut), Vt.subVectors(Bt, ut), q.cross(Vt), q.normalize(), i.push(q.x, q.y, q.z), i.push(q.x, q.y, q.z), i.push(q.x, q.y, q.z);
|
|
1355
1353
|
},
|
|
1356
1354
|
addColor: function(e, t, s) {
|
|
1357
1355
|
const n = this.colors, i = this.object.geometry.colors;
|
|
@@ -1402,7 +1400,7 @@ function ii() {
|
|
|
1402
1400
|
};
|
|
1403
1401
|
return r.startObject("", !1), r;
|
|
1404
1402
|
}
|
|
1405
|
-
class
|
|
1403
|
+
class ri extends ln {
|
|
1406
1404
|
/**
|
|
1407
1405
|
* Constructs a new OBJ loader.
|
|
1408
1406
|
*
|
|
@@ -1421,7 +1419,7 @@ class oi extends ln {
|
|
|
1421
1419
|
* @param {onErrorCallback} onError - Executed when errors occur.
|
|
1422
1420
|
*/
|
|
1423
1421
|
load(e, t, s, n) {
|
|
1424
|
-
const i = this, o = new
|
|
1422
|
+
const i = this, o = new xt(this.manager);
|
|
1425
1423
|
o.setPath(this.path), o.setRequestHeader(this.requestHeader), o.setWithCredentials(this.withCredentials), o.load(e, function(a) {
|
|
1426
1424
|
try {
|
|
1427
1425
|
t(i.parse(a));
|
|
@@ -1446,7 +1444,7 @@ class oi extends ln {
|
|
|
1446
1444
|
* @return {Group} The parsed OBJ.
|
|
1447
1445
|
*/
|
|
1448
1446
|
parse(e) {
|
|
1449
|
-
const t = new
|
|
1447
|
+
const t = new oi();
|
|
1450
1448
|
e.indexOf(`\r
|
|
1451
1449
|
`) !== -1 && (e = e.replace(/\r\n/g, `
|
|
1452
1450
|
`)), e.indexOf(`\\
|
|
@@ -1527,14 +1525,14 @@ class oi extends ln {
|
|
|
1527
1525
|
} else if (u === "p") {
|
|
1528
1526
|
const p = h.slice(1).trim().split(" ");
|
|
1529
1527
|
t.addPointGeometry(p);
|
|
1530
|
-
} else if ((n =
|
|
1528
|
+
} else if ((n = ti.exec(h)) !== null) {
|
|
1531
1529
|
const c = (" " + n[0].slice(1).trim()).slice(1);
|
|
1532
1530
|
t.startObject(c);
|
|
1533
|
-
} else if (
|
|
1531
|
+
} else if (si.test(h))
|
|
1534
1532
|
t.object.startMaterial(h.substring(7).trim(), t.materialLibraries);
|
|
1535
|
-
else if (
|
|
1533
|
+
else if (ni.test(h))
|
|
1536
1534
|
t.materialLibraries.push(h.substring(7).trim());
|
|
1537
|
-
else if (
|
|
1535
|
+
else if (ii.test(h))
|
|
1538
1536
|
console.warn('THREE.OBJLoader: Rendering identifier "usemap" not supported. Textures must be defined in MTL files.');
|
|
1539
1537
|
else if (u === "s") {
|
|
1540
1538
|
if (n = h.split(" "), n.length > 1) {
|
|
@@ -1579,9 +1577,9 @@ class oi extends ln {
|
|
|
1579
1577
|
const S = c[_];
|
|
1580
1578
|
f.addGroup(S.groupStart, S.groupCount, _);
|
|
1581
1579
|
}
|
|
1582
|
-
p ? d = new
|
|
1580
|
+
p ? d = new mt(f, y) : m ? d = new nt(f, y) : d = new T(f, y);
|
|
1583
1581
|
} else
|
|
1584
|
-
p ? d = new
|
|
1582
|
+
p ? d = new mt(f, y[0]) : m ? d = new nt(f, y[0]) : d = new T(f, y[0]);
|
|
1585
1583
|
d.name = h.name, i.add(d);
|
|
1586
1584
|
}
|
|
1587
1585
|
else if (t.vertices.length > 0) {
|
|
@@ -1596,7 +1594,7 @@ class oi extends ln {
|
|
|
1596
1594
|
function Zt(r, e) {
|
|
1597
1595
|
if (e === jn)
|
|
1598
1596
|
return console.warn("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Geometry already defined as triangles."), r;
|
|
1599
|
-
if (e ===
|
|
1597
|
+
if (e === gt || e === cn) {
|
|
1600
1598
|
let t = r.getIndex();
|
|
1601
1599
|
if (t === null) {
|
|
1602
1600
|
const o = [], a = r.getAttribute("position");
|
|
@@ -1608,7 +1606,7 @@ function Zt(r, e) {
|
|
|
1608
1606
|
return console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Undefined position attribute. Processing not possible."), r;
|
|
1609
1607
|
}
|
|
1610
1608
|
const s = t.count - 2, n = [];
|
|
1611
|
-
if (e ===
|
|
1609
|
+
if (e === gt)
|
|
1612
1610
|
for (let o = 1; o <= s; o++)
|
|
1613
1611
|
n.push(t.getX(0)), n.push(t.getX(o)), n.push(t.getX(o + 1));
|
|
1614
1612
|
else
|
|
@@ -1620,7 +1618,7 @@ function Zt(r, e) {
|
|
|
1620
1618
|
} else
|
|
1621
1619
|
return console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Unknown draw mode:", e), r;
|
|
1622
1620
|
}
|
|
1623
|
-
function
|
|
1621
|
+
function ai(r) {
|
|
1624
1622
|
const e = /* @__PURE__ */ new Map(), t = /* @__PURE__ */ new Map(), s = r.clone();
|
|
1625
1623
|
return yn(r, s, function(n, i) {
|
|
1626
1624
|
e.set(i, n), t.set(n, i);
|
|
@@ -1637,7 +1635,7 @@ function yn(r, e, t) {
|
|
|
1637
1635
|
for (let s = 0; s < r.children.length; s++)
|
|
1638
1636
|
yn(r.children[s], e.children[s], t);
|
|
1639
1637
|
}
|
|
1640
|
-
class
|
|
1638
|
+
class li extends ln {
|
|
1641
1639
|
/**
|
|
1642
1640
|
* Constructs a new glTF loader.
|
|
1643
1641
|
*
|
|
@@ -1645,41 +1643,41 @@ class ai extends ln {
|
|
|
1645
1643
|
*/
|
|
1646
1644
|
constructor(e) {
|
|
1647
1645
|
super(e), this.dracoLoader = null, this.ktx2Loader = null, this.meshoptDecoder = null, this.pluginCallbacks = [], this.register(function(t) {
|
|
1648
|
-
return new di(t);
|
|
1649
|
-
}), this.register(function(t) {
|
|
1650
1646
|
return new pi(t);
|
|
1651
1647
|
}), this.register(function(t) {
|
|
1652
|
-
return new
|
|
1648
|
+
return new fi(t);
|
|
1653
1649
|
}), this.register(function(t) {
|
|
1654
1650
|
return new Ei(t);
|
|
1655
1651
|
}), this.register(function(t) {
|
|
1656
1652
|
return new Mi(t);
|
|
1657
1653
|
}), this.register(function(t) {
|
|
1658
|
-
return new
|
|
1654
|
+
return new vi(t);
|
|
1659
1655
|
}), this.register(function(t) {
|
|
1660
1656
|
return new gi(t);
|
|
1661
1657
|
}), this.register(function(t) {
|
|
1662
1658
|
return new yi(t);
|
|
1663
1659
|
}), this.register(function(t) {
|
|
1664
1660
|
return new _i(t);
|
|
1665
|
-
}), this.register(function(t) {
|
|
1666
|
-
return new ui(t);
|
|
1667
1661
|
}), this.register(function(t) {
|
|
1668
1662
|
return new bi(t);
|
|
1669
1663
|
}), this.register(function(t) {
|
|
1670
|
-
return new
|
|
1671
|
-
}), this.register(function(t) {
|
|
1672
|
-
return new Ti(t);
|
|
1664
|
+
return new di(t);
|
|
1673
1665
|
}), this.register(function(t) {
|
|
1674
1666
|
return new wi(t);
|
|
1675
1667
|
}), this.register(function(t) {
|
|
1676
|
-
return new
|
|
1668
|
+
return new mi(t);
|
|
1669
|
+
}), this.register(function(t) {
|
|
1670
|
+
return new xi(t);
|
|
1671
|
+
}), this.register(function(t) {
|
|
1672
|
+
return new Ti(t);
|
|
1673
|
+
}), this.register(function(t) {
|
|
1674
|
+
return new hi(t);
|
|
1677
1675
|
}), this.register(function(t) {
|
|
1678
1676
|
return new Qt(t, R.EXT_MESHOPT_COMPRESSION);
|
|
1679
1677
|
}), this.register(function(t) {
|
|
1680
1678
|
return new Qt(t, R.KHR_MESHOPT_COMPRESSION);
|
|
1681
1679
|
}), this.register(function(t) {
|
|
1682
|
-
return new
|
|
1680
|
+
return new Si(t);
|
|
1683
1681
|
});
|
|
1684
1682
|
}
|
|
1685
1683
|
/**
|
|
@@ -1697,14 +1695,14 @@ class ai extends ln {
|
|
|
1697
1695
|
if (this.resourcePath !== "")
|
|
1698
1696
|
o = this.resourcePath;
|
|
1699
1697
|
else if (this.path !== "") {
|
|
1700
|
-
const h =
|
|
1701
|
-
o =
|
|
1698
|
+
const h = Fe.extractUrlBase(e);
|
|
1699
|
+
o = Fe.resolveURL(h, this.path);
|
|
1702
1700
|
} else
|
|
1703
|
-
o =
|
|
1701
|
+
o = Fe.extractUrlBase(e);
|
|
1704
1702
|
this.manager.itemStart(e);
|
|
1705
1703
|
const a = function(h) {
|
|
1706
1704
|
n ? n(h) : console.error(h), i.manager.itemError(e), i.manager.itemEnd(e);
|
|
1707
|
-
}, l = new
|
|
1705
|
+
}, l = new xt(this.manager);
|
|
1708
1706
|
l.setPath(this.path), l.setResponseType("arraybuffer"), l.setRequestHeader(this.requestHeader), l.setWithCredentials(this.withCredentials), l.load(e, function(h) {
|
|
1709
1707
|
try {
|
|
1710
1708
|
i.parse(h, o, function(u) {
|
|
@@ -1781,7 +1779,7 @@ class ai extends ln {
|
|
|
1781
1779
|
else if (e instanceof ArrayBuffer)
|
|
1782
1780
|
if (l.decode(new Uint8Array(e, 0, 4)) === _n) {
|
|
1783
1781
|
try {
|
|
1784
|
-
o[R.KHR_BINARY_GLTF] = new
|
|
1782
|
+
o[R.KHR_BINARY_GLTF] = new Ri(e);
|
|
1785
1783
|
} catch (c) {
|
|
1786
1784
|
n && n(c);
|
|
1787
1785
|
return;
|
|
@@ -1795,7 +1793,7 @@ class ai extends ln {
|
|
|
1795
1793
|
n && n(new Error("THREE.GLTFLoader: Unsupported asset. glTF versions >=2.0 are supported."));
|
|
1796
1794
|
return;
|
|
1797
1795
|
}
|
|
1798
|
-
const h = new
|
|
1796
|
+
const h = new Ui(i, {
|
|
1799
1797
|
path: t || this.resourcePath || "",
|
|
1800
1798
|
crossOrigin: this.crossOrigin,
|
|
1801
1799
|
requestHeader: this.requestHeader,
|
|
@@ -1813,16 +1811,16 @@ class ai extends ln {
|
|
|
1813
1811
|
const c = i.extensionsUsed[u], p = i.extensionsRequired || [];
|
|
1814
1812
|
switch (c) {
|
|
1815
1813
|
case R.KHR_MATERIALS_UNLIT:
|
|
1816
|
-
o[c] = new
|
|
1814
|
+
o[c] = new ui();
|
|
1817
1815
|
break;
|
|
1818
1816
|
case R.KHR_DRACO_MESH_COMPRESSION:
|
|
1819
|
-
o[c] = new
|
|
1817
|
+
o[c] = new Ai(i, this.dracoLoader);
|
|
1820
1818
|
break;
|
|
1821
1819
|
case R.KHR_TEXTURE_TRANSFORM:
|
|
1822
|
-
o[c] = new
|
|
1820
|
+
o[c] = new Pi();
|
|
1823
1821
|
break;
|
|
1824
1822
|
case R.KHR_MESH_QUANTIZATION:
|
|
1825
|
-
o[c] = new
|
|
1823
|
+
o[c] = new Li();
|
|
1826
1824
|
break;
|
|
1827
1825
|
default:
|
|
1828
1826
|
p.indexOf(c) >= 0 && a[c] === void 0 && console.warn('THREE.GLTFLoader: Unknown extension "' + c + '".');
|
|
@@ -1845,7 +1843,7 @@ class ai extends ln {
|
|
|
1845
1843
|
});
|
|
1846
1844
|
}
|
|
1847
1845
|
}
|
|
1848
|
-
function
|
|
1846
|
+
function ci() {
|
|
1849
1847
|
let r = {};
|
|
1850
1848
|
return {
|
|
1851
1849
|
get: function(e) {
|
|
@@ -1891,7 +1889,7 @@ const R = {
|
|
|
1891
1889
|
KHR_MESHOPT_COMPRESSION: "KHR_meshopt_compression",
|
|
1892
1890
|
EXT_MESH_GPU_INSTANCING: "EXT_mesh_gpu_instancing"
|
|
1893
1891
|
};
|
|
1894
|
-
class
|
|
1892
|
+
class hi {
|
|
1895
1893
|
constructor(e) {
|
|
1896
1894
|
this.parser = e, this.name = R.KHR_LIGHTS_PUNCTUAL, this.cache = { refs: {}, uses: {} };
|
|
1897
1895
|
}
|
|
@@ -1916,10 +1914,10 @@ class ci {
|
|
|
1916
1914
|
h = new Un(u), h.target.position.set(0, 0, -1), h.add(h.target);
|
|
1917
1915
|
break;
|
|
1918
1916
|
case "point":
|
|
1919
|
-
h = new
|
|
1917
|
+
h = new Hn(u), h.distance = c;
|
|
1920
1918
|
break;
|
|
1921
1919
|
case "spot":
|
|
1922
|
-
h = new
|
|
1920
|
+
h = new Fn(u), h.distance = c, l.spot = l.spot || {}, l.spot.innerConeAngle = l.spot.innerConeAngle !== void 0 ? l.spot.innerConeAngle : 0, l.spot.outerConeAngle = l.spot.outerConeAngle !== void 0 ? l.spot.outerConeAngle : Math.PI / 4, h.angle = l.spot.outerConeAngle, h.penumbra = 1 - l.spot.innerConeAngle / l.spot.outerConeAngle, h.target.position.set(0, 0, -1), h.add(h.target);
|
|
1923
1921
|
break;
|
|
1924
1922
|
default:
|
|
1925
1923
|
throw new Error("THREE.GLTFLoader: Unexpected light type: " + l.type);
|
|
@@ -1937,7 +1935,7 @@ class ci {
|
|
|
1937
1935
|
});
|
|
1938
1936
|
}
|
|
1939
1937
|
}
|
|
1940
|
-
class
|
|
1938
|
+
class ui {
|
|
1941
1939
|
constructor() {
|
|
1942
1940
|
this.name = R.KHR_MATERIALS_UNLIT;
|
|
1943
1941
|
}
|
|
@@ -1958,7 +1956,7 @@ class hi {
|
|
|
1958
1956
|
return Promise.all(n);
|
|
1959
1957
|
}
|
|
1960
1958
|
}
|
|
1961
|
-
class
|
|
1959
|
+
class di {
|
|
1962
1960
|
constructor(e) {
|
|
1963
1961
|
this.parser = e, this.name = R.KHR_MATERIALS_EMISSIVE_STRENGTH;
|
|
1964
1962
|
}
|
|
@@ -1967,7 +1965,7 @@ class ui {
|
|
|
1967
1965
|
return s === null || s.emissiveStrength !== void 0 && (t.emissiveIntensity = s.emissiveStrength), Promise.resolve();
|
|
1968
1966
|
}
|
|
1969
1967
|
}
|
|
1970
|
-
class
|
|
1968
|
+
class pi {
|
|
1971
1969
|
constructor(e) {
|
|
1972
1970
|
this.parser = e, this.name = R.KHR_MATERIALS_CLEARCOAT;
|
|
1973
1971
|
}
|
|
@@ -1985,7 +1983,7 @@ class di {
|
|
|
1985
1983
|
return Promise.all(n);
|
|
1986
1984
|
}
|
|
1987
1985
|
}
|
|
1988
|
-
class
|
|
1986
|
+
class fi {
|
|
1989
1987
|
constructor(e) {
|
|
1990
1988
|
this.parser = e, this.name = R.KHR_MATERIALS_DISPERSION;
|
|
1991
1989
|
}
|
|
@@ -1997,7 +1995,7 @@ class pi {
|
|
|
1997
1995
|
return s === null || (t.dispersion = s.dispersion !== void 0 ? s.dispersion : 0), Promise.resolve();
|
|
1998
1996
|
}
|
|
1999
1997
|
}
|
|
2000
|
-
class
|
|
1998
|
+
class mi {
|
|
2001
1999
|
constructor(e) {
|
|
2002
2000
|
this.parser = e, this.name = R.KHR_MATERIALS_IRIDESCENCE;
|
|
2003
2001
|
}
|
|
@@ -2011,7 +2009,7 @@ class fi {
|
|
|
2011
2009
|
return s.iridescenceFactor !== void 0 && (t.iridescence = s.iridescenceFactor), s.iridescenceTexture !== void 0 && n.push(this.parser.assignTexture(t, "iridescenceMap", s.iridescenceTexture)), s.iridescenceIor !== void 0 && (t.iridescenceIOR = s.iridescenceIor), t.iridescenceThicknessRange === void 0 && (t.iridescenceThicknessRange = [100, 400]), s.iridescenceThicknessMinimum !== void 0 && (t.iridescenceThicknessRange[0] = s.iridescenceThicknessMinimum), s.iridescenceThicknessMaximum !== void 0 && (t.iridescenceThicknessRange[1] = s.iridescenceThicknessMaximum), s.iridescenceThicknessTexture !== void 0 && n.push(this.parser.assignTexture(t, "iridescenceThicknessMap", s.iridescenceThicknessTexture)), Promise.all(n);
|
|
2012
2010
|
}
|
|
2013
2011
|
}
|
|
2014
|
-
class
|
|
2012
|
+
class gi {
|
|
2015
2013
|
constructor(e) {
|
|
2016
2014
|
this.parser = e, this.name = R.KHR_MATERIALS_SHEEN;
|
|
2017
2015
|
}
|
|
@@ -2029,7 +2027,7 @@ class mi {
|
|
|
2029
2027
|
return s.sheenRoughnessFactor !== void 0 && (t.sheenRoughness = s.sheenRoughnessFactor), s.sheenColorTexture !== void 0 && n.push(this.parser.assignTexture(t, "sheenColorMap", s.sheenColorTexture, Re)), s.sheenRoughnessTexture !== void 0 && n.push(this.parser.assignTexture(t, "sheenRoughnessMap", s.sheenRoughnessTexture)), Promise.all(n);
|
|
2030
2028
|
}
|
|
2031
2029
|
}
|
|
2032
|
-
class
|
|
2030
|
+
class yi {
|
|
2033
2031
|
constructor(e) {
|
|
2034
2032
|
this.parser = e, this.name = R.KHR_MATERIALS_TRANSMISSION;
|
|
2035
2033
|
}
|
|
@@ -2043,7 +2041,7 @@ class gi {
|
|
|
2043
2041
|
return s.transmissionFactor !== void 0 && (t.transmission = s.transmissionFactor), s.transmissionTexture !== void 0 && n.push(this.parser.assignTexture(t, "transmissionMap", s.transmissionTexture)), Promise.all(n);
|
|
2044
2042
|
}
|
|
2045
2043
|
}
|
|
2046
|
-
class
|
|
2044
|
+
class _i {
|
|
2047
2045
|
constructor(e) {
|
|
2048
2046
|
this.parser = e, this.name = R.KHR_MATERIALS_VOLUME;
|
|
2049
2047
|
}
|
|
@@ -2059,7 +2057,7 @@ class yi {
|
|
|
2059
2057
|
return t.attenuationColor = new pe().setRGB(i[0], i[1], i[2], ae), Promise.all(n);
|
|
2060
2058
|
}
|
|
2061
2059
|
}
|
|
2062
|
-
class
|
|
2060
|
+
class bi {
|
|
2063
2061
|
constructor(e) {
|
|
2064
2062
|
this.parser = e, this.name = R.KHR_MATERIALS_IOR;
|
|
2065
2063
|
}
|
|
@@ -2071,7 +2069,7 @@ class _i {
|
|
|
2071
2069
|
return s === null || (t.ior = s.ior !== void 0 ? s.ior : 1.5, t.ior === 0 && (t.ior = 1e3)), Promise.resolve();
|
|
2072
2070
|
}
|
|
2073
2071
|
}
|
|
2074
|
-
class
|
|
2072
|
+
class wi {
|
|
2075
2073
|
constructor(e) {
|
|
2076
2074
|
this.parser = e, this.name = R.KHR_MATERIALS_SPECULAR;
|
|
2077
2075
|
}
|
|
@@ -2087,7 +2085,7 @@ class bi {
|
|
|
2087
2085
|
return t.specularColor = new pe().setRGB(i[0], i[1], i[2], ae), s.specularColorTexture !== void 0 && n.push(this.parser.assignTexture(t, "specularColorMap", s.specularColorTexture, Re)), Promise.all(n);
|
|
2088
2086
|
}
|
|
2089
2087
|
}
|
|
2090
|
-
class
|
|
2088
|
+
class Ti {
|
|
2091
2089
|
constructor(e) {
|
|
2092
2090
|
this.parser = e, this.name = R.EXT_MATERIALS_BUMP;
|
|
2093
2091
|
}
|
|
@@ -2101,7 +2099,7 @@ class wi {
|
|
|
2101
2099
|
return t.bumpScale = s.bumpFactor !== void 0 ? s.bumpFactor : 1, s.bumpTexture !== void 0 && n.push(this.parser.assignTexture(t, "bumpMap", s.bumpTexture)), Promise.all(n);
|
|
2102
2100
|
}
|
|
2103
2101
|
}
|
|
2104
|
-
class
|
|
2102
|
+
class xi {
|
|
2105
2103
|
constructor(e) {
|
|
2106
2104
|
this.parser = e, this.name = R.KHR_MATERIALS_ANISOTROPY;
|
|
2107
2105
|
}
|
|
@@ -2115,7 +2113,7 @@ class Ti {
|
|
|
2115
2113
|
return s.anisotropyStrength !== void 0 && (t.anisotropy = s.anisotropyStrength), s.anisotropyRotation !== void 0 && (t.anisotropyRotation = s.anisotropyRotation), s.anisotropyTexture !== void 0 && n.push(this.parser.assignTexture(t, "anisotropyMap", s.anisotropyTexture)), Promise.all(n);
|
|
2116
2114
|
}
|
|
2117
2115
|
}
|
|
2118
|
-
class
|
|
2116
|
+
class Ei {
|
|
2119
2117
|
constructor(e) {
|
|
2120
2118
|
this.parser = e, this.name = R.KHR_TEXTURE_BASISU;
|
|
2121
2119
|
}
|
|
@@ -2132,7 +2130,7 @@ class xi {
|
|
|
2132
2130
|
return t.loadTextureImage(e, i.source, o);
|
|
2133
2131
|
}
|
|
2134
2132
|
}
|
|
2135
|
-
class
|
|
2133
|
+
class Mi {
|
|
2136
2134
|
constructor(e) {
|
|
2137
2135
|
this.parser = e, this.name = R.EXT_TEXTURE_WEBP;
|
|
2138
2136
|
}
|
|
@@ -2149,7 +2147,7 @@ class Ei {
|
|
|
2149
2147
|
return s.loadTextureImage(e, o.source, l);
|
|
2150
2148
|
}
|
|
2151
2149
|
}
|
|
2152
|
-
class
|
|
2150
|
+
class vi {
|
|
2153
2151
|
constructor(e) {
|
|
2154
2152
|
this.parser = e, this.name = R.EXT_TEXTURE_AVIF;
|
|
2155
2153
|
}
|
|
@@ -2192,7 +2190,7 @@ class Qt {
|
|
|
2192
2190
|
return null;
|
|
2193
2191
|
}
|
|
2194
2192
|
}
|
|
2195
|
-
class
|
|
2193
|
+
class Si {
|
|
2196
2194
|
constructor(e) {
|
|
2197
2195
|
this.name = R.EXT_MESH_GPU_INSTANCING, this.parser = e;
|
|
2198
2196
|
}
|
|
@@ -2225,7 +2223,7 @@ class vi {
|
|
|
2225
2223
|
}
|
|
2226
2224
|
}
|
|
2227
2225
|
const _n = "glTF", Oe = 12, qt = { JSON: 1313821514, BIN: 5130562 };
|
|
2228
|
-
class
|
|
2226
|
+
class Ri {
|
|
2229
2227
|
constructor(e) {
|
|
2230
2228
|
this.name = R.KHR_BINARY_GLTF, this.content = null, this.body = null;
|
|
2231
2229
|
const t = new DataView(e, 0, Oe), s = new TextDecoder();
|
|
@@ -2256,7 +2254,7 @@ class Si {
|
|
|
2256
2254
|
throw new Error("THREE.GLTFLoader: JSON content not found.");
|
|
2257
2255
|
}
|
|
2258
2256
|
}
|
|
2259
|
-
class
|
|
2257
|
+
class Ai {
|
|
2260
2258
|
constructor(e, t) {
|
|
2261
2259
|
if (!t)
|
|
2262
2260
|
throw new Error("THREE.GLTFLoader: No DRACOLoader instance provided.");
|
|
@@ -2265,11 +2263,11 @@ class Ri {
|
|
|
2265
2263
|
decodePrimitive(e, t) {
|
|
2266
2264
|
const s = this.json, n = this.dracoLoader, i = e.extensions[this.name].bufferView, o = e.extensions[this.name].attributes, a = {}, l = {}, h = {};
|
|
2267
2265
|
for (const u in o) {
|
|
2268
|
-
const c =
|
|
2266
|
+
const c = wt[u] || u.toLowerCase();
|
|
2269
2267
|
a[c] = o[u];
|
|
2270
2268
|
}
|
|
2271
2269
|
for (const u in e.attributes) {
|
|
2272
|
-
const c =
|
|
2270
|
+
const c = wt[u] || u.toLowerCase();
|
|
2273
2271
|
if (o[u] !== void 0) {
|
|
2274
2272
|
const p = s.accessors[e.attributes[u]], m = ve[p.componentType];
|
|
2275
2273
|
h[c] = m.name, l[c] = p.normalized === !0;
|
|
@@ -2288,7 +2286,7 @@ class Ri {
|
|
|
2288
2286
|
});
|
|
2289
2287
|
}
|
|
2290
2288
|
}
|
|
2291
|
-
class
|
|
2289
|
+
class Pi {
|
|
2292
2290
|
constructor() {
|
|
2293
2291
|
this.name = R.KHR_TEXTURE_TRANSFORM;
|
|
2294
2292
|
}
|
|
@@ -2296,7 +2294,7 @@ class Ai {
|
|
|
2296
2294
|
return (t.texCoord === void 0 || t.texCoord === e.channel) && t.offset === void 0 && t.rotation === void 0 && t.scale === void 0 || (e = e.clone(), t.texCoord !== void 0 && (e.channel = t.texCoord), t.offset !== void 0 && e.offset.fromArray(t.offset), t.rotation !== void 0 && (e.rotation = t.rotation), t.scale !== void 0 && e.repeat.fromArray(t.scale), e.needsUpdate = !0), e;
|
|
2297
2295
|
}
|
|
2298
2296
|
}
|
|
2299
|
-
class
|
|
2297
|
+
class Li {
|
|
2300
2298
|
constructor() {
|
|
2301
2299
|
this.name = R.KHR_MESH_QUANTIZATION;
|
|
2302
2300
|
}
|
|
@@ -2320,11 +2318,11 @@ class bn extends ls {
|
|
|
2320
2318
|
return i;
|
|
2321
2319
|
}
|
|
2322
2320
|
}
|
|
2323
|
-
const
|
|
2324
|
-
class
|
|
2321
|
+
const Ii = new K();
|
|
2322
|
+
class Oi extends bn {
|
|
2325
2323
|
interpolate_(e, t, s, n) {
|
|
2326
2324
|
const i = super.interpolate_(e, t, s, n);
|
|
2327
|
-
return
|
|
2325
|
+
return Ii.fromArray(i).normalize().toArray(i), i;
|
|
2328
2326
|
}
|
|
2329
2327
|
}
|
|
2330
2328
|
const W = {
|
|
@@ -2344,7 +2342,7 @@ const W = {
|
|
|
2344
2342
|
5126: Float32Array
|
|
2345
2343
|
}, Wt = {
|
|
2346
2344
|
9728: un,
|
|
2347
|
-
9729:
|
|
2345
|
+
9729: yt,
|
|
2348
2346
|
9984: Qn,
|
|
2349
2347
|
9985: Zn,
|
|
2350
2348
|
9986: Vn,
|
|
@@ -2352,8 +2350,8 @@ const W = {
|
|
|
2352
2350
|
}, $t = {
|
|
2353
2351
|
33071: Wn,
|
|
2354
2352
|
33648: qn,
|
|
2355
|
-
10497:
|
|
2356
|
-
},
|
|
2353
|
+
10497: _t
|
|
2354
|
+
}, dt = {
|
|
2357
2355
|
SCALAR: 1,
|
|
2358
2356
|
VEC2: 2,
|
|
2359
2357
|
VEC3: 3,
|
|
@@ -2361,7 +2359,7 @@ const W = {
|
|
|
2361
2359
|
MAT2: 4,
|
|
2362
2360
|
MAT3: 9,
|
|
2363
2361
|
MAT4: 16
|
|
2364
|
-
},
|
|
2362
|
+
}, wt = {
|
|
2365
2363
|
POSITION: "position",
|
|
2366
2364
|
NORMAL: "normal",
|
|
2367
2365
|
TANGENT: "tangent",
|
|
@@ -2377,18 +2375,18 @@ const W = {
|
|
|
2377
2375
|
translation: "position",
|
|
2378
2376
|
rotation: "quaternion",
|
|
2379
2377
|
weights: "morphTargetInfluences"
|
|
2380
|
-
},
|
|
2378
|
+
}, Ci = {
|
|
2381
2379
|
CUBICSPLINE: void 0,
|
|
2382
2380
|
// We use a custom interpolant (GLTFCubicSplineInterpolation) for CUBICSPLINE tracks. Each
|
|
2383
2381
|
// keyframe track will be initialized with a default interpolation type, then modified.
|
|
2384
2382
|
LINEAR: pn,
|
|
2385
2383
|
STEP: rs
|
|
2386
|
-
},
|
|
2384
|
+
}, pt = {
|
|
2387
2385
|
OPAQUE: "OPAQUE",
|
|
2388
2386
|
MASK: "MASK",
|
|
2389
2387
|
BLEND: "BLEND"
|
|
2390
2388
|
};
|
|
2391
|
-
function
|
|
2389
|
+
function Di(r) {
|
|
2392
2390
|
return r.DefaultMaterial === void 0 && (r.DefaultMaterial = new dn({
|
|
2393
2391
|
color: 16777215,
|
|
2394
2392
|
emissive: 0,
|
|
@@ -2406,7 +2404,7 @@ function ge(r, e, t) {
|
|
|
2406
2404
|
function ne(r, e) {
|
|
2407
2405
|
e.extras !== void 0 && (typeof e.extras == "object" ? Object.assign(r.userData, e.extras) : console.warn("THREE.GLTFLoader: Ignoring primitive type .extras, " + e.extras));
|
|
2408
2406
|
}
|
|
2409
|
-
function
|
|
2407
|
+
function Ni(r, e, t) {
|
|
2410
2408
|
let s = !1, n = !1, i = !1;
|
|
2411
2409
|
for (let h = 0, u = e.length; h < u; h++) {
|
|
2412
2410
|
const c = e[h];
|
|
@@ -2438,7 +2436,7 @@ function Di(r, e, t) {
|
|
|
2438
2436
|
return s && (r.morphAttributes.position = u), n && (r.morphAttributes.normal = c), i && (r.morphAttributes.color = p), r.morphTargetsRelative = !0, r;
|
|
2439
2437
|
});
|
|
2440
2438
|
}
|
|
2441
|
-
function
|
|
2439
|
+
function ki(r, e) {
|
|
2442
2440
|
if (r.updateMorphTargets(), e.weights !== void 0)
|
|
2443
2441
|
for (let t = 0, s = e.weights.length; t < s; t++)
|
|
2444
2442
|
r.morphTargetInfluences[t] = e.weights[t];
|
|
@@ -2452,22 +2450,22 @@ function Ni(r, e) {
|
|
|
2452
2450
|
console.warn("THREE.GLTFLoader: Invalid extras.targetNames length. Ignoring names.");
|
|
2453
2451
|
}
|
|
2454
2452
|
}
|
|
2455
|
-
function
|
|
2453
|
+
function ji(r) {
|
|
2456
2454
|
let e;
|
|
2457
2455
|
const t = r.extensions && r.extensions[R.KHR_DRACO_MESH_COMPRESSION];
|
|
2458
|
-
if (t ? e = "draco:" + t.bufferView + ":" + t.indices + ":" +
|
|
2456
|
+
if (t ? e = "draco:" + t.bufferView + ":" + t.indices + ":" + ft(t.attributes) : e = r.indices + ":" + ft(r.attributes) + ":" + r.mode, r.targets !== void 0)
|
|
2459
2457
|
for (let s = 0, n = r.targets.length; s < n; s++)
|
|
2460
|
-
e += ":" +
|
|
2458
|
+
e += ":" + ft(r.targets[s]);
|
|
2461
2459
|
return e;
|
|
2462
2460
|
}
|
|
2463
|
-
function
|
|
2461
|
+
function ft(r) {
|
|
2464
2462
|
let e = "";
|
|
2465
2463
|
const t = Object.keys(r).sort();
|
|
2466
2464
|
for (let s = 0, n = t.length; s < n; s++)
|
|
2467
2465
|
e += t[s] + ":" + r[t[s]] + ";";
|
|
2468
2466
|
return e;
|
|
2469
2467
|
}
|
|
2470
|
-
function
|
|
2468
|
+
function Tt(r) {
|
|
2471
2469
|
switch (r) {
|
|
2472
2470
|
case Int8Array:
|
|
2473
2471
|
return 1 / 127;
|
|
@@ -2481,13 +2479,13 @@ function xt(r) {
|
|
|
2481
2479
|
throw new Error("THREE.GLTFLoader: Unsupported normalized accessor component type.");
|
|
2482
2480
|
}
|
|
2483
2481
|
}
|
|
2484
|
-
function
|
|
2482
|
+
function Fi(r) {
|
|
2485
2483
|
return r.search(/\.jpe?g($|\?)/i) > 0 || r.search(/^data\:image\/jpeg/) === 0 ? "image/jpeg" : r.search(/\.webp($|\?)/i) > 0 || r.search(/^data\:image\/webp/) === 0 ? "image/webp" : r.search(/\.ktx2($|\?)/i) > 0 || r.search(/^data\:image\/ktx2/) === 0 ? "image/ktx2" : "image/png";
|
|
2486
2484
|
}
|
|
2487
2485
|
const Hi = new Se();
|
|
2488
|
-
class
|
|
2486
|
+
class Ui {
|
|
2489
2487
|
constructor(e = {}, t = {}) {
|
|
2490
|
-
this.json = e, this.extensions = {}, this.plugins = {}, this.options = t, this.cache = new
|
|
2488
|
+
this.json = e, this.extensions = {}, this.plugins = {}, this.options = t, this.cache = new ci(), this.associations = /* @__PURE__ */ new Map(), this.primitiveCache = {}, this.nodeCache = {}, this.meshCache = { refs: {}, uses: {} }, this.cameraCache = { refs: {}, uses: {} }, this.lightCache = { refs: {}, uses: {} }, this.sourceCache = {}, this.textureCache = {}, this.nodeNamesUsed = {};
|
|
2491
2489
|
let s = !1, n = -1, i = !1, o = -1;
|
|
2492
2490
|
if (typeof navigator < "u" && typeof navigator.userAgent < "u") {
|
|
2493
2491
|
const a = navigator.userAgent;
|
|
@@ -2495,7 +2493,7 @@ class Fi {
|
|
|
2495
2493
|
const l = a.match(/Version\/(\d+)/);
|
|
2496
2494
|
n = s && l ? parseInt(l[1], 10) : -1, i = a.indexOf("Firefox") > -1, o = i ? a.match(/Firefox\/([0-9]+)\./)[1] : -1;
|
|
2497
2495
|
}
|
|
2498
|
-
typeof createImageBitmap > "u" || s && n < 17 || i && o < 98 ? this.textureLoader = new Xn(this.options.manager) : this.textureLoader = new Yn(this.options.manager), this.textureLoader.setCrossOrigin(this.options.crossOrigin), this.textureLoader.setRequestHeader(this.options.requestHeader), this.fileLoader = new
|
|
2496
|
+
typeof createImageBitmap > "u" || s && n < 17 || i && o < 98 ? this.textureLoader = new Xn(this.options.manager) : this.textureLoader = new Yn(this.options.manager), this.textureLoader.setCrossOrigin(this.options.crossOrigin), this.textureLoader.setRequestHeader(this.options.requestHeader), this.fileLoader = new xt(this.options.manager), this.fileLoader.setResponseType("arraybuffer"), this.options.crossOrigin === "use-credentials" && this.fileLoader.setWithCredentials(!0);
|
|
2499
2497
|
}
|
|
2500
2498
|
setExtensions(e) {
|
|
2501
2499
|
this.extensions = e;
|
|
@@ -2706,7 +2704,7 @@ class Fi {
|
|
|
2706
2704
|
return Promise.resolve(this.extensions[R.KHR_BINARY_GLTF].body);
|
|
2707
2705
|
const n = this.options;
|
|
2708
2706
|
return new Promise(function(i, o) {
|
|
2709
|
-
s.load(
|
|
2707
|
+
s.load(Fe.resolveURL(t.uri, n.path), i, void 0, function() {
|
|
2710
2708
|
o(new Error('THREE.GLTFLoader: Failed to load buffer "' + t.uri + '".'));
|
|
2711
2709
|
});
|
|
2712
2710
|
});
|
|
@@ -2735,22 +2733,22 @@ class Fi {
|
|
|
2735
2733
|
loadAccessor(e) {
|
|
2736
2734
|
const t = this, s = this.json, n = this.json.accessors[e];
|
|
2737
2735
|
if (n.bufferView === void 0 && n.sparse === void 0) {
|
|
2738
|
-
const o =
|
|
2739
|
-
return Promise.resolve(new
|
|
2736
|
+
const o = dt[n.type], a = ve[n.componentType], l = n.normalized === !0, h = new a(n.count * o);
|
|
2737
|
+
return Promise.resolve(new rt(h, o, l));
|
|
2740
2738
|
}
|
|
2741
2739
|
const i = [];
|
|
2742
2740
|
return n.bufferView !== void 0 ? i.push(this.getDependency("bufferView", n.bufferView)) : i.push(null), n.sparse !== void 0 && (i.push(this.getDependency("bufferView", n.sparse.indices.bufferView)), i.push(this.getDependency("bufferView", n.sparse.values.bufferView))), Promise.all(i).then(function(o) {
|
|
2743
|
-
const a = o[0], l =
|
|
2741
|
+
const a = o[0], l = dt[n.type], h = ve[n.componentType], u = h.BYTES_PER_ELEMENT, c = u * l, p = n.byteOffset || 0, m = n.bufferView !== void 0 ? s.bufferViews[n.bufferView].byteStride : void 0, b = n.normalized === !0;
|
|
2744
2742
|
let f, y;
|
|
2745
2743
|
if (m && m !== c) {
|
|
2746
2744
|
const d = Math.floor(p / m), _ = "InterleavedBuffer:" + n.bufferView + ":" + n.componentType + ":" + d + ":" + n.count;
|
|
2747
2745
|
let x = t.cache.get(_);
|
|
2748
2746
|
x || (f = new h(a, d * m, n.count * m / u), x = new Bn(f, m / u), t.cache.add(_, x)), y = new Kn(x, l, p % m / u, b);
|
|
2749
2747
|
} else
|
|
2750
|
-
a === null ? f = new h(n.count * l) : f = new h(a, p, n.count * l), y = new
|
|
2748
|
+
a === null ? f = new h(n.count * l) : f = new h(a, p, n.count * l), y = new rt(f, l, b);
|
|
2751
2749
|
if (n.sparse !== void 0) {
|
|
2752
|
-
const d =
|
|
2753
|
-
a !== null && (y = new
|
|
2750
|
+
const d = dt.SCALAR, _ = ve[n.sparse.indices.componentType], x = n.sparse.indices.byteOffset || 0, S = n.sparse.values.byteOffset || 0, A = new _(o[1], x, n.sparse.count * d), v = new h(o[2], S, n.sparse.count * l);
|
|
2751
|
+
a !== null && (y = new rt(y.array.slice(), y.itemSize, y.normalized)), y.normalized = !1;
|
|
2754
2752
|
for (let I = 0, ie = A.length; I < ie; I++) {
|
|
2755
2753
|
const ee = A[I];
|
|
2756
2754
|
if (y.setX(ee, v[I * l]), l >= 2 && y.setY(ee, v[I * l + 1]), l >= 3 && y.setZ(ee, v[I * l + 2]), l >= 4 && y.setW(ee, v[I * l + 3]), l >= 5) throw new Error("THREE.GLTFLoader: Unsupported itemSize in sparse BufferAttribute.");
|
|
@@ -2783,7 +2781,7 @@ class Fi {
|
|
|
2783
2781
|
const h = this.loadImageSource(t, s).then(function(u) {
|
|
2784
2782
|
u.flipY = !1, u.name = o.name || a.name || "", u.name === "" && typeof a.uri == "string" && a.uri.startsWith("data:image/") === !1 && (u.name = a.uri);
|
|
2785
2783
|
const p = (i.samplers || {})[o.sampler] || {};
|
|
2786
|
-
return u.magFilter = Wt[p.magFilter] ||
|
|
2784
|
+
return u.magFilter = Wt[p.magFilter] || yt, u.minFilter = Wt[p.minFilter] || hn, u.wrapS = $t[p.wrapS] || _t, u.wrapT = $t[p.wrapT] || _t, u.generateMipmaps = !u.isCompressedTexture && u.minFilter !== un && u.minFilter !== yt, n.associations.set(u, { textures: e }), u;
|
|
2787
2785
|
}).catch(function() {
|
|
2788
2786
|
return null;
|
|
2789
2787
|
});
|
|
@@ -2809,10 +2807,10 @@ class Fi {
|
|
|
2809
2807
|
t.isImageBitmapLoader === !0 && (b = function(f) {
|
|
2810
2808
|
const y = new Lt(f);
|
|
2811
2809
|
y.needsUpdate = !0, p(y);
|
|
2812
|
-
}), t.load(
|
|
2810
|
+
}), t.load(Fe.resolveURL(c, i.path), b, void 0, m);
|
|
2813
2811
|
});
|
|
2814
2812
|
}).then(function(c) {
|
|
2815
|
-
return h === !0 && a.revokeObjectURL(l), ne(c, o), c.userData.mimeType = o.mimeType ||
|
|
2813
|
+
return h === !0 && a.revokeObjectURL(l), ne(c, o), c.userData.mimeType = o.mimeType || Fi(o.uri), c;
|
|
2816
2814
|
}).catch(function(c) {
|
|
2817
2815
|
throw console.error("THREE.GLTFLoader: Couldn't load texture", l), c;
|
|
2818
2816
|
});
|
|
@@ -2903,8 +2901,8 @@ class Fi {
|
|
|
2903
2901
|
})));
|
|
2904
2902
|
}
|
|
2905
2903
|
i.doubleSided === !0 && (a.side = an);
|
|
2906
|
-
const u = i.alphaMode ||
|
|
2907
|
-
if (u ===
|
|
2904
|
+
const u = i.alphaMode || pt.OPAQUE;
|
|
2905
|
+
if (u === pt.BLEND ? (a.transparent = !0, a.depthWrite = !1) : (a.transparent = !1, u === pt.MASK && (a.alphaTest = i.alphaCutoff !== void 0 ? i.alphaCutoff : 0.5)), i.normalTexture !== void 0 && o !== _e && (h.push(t.assignTexture(a, "normalMap", i.normalTexture)), a.normalScale = new V(1, 1), i.normalTexture.scale !== void 0)) {
|
|
2908
2906
|
const c = i.normalTexture.scale;
|
|
2909
2907
|
a.normalScale.set(c, c);
|
|
2910
2908
|
}
|
|
@@ -2946,7 +2944,7 @@ class Fi {
|
|
|
2946
2944
|
}
|
|
2947
2945
|
const o = [];
|
|
2948
2946
|
for (let a = 0, l = e.length; a < l; a++) {
|
|
2949
|
-
const h = e[a], u =
|
|
2947
|
+
const h = e[a], u = ji(h), c = n[u];
|
|
2950
2948
|
if (c)
|
|
2951
2949
|
o.push(c.promise);
|
|
2952
2950
|
else {
|
|
@@ -2966,7 +2964,7 @@ class Fi {
|
|
|
2966
2964
|
loadMesh(e) {
|
|
2967
2965
|
const t = this, s = this.json, n = this.extensions, i = s.meshes[e], o = i.primitives, a = [];
|
|
2968
2966
|
for (let l = 0, h = o.length; l < h; l++) {
|
|
2969
|
-
const u = o[l].material === void 0 ?
|
|
2967
|
+
const u = o[l].material === void 0 ? Di(this.cache) : this.getDependency("material", o[l].material);
|
|
2970
2968
|
a.push(u);
|
|
2971
2969
|
}
|
|
2972
2970
|
return a.push(t.loadGeometries(o)), Promise.all(a).then(function(l) {
|
|
@@ -2976,9 +2974,9 @@ class Fi {
|
|
|
2976
2974
|
let d;
|
|
2977
2975
|
const _ = h[m];
|
|
2978
2976
|
if (y.mode === W.TRIANGLES || y.mode === W.TRIANGLE_STRIP || y.mode === W.TRIANGLE_FAN || y.mode === void 0)
|
|
2979
|
-
d = i.isSkinnedMesh === !0 ? new Jn(f, _) : new
|
|
2977
|
+
d = i.isSkinnedMesh === !0 ? new Jn(f, _) : new T(f, _), d.isSkinnedMesh === !0 && d.normalizeSkinWeights(), y.mode === W.TRIANGLE_STRIP ? d.geometry = Zt(d.geometry, cn) : y.mode === W.TRIANGLE_FAN && (d.geometry = Zt(d.geometry, gt));
|
|
2980
2978
|
else if (y.mode === W.LINES)
|
|
2981
|
-
d = new
|
|
2979
|
+
d = new mt(f, _);
|
|
2982
2980
|
else if (y.mode === W.LINE_STRIP)
|
|
2983
2981
|
d = new re(f, _);
|
|
2984
2982
|
else if (y.mode === W.LINE_LOOP)
|
|
@@ -2987,7 +2985,7 @@ class Fi {
|
|
|
2987
2985
|
d = new nt(f, _);
|
|
2988
2986
|
else
|
|
2989
2987
|
throw new Error("THREE.GLTFLoader: Primitive mode unsupported: " + y.mode);
|
|
2990
|
-
Object.keys(d.geometry.morphAttributes).length > 0 &&
|
|
2988
|
+
Object.keys(d.geometry.morphAttributes).length > 0 && ki(d, i), d.name = t.createUniqueName(i.name || "mesh_" + e), ne(d, i), y.extensions && ge(n, d, y), t.assignFinalMaterial(d), c.push(d);
|
|
2991
2989
|
}
|
|
2992
2990
|
for (let m = 0, b = c.length; m < b; m++)
|
|
2993
2991
|
t.associations.set(c[m], {
|
|
@@ -3169,7 +3167,7 @@ class Fi {
|
|
|
3169
3167
|
return Promise.all(a).then(function(l) {
|
|
3170
3168
|
for (let u = 0, c = l.length; u < c; u++) {
|
|
3171
3169
|
const p = l[u];
|
|
3172
|
-
p.parent !== null ? i.add(
|
|
3170
|
+
p.parent !== null ? i.add(ai(p)) : i.add(p);
|
|
3173
3171
|
}
|
|
3174
3172
|
const h = (u) => {
|
|
3175
3173
|
const c = /* @__PURE__ */ new Map();
|
|
@@ -3214,7 +3212,7 @@ class Fi {
|
|
|
3214
3212
|
}
|
|
3215
3213
|
break;
|
|
3216
3214
|
}
|
|
3217
|
-
const c = n.interpolation !== void 0 ?
|
|
3215
|
+
const c = n.interpolation !== void 0 ? Ci[n.interpolation] : pn, p = this._getArrayFromAccessor(s);
|
|
3218
3216
|
for (let m = 0, b = l.length; m < b; m++) {
|
|
3219
3217
|
const f = new u(
|
|
3220
3218
|
l[m] + "." + ce[i.path],
|
|
@@ -3229,7 +3227,7 @@ class Fi {
|
|
|
3229
3227
|
_getArrayFromAccessor(e) {
|
|
3230
3228
|
let t = e.array;
|
|
3231
3229
|
if (e.normalized) {
|
|
3232
|
-
const s =
|
|
3230
|
+
const s = Tt(t.constructor), n = new Float32Array(t.length);
|
|
3233
3231
|
for (let i = 0, o = t.length; i < o; i++)
|
|
3234
3232
|
n[i] = t[i] * s;
|
|
3235
3233
|
t = n;
|
|
@@ -3238,12 +3236,12 @@ class Fi {
|
|
|
3238
3236
|
}
|
|
3239
3237
|
_createCubicSplineTrackInterpolant(e) {
|
|
3240
3238
|
e.createInterpolant = function(s) {
|
|
3241
|
-
const n = this instanceof Ct ?
|
|
3239
|
+
const n = this instanceof Ct ? Oi : bn;
|
|
3242
3240
|
return new n(this.times, this.values, this.getValueSize() / 3, s);
|
|
3243
3241
|
}, e.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline = !0;
|
|
3244
3242
|
}
|
|
3245
3243
|
}
|
|
3246
|
-
function
|
|
3244
|
+
function zi(r, e, t) {
|
|
3247
3245
|
const s = e.attributes, n = new cs();
|
|
3248
3246
|
if (s.POSITION !== void 0) {
|
|
3249
3247
|
const a = t.json.accessors[s.POSITION], l = a.min, h = a.max;
|
|
@@ -3252,7 +3250,7 @@ function Ui(r, e, t) {
|
|
|
3252
3250
|
new M(l[0], l[1], l[2]),
|
|
3253
3251
|
new M(h[0], h[1], h[2])
|
|
3254
3252
|
), a.normalized) {
|
|
3255
|
-
const u =
|
|
3253
|
+
const u = Tt(ve[a.componentType]);
|
|
3256
3254
|
n.min.multiplyScalar(u), n.max.multiplyScalar(u);
|
|
3257
3255
|
}
|
|
3258
3256
|
} else {
|
|
@@ -3270,7 +3268,7 @@ function Ui(r, e, t) {
|
|
|
3270
3268
|
const p = t.json.accessors[c.POSITION], m = p.min, b = p.max;
|
|
3271
3269
|
if (m !== void 0 && b !== void 0) {
|
|
3272
3270
|
if (l.setX(Math.max(Math.abs(m[0]), Math.abs(b[0]))), l.setY(Math.max(Math.abs(m[1]), Math.abs(b[1]))), l.setZ(Math.max(Math.abs(m[2]), Math.abs(b[2]))), p.normalized) {
|
|
3273
|
-
const f =
|
|
3271
|
+
const f = Tt(ve[p.componentType]);
|
|
3274
3272
|
l.multiplyScalar(f);
|
|
3275
3273
|
}
|
|
3276
3274
|
a.max(l);
|
|
@@ -3292,7 +3290,7 @@ function Jt(r, e, t) {
|
|
|
3292
3290
|
});
|
|
3293
3291
|
}
|
|
3294
3292
|
for (const o in s) {
|
|
3295
|
-
const a =
|
|
3293
|
+
const a = wt[o] || o.toLowerCase();
|
|
3296
3294
|
a in r.attributes || n.push(i(s[o], a));
|
|
3297
3295
|
}
|
|
3298
3296
|
if (e.indices !== void 0 && !r.index) {
|
|
@@ -3301,25 +3299,25 @@ function Jt(r, e, t) {
|
|
|
3301
3299
|
});
|
|
3302
3300
|
n.push(o);
|
|
3303
3301
|
}
|
|
3304
|
-
return Dt.workingColorSpace !== ae && "COLOR_0" in s && console.warn(`THREE.GLTFLoader: Converting vertex colors from "srgb-linear" to "${Dt.workingColorSpace}" not supported.`), ne(r, e),
|
|
3305
|
-
return e.targets !== void 0 ?
|
|
3302
|
+
return Dt.workingColorSpace !== ae && "COLOR_0" in s && console.warn(`THREE.GLTFLoader: Converting vertex colors from "srgb-linear" to "${Dt.workingColorSpace}" not supported.`), ne(r, e), zi(r, e, t), Promise.all(n).then(function() {
|
|
3303
|
+
return e.targets !== void 0 ? Ni(r, e.targets, t) : r;
|
|
3306
3304
|
});
|
|
3307
3305
|
}
|
|
3308
|
-
function zi() {
|
|
3309
|
-
const r = new k.BoxGeometry(1, 1, 1), e = new k.MeshStandardMaterial({ color: 43775 }), t = new k.Mesh(r, e);
|
|
3310
|
-
return t.position.y = 0.5, t.userData.isMovable = !0, t.name = "正方体", rt(t, !0), t;
|
|
3311
|
-
}
|
|
3312
3306
|
function Gi() {
|
|
3313
|
-
const r = new
|
|
3314
|
-
return t.position.y = 0.
|
|
3307
|
+
const r = new F.BoxGeometry(1, 1, 1), e = new F.MeshStandardMaterial({ color: 43775 }), t = new F.Mesh(r, e);
|
|
3308
|
+
return t.position.y = 0.5, t.userData.isMovable = !0, t.name = "正方体", vt(t, !0), t;
|
|
3315
3309
|
}
|
|
3316
|
-
function Xi(
|
|
3310
|
+
function Xi() {
|
|
3311
|
+
const r = new F.SphereGeometry(0.6, 32, 32), e = new F.MeshStandardMaterial({ color: 16746496 }), t = new F.Mesh(r, e);
|
|
3312
|
+
return t.position.y = 0.6, t.userData.isMovable = !0, t.name = "球体", vt(t, !0), t;
|
|
3313
|
+
}
|
|
3314
|
+
function Yi(r) {
|
|
3317
3315
|
return new Promise((e, t) => {
|
|
3318
3316
|
var o;
|
|
3319
3317
|
const s = (o = r.name.split(".").pop()) == null ? void 0 : o.toLowerCase(), n = URL.createObjectURL(r);
|
|
3320
3318
|
let i;
|
|
3321
|
-
if (s === "obj") i = new
|
|
3322
|
-
else if (s === "gltf" || s === "glb") i = new
|
|
3319
|
+
if (s === "obj") i = new ri();
|
|
3320
|
+
else if (s === "gltf" || s === "glb") i = new li();
|
|
3323
3321
|
else {
|
|
3324
3322
|
t(new Error("不支持的文件格式,请使用 .obj, .gltf, .glb"));
|
|
3325
3323
|
return;
|
|
@@ -3332,31 +3330,31 @@ function Xi(r) {
|
|
|
3332
3330
|
var p;
|
|
3333
3331
|
c.userData.isMovable = !0, c.name || (c.name = c.type), c.type === "Mesh" && (c.frustumCulled = !0, (p = c.geometry) == null || p.computeVertexNormals());
|
|
3334
3332
|
});
|
|
3335
|
-
const u = new
|
|
3336
|
-
l.position.sub(u),
|
|
3333
|
+
const u = new F.Box3().setFromObject(l).getCenter(new F.Vector3());
|
|
3334
|
+
l.position.sub(u), vt(l, !0), e(l);
|
|
3337
3335
|
},
|
|
3338
3336
|
void 0,
|
|
3339
3337
|
(a) => t(a)
|
|
3340
3338
|
);
|
|
3341
3339
|
});
|
|
3342
3340
|
}
|
|
3343
|
-
function
|
|
3341
|
+
function Bi(r) {
|
|
3344
3342
|
switch (r) {
|
|
3345
3343
|
case "box":
|
|
3346
|
-
|
|
3344
|
+
Gi();
|
|
3347
3345
|
break;
|
|
3348
3346
|
case "sphere":
|
|
3349
|
-
|
|
3347
|
+
Xi();
|
|
3350
3348
|
break;
|
|
3351
3349
|
}
|
|
3352
3350
|
}
|
|
3353
|
-
const
|
|
3351
|
+
const Ki = {
|
|
3354
3352
|
key: 1,
|
|
3355
3353
|
class: "toggle-placeholder"
|
|
3356
|
-
},
|
|
3354
|
+
}, Vi = { class: "tree-icon" }, Zi = { class: "tree-name" }, Qi = {
|
|
3357
3355
|
key: 0,
|
|
3358
3356
|
class: "tree-children"
|
|
3359
|
-
},
|
|
3357
|
+
}, qi = /* @__PURE__ */ Ge({
|
|
3360
3358
|
__name: "TreeItem",
|
|
3361
3359
|
props: {
|
|
3362
3360
|
node: {},
|
|
@@ -3397,22 +3395,22 @@ const Bi = {
|
|
|
3397
3395
|
ref: n
|
|
3398
3396
|
}, [
|
|
3399
3397
|
g("div", {
|
|
3400
|
-
class:
|
|
3398
|
+
class: He(["tree-item", { selected: u.value }]),
|
|
3401
3399
|
onClick: c
|
|
3402
3400
|
}, [
|
|
3403
3401
|
l.value ? (N(), U("span", {
|
|
3404
3402
|
key: 0,
|
|
3405
3403
|
class: "toggle-icon",
|
|
3406
3404
|
onClick: y[0] || (y[0] = At((_) => Mn(o)(r.node.uuid), ["stop"]))
|
|
3407
|
-
}, Ee(a.value ? "▼" : "▶"), 1)) : (N(), U("span",
|
|
3408
|
-
g("span",
|
|
3409
|
-
g("span",
|
|
3405
|
+
}, Ee(a.value ? "▼" : "▶"), 1)) : (N(), U("span", Ki)),
|
|
3406
|
+
g("span", Vi, Ee(m(r.node)), 1),
|
|
3407
|
+
g("span", Zi, Ee(b(r.node)), 1),
|
|
3410
3408
|
g("button", {
|
|
3411
3409
|
class: "tree-delete",
|
|
3412
3410
|
onClick: At(p, ["stop"])
|
|
3413
3411
|
}, "×")
|
|
3414
3412
|
], 2),
|
|
3415
|
-
a.value && l.value ? (N(), U("div",
|
|
3413
|
+
a.value && l.value ? (N(), U("div", Qi, [
|
|
3416
3414
|
(N(!0), U(en, null, tn(h.value, (_) => (N(), ot(d, {
|
|
3417
3415
|
key: _.uuid,
|
|
3418
3416
|
node: _,
|
|
@@ -3430,8 +3428,8 @@ const Bi = {
|
|
|
3430
3428
|
for (const [s, n] of e)
|
|
3431
3429
|
t[s] = n;
|
|
3432
3430
|
return t;
|
|
3433
|
-
},
|
|
3434
|
-
function
|
|
3431
|
+
}, Wi = /* @__PURE__ */ Xe(qi, [["__scopeId", "data-v-5ad9c842"]]);
|
|
3432
|
+
function $i(r) {
|
|
3435
3433
|
const e = G(/* @__PURE__ */ new Set()), t = (n) => {
|
|
3436
3434
|
const i = new Set(e.value);
|
|
3437
3435
|
i.has(n) ? i.delete(n) : i.add(n), e.value = i;
|
|
@@ -3451,28 +3449,28 @@ function Wi(r) {
|
|
|
3451
3449
|
{ immediate: !0 }
|
|
3452
3450
|
), { expandedSet: e, toggleExpand: t };
|
|
3453
3451
|
}
|
|
3454
|
-
const
|
|
3452
|
+
const Ji = {
|
|
3455
3453
|
key: 0,
|
|
3456
3454
|
class: "property-panel"
|
|
3457
|
-
},
|
|
3455
|
+
}, eo = { class: "property-group tree-group" }, to = { class: "tree-container" }, no = {
|
|
3458
3456
|
key: 0,
|
|
3459
3457
|
class: "tree-empty"
|
|
3460
|
-
},
|
|
3458
|
+
}, so = {
|
|
3461
3459
|
key: 0,
|
|
3462
3460
|
class: "tabs"
|
|
3463
|
-
},
|
|
3461
|
+
}, io = {
|
|
3464
3462
|
key: 1,
|
|
3465
3463
|
class: "tab-content"
|
|
3466
|
-
},
|
|
3464
|
+
}, oo = { class: "property-group" }, ro = { class: "row" }, ao = { class: "property-group" }, lo = { class: "row" }, co = { class: "property-group" }, ho = { class: "row" }, uo = {
|
|
3467
3465
|
key: 0,
|
|
3468
3466
|
class: "property-group material-group"
|
|
3469
|
-
},
|
|
3467
|
+
}, po = { class: "slider-row" }, fo = { class: "slider-value" }, mo = { class: "slider-row" }, go = { class: "slider-value" }, yo = { class: "slider-row" }, _o = { class: "slider-value" }, bo = {
|
|
3470
3468
|
key: 0,
|
|
3471
3469
|
class: "material-hint"
|
|
3472
|
-
},
|
|
3470
|
+
}, wo = {
|
|
3473
3471
|
key: 1,
|
|
3474
3472
|
class: "property-panel empty"
|
|
3475
|
-
},
|
|
3473
|
+
}, To = /* @__PURE__ */ Ge({
|
|
3476
3474
|
__name: "PropertyPanel",
|
|
3477
3475
|
props: {
|
|
3478
3476
|
transform: {},
|
|
@@ -3481,7 +3479,7 @@ const $i = {
|
|
|
3481
3479
|
},
|
|
3482
3480
|
emits: ["propertyChange", "treeSelect", "treeDelete"],
|
|
3483
3481
|
setup(r, { emit: e }) {
|
|
3484
|
-
const t = r, s = e, n = () => s("propertyChange"), i = G("transform"), o = G(0), a = vn(t, "selectedObject"), { expandedSet: l, toggleExpand: h } =
|
|
3482
|
+
const t = r, s = e, n = () => s("propertyChange"), i = G("transform"), o = G(0), a = vn(t, "selectedObject"), { expandedSet: l, toggleExpand: h } = $i(a);
|
|
3485
3483
|
Sn("treeExpand", { expandedSet: l, toggleExpand: h });
|
|
3486
3484
|
const u = (y) => {
|
|
3487
3485
|
o.value++, s("treeDelete", y);
|
|
@@ -3538,12 +3536,12 @@ const $i = {
|
|
|
3538
3536
|
c.metalness = 0, c.roughness = 0.5, c.opacity = 1, p.value = !1;
|
|
3539
3537
|
},
|
|
3540
3538
|
{ immediate: !0 }
|
|
3541
|
-
), (y, d) => r.transform ? (N(), U("div",
|
|
3539
|
+
), (y, d) => r.transform ? (N(), U("div", Ji, [
|
|
3542
3540
|
d[32] || (d[32] = g("h3", null, "属性面板", -1)),
|
|
3543
|
-
g("div",
|
|
3541
|
+
g("div", eo, [
|
|
3544
3542
|
d[15] || (d[15] = g("label", null, "场景物体", -1)),
|
|
3545
|
-
g("div",
|
|
3546
|
-
(N(!0), U(en, null, tn(r.treeData, (_) => (N(), ot(
|
|
3543
|
+
g("div", to, [
|
|
3544
|
+
(N(!0), U(en, null, tn(r.treeData, (_) => (N(), ot(Wi, {
|
|
3547
3545
|
key: _.uuid,
|
|
3548
3546
|
node: _,
|
|
3549
3547
|
"selected-object": r.selectedObject,
|
|
@@ -3551,28 +3549,28 @@ const $i = {
|
|
|
3551
3549
|
onSelect: d[0] || (d[0] = (x) => s("treeSelect", x)),
|
|
3552
3550
|
onDelete: u
|
|
3553
3551
|
}, null, 8, ["node", "selected-object", "version"]))), 128)),
|
|
3554
|
-
r.treeData.length === 0 ? (N(), U("div",
|
|
3552
|
+
r.treeData.length === 0 ? (N(), U("div", no, "暂无物体")) : de("", !0)
|
|
3555
3553
|
])
|
|
3556
3554
|
]),
|
|
3557
3555
|
d[33] || (d[33] = g("div", { class: "property-group" }, [
|
|
3558
3556
|
g("label", null, "全局属性"),
|
|
3559
3557
|
g("div", { class: "row" })
|
|
3560
3558
|
], -1)),
|
|
3561
|
-
r.selectedObject ? (N(), U("div",
|
|
3559
|
+
r.selectedObject ? (N(), U("div", so, [
|
|
3562
3560
|
g("button", {
|
|
3563
|
-
class:
|
|
3561
|
+
class: He(["tab-btn", { active: i.value === "transform" }]),
|
|
3564
3562
|
onClick: d[1] || (d[1] = (_) => i.value = "transform")
|
|
3565
3563
|
}, " 🔄 变换 ", 2),
|
|
3566
3564
|
g("button", {
|
|
3567
|
-
class:
|
|
3565
|
+
class: He(["tab-btn", { active: i.value === "info" }]),
|
|
3568
3566
|
onClick: d[2] || (d[2] = (_) => i.value = "info")
|
|
3569
3567
|
}, " ℹ️ 信息 ", 2)
|
|
3570
3568
|
])) : de("", !0),
|
|
3571
|
-
r.selectedObject ? (N(), U("div",
|
|
3569
|
+
r.selectedObject ? (N(), U("div", io, [
|
|
3572
3570
|
D(g("div", null, [
|
|
3573
|
-
g("div",
|
|
3571
|
+
g("div", oo, [
|
|
3574
3572
|
d[19] || (d[19] = g("label", null, "位置", -1)),
|
|
3575
|
-
g("div",
|
|
3573
|
+
g("div", ro, [
|
|
3576
3574
|
d[16] || (d[16] = g("span", null, "X:", -1)),
|
|
3577
3575
|
D(g("input", {
|
|
3578
3576
|
type: "number",
|
|
@@ -3617,9 +3615,9 @@ const $i = {
|
|
|
3617
3615
|
])
|
|
3618
3616
|
])
|
|
3619
3617
|
]),
|
|
3620
|
-
g("div",
|
|
3618
|
+
g("div", ao, [
|
|
3621
3619
|
d[23] || (d[23] = g("label", null, "旋转 (弧度)", -1)),
|
|
3622
|
-
g("div",
|
|
3620
|
+
g("div", lo, [
|
|
3623
3621
|
d[20] || (d[20] = g("span", null, "X:", -1)),
|
|
3624
3622
|
D(g("input", {
|
|
3625
3623
|
type: "number",
|
|
@@ -3664,9 +3662,9 @@ const $i = {
|
|
|
3664
3662
|
])
|
|
3665
3663
|
])
|
|
3666
3664
|
]),
|
|
3667
|
-
g("div",
|
|
3665
|
+
g("div", co, [
|
|
3668
3666
|
d[27] || (d[27] = g("label", null, "缩放", -1)),
|
|
3669
|
-
g("div",
|
|
3667
|
+
g("div", ho, [
|
|
3670
3668
|
d[24] || (d[24] = g("span", null, "X:", -1)),
|
|
3671
3669
|
D(g("input", {
|
|
3672
3670
|
type: "number",
|
|
@@ -3711,9 +3709,9 @@ const $i = {
|
|
|
3711
3709
|
])
|
|
3712
3710
|
])
|
|
3713
3711
|
]),
|
|
3714
|
-
r.selectedObject ? (N(), U("div",
|
|
3712
|
+
r.selectedObject ? (N(), U("div", uo, [
|
|
3715
3713
|
d[31] || (d[31] = g("label", null, "材质", -1)),
|
|
3716
|
-
g("div",
|
|
3714
|
+
g("div", po, [
|
|
3717
3715
|
d[28] || (d[28] = g("span", { class: "slider-label" }, "金属度", -1)),
|
|
3718
3716
|
D(g("input", {
|
|
3719
3717
|
type: "range",
|
|
@@ -3730,9 +3728,9 @@ const $i = {
|
|
|
3730
3728
|
{ number: !0 }
|
|
3731
3729
|
]
|
|
3732
3730
|
]),
|
|
3733
|
-
g("span",
|
|
3731
|
+
g("span", fo, Ee(c.metalness.toFixed(2)), 1)
|
|
3734
3732
|
]),
|
|
3735
|
-
g("div",
|
|
3733
|
+
g("div", mo, [
|
|
3736
3734
|
d[29] || (d[29] = g("span", { class: "slider-label" }, "粗糙度", -1)),
|
|
3737
3735
|
D(g("input", {
|
|
3738
3736
|
type: "range",
|
|
@@ -3749,9 +3747,9 @@ const $i = {
|
|
|
3749
3747
|
{ number: !0 }
|
|
3750
3748
|
]
|
|
3751
3749
|
]),
|
|
3752
|
-
g("span",
|
|
3750
|
+
g("span", go, Ee(c.roughness.toFixed(2)), 1)
|
|
3753
3751
|
]),
|
|
3754
|
-
g("div",
|
|
3752
|
+
g("div", yo, [
|
|
3755
3753
|
d[30] || (d[30] = g("span", { class: "slider-label" }, "透明度", -1)),
|
|
3756
3754
|
D(g("input", {
|
|
3757
3755
|
type: "range",
|
|
@@ -3768,19 +3766,19 @@ const $i = {
|
|
|
3768
3766
|
{ number: !0 }
|
|
3769
3767
|
]
|
|
3770
3768
|
]),
|
|
3771
|
-
g("span",
|
|
3769
|
+
g("span", _o, Ee(c.opacity.toFixed(2)), 1)
|
|
3772
3770
|
]),
|
|
3773
|
-
p.value ? de("", !0) : (N(), U("div",
|
|
3771
|
+
p.value ? de("", !0) : (N(), U("div", bo, " ⚠️ 当前材质不支持金属度/粗糙度(仅支持 Standard/Phong) "))
|
|
3774
3772
|
])) : de("", !0)
|
|
3775
3773
|
], 512), [
|
|
3776
3774
|
[he, i.value === "transform"]
|
|
3777
3775
|
])
|
|
3778
3776
|
])) : de("", !0)
|
|
3779
|
-
])) : (N(), U("div",
|
|
3777
|
+
])) : (N(), U("div", wo, [...d[34] || (d[34] = [
|
|
3780
3778
|
g("p", null, "未选中任何模型", -1)
|
|
3781
3779
|
])]));
|
|
3782
3780
|
}
|
|
3783
|
-
}),
|
|
3781
|
+
}), xo = /* @__PURE__ */ Xe(To, [["__scopeId", "data-v-d75c643f"]]), Eo = { class: "top-bar" }, Mo = { class: "left-section" }, vo = { class: "dropdown-menu" }, So = { class: "dropdown-menu sub-menu" }, Ro = { class: "dropdown-menu" }, Ao = { class: "dropdown-menu sub-menu" }, Po = { class: "dropdown-menu" }, Lo = { class: "dropdown-menu" }, Io = { class: "dropdown-menu" }, Oo = /* @__PURE__ */ Ge({
|
|
3784
3782
|
__name: "TopBar",
|
|
3785
3783
|
emits: ["addModel", "importModel"],
|
|
3786
3784
|
setup(r, { emit: e }) {
|
|
@@ -3791,26 +3789,26 @@ const $i = {
|
|
|
3791
3789
|
const E = $.target;
|
|
3792
3790
|
E.files && E.files.length > 0 && (h("importModel", E.files[0]), E.value = "");
|
|
3793
3791
|
}, m = () => console.log("新建项目"), b = () => console.log("保存场景"), f = () => console.log("导出模型"), y = () => console.log("撤销"), d = () => console.log("重做"), _ = () => console.log("复制物体"), x = () => console.log("删除物体"), S = () => console.log("重置相机"), A = () => console.log("切换网格"), v = () => console.log("打开帮助"), I = () => console.log("关于编辑器"), ie = () => console.log("打开项目"), ee = () => console.log("打开模型"), fe = () => console.log("打开场景");
|
|
3794
|
-
return ($, E) => (N(), U("div",
|
|
3795
|
-
g("div",
|
|
3792
|
+
return ($, E) => (N(), U("div", Eo, [
|
|
3793
|
+
g("div", Mo, [
|
|
3796
3794
|
g("div", {
|
|
3797
3795
|
class: "dropdown-wrapper",
|
|
3798
|
-
onMouseenter: E[2] || (E[2] = (
|
|
3799
|
-
onMouseleave: E[3] || (E[3] = (
|
|
3796
|
+
onMouseenter: E[2] || (E[2] = (j) => t.value = !0),
|
|
3797
|
+
onMouseleave: E[3] || (E[3] = (j) => t.value = !1)
|
|
3800
3798
|
}, [
|
|
3801
3799
|
E[17] || (E[17] = g("button", { class: "menu-btn" }, "文件", -1)),
|
|
3802
|
-
D(g("div",
|
|
3800
|
+
D(g("div", vo, [
|
|
3803
3801
|
g("div", {
|
|
3804
3802
|
class: "menu-item",
|
|
3805
3803
|
onClick: m
|
|
3806
3804
|
}, "新建"),
|
|
3807
3805
|
g("div", {
|
|
3808
3806
|
class: "menu-item dropdown-wrapper sub-trigger",
|
|
3809
|
-
onMouseenter: E[0] || (E[0] = (
|
|
3810
|
-
onMouseleave: E[1] || (E[1] = (
|
|
3807
|
+
onMouseenter: E[0] || (E[0] = (j) => a.value = !0),
|
|
3808
|
+
onMouseleave: E[1] || (E[1] = (j) => a.value = !1)
|
|
3811
3809
|
}, [
|
|
3812
3810
|
E[16] || (E[16] = g("span", null, "打开", -1)),
|
|
3813
|
-
D(g("div",
|
|
3811
|
+
D(g("div", So, [
|
|
3814
3812
|
g("div", {
|
|
3815
3813
|
class: "menu-item",
|
|
3816
3814
|
onClick: ie
|
|
@@ -3841,29 +3839,29 @@ const $i = {
|
|
|
3841
3839
|
], 32),
|
|
3842
3840
|
g("div", {
|
|
3843
3841
|
class: "dropdown-wrapper",
|
|
3844
|
-
onMouseenter: E[8] || (E[8] = (
|
|
3845
|
-
onMouseleave: E[9] || (E[9] = (
|
|
3842
|
+
onMouseenter: E[8] || (E[8] = (j) => o.value = !0),
|
|
3843
|
+
onMouseleave: E[9] || (E[9] = (j) => o.value = !1)
|
|
3846
3844
|
}, [
|
|
3847
3845
|
E[19] || (E[19] = g("button", { class: "menu-btn" }, "添加", -1)),
|
|
3848
|
-
D(g("div",
|
|
3846
|
+
D(g("div", Ro, [
|
|
3849
3847
|
g("div", {
|
|
3850
3848
|
class: "menu-item",
|
|
3851
3849
|
onClick: y
|
|
3852
3850
|
}, "组"),
|
|
3853
3851
|
g("div", {
|
|
3854
3852
|
class: "menu-item dropdown-wrapper sub-trigger",
|
|
3855
|
-
onMouseenter: E[6] || (E[6] = (
|
|
3856
|
-
onMouseleave: E[7] || (E[7] = (
|
|
3853
|
+
onMouseenter: E[6] || (E[6] = (j) => l.value = !0),
|
|
3854
|
+
onMouseleave: E[7] || (E[7] = (j) => l.value = !1)
|
|
3857
3855
|
}, [
|
|
3858
3856
|
E[18] || (E[18] = g("span", null, "网格", -1)),
|
|
3859
|
-
D(g("div",
|
|
3857
|
+
D(g("div", Ao, [
|
|
3860
3858
|
g("div", {
|
|
3861
3859
|
class: "menu-item",
|
|
3862
|
-
onClick: E[4] || (E[4] = (
|
|
3860
|
+
onClick: E[4] || (E[4] = (j) => h("addModel", "box"))
|
|
3863
3861
|
}, " 正方体 "),
|
|
3864
3862
|
g("div", {
|
|
3865
3863
|
class: "menu-item",
|
|
3866
|
-
onClick: E[5] || (E[5] = (
|
|
3864
|
+
onClick: E[5] || (E[5] = (j) => h("addModel", "sphere"))
|
|
3867
3865
|
}, " 球体 "),
|
|
3868
3866
|
g("div", {
|
|
3869
3867
|
class: "menu-item",
|
|
@@ -3887,11 +3885,11 @@ const $i = {
|
|
|
3887
3885
|
], 32),
|
|
3888
3886
|
g("div", {
|
|
3889
3887
|
class: "dropdown-wrapper",
|
|
3890
|
-
onMouseenter: E[10] || (E[10] = (
|
|
3891
|
-
onMouseleave: E[11] || (E[11] = (
|
|
3888
|
+
onMouseenter: E[10] || (E[10] = (j) => s.value = !0),
|
|
3889
|
+
onMouseleave: E[11] || (E[11] = (j) => s.value = !1)
|
|
3892
3890
|
}, [
|
|
3893
3891
|
E[20] || (E[20] = g("button", { class: "menu-btn" }, "编辑", -1)),
|
|
3894
|
-
D(g("div",
|
|
3892
|
+
D(g("div", Po, [
|
|
3895
3893
|
g("div", {
|
|
3896
3894
|
class: "menu-item",
|
|
3897
3895
|
onClick: y
|
|
@@ -3914,11 +3912,11 @@ const $i = {
|
|
|
3914
3912
|
], 32),
|
|
3915
3913
|
g("div", {
|
|
3916
3914
|
class: "dropdown-wrapper",
|
|
3917
|
-
onMouseenter: E[12] || (E[12] = (
|
|
3918
|
-
onMouseleave: E[13] || (E[13] = (
|
|
3915
|
+
onMouseenter: E[12] || (E[12] = (j) => n.value = !0),
|
|
3916
|
+
onMouseleave: E[13] || (E[13] = (j) => n.value = !1)
|
|
3919
3917
|
}, [
|
|
3920
3918
|
E[21] || (E[21] = g("button", { class: "menu-btn" }, "视图", -1)),
|
|
3921
|
-
D(g("div",
|
|
3919
|
+
D(g("div", Lo, [
|
|
3922
3920
|
g("div", {
|
|
3923
3921
|
class: "menu-item",
|
|
3924
3922
|
onClick: S
|
|
@@ -3933,11 +3931,11 @@ const $i = {
|
|
|
3933
3931
|
], 32),
|
|
3934
3932
|
g("div", {
|
|
3935
3933
|
class: "dropdown-wrapper",
|
|
3936
|
-
onMouseenter: E[14] || (E[14] = (
|
|
3937
|
-
onMouseleave: E[15] || (E[15] = (
|
|
3934
|
+
onMouseenter: E[14] || (E[14] = (j) => i.value = !0),
|
|
3935
|
+
onMouseleave: E[15] || (E[15] = (j) => i.value = !1)
|
|
3938
3936
|
}, [
|
|
3939
3937
|
E[22] || (E[22] = g("button", { class: "menu-btn" }, "帮助", -1)),
|
|
3940
|
-
D(g("div",
|
|
3938
|
+
D(g("div", Io, [
|
|
3941
3939
|
g("div", {
|
|
3942
3940
|
class: "menu-item",
|
|
3943
3941
|
onClick: v
|
|
@@ -3964,10 +3962,10 @@ const $i = {
|
|
|
3964
3962
|
}, null, 544)
|
|
3965
3963
|
]));
|
|
3966
3964
|
}
|
|
3967
|
-
}),
|
|
3965
|
+
}), Co = /* @__PURE__ */ Xe(Oo, [["__scopeId", "data-v-6bb4762f"]]), Do = { class: "bottom-bar" }, No = /* @__PURE__ */ Ge({
|
|
3968
3966
|
__name: "BottomBar",
|
|
3969
3967
|
setup(r) {
|
|
3970
|
-
return (e, t) => (N(), U("div",
|
|
3968
|
+
return (e, t) => (N(), U("div", Do, [...t[0] || (t[0] = [
|
|
3971
3969
|
g("div", { class: "status-left" }, [
|
|
3972
3970
|
g("span", null, "就绪")
|
|
3973
3971
|
], -1),
|
|
@@ -3976,7 +3974,7 @@ const $i = {
|
|
|
3976
3974
|
], -1)
|
|
3977
3975
|
])]));
|
|
3978
3976
|
}
|
|
3979
|
-
}),
|
|
3977
|
+
}), ko = /* @__PURE__ */ Xe(No, [["__scopeId", "data-v-3427bb27"]]), jo = { class: "app-layout" }, Fo = /* @__PURE__ */ Ge({
|
|
3980
3978
|
__name: "DrawingBoard",
|
|
3981
3979
|
props: {
|
|
3982
3980
|
mode: { default: "edit" }
|
|
@@ -4006,9 +4004,9 @@ const $i = {
|
|
|
4006
4004
|
});
|
|
4007
4005
|
const o = () => {
|
|
4008
4006
|
t.value && i(t.value);
|
|
4009
|
-
}, a = (f) =>
|
|
4007
|
+
}, a = (f) => Bi(f), l = async (f) => {
|
|
4010
4008
|
try {
|
|
4011
|
-
await
|
|
4009
|
+
await Yi(f);
|
|
4012
4010
|
} catch (y) {
|
|
4013
4011
|
console.error("导入失败:", y), alert("导入失败:" + y.message);
|
|
4014
4012
|
}
|
|
@@ -4019,24 +4017,24 @@ const $i = {
|
|
|
4019
4017
|
const u = () => {
|
|
4020
4018
|
const f = Js();
|
|
4021
4019
|
f && (h.value = f);
|
|
4022
|
-
}, c = (f) =>
|
|
4020
|
+
}, c = (f) => Mt(f), p = (f) => Ks(f.uuid), m = G(null);
|
|
4023
4021
|
return An(() => {
|
|
4024
4022
|
m.value && Ns(m.value, e.mode), u();
|
|
4025
|
-
}), (f, y) => (N(), U("div",
|
|
4026
|
-
r.mode === "edit" ? (N(), ot(
|
|
4023
|
+
}), (f, y) => (N(), U("div", jo, [
|
|
4024
|
+
r.mode === "edit" ? (N(), ot(Co, {
|
|
4027
4025
|
key: 0,
|
|
4028
4026
|
onAddModel: a,
|
|
4029
4027
|
onImportModel: l
|
|
4030
4028
|
})) : de("", !0),
|
|
4031
4029
|
g("div", {
|
|
4032
|
-
class:
|
|
4030
|
+
class: He(`editor-container editor-container-mode-${r.mode}`)
|
|
4033
4031
|
}, [
|
|
4034
4032
|
g("div", {
|
|
4035
|
-
class:
|
|
4033
|
+
class: He(`canvas canvas-mode-${r.mode}`),
|
|
4036
4034
|
ref_key: "containerRef",
|
|
4037
4035
|
ref: m
|
|
4038
4036
|
}, null, 2),
|
|
4039
|
-
r.mode === "edit" ? (N(), ot(
|
|
4037
|
+
r.mode === "edit" ? (N(), ot(xo, {
|
|
4040
4038
|
key: 0,
|
|
4041
4039
|
transform: s,
|
|
4042
4040
|
"tree-data": h.value,
|
|
@@ -4046,34 +4044,34 @@ const $i = {
|
|
|
4046
4044
|
onTreeDelete: p
|
|
4047
4045
|
}, null, 8, ["transform", "tree-data", "selected-object"])) : de("", !0)
|
|
4048
4046
|
], 2),
|
|
4049
|
-
Pn(
|
|
4047
|
+
Pn(ko)
|
|
4050
4048
|
]));
|
|
4051
4049
|
}
|
|
4052
|
-
}), Ko = /* @__PURE__ */ Xe(
|
|
4050
|
+
}), Ko = /* @__PURE__ */ Xe(Fo, [["__scopeId", "data-v-290e9b49"]]);
|
|
4053
4051
|
export {
|
|
4054
|
-
|
|
4052
|
+
ko as BottomBar,
|
|
4055
4053
|
Ko as DrawingBoard,
|
|
4056
|
-
|
|
4057
|
-
|
|
4058
|
-
|
|
4059
|
-
|
|
4060
|
-
|
|
4061
|
-
|
|
4062
|
-
|
|
4063
|
-
|
|
4064
|
-
|
|
4065
|
-
|
|
4066
|
-
|
|
4054
|
+
xo as PropertyPanel,
|
|
4055
|
+
Co as TopBar,
|
|
4056
|
+
Wi as TreeItem,
|
|
4057
|
+
Gi as addBox,
|
|
4058
|
+
vt as addModel,
|
|
4059
|
+
Bi as addModelByType,
|
|
4060
|
+
Xi as addSphere,
|
|
4061
|
+
Bo as exportSceneToJSON,
|
|
4062
|
+
Xo as getCamera,
|
|
4063
|
+
Yo as getRenderer,
|
|
4064
|
+
Go as getScene,
|
|
4067
4065
|
Js as getSceneObjects,
|
|
4068
|
-
|
|
4069
|
-
Bo as importSceneFromJSON,
|
|
4066
|
+
Yi as importModelFromFile,
|
|
4070
4067
|
Ns as initEditor,
|
|
4068
|
+
ei as loadSceneFromJSON,
|
|
4071
4069
|
$s as onSceneObjectsChangeCallback,
|
|
4072
4070
|
Bs as removeModel,
|
|
4073
4071
|
Ks as removeModelById,
|
|
4074
|
-
|
|
4072
|
+
Mt as selectObject,
|
|
4075
4073
|
qs as setSelectedObjectCallback,
|
|
4076
4074
|
Ws as setTransformChangeCallback,
|
|
4077
|
-
|
|
4075
|
+
$i as useTreeExpand
|
|
4078
4076
|
};
|
|
4079
4077
|
//# sourceMappingURL=three-editor.es.js.map
|