@tomorrowevening/hermes 0.0.103 → 0.0.105
Sign up to get free protection for your applications and to get access to all the features.
package/dist/hermes.es.js
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
import { OrthographicCamera as wi, Scene as Ps, MeshBasicMaterial as
|
1
|
+
import { OrthographicCamera as wi, Scene as Ps, MeshBasicMaterial as Ve, BufferGeometry as ot, Float32BufferAttribute as Ze, Mesh as w, LinearSRGBColorSpace as $i, EventDispatcher as Ds, Texture as In, RepeatWrapping as Qi, WebGLRenderTarget as Ln, Color as Tt, FrontSide as kn, BackSide as Rs, DoubleSide as Ri, NoBlending as Un, NormalBlending as jn, AdditiveBlending as Nn, SubtractiveBlending as zn, MultiplyBlending as Fn, CustomBlending as Hn, AddEquation as Yn, SubtractEquation as Bn, ReverseSubtractEquation as Zn, MinEquation as Gn, MaxEquation as Vn, ZeroFactor as As, OneFactor as Is, SrcColorFactor as Ls, OneMinusSrcColorFactor as ks, SrcAlphaFactor as Us, OneMinusSrcAlphaFactor as js, DstAlphaFactor as Ns, OneMinusDstAlphaFactor as zs, DstColorFactor as Fs, OneMinusDstColorFactor as Hs, SrcAlphaSaturateFactor as Wn, ConstantColorFactor as Ys, OneMinusConstantColorFactor as Bs, ConstantAlphaFactor as Zs, OneMinusConstantAlphaFactor as Gs, Line as xe, LineBasicMaterial as Ai, Ray as Xn, Plane as $n, MathUtils as Qn, Vector3 as O, Controls as Vs, MOUSE as at, TOUCH as rt, Quaternion as fe, Spherical as Si, Vector2 as ae, ShaderMaterial as Ws, GLSL3 as qn, PlaneGeometry as Xs, Raycaster as Xt, Euler as $s, Matrix4 as Kt, Object3D as lt, CylinderGeometry as ce, BoxGeometry as ne, OctahedronGeometry as kt, SphereGeometry as Qs, TorusGeometry as ut, CatmullRomCurve3 as qi, Group as Kn, AxesHelper as Ki, MeshDepthMaterial as Jn, MeshNormalMaterial as er, WebGLRenderer as tr, PerspectiveCamera as hi, CameraHelper as ir, SkinnedMesh as sr, SpotLightHelper as nr, PointLightHelper as rr, HemisphereLightHelper as ar, DirectionalLightHelper as or, Clock as lr, Vector4 as cr, Box3 as hr, Sphere as dr } from "three";
|
2
2
|
import qs, { useState as G, useRef as ee, useEffect as ct, useMemo as Ot, Component as Jt, createRef as Ie, forwardRef as ur } from "react";
|
3
3
|
import { Reorder as Ks } from "framer-motion";
|
4
4
|
const Js = () => {
|
@@ -63,11 +63,11 @@ const ts = () => {
|
|
63
63
|
s?.dispose();
|
64
64
|
}, _r = (s) => {
|
65
65
|
s && (Array.isArray(s) ? s.forEach((e) => e.dispose()) : s.dispose());
|
66
|
-
},
|
66
|
+
}, We = (s) => {
|
67
67
|
if (s) {
|
68
68
|
for (; s.children.length > 0; ) {
|
69
69
|
const e = s.children[0];
|
70
|
-
e.type === "Audio" ? (e.pause(), e.parent && e.parent.remove(e)) :
|
70
|
+
e.type === "Audio" ? (e.pause(), e.parent && e.parent.remove(e)) : We(e);
|
71
71
|
}
|
72
72
|
if (s.parent && s.parent.remove(s), s.isMesh) {
|
73
73
|
const e = s;
|
@@ -105,7 +105,7 @@ class Gt {
|
|
105
105
|
}
|
106
106
|
static renderToCanvas(e) {
|
107
107
|
if (this.material === null) {
|
108
|
-
this.camera = new wi(-0.5, 0.5, 0.5, -0.5, 0, 100), this.scene = new Ps(), this.material = new
|
108
|
+
this.camera = new wi(-0.5, 0.5, 0.5, -0.5, 0, 100), this.scene = new Ps(), this.material = new Ve();
|
109
109
|
const t = new ot();
|
110
110
|
t.setAttribute("position", new Ze([-0.5, -0.5, 0, 1.5, -0.5, 0, -0.5, 1.5, 0], 3)), t.setAttribute("normal", new Ze([0, 0, 1, 0, 0, 1], 3)), t.setAttribute("uv", new Ze([0, 0, 2, 0, 0, 2], 2));
|
111
111
|
const i = new w(t, this.material);
|
@@ -192,7 +192,7 @@ class Ii {
|
|
192
192
|
handleEditor(e, t, i) {
|
193
193
|
}
|
194
194
|
}
|
195
|
-
class
|
195
|
+
class Va extends Ii {
|
196
196
|
selectDropdown(e, t) {
|
197
197
|
this.app.send({
|
198
198
|
event: "selectComponent",
|
@@ -224,7 +224,7 @@ class Wa extends Ii {
|
|
224
224
|
}
|
225
225
|
}
|
226
226
|
}
|
227
|
-
function
|
227
|
+
function Wa(s, e, t) {
|
228
228
|
if (s.editor) {
|
229
229
|
t.ui.restore(), t.onSelectionChange((r) => {
|
230
230
|
r.length < 1 || r.forEach((o) => {
|
@@ -693,8 +693,8 @@ class $a extends Ii {
|
|
693
693
|
groups = /* @__PURE__ */ new Map();
|
694
694
|
dispose() {
|
695
695
|
this.scenes.forEach((e) => {
|
696
|
-
|
697
|
-
}), this.scenes.clear(), this.scene &&
|
696
|
+
We(e);
|
697
|
+
}), this.scenes.clear(), this.scene && We(this.scene), this.renderTargets.forEach((e) => {
|
698
698
|
e.dispose();
|
699
699
|
}), this.renderTargets.clear(), this.renderer?.dispose();
|
700
700
|
}
|
@@ -1486,7 +1486,7 @@ Check the top-level render call using <` + C + ">.");
|
|
1486
1486
|
l && l._owner && l._owner !== oi.current && (I = " It was passed a child from " + me(l._owner.type) + "."), $e(l), v('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', C, I), $e(null);
|
1487
1487
|
}
|
1488
1488
|
}
|
1489
|
-
function
|
1489
|
+
function Vi(l, y) {
|
1490
1490
|
{
|
1491
1491
|
if (typeof l != "object")
|
1492
1492
|
return;
|
@@ -1542,7 +1542,7 @@ Check the top-level render call using <` + C + ">.");
|
|
1542
1542
|
l.ref !== null && ($e(l), v("Invalid attribute `ref` supplied to `React.Fragment`."), $e(null));
|
1543
1543
|
}
|
1544
1544
|
}
|
1545
|
-
function
|
1545
|
+
function Wi(l, y, C, I, z, Y) {
|
1546
1546
|
{
|
1547
1547
|
var U = De(l);
|
1548
1548
|
if (!U) {
|
@@ -1562,21 +1562,21 @@ Check the top-level render call using <` + C + ">.");
|
|
1562
1562
|
if (I)
|
1563
1563
|
if (ri(ge)) {
|
1564
1564
|
for (var Qe = 0; Qe < ge.length; Qe++)
|
1565
|
-
|
1565
|
+
Vi(ge[Qe], l);
|
1566
1566
|
Object.freeze && Object.freeze(ge);
|
1567
1567
|
} else
|
1568
1568
|
v("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
|
1569
1569
|
else
|
1570
|
-
|
1570
|
+
Vi(ge, l);
|
1571
1571
|
}
|
1572
1572
|
return l === i ? Mn(J) : Tn(J), J;
|
1573
1573
|
}
|
1574
1574
|
}
|
1575
1575
|
function Pn(l, y, C) {
|
1576
|
-
return
|
1576
|
+
return Wi(l, y, C, !0);
|
1577
1577
|
}
|
1578
1578
|
function Dn(l, y, C) {
|
1579
|
-
return
|
1579
|
+
return Wi(l, y, C, !1);
|
1580
1580
|
}
|
1581
1581
|
var Rn = Dn, An = Pn;
|
1582
1582
|
mt.Fragment = i, mt.jsx = Rn, mt.jsxs = An;
|
@@ -2473,7 +2473,7 @@ const zr = [
|
|
2473
2473
|
},
|
2474
2474
|
{
|
2475
2475
|
title: "Max",
|
2476
|
-
value:
|
2476
|
+
value: Vn
|
2477
2477
|
}
|
2478
2478
|
], Yr = [
|
2479
2479
|
{
|
@@ -2518,7 +2518,7 @@ const zr = [
|
|
2518
2518
|
},
|
2519
2519
|
{
|
2520
2520
|
title: "Src Alpha Saturate",
|
2521
|
-
value:
|
2521
|
+
value: Wn
|
2522
2522
|
},
|
2523
2523
|
{
|
2524
2524
|
title: "Constant Color",
|
@@ -2652,7 +2652,7 @@ function Gr(s, e, t, i) {
|
|
2652
2652
|
}
|
2653
2653
|
return rn(s) && (n.value = Number(e), n.type = "range", n.min = Math.min(0, n.value), n.max = Math.max(1, n.value), n.step = 0.01), n;
|
2654
2654
|
}
|
2655
|
-
function
|
2655
|
+
function Vr(s, e, t, i) {
|
2656
2656
|
const n = {
|
2657
2657
|
type: "string",
|
2658
2658
|
title: ei(s),
|
@@ -2688,7 +2688,7 @@ function Wr(s, e, t, i) {
|
|
2688
2688
|
}
|
2689
2689
|
}), n;
|
2690
2690
|
}
|
2691
|
-
function
|
2691
|
+
function Wr(s) {
|
2692
2692
|
return s.x !== void 0 && s.y !== void 0 && s.z === void 0;
|
2693
2693
|
}
|
2694
2694
|
function Xr(s) {
|
@@ -2772,7 +2772,7 @@ function wt(s, e, t, i, n = "", a = !1) {
|
|
2772
2772
|
items: h
|
2773
2773
|
};
|
2774
2774
|
} else {
|
2775
|
-
if (
|
2775
|
+
if (Wr(e))
|
2776
2776
|
return {
|
2777
2777
|
title: r,
|
2778
2778
|
prop: o,
|
@@ -2930,7 +2930,7 @@ function as(s, e, t) {
|
|
2930
2930
|
else if (a === "number")
|
2931
2931
|
i.push(Gr(n, r, e, t));
|
2932
2932
|
else if (a === "string")
|
2933
|
-
i.push(
|
2933
|
+
i.push(Vr(n, r, e, t));
|
2934
2934
|
else if (a === "object") {
|
2935
2935
|
const o = wt(n, r, e, t);
|
2936
2936
|
o !== void 0 && i.push(o);
|
@@ -3064,7 +3064,7 @@ function qr(s) {
|
|
3064
3064
|
] })
|
3065
3065
|
] });
|
3066
3066
|
}
|
3067
|
-
function
|
3067
|
+
function Vt(s) {
|
3068
3068
|
let e = s.value;
|
3069
3069
|
e !== void 0 && (e.isColor !== void 0 ? e = es(s.value) : s.type === "color" && (e = es(new Tt(s.value))));
|
3070
3070
|
const [t, i] = G(e), n = ee(null), a = (h) => {
|
@@ -3227,7 +3227,7 @@ class Ee extends Jt {
|
|
3227
3227
|
const i = this.valueOverrides.get(t.title), n = i !== void 0 ? i : t.value;
|
3228
3228
|
e.push(
|
3229
3229
|
/* @__PURE__ */ d.jsx(
|
3230
|
-
|
3230
|
+
Vt,
|
3231
3231
|
{
|
3232
3232
|
title: t.title,
|
3233
3233
|
prop: t.prop,
|
@@ -3433,7 +3433,7 @@ class ea extends xe {
|
|
3433
3433
|
const a = new Ai({ fog: !1 });
|
3434
3434
|
super(n, a), this.light = e, this.color = t, this.type = "RectAreaLightHelper";
|
3435
3435
|
const r = [1, 1, 0, -1, 1, 0, -1, -1, 0, 1, 1, 0, -1, -1, 0, 1, -1, 0], o = new ot();
|
3436
|
-
o.setAttribute("position", new Ze(r, 3)), o.computeBoundingSphere(), this.add(new w(o, new
|
3436
|
+
o.setAttribute("position", new Ze(r, 3)), o.computeBoundingSphere(), this.add(new w(o, new Ve({ side: Rs, fog: !1 })));
|
3437
3437
|
}
|
3438
3438
|
updateMatrixWorld() {
|
3439
3439
|
if (this.scale.set(0.5 * this.light.width, 0.5 * this.light.height, 1), this.color !== void 0)
|
@@ -3459,7 +3459,7 @@ const cs = { type: "change" }, Li = { type: "start" }, an = { type: "end" }, Ut
|
|
3459
3459
|
TOUCH_DOLLY_PAN: 5,
|
3460
3460
|
TOUCH_DOLLY_ROTATE: 6
|
3461
3461
|
}, ui = 1e-6;
|
3462
|
-
class ia extends
|
3462
|
+
class ia extends Vs {
|
3463
3463
|
constructor(e, t = null) {
|
3464
3464
|
super(e, t), this.state = H.NONE, this.enabled = !0, this.target = new O(), this.cursor = new O(), this.minDistance = 0, this.maxDistance = 1 / 0, this.minZoom = 0, this.maxZoom = 1 / 0, this.minTargetRadius = 0, this.maxTargetRadius = 1 / 0, this.minPolarAngle = 0, this.maxPolarAngle = Math.PI, this.minAzimuthAngle = -1 / 0, this.maxAzimuthAngle = 1 / 0, this.enableDamping = !1, this.dampingFactor = 0.05, this.enableZoom = !0, this.zoomSpeed = 1, this.enableRotate = !0, this.rotateSpeed = 1, this.enablePan = !0, this.panSpeed = 1, this.screenSpacePanning = !0, this.keyPanSpeed = 7, this.zoomToCursor = !1, this.autoRotate = !1, this.autoRotateSpeed = 2, this.keys = { LEFT: "ArrowLeft", UP: "ArrowUp", RIGHT: "ArrowRight", BOTTOM: "ArrowDown" }, this.mouseButtons = { LEFT: at.ROTATE, MIDDLE: at.DOLLY, RIGHT: at.PAN }, this.touches = { ONE: rt.ROTATE, TWO: rt.DOLLY_PAN }, this.target0 = this.target.clone(), this.position0 = this.object.position.clone(), this.zoom0 = this.object.zoom, this._domElementKeyEvents = null, this._lastPosition = new O(), this._lastQuaternion = new fe(), this._lastTargetPosition = new O(), this._quat = new fe().setFromUnitVectors(e.up, new O(0, 1, 0)), this._quatInverse = this._quat.clone().invert(), this._spherical = new Si(), this._sphericalDelta = new Si(), this._scale = 1, this._panOffset = new O(), this._rotateStart = new ae(), this._rotateEnd = new ae(), this._rotateDelta = new ae(), this._panStart = new ae(), this._panEnd = new ae(), this._panDelta = new ae(), this._dollyStart = new ae(), this._dollyEnd = new ae(), this._dollyDelta = new ae(), this._dollyDirection = new O(), this._mouse = new ae(), this._performCursorZoom = !1, this._pointers = [], this._pointerPositions = {}, this._controlActive = !1, this._onPointerMove = na.bind(this), this._onPointerDown = sa.bind(this), this._onPointerUp = ra.bind(this), this._onContextMenu = ua.bind(this), this._onMouseWheel = la.bind(this), this._onKeyDown = ca.bind(this), this._onTouchStart = ha.bind(this), this._onTouchMove = da.bind(this), this._onMouseDown = aa.bind(this), this._onMouseMove = oa.bind(this), this._interceptControlDown = pa.bind(this), this._interceptControlUp = ma.bind(this), this.domElement !== null && this.connect(), this.update();
|
3465
3465
|
}
|
@@ -3890,7 +3890,7 @@ function ma(s) {
|
|
3890
3890
|
* (c) 2017 @yomotsu
|
3891
3891
|
* Released under the MIT License.
|
3892
3892
|
*/
|
3893
|
-
const
|
3893
|
+
const W = {
|
3894
3894
|
LEFT: 1,
|
3895
3895
|
RIGHT: 2,
|
3896
3896
|
MIDDLE: 4
|
@@ -4156,12 +4156,12 @@ class Oe extends fa {
|
|
4156
4156
|
if (P < this._interactiveArea.left || P > this._interactiveArea.right || x < this._interactiveArea.top || x > this._interactiveArea.bottom)
|
4157
4157
|
return;
|
4158
4158
|
}
|
4159
|
-
const v = f.pointerType !== "mouse" ? null : (f.buttons &
|
4159
|
+
const v = f.pointerType !== "mouse" ? null : (f.buttons & W.LEFT) === W.LEFT ? W.LEFT : (f.buttons & W.MIDDLE) === W.MIDDLE ? W.MIDDLE : (f.buttons & W.RIGHT) === W.RIGHT ? W.RIGHT : null;
|
4160
4160
|
if (v !== null) {
|
4161
4161
|
const b = this._findPointerByMouseButton(v);
|
4162
4162
|
b && this._disposePointer(b);
|
4163
4163
|
}
|
4164
|
-
if ((f.buttons &
|
4164
|
+
if ((f.buttons & W.LEFT) === W.LEFT && this._lockedPointer)
|
4165
4165
|
return;
|
4166
4166
|
const E = {
|
4167
4167
|
pointerId: f.pointerId,
|
@@ -4189,7 +4189,7 @@ class Oe extends fa {
|
|
4189
4189
|
break;
|
4190
4190
|
}
|
4191
4191
|
else
|
4192
|
-
(!this._isDragging && this._lockedPointer || this._isDragging && (f.buttons &
|
4192
|
+
(!this._isDragging && this._lockedPointer || this._isDragging && (f.buttons & W.LEFT) === W.LEFT) && (this._state = this._state | this.mouseButtons.left), this._isDragging && (f.buttons & W.MIDDLE) === W.MIDDLE && (this._state = this._state | this.mouseButtons.middle), this._isDragging && (f.buttons & W.RIGHT) === W.RIGHT && (this._state = this._state | this.mouseButtons.right);
|
4193
4193
|
g();
|
4194
4194
|
}
|
4195
4195
|
}, c = (f) => {
|
@@ -4285,7 +4285,7 @@ class Oe extends fa {
|
|
4285
4285
|
break;
|
4286
4286
|
}
|
4287
4287
|
else
|
4288
|
-
!this._lockedPointer && (f.buttons &
|
4288
|
+
!this._lockedPointer && (f.buttons & W.LEFT) === W.LEFT && (this._state = this._state | this.mouseButtons.left), (f.buttons & W.MIDDLE) === W.MIDDLE && (this._state = this._state | this.mouseButtons.middle), (f.buttons & W.RIGHT) === W.RIGHT && (this._state = this._state | this.mouseButtons.right);
|
4289
4289
|
((this._state & m.ROTATE) === m.ROTATE || (this._state & m.TOUCH_ROTATE) === m.TOUCH_ROTATE || (this._state & m.TOUCH_DOLLY_ROTATE) === m.TOUCH_DOLLY_ROTATE || (this._state & m.TOUCH_ZOOM_ROTATE) === m.TOUCH_ZOOM_ROTATE) && (this._sphericalEnd.theta = this._spherical.theta, this._sphericalEnd.phi = this._spherical.phi, this._thetaVelocity.value = 0, this._phiVelocity.value = 0), ((this._state & m.TRUCK) === m.TRUCK || (this._state & m.TOUCH_TRUCK) === m.TOUCH_TRUCK || (this._state & m.TOUCH_DOLLY_TRUCK) === m.TOUCH_DOLLY_TRUCK || (this._state & m.TOUCH_ZOOM_TRUCK) === m.TOUCH_ZOOM_TRUCK) && (this._targetEnd.copy(this._target), this._targetVelocity.set(0, 0, 0)), ((this._state & m.DOLLY) === m.DOLLY || (this._state & m.TOUCH_DOLLY) === m.TOUCH_DOLLY || (this._state & m.TOUCH_DOLLY_TRUCK) === m.TOUCH_DOLLY_TRUCK || (this._state & m.TOUCH_DOLLY_OFFSET) === m.TOUCH_DOLLY_OFFSET || (this._state & m.TOUCH_DOLLY_ROTATE) === m.TOUCH_DOLLY_ROTATE) && (this._sphericalEnd.radius = this._spherical.radius, this._radiusVelocity.value = 0), ((this._state & m.ZOOM) === m.ZOOM || (this._state & m.TOUCH_ZOOM) === m.TOUCH_ZOOM || (this._state & m.TOUCH_ZOOM_TRUCK) === m.TOUCH_ZOOM_TRUCK || (this._state & m.TOUCH_ZOOM_OFFSET) === m.TOUCH_ZOOM_OFFSET || (this._state & m.TOUCH_ZOOM_ROTATE) === m.TOUCH_ZOOM_ROTATE) && (this._zoomEnd = this._zoom, this._zoomVelocity.value = 0), ((this._state & m.OFFSET) === m.OFFSET || (this._state & m.TOUCH_OFFSET) === m.TOUCH_OFFSET || (this._state & m.TOUCH_DOLLY_OFFSET) === m.TOUCH_DOLLY_OFFSET || (this._state & m.TOUCH_ZOOM_OFFSET) === m.TOUCH_ZOOM_OFFSET) && (this._focalOffsetEnd.copy(this._focalOffset), this._focalOffsetVelocity.set(0, 0, 0)), this.dispatchEvent({ type: "controlstart" });
|
4290
4290
|
}, g = () => {
|
4291
4291
|
if (!this._enabled || !this._dragNeedsUpdate)
|
@@ -5297,7 +5297,7 @@ const qt = (s) => {
|
|
5297
5297
|
] })
|
5298
5298
|
] });
|
5299
5299
|
});
|
5300
|
-
class va extends
|
5300
|
+
class va extends Ws {
|
5301
5301
|
constructor(e) {
|
5302
5302
|
super({
|
5303
5303
|
extensions: {
|
@@ -5459,7 +5459,7 @@ void main() {
|
|
5459
5459
|
#include <clipping_planes_fragment>
|
5460
5460
|
gl_FragColor = vec4(vec3(vUv, 0.0), 1.0);
|
5461
5461
|
}`;
|
5462
|
-
class Ca extends
|
5462
|
+
class Ca extends Ws {
|
5463
5463
|
constructor() {
|
5464
5464
|
super({
|
5465
5465
|
defines: {
|
@@ -5470,12 +5470,12 @@ class Ca extends Vs {
|
|
5470
5470
|
});
|
5471
5471
|
}
|
5472
5472
|
}
|
5473
|
-
const He = new Xt(), re = new O(), Re = new O(),
|
5473
|
+
const He = new Xt(), re = new O(), Re = new O(), V = new fe(), ys = {
|
5474
5474
|
X: new O(1, 0, 0),
|
5475
5475
|
Y: new O(0, 1, 0),
|
5476
5476
|
Z: new O(0, 0, 1)
|
5477
5477
|
}, bi = { type: "change" }, bs = { type: "mouseDown", mode: null }, Es = { type: "mouseUp", mode: null }, Cs = { type: "objectChange" };
|
5478
|
-
class wa extends
|
5478
|
+
class wa extends Vs {
|
5479
5479
|
constructor(e, t = null) {
|
5480
5480
|
super(void 0, t);
|
5481
5481
|
const i = new Pa(this);
|
@@ -5532,7 +5532,7 @@ class wa extends Ws {
|
|
5532
5532
|
const r = Ei(this._plane, He, !0);
|
5533
5533
|
if (r) {
|
5534
5534
|
if (this.pointEnd.copy(r.point).sub(this.worldPositionStart), i === "translate")
|
5535
|
-
this._offset.copy(this.pointEnd).sub(this.pointStart), a === "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), a === "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 && (a === "local" && (n.position.applyQuaternion(
|
5535
|
+
this._offset.copy(this.pointEnd).sub(this.pointStart), a === "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), a === "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 && (a === "local" && (n.position.applyQuaternion(V.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)), a === "world" && (n.parent && n.position.add(re.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(re.setFromMatrixPosition(n.parent.matrixWorld))));
|
5536
5536
|
else if (i === "scale") {
|
5537
5537
|
if (t.search("XYZ") !== -1) {
|
5538
5538
|
let o = this.pointEnd.length() / this.pointStart.length();
|
@@ -5544,7 +5544,7 @@ class wa extends Ws {
|
|
5544
5544
|
this._offset.copy(this.pointEnd).sub(this.pointStart);
|
5545
5545
|
const o = 20 / this.worldPosition.distanceTo(re.setFromMatrixPosition(this.camera.matrixWorld));
|
5546
5546
|
let c = !1;
|
5547
|
-
t === "XYZE" ? (this.rotationAxis.copy(this._offset).cross(this.eye).normalize(), this.rotationAngle = this._offset.dot(re.copy(this.rotationAxis).cross(this.eye)) * o) : (t === "X" || t === "Y" || t === "Z") && (this.rotationAxis.copy(ys[t]), re.copy(ys[t]), a === "local" && re.applyQuaternion(this.worldQuaternion), re.cross(this.eye), re.length() === 0 ? c = !0 : this.rotationAngle = this._offset.dot(re.normalize()) * o), (t === "E" || c) && (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), a === "local" && t !== "E" && t !== "XYZE" ? (n.quaternion.copy(this._quaternionStart), n.quaternion.multiply(
|
5547
|
+
t === "XYZE" ? (this.rotationAxis.copy(this._offset).cross(this.eye).normalize(), this.rotationAngle = this._offset.dot(re.copy(this.rotationAxis).cross(this.eye)) * o) : (t === "X" || t === "Y" || t === "Z") && (this.rotationAxis.copy(ys[t]), re.copy(ys[t]), a === "local" && re.applyQuaternion(this.worldQuaternion), re.cross(this.eye), re.length() === 0 ? c = !0 : this.rotationAngle = this._offset.dot(re.normalize()) * o), (t === "E" || c) && (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), a === "local" && t !== "E" && t !== "XYZE" ? (n.quaternion.copy(this._quaternionStart), n.quaternion.multiply(V.setFromAxisAngle(this.rotationAxis, this.rotationAngle)).normalize()) : (this.rotationAxis.applyQuaternion(this._parentQuaternionInv), n.quaternion.copy(V.setFromAxisAngle(this.rotationAxis, this.rotationAngle)), n.quaternion.multiply(this._quaternionStart).normalize());
|
5548
5548
|
}
|
5549
5549
|
this.dispatchEvent(bi), this.dispatchEvent(Cs);
|
5550
5550
|
}
|
@@ -5635,7 +5635,7 @@ function Ei(s, e, t) {
|
|
5635
5635
|
return i[n];
|
5636
5636
|
return !1;
|
5637
5637
|
}
|
5638
|
-
const Ht = new $s(), B = new O(0, 1, 0), ws = new O(0, 0, 0), Ss = new Kt(), Yt = new fe(),
|
5638
|
+
const Ht = new $s(), B = new O(0, 1, 0), ws = new O(0, 0, 0), Ss = new Kt(), Yt = new fe(), Wt = new fe(), Se = new O(), xs = new Kt(), St = new O(1, 0, 0), Be = new O(0, 1, 0), xt = new O(0, 0, 1), Bt = new O(), Et = new O(), Ct = new O();
|
5639
5639
|
class Pa extends lt {
|
5640
5640
|
constructor(e) {
|
5641
5641
|
super(), this.isTransformControlsRoot = !0, this.controls = e, this.visible = !1;
|
@@ -5649,7 +5649,7 @@ class Pa extends lt {
|
|
5649
5649
|
class Da extends lt {
|
5650
5650
|
constructor() {
|
5651
5651
|
super(), this.isTransformControlsGizmo = !0, this.type = "TransformControlsGizmo";
|
5652
|
-
const e = new
|
5652
|
+
const e = new Ve({
|
5653
5653
|
depthTest: !1,
|
5654
5654
|
depthWrite: !1,
|
5655
5655
|
fog: !1,
|
@@ -5886,7 +5886,7 @@ class Da extends lt {
|
|
5886
5886
|
}
|
5887
5887
|
// updateMatrixWorld will update transformations and appearance of individual handles
|
5888
5888
|
updateMatrixWorld(e) {
|
5889
|
-
const i = (this.mode === "scale" ? "local" : this.space) === "local" ? this.worldQuaternion :
|
5889
|
+
const i = (this.mode === "scale" ? "local" : this.space) === "local" ? this.worldQuaternion : Wt;
|
5890
5890
|
this.gizmo.translate.visible = this.mode === "translate", this.gizmo.rotate.visible = this.mode === "rotate", this.gizmo.scale.visible = this.mode === "scale", this.helper.translate.visible = this.mode === "translate", this.helper.rotate.visible = this.mode === "rotate", this.helper.scale.visible = this.mode === "scale";
|
5891
5891
|
let n = [];
|
5892
5892
|
n = n.concat(this.picker[this.mode].children), n = n.concat(this.gizmo[this.mode].children), n = n.concat(this.helper[this.mode].children);
|
@@ -5895,10 +5895,10 @@ class Da extends lt {
|
|
5895
5895
|
r.visible = !0, r.rotation.set(0, 0, 0), r.position.copy(this.worldPosition);
|
5896
5896
|
let o;
|
5897
5897
|
if (this.camera.isOrthographicCamera ? o = (this.camera.top - this.camera.bottom) / this.camera.zoom : o = this.worldPosition.distanceTo(this.cameraPosition) * Math.min(1.9 * Math.tan(Math.PI * this.camera.fov / 360) / this.camera.zoom, 7), r.scale.set(1, 1, 1).multiplyScalar(o * this.size / 4), r.tag === "helper") {
|
5898
|
-
r.visible = !1, r.name === "AXIS" ? (r.visible = !!this.axis, this.axis === "X" && (
|
5898
|
+
r.visible = !1, r.name === "AXIS" ? (r.visible = !!this.axis, this.axis === "X" && (V.setFromEuler(Ht.set(0, 0, 0)), r.quaternion.copy(i).multiply(V), Math.abs(B.copy(St).applyQuaternion(i).dot(this.eye)) > 0.9 && (r.visible = !1)), this.axis === "Y" && (V.setFromEuler(Ht.set(0, 0, Math.PI / 2)), r.quaternion.copy(i).multiply(V), Math.abs(B.copy(Be).applyQuaternion(i).dot(this.eye)) > 0.9 && (r.visible = !1)), this.axis === "Z" && (V.setFromEuler(Ht.set(0, Math.PI / 2, 0)), r.quaternion.copy(i).multiply(V), Math.abs(B.copy(xt).applyQuaternion(i).dot(this.eye)) > 0.9 && (r.visible = !1)), this.axis === "XYZE" && (V.setFromEuler(Ht.set(0, Math.PI / 2, 0)), B.copy(this.rotationAxis), r.quaternion.setFromRotationMatrix(Ss.lookAt(ws, B, Be)), r.quaternion.multiply(V), r.visible = this.dragging), this.axis === "E" && (r.visible = !1)) : r.name === "START" ? (r.position.copy(this.worldPositionStart), r.visible = this.dragging) : r.name === "END" ? (r.position.copy(this.worldPosition), r.visible = this.dragging) : r.name === "DELTA" ? (r.position.copy(this.worldPositionStart), r.quaternion.copy(this.worldQuaternionStart), re.set(1e-10, 1e-10, 1e-10).add(this.worldPositionStart).sub(this.worldPosition).multiplyScalar(-1), re.applyQuaternion(this.worldQuaternionStart.clone().invert()), r.scale.copy(re), r.visible = this.dragging) : (r.quaternion.copy(i), this.dragging ? r.position.copy(this.worldPositionStart) : r.position.copy(this.worldPosition), this.axis && (r.visible = this.axis.search(r.name) !== -1));
|
5899
5899
|
continue;
|
5900
5900
|
}
|
5901
|
-
r.quaternion.copy(i), this.mode === "translate" || this.mode === "scale" ? (r.name === "X" && Math.abs(B.copy(St).applyQuaternion(i).dot(this.eye)) > 0.99 && (r.scale.set(1e-10, 1e-10, 1e-10), r.visible = !1), r.name === "Y" && Math.abs(B.copy(Be).applyQuaternion(i).dot(this.eye)) > 0.99 && (r.scale.set(1e-10, 1e-10, 1e-10), r.visible = !1), r.name === "Z" && Math.abs(B.copy(xt).applyQuaternion(i).dot(this.eye)) > 0.99 && (r.scale.set(1e-10, 1e-10, 1e-10), r.visible = !1), r.name === "XY" && Math.abs(B.copy(xt).applyQuaternion(i).dot(this.eye)) < 0.2 && (r.scale.set(1e-10, 1e-10, 1e-10), r.visible = !1), r.name === "YZ" && Math.abs(B.copy(St).applyQuaternion(i).dot(this.eye)) < 0.2 && (r.scale.set(1e-10, 1e-10, 1e-10), r.visible = !1), r.name === "XZ" && Math.abs(B.copy(Be).applyQuaternion(i).dot(this.eye)) < 0.2 && (r.scale.set(1e-10, 1e-10, 1e-10), r.visible = !1)) : this.mode === "rotate" && (Yt.copy(i), B.copy(this.eye).applyQuaternion(
|
5901
|
+
r.quaternion.copy(i), this.mode === "translate" || this.mode === "scale" ? (r.name === "X" && Math.abs(B.copy(St).applyQuaternion(i).dot(this.eye)) > 0.99 && (r.scale.set(1e-10, 1e-10, 1e-10), r.visible = !1), r.name === "Y" && Math.abs(B.copy(Be).applyQuaternion(i).dot(this.eye)) > 0.99 && (r.scale.set(1e-10, 1e-10, 1e-10), r.visible = !1), r.name === "Z" && Math.abs(B.copy(xt).applyQuaternion(i).dot(this.eye)) > 0.99 && (r.scale.set(1e-10, 1e-10, 1e-10), r.visible = !1), r.name === "XY" && Math.abs(B.copy(xt).applyQuaternion(i).dot(this.eye)) < 0.2 && (r.scale.set(1e-10, 1e-10, 1e-10), r.visible = !1), r.name === "YZ" && Math.abs(B.copy(St).applyQuaternion(i).dot(this.eye)) < 0.2 && (r.scale.set(1e-10, 1e-10, 1e-10), r.visible = !1), r.name === "XZ" && Math.abs(B.copy(Be).applyQuaternion(i).dot(this.eye)) < 0.2 && (r.scale.set(1e-10, 1e-10, 1e-10), r.visible = !1)) : this.mode === "rotate" && (Yt.copy(i), B.copy(this.eye).applyQuaternion(V.copy(i).invert()), r.name.search("E") !== -1 && r.quaternion.setFromRotationMatrix(Ss.lookAt(this.eye, ws, Be)), r.name === "X" && (V.setFromAxisAngle(St, Math.atan2(-B.y, B.z)), V.multiplyQuaternions(Yt, V), r.quaternion.copy(V)), r.name === "Y" && (V.setFromAxisAngle(Be, Math.atan2(B.x, B.z)), V.multiplyQuaternions(Yt, V), r.quaternion.copy(V)), r.name === "Z" && (V.setFromAxisAngle(xt, Math.atan2(B.y, B.x)), V.multiplyQuaternions(Yt, V), r.quaternion.copy(V))), r.visible = r.visible && (r.name.indexOf("X") === -1 || this.showX), r.visible = r.visible && (r.name.indexOf("Y") === -1 || this.showY), r.visible = r.visible && (r.name.indexOf("Z") === -1 || this.showZ), r.visible = r.visible && (r.name.indexOf("E") === -1 || this.showX && this.showY && this.showZ), r.material._color = r.material._color || r.material.color.clone(), r.material._opacity = r.material._opacity || r.material.opacity, r.material.color.copy(r.material._color), r.material.opacity = r.material._opacity, this.enabled && this.axis && (r.name === this.axis || this.axis.split("").some(function(c) {
|
5902
5902
|
return r.name === c;
|
5903
5903
|
})) && (r.material.color.setHex(16776960), r.material.opacity = 1);
|
5904
5904
|
}
|
@@ -5909,12 +5909,12 @@ class Ra extends w {
|
|
5909
5909
|
constructor() {
|
5910
5910
|
super(
|
5911
5911
|
new Xs(1e5, 1e5, 2, 2),
|
5912
|
-
new
|
5912
|
+
new Ve({ visible: !1, wireframe: !0, side: Ri, transparent: !0, opacity: 0.1, toneMapped: !1 })
|
5913
5913
|
), this.isTransformControlsPlane = !0, this.type = "TransformControlsPlane";
|
5914
5914
|
}
|
5915
5915
|
updateMatrixWorld(e) {
|
5916
5916
|
let t = this.space;
|
5917
|
-
switch (this.position.copy(this.worldPosition), this.mode === "scale" && (t = "local"), Bt.copy(St).applyQuaternion(t === "local" ? this.worldQuaternion :
|
5917
|
+
switch (this.position.copy(this.worldPosition), this.mode === "scale" && (t = "local"), Bt.copy(St).applyQuaternion(t === "local" ? this.worldQuaternion : Wt), Et.copy(Be).applyQuaternion(t === "local" ? this.worldQuaternion : Wt), Ct.copy(xt).applyQuaternion(t === "local" ? this.worldQuaternion : Wt), B.copy(Et), this.mode) {
|
5918
5918
|
case "translate":
|
5919
5919
|
case "scale":
|
5920
5920
|
switch (this.axis) {
|
@@ -5957,7 +5957,6 @@ class pe extends Ds {
|
|
5957
5957
|
activeCamera;
|
5958
5958
|
controls = /* @__PURE__ */ new Map();
|
5959
5959
|
visibility = /* @__PURE__ */ new Map();
|
5960
|
-
groups = [];
|
5961
5960
|
clear() {
|
5962
5961
|
for (const e of this.controls.values()) {
|
5963
5962
|
e.detach(), e.dispose();
|
@@ -5974,80 +5973,8 @@ class pe extends Ds {
|
|
5974
5973
|
this.dispatchEvent({ type: pe.DRAG_START });
|
5975
5974
|
}), t.addEventListener("mouseUp", () => {
|
5976
5975
|
this.dispatchEvent({ type: pe.DRAG_END });
|
5977
|
-
}), t.addEventListener("dragging-changed", (
|
5978
|
-
Pe.instance?.toggleOrbitControls(
|
5979
|
-
});
|
5980
|
-
const n = `Controls: ${e}`;
|
5981
|
-
this.groups.push(n), this.three.addGroup({
|
5982
|
-
title: n,
|
5983
|
-
items: [
|
5984
|
-
{
|
5985
|
-
type: "boolean",
|
5986
|
-
prop: "enabled",
|
5987
|
-
value: t.enabled
|
5988
|
-
},
|
5989
|
-
{
|
5990
|
-
type: "boolean",
|
5991
|
-
prop: "visible",
|
5992
|
-
value: !0
|
5993
|
-
},
|
5994
|
-
{
|
5995
|
-
type: "button",
|
5996
|
-
prop: "Reset"
|
5997
|
-
},
|
5998
|
-
{
|
5999
|
-
type: "option",
|
6000
|
-
prop: "Mode",
|
6001
|
-
options: [
|
6002
|
-
{
|
6003
|
-
title: "Translate",
|
6004
|
-
value: "translate"
|
6005
|
-
},
|
6006
|
-
{
|
6007
|
-
title: "Rotate",
|
6008
|
-
value: "rotate"
|
6009
|
-
},
|
6010
|
-
{
|
6011
|
-
title: "Scale",
|
6012
|
-
value: "scale"
|
6013
|
-
}
|
6014
|
-
]
|
6015
|
-
},
|
6016
|
-
{
|
6017
|
-
type: "option",
|
6018
|
-
prop: "Space",
|
6019
|
-
options: [
|
6020
|
-
{
|
6021
|
-
title: "World",
|
6022
|
-
value: "world"
|
6023
|
-
},
|
6024
|
-
{
|
6025
|
-
title: "Local",
|
6026
|
-
value: "local"
|
6027
|
-
}
|
6028
|
-
]
|
6029
|
-
}
|
6030
|
-
],
|
6031
|
-
onUpdate: (a, r) => {
|
6032
|
-
if (t !== void 0)
|
6033
|
-
switch (a) {
|
6034
|
-
case "enabled":
|
6035
|
-
t.enabled = r;
|
6036
|
-
break;
|
6037
|
-
case "visible":
|
6038
|
-
t.getHelper().visible = r;
|
6039
|
-
break;
|
6040
|
-
case "Reset":
|
6041
|
-
t.reset();
|
6042
|
-
break;
|
6043
|
-
case "Mode":
|
6044
|
-
t.setMode(r);
|
6045
|
-
break;
|
6046
|
-
case "Space":
|
6047
|
-
t.setSpace(r);
|
6048
|
-
break;
|
6049
|
-
}
|
6050
|
-
}
|
5976
|
+
}), t.addEventListener("dragging-changed", (n) => {
|
5977
|
+
Pe.instance?.toggleOrbitControls(n.value);
|
6051
5978
|
});
|
6052
5979
|
}
|
6053
5980
|
return t;
|
@@ -6057,7 +5984,7 @@ class pe extends Ds {
|
|
6057
5984
|
}
|
6058
5985
|
remove(e) {
|
6059
5986
|
const t = this.get(e);
|
6060
|
-
return t === void 0 ? !1 : (t.detach(), t.disconnect(),
|
5987
|
+
return t === void 0 ? !1 : (t.detach(), t.disconnect(), We(t.getHelper()), this.controls.delete(e), !0);
|
6061
5988
|
}
|
6062
5989
|
enabled(e) {
|
6063
5990
|
this.controls.forEach((t) => {
|
@@ -6103,12 +6030,12 @@ class Os extends lt {
|
|
6103
6030
|
_draggableScale = 10;
|
6104
6031
|
_transform;
|
6105
6032
|
raycaster;
|
6106
|
-
draggedMat = new
|
6033
|
+
draggedMat = new Ve();
|
6107
6034
|
parentGroup;
|
6108
6035
|
group;
|
6109
6036
|
constructor(e, t) {
|
6110
6037
|
const i = new Tt(Je(0.5, 1, Math.random()), Je(0.5, 1, Math.random()), Je(0.5, 1, Math.random()));
|
6111
|
-
super(), this.name = e, this.lineMaterial = new Ai({ color: i }), this.line = new xe(new ot(), this.lineMaterial), this.line.name = "line", this.add(this.line), this._camera = t, this.curveType = "catmullrom", this.draggedMat.color = i, this.draggable = new lt(), this.draggable.name = "draggablePoints", this.add(this.draggable), this.curvePos = new w(new Qs(1.5), new
|
6038
|
+
super(), this.name = e, this.lineMaterial = new Ai({ color: i }), this.line = new xe(new ot(), this.lineMaterial), this.line.name = "line", this.add(this.line), this._camera = t, this.curveType = "catmullrom", this.draggedMat.color = i, this.draggable = new lt(), this.draggable.name = "draggablePoints", this.add(this.draggable), this.curvePos = new w(new Qs(1.5), new Ve({ color: i })), this.curvePos.name = "curvePos", this.curvePos.scale.setScalar(this._draggableScale), this.curvePos.visible = !1, this.add(this.curvePos), this.raycaster = new Xt(), this.raycaster.params.Line.threshold = 3, this.enable();
|
6112
6039
|
}
|
6113
6040
|
enable() {
|
6114
6041
|
document.addEventListener("pointerdown", this.onMouseClick);
|
@@ -6168,7 +6095,7 @@ class Os extends lt {
|
|
6168
6095
|
const t = this.draggable.children[this.draggable.children.length - 1];
|
6169
6096
|
this._transform?.attach(t), this.group.current?.setField("Current Point", t.position);
|
6170
6097
|
}
|
6171
|
-
|
6098
|
+
We(e), this.updateSpline();
|
6172
6099
|
};
|
6173
6100
|
removePointAt = (e) => {
|
6174
6101
|
const t = this.draggable.children[e];
|
@@ -6400,7 +6327,7 @@ class Os extends lt {
|
|
6400
6327
|
this.exportSpline();
|
6401
6328
|
break;
|
6402
6329
|
case "Delete":
|
6403
|
-
|
6330
|
+
We(this);
|
6404
6331
|
break;
|
6405
6332
|
case "Current Point":
|
6406
6333
|
if (this.group.current && this._transform?.object) {
|
@@ -6487,7 +6414,7 @@ class Ia extends lt {
|
|
6487
6414
|
t.push(new O(i[0], i[1], i[2]));
|
6488
6415
|
}), this.createSpline(t);
|
6489
6416
|
};
|
6490
|
-
|
6417
|
+
createSplineFromCatmullRom = (e) => this.createSpline(e.points);
|
6491
6418
|
createSplineFromJSON = (e) => {
|
6492
6419
|
const t = this.createSplineFromArray(e.points);
|
6493
6420
|
return t.name = e.name, t.closed = e.closed, t.subdivide = e.subdivide, t.tension = e.tension, t.type = e.type, t.updateSpline(), t;
|
@@ -6500,7 +6427,7 @@ class Ia extends lt {
|
|
6500
6427
|
onAddSpline = (e) => {
|
6501
6428
|
const t = JSON.parse(e.value), i = `Spline ${Zt + 1}`, n = [];
|
6502
6429
|
t.points.forEach((r) => {
|
6503
|
-
n.push(new O(r[0], r[1],
|
6430
|
+
n.push(new O(r[0], r[1], r[2]));
|
6504
6431
|
});
|
6505
6432
|
const a = new Os(i, this.camera);
|
6506
6433
|
a.addPoints(n), this.addSpline(a), Zt++;
|
@@ -6544,7 +6471,7 @@ class Pe extends Jt {
|
|
6544
6471
|
depthMaterial = new Jn();
|
6545
6472
|
normalsMaterial = new er();
|
6546
6473
|
uvMaterial = new Ca();
|
6547
|
-
wireframeMaterial = new
|
6474
|
+
wireframeMaterial = new Ve({
|
6548
6475
|
opacity: 0.33,
|
6549
6476
|
transparent: !0,
|
6550
6477
|
wireframe: !0
|
@@ -6876,7 +6803,7 @@ class Pe extends Jt {
|
|
6876
6803
|
});
|
6877
6804
|
};
|
6878
6805
|
sceneUpdate = (e) => {
|
6879
|
-
this.helpersContainer.add(this.axisHelper), this.clearLightHelpers(), this.scene.remove(this.currentScene),
|
6806
|
+
this.helpersContainer.add(this.axisHelper), this.clearLightHelpers(), this.scene.remove(this.currentScene), We(this.currentScene);
|
6880
6807
|
const t = this.props.scenes.get(e.value.name);
|
6881
6808
|
if (t !== void 0) {
|
6882
6809
|
const i = new t();
|
@@ -6949,6 +6876,9 @@ class Pe extends Jt {
|
|
6949
6876
|
case "t":
|
6950
6877
|
this.currentTransform.setMode("translate");
|
6951
6878
|
break;
|
6879
|
+
case "q":
|
6880
|
+
this.currentTransform.setSpace(this.currentTransform.space === "local" ? "world" : "local");
|
6881
|
+
break;
|
6952
6882
|
}
|
6953
6883
|
}
|
6954
6884
|
};
|
@@ -7354,7 +7284,7 @@ function Ua(s) {
|
|
7354
7284
|
return /* @__PURE__ */ d.jsx(Qt, { label: "Inspector", children: /* @__PURE__ */ d.jsx("div", { id: "Inspector", className: s.class, children: ue.uuid.length > 0 && /* @__PURE__ */ d.jsxs(d.Fragment, { children: [
|
7355
7285
|
/* @__PURE__ */ d.jsxs(d.Fragment, { children: [
|
7356
7286
|
/* @__PURE__ */ d.jsx(
|
7357
|
-
|
7287
|
+
Vt,
|
7358
7288
|
{
|
7359
7289
|
type: "string",
|
7360
7290
|
title: "Name",
|
@@ -7364,7 +7294,7 @@ function Ua(s) {
|
|
7364
7294
|
}
|
7365
7295
|
),
|
7366
7296
|
/* @__PURE__ */ d.jsx(
|
7367
|
-
|
7297
|
+
Vt,
|
7368
7298
|
{
|
7369
7299
|
type: "string",
|
7370
7300
|
title: "Type",
|
@@ -7374,7 +7304,7 @@ function Ua(s) {
|
|
7374
7304
|
}
|
7375
7305
|
),
|
7376
7306
|
/* @__PURE__ */ d.jsx(
|
7377
|
-
|
7307
|
+
Vt,
|
7378
7308
|
{
|
7379
7309
|
type: "string",
|
7380
7310
|
title: "UUID",
|
@@ -7542,14 +7472,17 @@ export {
|
|
7542
7472
|
Ua as Inspector,
|
7543
7473
|
Pe as MultiView,
|
7544
7474
|
sn as NavButton,
|
7545
|
-
|
7475
|
+
Va as RemoteComponents,
|
7546
7476
|
Qa as RemoteController,
|
7547
7477
|
en as RemoteTheatre,
|
7548
7478
|
$a as RemoteThree,
|
7549
7479
|
qa as SceneInspector,
|
7550
7480
|
ja as SidePanel,
|
7481
|
+
Os as Spline,
|
7482
|
+
Ia as SplineEditor,
|
7551
7483
|
Ka as ThreeEditor,
|
7552
7484
|
D as ToolEvents,
|
7485
|
+
pe as Transform,
|
7553
7486
|
$t as capitalize,
|
7554
7487
|
Ye as clamp,
|
7555
7488
|
es as colorToHex,
|
@@ -7557,7 +7490,7 @@ export {
|
|
7557
7490
|
Xa as customizeTheatreElements,
|
7558
7491
|
R as debugDispatcher,
|
7559
7492
|
Ya as defaultTheatreCallback,
|
7560
|
-
|
7493
|
+
We as dispose,
|
7561
7494
|
_r as disposeMaterial,
|
7562
7495
|
Za as disposeTexture,
|
7563
7496
|
Ba as distance,
|
@@ -7569,6 +7502,6 @@ export {
|
|
7569
7502
|
mr as randomID,
|
7570
7503
|
ts as resetThreeObjects,
|
7571
7504
|
be as round,
|
7572
|
-
|
7505
|
+
Wa as theatreEditorApp,
|
7573
7506
|
Oi as totalThreeObjects
|
7574
7507
|
};
|
package/package.json
CHANGED
@@ -7,7 +7,7 @@
|
|
7
7
|
"module": "./dist/hermes.esm.js",
|
8
8
|
"types": "./types/index.d.ts",
|
9
9
|
"type": "module",
|
10
|
-
"version": "0.0.
|
10
|
+
"version": "0.0.105",
|
11
11
|
"homepage": "https://github.com/tomorrowevening/hermes#readme",
|
12
12
|
"bugs": {
|
13
13
|
"url": "https://github.com/tomorrowevening/hermes/issues"
|
@@ -9,7 +9,6 @@ export default class Transform extends EventDispatcher {
|
|
9
9
|
activeCamera: Camera;
|
10
10
|
controls: Map<string, TransformControls>;
|
11
11
|
private visibility;
|
12
|
-
private groups;
|
13
12
|
clear(): void;
|
14
13
|
add(name: string): TransformControls;
|
15
14
|
get(name: string): TransformControls | undefined;
|
@@ -18,7 +18,7 @@ export default class SplineEditor extends Object3D {
|
|
18
18
|
addSpline(spline: Spline): void;
|
19
19
|
createSpline: (defaultPoints?: Array<Vector3>) => Spline;
|
20
20
|
createSplineFromArray: (points: Array<number[]>) => Spline;
|
21
|
-
|
21
|
+
createSplineFromCatmullRom: (curve: CatmullRomCurve3) => Spline;
|
22
22
|
createSplineFromJSON: (data: SplineJSON) => Spline;
|
23
23
|
showPoints: (visible?: boolean) => void;
|
24
24
|
private onAddSpline;
|
package/types/index.d.ts
CHANGED
@@ -22,3 +22,6 @@ export { default as SceneInspector } from './editor/sidePanel/inspector/SceneIns
|
|
22
22
|
export { default as MultiView } from './editor/multiView/MultiView';
|
23
23
|
export { default as Editor } from './editor/Editor';
|
24
24
|
export { default as ThreeEditor } from './editor/ThreeEditor';
|
25
|
+
export { default as Transform } from './editor/tools/Transform';
|
26
|
+
export { default as Spline } from './editor/tools/splineEditor/Spline';
|
27
|
+
export { default as SplineEditor } from './editor/tools/splineEditor/index';
|