@shopware-ag/dive 3.1.0 → 4.0.1
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/README.md +31 -5
- package/build/chunks/{AssetCache-xpY_N7Yp.cjs → AssetCache-CUVFS7wk.cjs} +1 -1
- package/build/chunks/{AssetCache-C3YXhbaX.mjs → AssetCache-DnAAa719.mjs} +1 -1
- package/build/chunks/AssetExporter-CD2iuQce.mjs +108 -0
- package/build/chunks/AssetExporter-CoL-QXkB.cjs +1 -0
- package/build/chunks/{AssetLoader-MfH5d_Rr.mjs → AssetLoader-Bkp3fWZz.mjs} +9 -9
- package/build/chunks/{AssetLoader-CRxLq0AL.cjs → AssetLoader-DnVvCd41.cjs} +2 -2
- package/build/chunks/FileTypes-B-MjfMGd.cjs +29 -0
- package/build/chunks/FileTypes-D3Dxr2dj.mjs +2294 -0
- package/build/chunks/ModelComponent-Cmu0EX0r.cjs +1 -0
- package/build/chunks/ModelComponent-WA0kLOEY.mjs +87 -0
- package/build/chunks/OrbitController-CAJIiZeE.cjs +1 -0
- package/build/chunks/OrbitController-DxCbrQVB.mjs +612 -0
- package/build/chunks/SpriteTextComponent-BpoKLOjA.cjs +1 -0
- package/build/chunks/SpriteTextComponent-DIZFqao0.mjs +83 -0
- package/build/chunks/collectAnimations-BgYCN1le.mjs +35 -0
- package/build/chunks/collectAnimations-C3HfZHte.cjs +1 -0
- package/build/chunks/contributesToBounds-C1mva__U.cjs +1 -0
- package/build/chunks/contributesToBounds-DYmHYES4.mjs +14 -0
- package/build/chunks/detachTransformControls-B4iRF1bw.mjs +209 -0
- package/build/chunks/detachTransformControls-CZ2cd5hx.cjs +1 -0
- package/build/chunks/{isFileTypeSupported-BBU39V4u.cjs → isFileExtensionSupported-B1q2eWs7.cjs} +1 -1
- package/build/chunks/{isFileTypeSupported-9h8lrIuG.mjs → isFileExtensionSupported-BqOqU3-h.mjs} +1 -1
- package/build/chunks/isVisibleInHierarchy-D9JcLqR5.cjs +1 -0
- package/build/chunks/isVisibleInHierarchy-KzVGvDEw.mjs +21 -0
- package/build/components/boundingbox/BoundingBoxComponent.d.ts +100 -0
- package/build/components/boundingbox/index.d.ts +1 -0
- package/build/components/camera/CameraComponent.d.ts +75 -0
- package/build/components/camera/index.d.ts +2 -0
- package/build/components/camera/perspective/PerspectiveCameraComponent.d.ts +39 -0
- package/build/components/grid/GridComponent.d.ts +50 -0
- package/build/components/index.d.ts +6 -10
- package/build/components/light/LightComponent.d.ts +65 -0
- package/build/components/light/ambient/AmbientLightComponent.d.ts +10 -0
- package/build/components/light/directional/DirectionalLightComponent.d.ts +23 -0
- package/build/components/light/hemi/HemisphereLightComponent.d.ts +21 -0
- package/build/components/light/index.d.ts +5 -3
- package/build/components/light/point/PointLightComponent.d.ts +26 -0
- package/build/components/line/MultiLineComponent.d.ts +133 -0
- package/build/components/line/index.d.ts +1 -0
- package/build/components/mesh/MeshComponent.d.ts +74 -0
- package/build/components/mesh/floor/FloorComponent.d.ts +36 -0
- package/build/components/mesh/index.d.ts +4 -0
- package/build/components/mesh/model/ModelComponent.d.ts +67 -0
- package/build/components/mesh/primitive/PrimitiveComponent.d.ts +43 -0
- package/build/components/spritetext/SpriteTextComponent.d.ts +58 -0
- package/build/constants/VisibilityLayerMask.d.ts +23 -0
- package/build/dive.cjs +1 -1
- package/build/dive.mjs +252 -773
- package/build/engine/Dive.d.ts +11 -13
- package/build/engine/boundingbox/BoundingBox.d.ts +76 -0
- package/build/engine/component/Component.d.ts +236 -0
- package/build/engine/environment/Environment.d.ts +0 -18
- package/build/engine/index.d.ts +4 -1
- package/build/engine/node/Node.d.ts +189 -0
- package/build/engine/promise/abortable/AbortablePromise.d.ts +8 -0
- package/build/engine/renderer/Renderer.d.ts +43 -7
- package/build/engine/scene/Scene.d.ts +88 -4
- package/build/engine/scene/root/Root.d.ts +29 -0
- package/build/engine/scene/xrroot/XRRoot.d.ts +1 -1
- package/build/engine/view/View.d.ts +15 -4
- package/build/helpers/collectAnimations/collectAnimations.d.ts +23 -0
- package/build/helpers/computeProductBounds/computeProductBounds.d.ts +18 -0
- package/build/helpers/contributesToBounds/contributesToBounds.d.ts +17 -0
- package/build/helpers/detachTransformControls/detachTransformControls.d.ts +15 -0
- package/build/helpers/disposeComponents/disposeComponents.d.ts +20 -0
- package/build/helpers/findSceneRecursive/findSceneRecursive.d.ts +7 -3
- package/build/helpers/implementsInterface/implementsInterface.d.ts +11 -0
- package/build/helpers/index.d.ts +6 -1
- package/build/helpers/isVisibleInHierarchy/isVisibleInHierarchy.d.ts +12 -0
- package/build/index.d.ts +0 -1
- package/build/plugins/animation/index.mjs +3 -2
- package/build/plugins/animation/src/system/AnimationSystem.d.ts +3 -2
- package/build/plugins/ar/index.cjs +1 -1
- package/build/plugins/ar/index.mjs +2 -2
- package/build/plugins/ar/src/webxr/WebXR.d.ts +7 -0
- package/build/plugins/assetcache/index.cjs +1 -1
- package/build/plugins/assetcache/index.mjs +1 -1
- package/build/plugins/assetexporter/index.cjs +1 -1
- package/build/plugins/assetexporter/index.mjs +1 -1
- package/build/plugins/assetexporter/src/AssetExporter.d.ts +12 -0
- package/build/plugins/assetloader/index.cjs +1 -1
- package/build/plugins/assetloader/index.mjs +2 -2
- package/build/plugins/mediacreator/index.cjs +1 -1
- package/build/plugins/mediacreator/index.mjs +32 -30
- package/build/plugins/mediacreator/src/MediaCreator.d.ts +1 -2
- package/build/plugins/orbitcontroller/index.cjs +1 -1
- package/build/plugins/orbitcontroller/index.d.ts +1 -0
- package/build/plugins/orbitcontroller/index.mjs +1 -1
- package/build/plugins/orbitcontroller/src/OrbitController.d.ts +39 -6
- package/build/plugins/orientationdisplay/index.cjs +1 -1
- package/build/plugins/orientationdisplay/index.mjs +39 -31
- package/build/plugins/orientationdisplay/src/OrientationDisplay.d.ts +3 -3
- package/build/plugins/quickview/index.cjs +1 -1
- package/build/plugins/quickview/index.mjs +68 -45
- package/build/plugins/quickview/src/QuickView.d.ts +40 -13
- package/build/plugins/quickview/types/index.d.ts +0 -18
- package/build/plugins/state/index.cjs +1 -27
- package/build/plugins/state/index.mjs +1983 -4262
- package/build/plugins/state/src/EngineGateway.d.ts +98 -0
- package/build/plugins/state/src/EntityRegistry.d.ts +51 -0
- package/build/plugins/state/src/State.d.ts +20 -9
- package/build/plugins/state/src/actions/camera/computeencompassingview.d.ts +1 -1
- package/build/plugins/state/src/actions/camera/movecamera.d.ts +2 -2
- package/build/plugins/state/src/actions/media/generatemedia.d.ts +1 -1
- package/build/plugins/state/src/actions/object/addobject.d.ts +2 -3
- package/build/plugins/state/src/actions/object/deleteobject.d.ts +3 -4
- package/build/plugins/state/src/actions/object/deselectobject.d.ts +3 -4
- package/build/plugins/state/src/actions/object/dropit.d.ts +2 -2
- package/build/plugins/state/src/actions/object/getallobjects.d.ts +2 -3
- package/build/plugins/state/src/actions/object/getobjects.d.ts +3 -4
- package/build/plugins/state/src/actions/object/index.d.ts +0 -1
- package/build/plugins/state/src/actions/object/modelloaded.d.ts +2 -2
- package/build/plugins/state/src/actions/object/selectobject.d.ts +3 -4
- package/build/plugins/state/src/actions/object/setparent.d.ts +3 -4
- package/build/plugins/state/src/actions/object/updateobject.d.ts +3 -4
- package/build/plugins/state/src/actions/renderer/startrender.d.ts +1 -1
- package/build/plugins/state/src/actions/scene/exportscene.d.ts +2 -2
- package/build/plugins/state/src/actions/scene/index.d.ts +0 -1
- package/build/plugins/state/src/actions/scene/setbackground.d.ts +2 -2
- package/build/plugins/state/src/actions/scene/updatescene.d.ts +2 -2
- package/build/plugins/state/src/actions/state/getstate.d.ts +1 -1
- package/build/plugins/state/src/actions/state/setstate.d.ts +1 -1
- package/build/plugins/state/src/helpers/copyVectors/copyVectors.d.ts +17 -0
- package/build/plugins/state/src/helpers/updateParentLink/updateParentLink.d.ts +29 -0
- package/build/plugins/state/src/helpers/watchEntity/watchEntity.d.ts +30 -0
- package/build/plugins/state/types/ActionTypes.d.ts +18 -3
- package/build/plugins/state/types/RegisteredEntity.d.ts +27 -0
- package/build/plugins/state/types/StateData.d.ts +1 -1
- package/build/plugins/state/types/index.d.ts +2 -1
- package/build/{types → plugins/state/types}/schema/GroupSchema.d.ts +1 -1
- package/build/{types → plugins/state/types}/schema/ModelSchema.d.ts +7 -4
- package/build/{types → plugins/state/types}/schema/PrimitiveSchema.d.ts +4 -5
- package/build/{types → plugins/state/types}/schema/index.d.ts +0 -3
- package/build/plugins/toolbox/index.cjs +1 -1
- package/build/plugins/toolbox/index.mjs +193 -140
- package/build/plugins/toolbox/src/PointerContext.d.ts +7 -0
- package/build/plugins/toolbox/src/SelectionState.d.ts +21 -0
- package/build/plugins/toolbox/src/Toolbox.d.ts +9 -2
- package/build/{components → plugins/toolbox/src}/gizmo/Gizmo.d.ts +16 -2
- package/build/{components → plugins/toolbox/src}/gizmo/handles/AxisHandle.d.ts +2 -3
- package/build/{components → plugins/toolbox/src}/gizmo/handles/RadialHandle.d.ts +2 -3
- package/build/{components → plugins/toolbox/src}/gizmo/handles/ScaleHandle.d.ts +2 -3
- package/build/{components → plugins/toolbox/src}/gizmo/rotate/RotateGizmo.d.ts +2 -2
- package/build/{components → plugins/toolbox/src}/gizmo/scale/ScaleGizmo.d.ts +3 -3
- package/build/{components → plugins/toolbox/src}/gizmo/translate/TranslateGizmo.d.ts +2 -2
- package/build/types/components/DIVESceneObject.d.ts +13 -6
- package/build/types/components/index.d.ts +0 -1
- package/build/types/events/DIVEComponentEventMap.d.ts +14 -0
- package/build/types/events/DIVEEntityEventMap.d.ts +47 -0
- package/build/types/events/index.d.ts +2 -0
- package/build/types/{schema/GeometrySchema.d.ts → geometry/DIVEGeometry.d.ts} +4 -4
- package/build/types/{schema/GeometryTypeSchema.d.ts → geometry/DIVEGeometryType.d.ts} +1 -1
- package/build/types/geometry/index.d.ts +2 -0
- package/build/types/index.d.ts +3 -1
- package/build/types/{schema/MaterialSchema.d.ts → material/DIVEMaterial.d.ts} +1 -1
- package/build/types/material/index.d.ts +1 -0
- package/package.json +6 -5
- package/build/chunks/AssetExporter-C5MScs9S.mjs +0 -70
- package/build/chunks/AssetExporter-Cdxb04b3.cjs +0 -1
- package/build/chunks/CameraSchema-cgY5WBGW.mjs +0 -10
- package/build/chunks/CameraSchema-twxH-72N.cjs +0 -1
- package/build/chunks/FileTypes-Cgyf8ocm.cjs +0 -29
- package/build/chunks/FileTypes-DiYB3WBp.mjs +0 -2166
- package/build/chunks/PerspectiveCamera-B5TvUzTa.mjs +0 -39
- package/build/chunks/PerspectiveCamera-DwQUmkDv.cjs +0 -1
- package/build/chunks/SpriteText-2lCRglsw.cjs +0 -1
- package/build/chunks/SpriteText-C_CQPvUn.mjs +0 -50
- package/build/chunks/findInterface-C6mrvf_t.cjs +0 -1
- package/build/chunks/findInterface-DbJ5qzbc.mjs +0 -11
- package/build/components/boundingbox/BoundingBox.d.ts +0 -140
- package/build/components/floor/Floor.d.ts +0 -14
- package/build/components/grid/Grid.d.ts +0 -23
- package/build/components/group/Group.d.ts +0 -28
- package/build/components/light/AmbientLight.d.ts +0 -19
- package/build/components/light/PointLight.d.ts +0 -29
- package/build/components/light/SceneLight.d.ts +0 -20
- package/build/components/model/Model.d.ts +0 -26
- package/build/components/node/Node.d.ts +0 -24
- package/build/components/primitive/Primitive.d.ts +0 -27
- package/build/components/root/Root.d.ts +0 -34
- package/build/components/spritetext/SpriteText.d.ts +0 -27
- package/build/engine/camera/PerspectiveCamera.d.ts +0 -24
- package/build/helpers/isFileTypeSupported/isFileTypeSupported.d.ts +0 -9
- package/build/plugins/quickview/src/state/QuickViewState.d.ts +0 -4
- package/build/plugins/quickview/src/uri/QuickViewUri.d.ts +0 -3
- package/build/plugins/state/src/actions/object/placeonfloor.d.ts +0 -12
- package/build/plugins/state/src/actions/scene/getallscenedata.d.ts +0 -12
- package/build/plugins/state/types/StateSceneData.d.ts +0 -5
- package/build/types/components/DIVELight.d.ts +0 -4
- /package/build/{types → plugins/state/types}/schema/BaseEntitySchema.d.ts +0 -0
- /package/build/{types → plugins/state/types}/schema/CameraSchema.d.ts +0 -0
- /package/build/{types → plugins/state/types}/schema/EntitySchema.d.ts +0 -0
- /package/build/{types → plugins/state/types}/schema/EntityTypeSchema.d.ts +0 -0
- /package/build/{types → plugins/state/types}/schema/LightSchema.d.ts +0 -0
- /package/build/{components → plugins/toolbox/src}/gizmo/plane/GizmoPlane.d.ts +0 -0
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
var
|
|
2
|
-
var w = (
|
|
3
|
-
var
|
|
4
|
-
import { EventDispatcher as T, Vector3 as
|
|
5
|
-
import "../../chunks/FileTypes-
|
|
6
|
-
import { P as _, U as
|
|
1
|
+
var P = Object.defineProperty;
|
|
2
|
+
var w = (a, t, e) => t in a ? P(a, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : a[t] = e;
|
|
3
|
+
var r = (a, t, e) => w(a, typeof t != "symbol" ? t + "" : t, e);
|
|
4
|
+
import { EventDispatcher as T, Vector3 as h, Raycaster as S, Vector2 as m } from "three/webgpu";
|
|
5
|
+
import "../../chunks/FileTypes-D3Dxr2dj.mjs";
|
|
6
|
+
import { D as E, P as _, U as f, a as v } from "../../chunks/contributesToBounds-DYmHYES4.mjs";
|
|
7
7
|
import "three/examples/jsm/loaders/HDRLoader.js";
|
|
8
8
|
import "three/tsl";
|
|
9
|
-
import { f as
|
|
10
|
-
import { TransformControls as
|
|
9
|
+
import { f as d, i as l, a as z } from "../../chunks/isVisibleInHierarchy-KzVGvDEw.mjs";
|
|
10
|
+
import { TransformControls as C } from "three/examples/jsm/controls/TransformControls.js";
|
|
11
11
|
import { A as b, a as D, b as y } from "../../chunks/AxisHelperColors-JLBHYQDi.mjs";
|
|
12
|
-
class
|
|
12
|
+
class L {
|
|
13
13
|
constructor() {
|
|
14
|
-
|
|
15
|
-
|
|
14
|
+
r(this, "_selected", null);
|
|
15
|
+
r(this, "_listeners", /* @__PURE__ */ new Set());
|
|
16
16
|
}
|
|
17
17
|
/**
|
|
18
18
|
* Currently selected object, or null if nothing is selected.
|
|
@@ -25,16 +25,48 @@ class z {
|
|
|
25
25
|
* Calls onSelect on the new object and onDeselect on the previous.
|
|
26
26
|
*/
|
|
27
27
|
select(t) {
|
|
28
|
-
|
|
29
|
-
|
|
28
|
+
this._select(t, !0);
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Selects without having the object announce it.
|
|
32
|
+
*
|
|
33
|
+
* For a caller that announces the selection itself, so a subscriber does not
|
|
34
|
+
* hear about it twice: whoever asked for this already knows it happened.
|
|
35
|
+
*
|
|
36
|
+
* The object that was displaced still gets its `onDeselect` — nobody told
|
|
37
|
+
* *it* anything, and it is the only source for that news. Listeners
|
|
38
|
+
* registered through {@link onChange} are notified either way, or a
|
|
39
|
+
* programmatic selection would not attach the gizmo.
|
|
40
|
+
*/
|
|
41
|
+
applySelection(t) {
|
|
42
|
+
this._select(t, !1);
|
|
30
43
|
}
|
|
31
44
|
/**
|
|
32
45
|
* Deselect the currently selected object.
|
|
33
46
|
* Calls onDeselect on the object.
|
|
34
47
|
*/
|
|
35
48
|
deselect() {
|
|
36
|
-
|
|
37
|
-
|
|
49
|
+
this._deselect(!0);
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Deselects without having the object announce it.
|
|
53
|
+
*
|
|
54
|
+
* The counterpart to {@link applySelection}: for a caller that asked for
|
|
55
|
+
* exactly this and announces it itself.
|
|
56
|
+
*/
|
|
57
|
+
applyDeselection() {
|
|
58
|
+
this._deselect(!1);
|
|
59
|
+
}
|
|
60
|
+
_select(t, e) {
|
|
61
|
+
var i, o;
|
|
62
|
+
if (this._selected === t) return;
|
|
63
|
+
const s = this._selected;
|
|
64
|
+
this._selected = null, (i = s == null ? void 0 : s.onDeselect) == null || i.call(s), this._selected = t, e && ((o = t.onSelect) == null || o.call(t)), this.notifyListeners();
|
|
65
|
+
}
|
|
66
|
+
_deselect(t) {
|
|
67
|
+
var s;
|
|
68
|
+
const e = this._selected;
|
|
69
|
+
e && (this._selected = null, t && ((s = e.onDeselect) == null || s.call(e)), this.notifyListeners());
|
|
38
70
|
}
|
|
39
71
|
/**
|
|
40
72
|
* Register a callback to be notified when selection changes.
|
|
@@ -59,11 +91,11 @@ class z {
|
|
|
59
91
|
t(this._selected);
|
|
60
92
|
}
|
|
61
93
|
}
|
|
62
|
-
class
|
|
94
|
+
class A {
|
|
63
95
|
constructor() {
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
96
|
+
r(this, "name", "hover");
|
|
97
|
+
r(this, "priority", 20);
|
|
98
|
+
r(this, "_hovered", null);
|
|
67
99
|
}
|
|
68
100
|
/**
|
|
69
101
|
* Currently hovered object, or null if nothing is hovered.
|
|
@@ -79,8 +111,10 @@ class C {
|
|
|
79
111
|
this._hovered && ((e = (t = this._hovered).onPointerLeave) == null || e.call(t), this._hovered = null);
|
|
80
112
|
}
|
|
81
113
|
onPointerMove(t) {
|
|
82
|
-
var i,
|
|
83
|
-
|
|
114
|
+
var i, o, n, c, g, u, p;
|
|
115
|
+
if (t.pointerPrimaryDown || t.pointerMiddleDown || t.pointerSecondaryDown)
|
|
116
|
+
return;
|
|
117
|
+
const e = t.intersects[0], s = d(
|
|
84
118
|
e == null ? void 0 : e.object,
|
|
85
119
|
"isHoverable"
|
|
86
120
|
);
|
|
@@ -90,21 +124,21 @@ class C {
|
|
|
90
124
|
return;
|
|
91
125
|
}
|
|
92
126
|
if (this._hovered.uuid !== s.uuid) {
|
|
93
|
-
(
|
|
127
|
+
(n = (o = this._hovered).onPointerLeave) == null || n.call(o), (c = s.onPointerEnter) == null || c.call(s, e), this._hovered = s;
|
|
94
128
|
return;
|
|
95
129
|
}
|
|
96
|
-
(
|
|
130
|
+
(g = s.onPointerOver) == null || g.call(s, e);
|
|
97
131
|
return;
|
|
98
132
|
}
|
|
99
|
-
this._hovered && ((
|
|
133
|
+
this._hovered && ((p = (u = this._hovered).onPointerLeave) == null || p.call(u), this._hovered = null);
|
|
100
134
|
}
|
|
101
135
|
}
|
|
102
|
-
const
|
|
136
|
+
const F = (a) => a.name === "select";
|
|
103
137
|
class M {
|
|
104
138
|
constructor(t) {
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
139
|
+
r(this, "name", "select");
|
|
140
|
+
r(this, "priority", 30);
|
|
141
|
+
r(this, "_selectionState");
|
|
108
142
|
this._selectionState = t;
|
|
109
143
|
}
|
|
110
144
|
/**
|
|
@@ -118,7 +152,7 @@ class M {
|
|
|
118
152
|
onDeactivate() {
|
|
119
153
|
}
|
|
120
154
|
onClick(t) {
|
|
121
|
-
const e = t.
|
|
155
|
+
const e = t.entityIntersects[0], s = d(
|
|
122
156
|
e == null ? void 0 : e.object,
|
|
123
157
|
"isSelectable"
|
|
124
158
|
);
|
|
@@ -142,20 +176,20 @@ class M {
|
|
|
142
176
|
this._selectionState.deselect();
|
|
143
177
|
}
|
|
144
178
|
}
|
|
145
|
-
const
|
|
146
|
-
class
|
|
179
|
+
const K = (a) => a.name === "transform";
|
|
180
|
+
class j extends T {
|
|
147
181
|
constructor(e, s, i) {
|
|
148
182
|
super();
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
183
|
+
r(this, "name", "transform");
|
|
184
|
+
r(this, "priority", 5);
|
|
185
|
+
r(this, "_scene");
|
|
186
|
+
r(this, "_controller");
|
|
187
|
+
r(this, "_selectionState");
|
|
188
|
+
r(this, "_gizmo");
|
|
189
|
+
r(this, "_gizmoHelper");
|
|
190
|
+
r(this, "_scaleLinked", !1);
|
|
191
|
+
r(this, "_gizmoVisible", !0);
|
|
192
|
+
r(this, "_selectionChangeHandler");
|
|
159
193
|
this._scene = e, this._controller = s, this._selectionState = i, this._gizmo = this.initGizmo(), this._gizmoHelper = this._gizmo.getHelper(), this._scene.add(this._gizmoHelper), this._selectionChangeHandler = this.onSelectionChange.bind(this);
|
|
160
194
|
}
|
|
161
195
|
/**
|
|
@@ -179,7 +213,11 @@ class L extends T {
|
|
|
179
213
|
this._selectionState.offChange(this._selectionChangeHandler), this._gizmo.detach();
|
|
180
214
|
}
|
|
181
215
|
onPointerMove(e) {
|
|
182
|
-
if (this._gizmo.dragging
|
|
216
|
+
if (this._gizmo.dragging)
|
|
217
|
+
return !0;
|
|
218
|
+
if (e.pointerPrimaryDown || e.pointerMiddleDown || e.pointerSecondaryDown)
|
|
219
|
+
return;
|
|
220
|
+
if (e.intersects.some(
|
|
183
221
|
(i) => this.isGizmoChild(i.object)
|
|
184
222
|
))
|
|
185
223
|
return !0;
|
|
@@ -212,10 +250,10 @@ class L extends T {
|
|
|
212
250
|
}
|
|
213
251
|
// ============ Private Methods ============
|
|
214
252
|
onSelectionChange(e) {
|
|
215
|
-
e &&
|
|
253
|
+
e && l(e, "isMovable") ? this.attachGizmo(e) : this._gizmo.detach();
|
|
216
254
|
}
|
|
217
255
|
attachGizmo(e) {
|
|
218
|
-
|
|
256
|
+
l(e, "isMovable") && (this._gizmo.attach(e), this.setGizmoVisible(e.visible && this._gizmoVisible));
|
|
219
257
|
}
|
|
220
258
|
isGizmoChild(e) {
|
|
221
259
|
let s = e;
|
|
@@ -226,22 +264,24 @@ class L extends T {
|
|
|
226
264
|
return !1;
|
|
227
265
|
}
|
|
228
266
|
initGizmo() {
|
|
229
|
-
const e = new
|
|
230
|
-
this._controller.object,
|
|
267
|
+
const e = new C(
|
|
268
|
+
this._controller.object.camera,
|
|
231
269
|
this._controller.domElement
|
|
232
270
|
);
|
|
233
|
-
|
|
271
|
+
e.mode = "translate";
|
|
272
|
+
const s = e.getHelper();
|
|
273
|
+
return s.name = "TransformControlsRoot", s.traverse((i) => {
|
|
234
274
|
if (!("isMesh" in i)) return;
|
|
235
|
-
const
|
|
236
|
-
i.name === "X" &&
|
|
275
|
+
const o = i.material;
|
|
276
|
+
i.name === "X" && o.color.set(b), i.name === "Y" && o.color.set(D), i.name === "Z" && o.color.set(y), i.name === "XY" && o.color.set(y), i.name === "YZ" && o.color.set(b), i.name === "XZ" && o.color.set(D);
|
|
237
277
|
}), e.addEventListener("mouseDown", () => {
|
|
238
|
-
var i,
|
|
239
|
-
this._controller.enabled = !1,
|
|
278
|
+
var i, o;
|
|
279
|
+
this._controller.enabled = !1, l(e.object, "isMovable") && ((o = (i = e.object).onMoveStart) == null || o.call(i));
|
|
240
280
|
}), e.addEventListener("objectChange", () => {
|
|
241
|
-
var i,
|
|
242
|
-
if (
|
|
243
|
-
if ((
|
|
244
|
-
const
|
|
281
|
+
var i, o;
|
|
282
|
+
if (l(e.object, "isMovable")) {
|
|
283
|
+
if ((o = (i = e.object).onMove) == null || o.call(i), this._scaleLinked && e.object) {
|
|
284
|
+
const n = e.object.scale, c = (n.x + n.y + n.z) / 3;
|
|
245
285
|
e.object.scale.set(c, c, c);
|
|
246
286
|
}
|
|
247
287
|
switch (this.dispatchEvent({
|
|
@@ -269,28 +309,28 @@ class L extends T {
|
|
|
269
309
|
}
|
|
270
310
|
}
|
|
271
311
|
}), e.addEventListener("mouseUp", () => {
|
|
272
|
-
var i,
|
|
273
|
-
this._controller.enabled = !0,
|
|
312
|
+
var i, o;
|
|
313
|
+
this._controller.enabled = !0, l(e.object, "isMovable") && ((o = (i = e.object).onMoveEnd) == null || o.call(i));
|
|
274
314
|
}), e;
|
|
275
315
|
}
|
|
276
316
|
}
|
|
277
|
-
const
|
|
278
|
-
class
|
|
317
|
+
const H = 1e-3;
|
|
318
|
+
class R {
|
|
279
319
|
constructor(t) {
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
320
|
+
r(this, "name", "drag");
|
|
321
|
+
r(this, "priority", 10);
|
|
322
|
+
r(this, "_controller");
|
|
323
|
+
r(this, "_raycaster");
|
|
284
324
|
// Drag state
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
325
|
+
r(this, "_dragging", !1);
|
|
326
|
+
r(this, "_draggable", null);
|
|
327
|
+
r(this, "_dragStart", new h());
|
|
328
|
+
r(this, "_dragCurrent", new h());
|
|
329
|
+
r(this, "_dragEnd", new h());
|
|
330
|
+
r(this, "_dragDelta", new h());
|
|
291
331
|
// Custom raycast targets for drag plane
|
|
292
|
-
|
|
293
|
-
this._controller = t, this._raycaster = new
|
|
332
|
+
r(this, "_dragRaycastTargets", null);
|
|
333
|
+
this._controller = t, this._raycaster = new S();
|
|
294
334
|
}
|
|
295
335
|
/**
|
|
296
336
|
* Whether a drag operation is currently in progress.
|
|
@@ -312,17 +352,23 @@ class j {
|
|
|
312
352
|
}
|
|
313
353
|
onPointerDown(t) {
|
|
314
354
|
var e;
|
|
315
|
-
t.pointerPrimaryDown && (this._draggable =
|
|
355
|
+
t.pointerPrimaryDown && (this._draggable = d(
|
|
316
356
|
(e = t.intersects[0]) == null ? void 0 : e.object,
|
|
317
357
|
"isDraggable"
|
|
318
358
|
) || null);
|
|
319
359
|
}
|
|
320
360
|
onPointerMove(t) {
|
|
321
|
-
if (t.pointerPrimaryDown && this._draggable && (this._raycaster.setFromCamera(
|
|
361
|
+
if (t.pointerPrimaryDown && this._draggable && (this._raycaster.setFromCamera(
|
|
362
|
+
t.pointer,
|
|
363
|
+
this._controller.object.camera
|
|
364
|
+
), this._dragging || t.lastPointerDown.distanceTo(t.pointer) > H && this.startDrag(t), this._dragging))
|
|
322
365
|
return this.updateDrag(t), !0;
|
|
323
366
|
}
|
|
324
367
|
onPointerUp(t) {
|
|
325
|
-
this._dragging && (this._raycaster.setFromCamera(
|
|
368
|
+
this._dragging && (this._raycaster.setFromCamera(
|
|
369
|
+
t.pointer,
|
|
370
|
+
this._controller.object.camera
|
|
371
|
+
), this.endDrag()), this._draggable = null;
|
|
326
372
|
}
|
|
327
373
|
/**
|
|
328
374
|
* Set custom objects to raycast against during drag.
|
|
@@ -368,40 +414,38 @@ class j {
|
|
|
368
414
|
}
|
|
369
415
|
}
|
|
370
416
|
const k = 1e-3;
|
|
371
|
-
class
|
|
417
|
+
class B {
|
|
372
418
|
constructor(t, e) {
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
419
|
+
r(this, "_scene");
|
|
420
|
+
r(this, "_controller");
|
|
421
|
+
r(this, "_canvas");
|
|
376
422
|
// Tool management
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
423
|
+
r(this, "_tools");
|
|
424
|
+
r(this, "_activeTools", /* @__PURE__ */ new Map());
|
|
425
|
+
r(this, "_sortedActiveTools", []);
|
|
380
426
|
// Shared selection state
|
|
381
|
-
|
|
427
|
+
r(this, "_selectionState");
|
|
382
428
|
// Raycasting (shared, computed once per event)
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
o(this, "_productLayerMask");
|
|
386
|
-
o(this, "_uiLayerMask");
|
|
429
|
+
r(this, "_raycaster");
|
|
430
|
+
r(this, "_pointer");
|
|
387
431
|
// Pointer state
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
432
|
+
r(this, "_pointerPrimaryDown", !1);
|
|
433
|
+
r(this, "_pointerMiddleDown", !1);
|
|
434
|
+
r(this, "_pointerSecondaryDown", !1);
|
|
435
|
+
r(this, "_lastPointerDown");
|
|
392
436
|
// Bound event handlers (for cleanup)
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
this._scene = t, this._controller = e, this._canvas = e.domElement, this._selectionState = new
|
|
398
|
-
["hover", new
|
|
437
|
+
r(this, "_boundPointerMove");
|
|
438
|
+
r(this, "_boundPointerDown");
|
|
439
|
+
r(this, "_boundPointerUp");
|
|
440
|
+
r(this, "_boundWheel");
|
|
441
|
+
this._scene = t, this._controller = e, this._canvas = e.domElement, this._selectionState = new L(), this._raycaster = new S(), this._pointer = new m(), this._lastPointerDown = new m(), this._tools = /* @__PURE__ */ new Map([
|
|
442
|
+
["hover", new A()],
|
|
399
443
|
["select", new M(this._selectionState)],
|
|
400
444
|
[
|
|
401
445
|
"transform",
|
|
402
|
-
new
|
|
446
|
+
new j(t, e, this._selectionState)
|
|
403
447
|
],
|
|
404
|
-
["drag", new
|
|
448
|
+
["drag", new R(e)]
|
|
405
449
|
]), this._boundPointerMove = this.onPointerMove.bind(this), this._boundPointerDown = this.onPointerDown.bind(this), this._boundPointerUp = this.onPointerUp.bind(this), this._boundWheel = this.onWheel.bind(this), this._canvas.addEventListener("pointermove", this._boundPointerMove), this._canvas.addEventListener("pointerdown", this._boundPointerDown), this._canvas.addEventListener("pointerup", this._boundPointerUp), this._canvas.addEventListener("wheel", this._boundWheel);
|
|
406
450
|
}
|
|
407
451
|
get selectionState() {
|
|
@@ -466,14 +510,14 @@ class X {
|
|
|
466
510
|
if ((s = i.onPointerDown) == null ? void 0 : s.call(i, e)) break;
|
|
467
511
|
}
|
|
468
512
|
onPointerUp(t) {
|
|
469
|
-
var i,
|
|
513
|
+
var i, o;
|
|
470
514
|
this.updatePointer(t);
|
|
471
515
|
const e = this.createPointerContext(t), s = !this.pointerWasDragged();
|
|
472
|
-
for (const
|
|
473
|
-
if ((i =
|
|
516
|
+
for (const n of this._sortedActiveTools)
|
|
517
|
+
if ((i = n.onPointerUp) == null ? void 0 : i.call(n, e)) break;
|
|
474
518
|
if (s) {
|
|
475
|
-
for (const
|
|
476
|
-
if ((
|
|
519
|
+
for (const n of this._sortedActiveTools)
|
|
520
|
+
if ((o = n.onClick) == null ? void 0 : o.call(n, e)) break;
|
|
477
521
|
}
|
|
478
522
|
this.updatePointerState(t, !1);
|
|
479
523
|
}
|
|
@@ -485,44 +529,55 @@ class X {
|
|
|
485
529
|
}
|
|
486
530
|
// ============ Context Creation ============
|
|
487
531
|
createPointerContext(t) {
|
|
488
|
-
|
|
489
|
-
return {
|
|
532
|
+
return Object.assign(this.createLazyIntersects(), {
|
|
490
533
|
event: t,
|
|
491
534
|
pointer: this._pointer.clone(),
|
|
492
|
-
intersects: e,
|
|
493
|
-
modelIntersects: this.filterIntersectsByLayer(
|
|
494
|
-
e,
|
|
495
|
-
_
|
|
496
|
-
),
|
|
497
|
-
uiIntersects: this.filterIntersectsByLayer(
|
|
498
|
-
e,
|
|
499
|
-
d
|
|
500
|
-
),
|
|
501
535
|
pointerPrimaryDown: this._pointerPrimaryDown,
|
|
502
536
|
pointerMiddleDown: this._pointerMiddleDown,
|
|
503
537
|
pointerSecondaryDown: this._pointerSecondaryDown,
|
|
504
538
|
lastPointerDown: this._lastPointerDown.clone()
|
|
505
|
-
};
|
|
539
|
+
});
|
|
506
540
|
}
|
|
507
541
|
createWheelContext(t) {
|
|
508
|
-
|
|
509
|
-
return {
|
|
542
|
+
return Object.assign(this.createLazyIntersects(), {
|
|
510
543
|
event: t,
|
|
511
|
-
pointer: this._pointer.clone()
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
544
|
+
pointer: this._pointer.clone()
|
|
545
|
+
});
|
|
546
|
+
}
|
|
547
|
+
/**
|
|
548
|
+
* The four intersect lists, each raycast on first read and then kept.
|
|
549
|
+
*
|
|
550
|
+
* Still one raycast per event shared by every tool -- but only if a tool
|
|
551
|
+
* actually looks. It used to run eagerly, so a pointer move cost a full
|
|
552
|
+
* raycast even with no tool enabled at all, and while the camera was being
|
|
553
|
+
* orbited that was a raycast per frame against every mesh in the scene.
|
|
554
|
+
*/
|
|
555
|
+
createLazyIntersects() {
|
|
556
|
+
const t = () => s ?? (s = this.raycast()), e = (c) => this.filterIntersectsByLayer(t(), c);
|
|
557
|
+
let s, i, o, n;
|
|
558
|
+
return {
|
|
559
|
+
get intersects() {
|
|
560
|
+
return t();
|
|
561
|
+
},
|
|
562
|
+
get modelIntersects() {
|
|
563
|
+
return i ?? (i = e(_));
|
|
564
|
+
},
|
|
565
|
+
get entityIntersects() {
|
|
566
|
+
return o ?? (o = e(
|
|
567
|
+
_ | v
|
|
568
|
+
));
|
|
569
|
+
},
|
|
570
|
+
get uiIntersects() {
|
|
571
|
+
return n ?? (n = e(f));
|
|
572
|
+
}
|
|
521
573
|
};
|
|
522
574
|
}
|
|
523
575
|
// ============ Helper Methods ============
|
|
524
576
|
updatePointer(t) {
|
|
525
|
-
this._pointer.x = t.offsetX / this._canvas.clientWidth * 2 - 1, this._pointer.y = -(t.offsetY / this._canvas.clientHeight) * 2 + 1, this._raycaster.setFromCamera(
|
|
577
|
+
this._pointer.x = t.offsetX / this._canvas.clientWidth * 2 - 1, this._pointer.y = -(t.offsetY / this._canvas.clientHeight) * 2 + 1, this._raycaster.setFromCamera(
|
|
578
|
+
this._pointer,
|
|
579
|
+
this._controller.object.camera
|
|
580
|
+
);
|
|
526
581
|
}
|
|
527
582
|
updatePointerState(t, e) {
|
|
528
583
|
switch (t.button) {
|
|
@@ -538,11 +593,9 @@ class X {
|
|
|
538
593
|
}
|
|
539
594
|
}
|
|
540
595
|
raycast() {
|
|
541
|
-
this._raycaster.layers.mask = _ |
|
|
542
|
-
|
|
543
|
-
(e) => e.visible && "isMesh" in e && e.isMesh
|
|
596
|
+
return this._raycaster.layers.mask = E | _ | f | v, this._raycaster.intersectObjects(this._scene.children, !0).filter(
|
|
597
|
+
(t) => z(t.object)
|
|
544
598
|
);
|
|
545
|
-
return this._raycaster.intersectObjects(t, !0);
|
|
546
599
|
}
|
|
547
600
|
filterIntersectsByLayer(t, e) {
|
|
548
601
|
return t.filter(
|
|
@@ -560,13 +613,13 @@ class X {
|
|
|
560
613
|
}
|
|
561
614
|
export {
|
|
562
615
|
M as DIVESelectTool,
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
616
|
+
j as DIVETransformTool,
|
|
617
|
+
R as DragTool,
|
|
618
|
+
A as HoverTool,
|
|
566
619
|
M as SelectTool,
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
620
|
+
L as SelectionState,
|
|
621
|
+
B as Toolbox,
|
|
622
|
+
j as TransformTool,
|
|
623
|
+
F as isSelectTool,
|
|
624
|
+
K as isTransformTool
|
|
572
625
|
};
|
|
@@ -16,6 +16,11 @@ export interface PointerContext {
|
|
|
16
16
|
readonly intersects: Intersection[];
|
|
17
17
|
/** Intersections filtered to PRODUCT_LAYER (models only) */
|
|
18
18
|
readonly modelIntersects: Intersection[];
|
|
19
|
+
/**
|
|
20
|
+
* Intersections that stand for an entity: real geometry, or a proxy for
|
|
21
|
+
* something that has none, such as a light's handle. What selecting reads.
|
|
22
|
+
*/
|
|
23
|
+
readonly entityIntersects: Intersection[];
|
|
19
24
|
/** Intersections filtered to UI_LAYER (gizmo, UI elements) */
|
|
20
25
|
readonly uiIntersects: Intersection[];
|
|
21
26
|
/** Whether primary mouse button (left) is pressed */
|
|
@@ -41,6 +46,8 @@ export interface WheelContext {
|
|
|
41
46
|
readonly intersects: Intersection[];
|
|
42
47
|
/** Intersections filtered to PRODUCT_LAYER (models only) */
|
|
43
48
|
readonly modelIntersects: Intersection[];
|
|
49
|
+
/** Intersections that stand for an entity. See {@link PointerContext}. */
|
|
50
|
+
readonly entityIntersects: Intersection[];
|
|
44
51
|
/** Intersections filtered to UI_LAYER (gizmo, UI elements) */
|
|
45
52
|
readonly uiIntersects: Intersection[];
|
|
46
53
|
}
|
|
@@ -21,11 +21,32 @@ export declare class SelectionState {
|
|
|
21
21
|
* Calls onSelect on the new object and onDeselect on the previous.
|
|
22
22
|
*/
|
|
23
23
|
select(obj: Object3D & DIVESelectable): void;
|
|
24
|
+
/**
|
|
25
|
+
* Selects without having the object announce it.
|
|
26
|
+
*
|
|
27
|
+
* For a caller that announces the selection itself, so a subscriber does not
|
|
28
|
+
* hear about it twice: whoever asked for this already knows it happened.
|
|
29
|
+
*
|
|
30
|
+
* The object that was displaced still gets its `onDeselect` — nobody told
|
|
31
|
+
* *it* anything, and it is the only source for that news. Listeners
|
|
32
|
+
* registered through {@link onChange} are notified either way, or a
|
|
33
|
+
* programmatic selection would not attach the gizmo.
|
|
34
|
+
*/
|
|
35
|
+
applySelection(obj: Object3D & DIVESelectable): void;
|
|
24
36
|
/**
|
|
25
37
|
* Deselect the currently selected object.
|
|
26
38
|
* Calls onDeselect on the object.
|
|
27
39
|
*/
|
|
28
40
|
deselect(): void;
|
|
41
|
+
/**
|
|
42
|
+
* Deselects without having the object announce it.
|
|
43
|
+
*
|
|
44
|
+
* The counterpart to {@link applySelection}: for a caller that asked for
|
|
45
|
+
* exactly this and announces it itself.
|
|
46
|
+
*/
|
|
47
|
+
applyDeselection(): void;
|
|
48
|
+
private _select;
|
|
49
|
+
private _deselect;
|
|
29
50
|
/**
|
|
30
51
|
* Register a callback to be notified when selection changes.
|
|
31
52
|
*/
|
|
@@ -22,8 +22,6 @@ export declare class Toolbox {
|
|
|
22
22
|
get selectionState(): SelectionState;
|
|
23
23
|
private _raycaster;
|
|
24
24
|
private _pointer;
|
|
25
|
-
private _productLayerMask;
|
|
26
|
-
private _uiLayerMask;
|
|
27
25
|
private _pointerPrimaryDown;
|
|
28
26
|
private _pointerMiddleDown;
|
|
29
27
|
private _pointerSecondaryDown;
|
|
@@ -63,6 +61,15 @@ export declare class Toolbox {
|
|
|
63
61
|
private onWheel;
|
|
64
62
|
private createPointerContext;
|
|
65
63
|
private createWheelContext;
|
|
64
|
+
/**
|
|
65
|
+
* The four intersect lists, each raycast on first read and then kept.
|
|
66
|
+
*
|
|
67
|
+
* Still one raycast per event shared by every tool -- but only if a tool
|
|
68
|
+
* actually looks. It used to run eagerly, so a pointer move cost a full
|
|
69
|
+
* raycast even with no tool enabled at all, and while the camera was being
|
|
70
|
+
* orbited that was a raycast per frame against every mesh in the scene.
|
|
71
|
+
*/
|
|
72
|
+
private createLazyIntersects;
|
|
66
73
|
private updatePointer;
|
|
67
74
|
private updatePointerState;
|
|
68
75
|
private raycast;
|
|
@@ -1,7 +1,21 @@
|
|
|
1
1
|
import { Euler, Object3D, Vector3 } from 'three/webgpu';
|
|
2
|
-
import { OrbitController } from '
|
|
2
|
+
import { OrbitController } from '../../../orbitcontroller/index.ts';
|
|
3
3
|
import { DIVEGizmoPlane as DIVEGizmoPlane } from './plane/GizmoPlane.ts';
|
|
4
|
-
import { DIVESelectable } from '
|
|
4
|
+
import { DIVESelectable } from '../../../../index.ts';
|
|
5
|
+
/**
|
|
6
|
+
* DIVE's own transform gizmo.
|
|
7
|
+
*
|
|
8
|
+
* **Written ahead of its activation, and deliberately not wired up yet.** The
|
|
9
|
+
* toolbox currently drives three's `TransformControls` (see
|
|
10
|
+
* `plugins/toolbox/src/transform/TransformTool.ts`), so nothing constructs a
|
|
11
|
+
* `DIVEGizmo` at runtime.
|
|
12
|
+
*
|
|
13
|
+
* Being unreferenced is therefore expected and is *not* a sign that this is
|
|
14
|
+
* obsolete — do not remove it as dead code. Its tests keep it compiling until
|
|
15
|
+
* the switch happens.
|
|
16
|
+
*
|
|
17
|
+
* @module
|
|
18
|
+
*/
|
|
5
19
|
export type DIVEGizmoMode = 'translate' | 'rotate' | 'scale';
|
|
6
20
|
export type DIVEGizmoAxis = 'x' | 'y' | 'z';
|
|
7
21
|
export declare class DIVEGizmo extends Object3D {
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { ColorRepresentation, Object3D, Vector3 } from 'three/webgpu';
|
|
2
|
-
import { DIVEHoverable } from '
|
|
2
|
+
import { DIVEHoverable, DIVEDraggable } from '../../../../../index.ts';
|
|
3
3
|
import { DIVETranslateGizmo } from '../translate/TranslateGizmo.ts';
|
|
4
|
-
import {
|
|
5
|
-
import { DraggableEvent } from '../../../plugins/toolbox/index.ts';
|
|
4
|
+
import { DraggableEvent } from '../../drag/DraggableEvent.ts';
|
|
6
5
|
export declare class DIVEAxisHandle extends Object3D implements DIVEHoverable, DIVEDraggable {
|
|
7
6
|
readonly isHoverable: true;
|
|
8
7
|
readonly isDraggable: true;
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { ColorRepresentation, Object3D, Vector3 } from 'three/webgpu';
|
|
2
|
-
import { DIVEHoverable } from '
|
|
3
|
-
import { DraggableEvent } from '
|
|
2
|
+
import { DIVEHoverable, DIVEDraggable } from '../../../../../index.ts';
|
|
3
|
+
import { DraggableEvent } from '../../drag/DraggableEvent.ts';
|
|
4
4
|
import { DIVERotateGizmo } from '../rotate/RotateGizmo.ts';
|
|
5
|
-
import { DIVEDraggable } from '../../../interfaces/Draggable.ts';
|
|
6
5
|
export declare class DIVERadialHandle extends Object3D implements DIVEHoverable, DIVEDraggable {
|
|
7
6
|
readonly isHoverable: true;
|
|
8
7
|
readonly isDraggable: true;
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { ColorRepresentation, Object3D, Vector3 } from 'three/webgpu';
|
|
2
|
-
import { DIVEHoverable } from '
|
|
2
|
+
import { DIVEHoverable, DIVEDraggable } from '../../../../../index.ts';
|
|
3
3
|
import { DIVEScaleGizmo } from '../scale/ScaleGizmo.ts';
|
|
4
|
-
import {
|
|
5
|
-
import { DraggableEvent } from '../../../plugins/toolbox/index.ts';
|
|
4
|
+
import { DraggableEvent } from '../../drag/DraggableEvent.ts';
|
|
6
5
|
export declare class DIVEScaleHandle extends Object3D implements DIVEHoverable, DIVEDraggable {
|
|
7
6
|
readonly isHoverable: true;
|
|
8
7
|
readonly isDraggable: true;
|