@shopware-ag/dive 3.0.11 → 4.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (200) hide show
  1. package/README.md +31 -5
  2. package/build/chunks/{AssetCache-MtISiPD2.cjs → AssetCache-DdxevusY.cjs} +1 -1
  3. package/build/chunks/{AssetCache-DOB996Vk.mjs → AssetCache-MXFCGzZU.mjs} +1 -1
  4. package/build/chunks/AssetExporter-CD2iuQce.mjs +108 -0
  5. package/build/chunks/AssetExporter-CoL-QXkB.cjs +1 -0
  6. package/build/chunks/{AssetLoader-B1n3KGOu.cjs → AssetLoader-BDDJG9JL.cjs} +2 -2
  7. package/build/chunks/{AssetLoader-BY5D3Cvc.mjs → AssetLoader-kRhuVN4p.mjs} +12 -21
  8. package/build/chunks/FileTypes-DGSsi-AX.mjs +2294 -0
  9. package/build/chunks/FileTypes-gD_1MonW.cjs +29 -0
  10. package/build/chunks/ModelComponent-Cj3ff6nL.cjs +1 -0
  11. package/build/chunks/ModelComponent-DkfAgTL0.mjs +87 -0
  12. package/build/chunks/OrbitController-DFPcXvlO.cjs +1 -0
  13. package/build/chunks/OrbitController-DLEyTvUt.mjs +612 -0
  14. package/build/chunks/SpriteTextComponent-ByefJLeU.cjs +1 -0
  15. package/build/chunks/SpriteTextComponent-CG5vfiFy.mjs +83 -0
  16. package/build/chunks/collectAnimations-BgYCN1le.mjs +35 -0
  17. package/build/chunks/collectAnimations-C3HfZHte.cjs +1 -0
  18. package/build/chunks/contributesToBounds-C1mva__U.cjs +1 -0
  19. package/build/chunks/contributesToBounds-DYmHYES4.mjs +14 -0
  20. package/build/chunks/detachTransformControls-2XQrpLN-.cjs +1 -0
  21. package/build/chunks/detachTransformControls-Dr3TIdVy.mjs +209 -0
  22. package/build/chunks/{isFileTypeSupported-C-hfGk-7.mjs → isFileExtensionSupported-CgcqpgqN.mjs} +1 -1
  23. package/build/chunks/{isFileTypeSupported-xoGjHFuz.cjs → isFileExtensionSupported-RvlnH2dr.cjs} +1 -1
  24. package/build/chunks/isVisibleInHierarchy-D9JcLqR5.cjs +1 -0
  25. package/build/chunks/isVisibleInHierarchy-KzVGvDEw.mjs +21 -0
  26. package/build/components/boundingbox/BoundingBoxComponent.d.ts +100 -0
  27. package/build/components/boundingbox/index.d.ts +1 -0
  28. package/build/components/camera/CameraComponent.d.ts +75 -0
  29. package/build/components/camera/index.d.ts +2 -0
  30. package/build/components/camera/perspective/PerspectiveCameraComponent.d.ts +39 -0
  31. package/build/components/grid/GridComponent.d.ts +50 -0
  32. package/build/components/index.d.ts +6 -9
  33. package/build/components/light/LightComponent.d.ts +65 -0
  34. package/build/components/light/ambient/AmbientLightComponent.d.ts +10 -0
  35. package/build/components/light/directional/DirectionalLightComponent.d.ts +23 -0
  36. package/build/components/light/hemi/HemisphereLightComponent.d.ts +21 -0
  37. package/build/components/light/index.d.ts +5 -3
  38. package/build/components/light/point/PointLightComponent.d.ts +26 -0
  39. package/build/components/line/MultiLineComponent.d.ts +133 -0
  40. package/build/components/line/index.d.ts +1 -0
  41. package/build/components/mesh/MeshComponent.d.ts +74 -0
  42. package/build/components/mesh/floor/FloorComponent.d.ts +36 -0
  43. package/build/components/mesh/index.d.ts +4 -0
  44. package/build/components/mesh/model/ModelComponent.d.ts +67 -0
  45. package/build/components/mesh/primitive/PrimitiveComponent.d.ts +43 -0
  46. package/build/components/spritetext/SpriteTextComponent.d.ts +58 -0
  47. package/build/constants/VisibilityLayerMask.d.ts +23 -0
  48. package/build/dive.cjs +1 -1
  49. package/build/dive.mjs +252 -774
  50. package/build/engine/Dive.d.ts +17 -13
  51. package/build/engine/boundingbox/BoundingBox.d.ts +76 -0
  52. package/build/engine/component/Component.d.ts +236 -0
  53. package/build/engine/environment/Environment.d.ts +8 -18
  54. package/build/engine/index.d.ts +4 -1
  55. package/build/engine/node/Node.d.ts +189 -0
  56. package/build/engine/promise/abortable/AbortablePromise.d.ts +8 -0
  57. package/build/engine/renderer/Renderer.d.ts +43 -7
  58. package/build/engine/scene/Scene.d.ts +88 -4
  59. package/build/engine/scene/root/Root.d.ts +29 -0
  60. package/build/engine/scene/xrroot/XRRoot.d.ts +1 -1
  61. package/build/engine/view/View.d.ts +15 -4
  62. package/build/helpers/collectAnimations/collectAnimations.d.ts +23 -0
  63. package/build/helpers/computeProductBounds/computeProductBounds.d.ts +18 -0
  64. package/build/helpers/contributesToBounds/contributesToBounds.d.ts +17 -0
  65. package/build/helpers/detachTransformControls/detachTransformControls.d.ts +15 -0
  66. package/build/helpers/disposeComponents/disposeComponents.d.ts +20 -0
  67. package/build/helpers/findSceneRecursive/findSceneRecursive.d.ts +7 -3
  68. package/build/helpers/implementsInterface/implementsInterface.d.ts +11 -0
  69. package/build/helpers/index.d.ts +6 -1
  70. package/build/helpers/isVisibleInHierarchy/isVisibleInHierarchy.d.ts +12 -0
  71. package/build/index.d.ts +0 -1
  72. package/build/plugins/animation/index.mjs +3 -2
  73. package/build/plugins/animation/src/system/AnimationSystem.d.ts +3 -2
  74. package/build/plugins/ar/index.cjs +1 -1
  75. package/build/plugins/ar/index.mjs +2 -2
  76. package/build/plugins/ar/src/webxr/WebXR.d.ts +7 -0
  77. package/build/plugins/assetcache/index.cjs +1 -1
  78. package/build/plugins/assetcache/index.mjs +1 -1
  79. package/build/plugins/assetexporter/index.cjs +1 -1
  80. package/build/plugins/assetexporter/index.mjs +1 -1
  81. package/build/plugins/assetexporter/src/AssetExporter.d.ts +12 -0
  82. package/build/plugins/assetloader/index.cjs +1 -1
  83. package/build/plugins/assetloader/index.mjs +2 -2
  84. package/build/plugins/mediacreator/index.cjs +1 -1
  85. package/build/plugins/mediacreator/index.mjs +32 -30
  86. package/build/plugins/mediacreator/src/MediaCreator.d.ts +1 -2
  87. package/build/plugins/orbitcontroller/index.cjs +1 -1
  88. package/build/plugins/orbitcontroller/index.d.ts +1 -0
  89. package/build/plugins/orbitcontroller/index.mjs +1 -1
  90. package/build/plugins/orbitcontroller/src/OrbitController.d.ts +39 -6
  91. package/build/plugins/orientationdisplay/index.cjs +1 -1
  92. package/build/plugins/orientationdisplay/index.mjs +41 -33
  93. package/build/plugins/orientationdisplay/src/OrientationDisplay.d.ts +3 -3
  94. package/build/plugins/quickview/index.cjs +1 -1
  95. package/build/plugins/quickview/index.mjs +71 -19
  96. package/build/plugins/quickview/src/QuickView.d.ts +40 -8
  97. package/build/plugins/quickview/types/QuickViewSettings.d.ts +14 -0
  98. package/build/plugins/state/index.cjs +1 -27
  99. package/build/plugins/state/index.mjs +2031 -4135
  100. package/build/plugins/state/src/EngineGateway.d.ts +98 -0
  101. package/build/plugins/state/src/EntityRegistry.d.ts +51 -0
  102. package/build/plugins/state/src/State.d.ts +20 -9
  103. package/build/plugins/state/src/actions/camera/computeencompassingview.d.ts +1 -1
  104. package/build/plugins/state/src/actions/camera/movecamera.d.ts +2 -2
  105. package/build/plugins/state/src/actions/index.d.ts +1 -0
  106. package/build/plugins/state/src/actions/media/generatemedia.d.ts +1 -1
  107. package/build/plugins/state/src/actions/object/addobject.d.ts +2 -3
  108. package/build/plugins/state/src/actions/object/deleteobject.d.ts +3 -4
  109. package/build/plugins/state/src/actions/object/deselectobject.d.ts +3 -4
  110. package/build/plugins/state/src/actions/object/dropit.d.ts +2 -2
  111. package/build/plugins/state/src/actions/object/getallobjects.d.ts +2 -3
  112. package/build/plugins/state/src/actions/object/getobjects.d.ts +3 -4
  113. package/build/plugins/state/src/actions/object/index.d.ts +0 -1
  114. package/build/plugins/state/src/actions/object/modelloaded.d.ts +2 -2
  115. package/build/plugins/state/src/actions/object/selectobject.d.ts +3 -4
  116. package/build/plugins/state/src/actions/object/setparent.d.ts +3 -4
  117. package/build/plugins/state/src/actions/object/updateobject.d.ts +3 -4
  118. package/build/plugins/state/src/actions/renderer/startrender.d.ts +1 -1
  119. package/build/plugins/state/src/actions/scene/exportscene.d.ts +2 -2
  120. package/build/plugins/state/src/actions/scene/index.d.ts +0 -1
  121. package/build/plugins/state/src/actions/scene/setbackground.d.ts +2 -2
  122. package/build/plugins/state/src/actions/scene/updatescene.d.ts +2 -2
  123. package/build/plugins/state/src/actions/state/getstate.d.ts +8 -0
  124. package/build/plugins/state/src/actions/state/index.d.ts +2 -0
  125. package/build/plugins/state/src/actions/state/setstate.d.ts +8 -0
  126. package/build/plugins/state/src/helpers/copyVectors/copyVectors.d.ts +17 -0
  127. package/build/plugins/state/src/helpers/updateParentLink/updateParentLink.d.ts +29 -0
  128. package/build/plugins/state/src/helpers/watchEntity/watchEntity.d.ts +30 -0
  129. package/build/plugins/state/types/ActionTypes.d.ts +18 -3
  130. package/build/plugins/state/types/RegisteredEntity.d.ts +27 -0
  131. package/build/plugins/state/types/{StateSceneData.d.ts → StateData.d.ts} +7 -8
  132. package/build/plugins/state/types/index.d.ts +3 -1
  133. package/build/plugins/state/types/schema/BaseEntitySchema.d.ts +25 -0
  134. package/build/plugins/state/types/schema/CameraSchema.d.ts +18 -0
  135. package/build/plugins/state/types/schema/EntitySchema.d.ts +21 -0
  136. package/build/plugins/state/types/schema/EntityTypeSchema.d.ts +9 -0
  137. package/build/{types → plugins/state/types}/schema/GroupSchema.d.ts +8 -1
  138. package/build/{types → plugins/state/types}/schema/LightSchema.d.ts +16 -0
  139. package/build/plugins/state/types/schema/ModelSchema.d.ts +33 -0
  140. package/build/{types → plugins/state/types}/schema/PrimitiveSchema.d.ts +8 -4
  141. package/build/{types → plugins/state/types}/schema/index.d.ts +1 -4
  142. package/build/plugins/toolbox/index.cjs +1 -1
  143. package/build/plugins/toolbox/index.mjs +194 -150
  144. package/build/plugins/toolbox/src/PointerContext.d.ts +7 -0
  145. package/build/plugins/toolbox/src/SelectionState.d.ts +21 -0
  146. package/build/plugins/toolbox/src/Toolbox.d.ts +9 -2
  147. package/build/{components → plugins/toolbox/src}/gizmo/Gizmo.d.ts +16 -2
  148. package/build/{components → plugins/toolbox/src}/gizmo/handles/AxisHandle.d.ts +2 -3
  149. package/build/{components → plugins/toolbox/src}/gizmo/handles/RadialHandle.d.ts +2 -3
  150. package/build/{components → plugins/toolbox/src}/gizmo/handles/ScaleHandle.d.ts +2 -3
  151. package/build/{components → plugins/toolbox/src}/gizmo/rotate/RotateGizmo.d.ts +2 -2
  152. package/build/{components → plugins/toolbox/src}/gizmo/scale/ScaleGizmo.d.ts +3 -3
  153. package/build/{components → plugins/toolbox/src}/gizmo/translate/TranslateGizmo.d.ts +2 -2
  154. package/build/types/components/DIVESceneObject.d.ts +13 -6
  155. package/build/types/components/index.d.ts +0 -1
  156. package/build/types/events/DIVEComponentEventMap.d.ts +14 -0
  157. package/build/types/events/DIVEEntityEventMap.d.ts +47 -0
  158. package/build/types/events/index.d.ts +2 -0
  159. package/build/types/geometry/DIVEGeometry.d.ts +16 -0
  160. package/build/types/geometry/DIVEGeometryType.d.ts +7 -0
  161. package/build/types/geometry/index.d.ts +2 -0
  162. package/build/types/index.d.ts +3 -1
  163. package/build/types/material/DIVEMaterial.d.ts +21 -0
  164. package/build/types/material/index.d.ts +1 -0
  165. package/package.json +8 -9
  166. package/build/chunks/AssetExporter-Cdxb04b3.cjs +0 -1
  167. package/build/chunks/AssetExporter-DLL_vJae.mjs +0 -67
  168. package/build/chunks/FileTypes-DMTSUCcK.cjs +0 -29
  169. package/build/chunks/FileTypes-DYtXCJQV.mjs +0 -2141
  170. package/build/chunks/PerspectiveCamera-B5TvUzTa.mjs +0 -39
  171. package/build/chunks/PerspectiveCamera-DwQUmkDv.cjs +0 -1
  172. package/build/chunks/PovSchema-Co9FznEz.cjs +0 -1
  173. package/build/chunks/PovSchema-DWWvr_ED.mjs +0 -10
  174. package/build/chunks/findInterface-C6mrvf_t.cjs +0 -1
  175. package/build/chunks/findInterface-DbJ5qzbc.mjs +0 -11
  176. package/build/components/boundingbox/BoundingBox.d.ts +0 -136
  177. package/build/components/floor/Floor.d.ts +0 -14
  178. package/build/components/grid/Grid.d.ts +0 -23
  179. package/build/components/group/Group.d.ts +0 -28
  180. package/build/components/light/AmbientLight.d.ts +0 -19
  181. package/build/components/light/PointLight.d.ts +0 -29
  182. package/build/components/light/SceneLight.d.ts +0 -20
  183. package/build/components/model/Model.d.ts +0 -26
  184. package/build/components/node/Node.d.ts +0 -24
  185. package/build/components/primitive/Primitive.d.ts +0 -27
  186. package/build/components/root/Root.d.ts +0 -34
  187. package/build/engine/camera/PerspectiveCamera.d.ts +0 -24
  188. package/build/helpers/isFileTypeSupported/isFileTypeSupported.d.ts +0 -9
  189. package/build/plugins/state/src/actions/object/placeonfloor.d.ts +0 -12
  190. package/build/plugins/state/src/actions/scene/getallscenedata.d.ts +0 -9
  191. package/build/types/components/DIVELight.d.ts +0 -4
  192. package/build/types/schema/BaseEntitySchema.d.ts +0 -8
  193. package/build/types/schema/EntitySchema.d.ts +0 -11
  194. package/build/types/schema/EntityTypeSchema.d.ts +0 -1
  195. package/build/types/schema/GeometrySchema.d.ts +0 -7
  196. package/build/types/schema/GeometryTypeSchema.d.ts +0 -1
  197. package/build/types/schema/MaterialSchema.d.ts +0 -11
  198. package/build/types/schema/ModelSchema.d.ts +0 -14
  199. package/build/types/schema/PovSchema.d.ts +0 -10
  200. /package/build/{components → plugins/toolbox/src}/gizmo/plane/GizmoPlane.d.ts +0 -0
package/build/dive.mjs CHANGED
@@ -1,821 +1,299 @@
1
- var S = Object.defineProperty;
2
- var A = (r, s, t) => s in r ? S(r, s, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[s] = t;
3
- var i = (r, s, t) => A(r, typeof s != "symbol" ? s + "" : s, t);
4
- import { d as G, F as R } from "./chunks/FileTypes-DYtXCJQV.mjs";
5
- import { B as _t, b as gt, e as mt, f as Et, g as Dt, h as wt, D as yt, i as Mt, j as xt, k as It, l as Pt, m as Vt, n as bt, c as Ht, o as zt, p as vt, q as Ot, r as St, s as At, t as Gt, u as Rt, v as Tt, w as Lt, x as Yt, G as Ct, y as jt, S as Nt, z as Xt } from "./chunks/FileTypes-DYtXCJQV.mjs";
6
- import { U as d } from "./chunks/PerspectiveCamera-B5TvUzTa.mjs";
7
- import { C as Zt, b as qt, D as Qt, a as Ut, H as Wt, P as kt } from "./chunks/PerspectiveCamera-B5TvUzTa.mjs";
8
- import { A as I, a as P, b as V } from "./chunks/AxisHelperColors-JLBHYQDi.mjs";
9
- import { e as Kt, d as Jt, c as $t } from "./chunks/AxisHelperColors-JLBHYQDi.mjs";
10
- import { Object3D as f, Color as b, Vector3 as c, TorusGeometry as H, MeshBasicMaterial as g, Mesh as p, MathUtils as v, Euler as T, CylinderGeometry as E, BoxGeometry as L, PlaneGeometry as w } from "three/webgpu";
11
- import { f as ee, i as re } from "./chunks/findInterface-DbJ5qzbc.mjs";
12
- import { g as Y } from "./chunks/isFileTypeSupported-C-hfGk-7.mjs";
13
- import { i as ie } from "./chunks/isFileTypeSupported-C-hfGk-7.mjs";
14
- import { F as ae, N as oe } from "./chunks/network-error-BONfHWQq.mjs";
15
- import { F as le, P as ce } from "./chunks/parse-error-DfOPyLWM.mjs";
16
- import { i as pe, a as ue } from "./chunks/PovSchema-DWWvr_ED.mjs";
17
- class y extends f {
18
- constructor(t, e, n, o, a) {
19
- super();
20
- i(this, "isHoverable", !0);
21
- i(this, "isDraggable", !0);
22
- i(this, "parent", null);
23
- i(this, "axis");
24
- i(this, "_color", new b(16711935));
25
- i(this, "_colorHover");
26
- i(this, "_hovered");
27
- i(this, "_highlight");
28
- i(this, "_lineMaterial");
29
- i(this, "_colliderMesh");
30
- this.name = "DIVERadialHandle", this.axis = t, this._color.set(a), this._colorHover = this._color.clone().multiplyScalar(2), this._hovered = !1, this._highlight = !1;
31
- const h = new H(e, 0.01, 13, 48, n);
32
- this._lineMaterial = new g({
33
- color: a,
34
- depthTest: !1,
35
- depthWrite: !1
36
- });
37
- const l = new p(h, this._lineMaterial);
38
- l.layers.mask = d, l.renderOrder = 1 / 0, this.add(l);
39
- const _ = new H(e, 0.1, 3, 48, n), D = new g({
40
- color: 16711935,
41
- transparent: !0,
42
- opacity: 0.15,
43
- depthTest: !1,
44
- depthWrite: !1
45
- });
46
- this._colliderMesh = new p(_, D), this._colliderMesh.visible = !1, this._colliderMesh.layers.mask = d, this._colliderMesh.renderOrder = 1 / 0, this.add(this._colliderMesh), this.lookAt(o);
47
- }
48
- set debug(t) {
49
- this._colliderMesh.visible = t;
50
- }
51
- get highlight() {
52
- return this._highlight;
53
- }
54
- set highlight(t) {
55
- this._highlight = t, this._lineMaterial.color = this._highlight || this._hovered ? this._colorHover : this._color;
56
- }
57
- get forwardVector() {
58
- return new c(0, 0, 1).applyQuaternion(this.quaternion).normalize();
59
- }
60
- get rightVector() {
61
- return new c(1, 0, 0).applyQuaternion(this.quaternion).normalize();
62
- }
63
- get upVector() {
64
- return new c(0, 1, 0).applyQuaternion(this.quaternion).normalize();
65
- }
66
- reset() {
67
- this._lineMaterial.color = this._color;
68
- }
69
- onPointerEnter() {
70
- this._hovered = !0, this.parent && this.parent.onHandleHover(this, !0);
71
- }
72
- onPointerLeave() {
73
- this._hovered = !1, this.parent && this.parent.onHandleHover(this, !1);
74
- }
75
- onDragStart() {
76
- this.parent && this.parent.onHandleDragStart(this);
77
- }
78
- onDrag(t) {
79
- this.parent && this.parent.onHandleDrag(this, t);
80
- }
81
- onDragEnd() {
82
- this.parent && this.parent.onHandleDragEnd(this);
83
- }
84
- }
85
- function u(r, s) {
86
- const t = (r + "e").split("e");
87
- return +(t[0] + "e" + (+t[1] + (s || 0)));
88
- }
89
- function C(r, s = 0) {
90
- const t = u(r, +s);
91
- return u(Math.ceil(t), -s);
92
- }
93
- function j(r, s = 0) {
94
- const t = u(r, +s);
95
- return u(Math.floor(t), -s);
96
- }
97
- function O(r, s = 0) {
98
- if (r < 0) return -O(-r, s);
99
- const t = u(r, +s);
100
- return u(Math.round(t), -s);
101
- }
102
- function N(r, s, t) {
103
- return Math.atan2(
104
- r.clone().cross(s).dot(t),
105
- s.clone().dot(r)
106
- );
107
- }
108
- function X(r, s = 0) {
109
- const t = u(r, +s);
110
- return u(Math.round(t), -s).toFixed(s);
111
- }
112
- function F(r, s = 0) {
113
- const t = u(r, +s);
114
- return u(Math.trunc(t), -s);
115
- }
116
- function Z(r) {
117
- return (v.radToDeg(r) + 360) % 360;
118
- }
119
- function q(r) {
120
- return v.degToRad(r);
121
- }
122
- const Q = {
123
- ceilExp: C,
124
- floorExp: j,
125
- roundExp: O,
126
- toFixedExp: X,
127
- truncateExp: F,
128
- signedAngleTo: N,
129
- radToDeg: Z,
130
- degToRad: q
131
- };
132
- class U extends f {
133
- constructor(t) {
134
- super();
135
- i(this, "children");
136
- i(this, "_controller");
137
- i(this, "_startRot");
138
- this.name = "DIVERotateGizmo", this.children = [], this._startRot = null, this._controller = t, this.add(
139
- new y(
140
- "x",
141
- 1,
142
- Math.PI / 2,
143
- new c(1, 0, 0),
144
- I
145
- )
146
- ), this.add(
147
- new y(
148
- "y",
149
- 1,
150
- -Math.PI / 2,
151
- new c(0, 1, 0),
152
- P
153
- )
154
- ), this.add(
155
- new y(
156
- "z",
157
- 1,
158
- Math.PI / 2,
159
- new c(0, 0, 1),
160
- V
161
- )
162
- );
163
- }
164
- set debug(t) {
165
- this.children.forEach((e) => {
166
- e.debug = t;
167
- });
168
- }
169
- reset() {
170
- this.children.forEach((t) => {
171
- t.reset();
172
- });
173
- }
174
- handleHighlight(t, e, n) {
175
- this.children.forEach((o) => {
176
- n ? o.highlight = o.axis === t && n : o.highlight = o.axis === t && e;
177
- });
178
- }
179
- onHandleHover(t, e) {
180
- this._startRot || this.parent && this.parent.parent && (this.parent.parent.onHover("rotate", t.axis, e), this.handleHighlight(t.axis, e, !1));
181
- }
182
- onHandleDragStart(t) {
183
- if (!this.parent || !this.parent.parent) return;
184
- const e = this.parent.parent.object;
185
- e && (this._startRot = e.rotation.clone(), this.handleHighlight(t.axis, !0, !0));
186
- }
187
- onHandleDrag(t, e) {
188
- if (!this._startRot || !this.parent || !this.parent.parent || !("onChange" in this.parent.parent)) return;
189
- const n = e.dragCurrent.clone().sub(this.parent.parent.position).normalize(), o = e.dragStart.clone().sub(this.parent.parent.position).normalize(), a = Q.signedAngleTo(
190
- o,
191
- n,
192
- t.forwardVector
193
- ), h = new T(
194
- this._startRot.x + t.forwardVector.x * a,
195
- this._startRot.y + t.forwardVector.y * a,
196
- this._startRot.z + t.forwardVector.z * a
197
- );
198
- this.parent.parent.onChange(void 0, h);
199
- }
200
- onHandleDragEnd(t) {
201
- this._startRot = null, this.handleHighlight(t.axis, !1, !1);
202
- }
203
- }
204
- class M extends f {
205
- constructor(t, e, n, o) {
206
- super();
207
- i(this, "isHoverable", !0);
208
- i(this, "isDraggable", !0);
209
- i(this, "parent", null);
210
- i(this, "axis");
211
- i(this, "_color", new b(16711935));
212
- i(this, "_colorHover");
213
- i(this, "_hovered");
214
- i(this, "_highlight");
215
- i(this, "_lineMaterial");
216
- i(this, "_colliderMesh");
217
- this.name = "DIVEAxisHandle", this.axis = t, this._color.set(o), this._colorHover = this._color.clone().multiplyScalar(2), this._highlight = !1, this._hovered = !1;
218
- const a = new E(0.01, 0.01, e, 13);
219
- this._lineMaterial = new g({
220
- color: o,
221
- depthTest: !1,
222
- depthWrite: !1
223
- });
224
- const h = new p(a, this._lineMaterial);
225
- h.layers.mask = d, h.renderOrder = 1 / 0, h.rotateX(Math.PI / 2), h.translateY(e / 2), this.add(h);
226
- const l = new E(0.1, 0.1, e, 3), _ = new g({
227
- color: 16711935,
228
- transparent: !0,
229
- opacity: 0.15,
230
- depthTest: !1,
231
- depthWrite: !1
232
- });
233
- this._colliderMesh = new p(l, _), this._colliderMesh.visible = !1, this._colliderMesh.layers.mask = d, this._colliderMesh.renderOrder = 1 / 0, this._colliderMesh.rotateX(Math.PI / 2), this._colliderMesh.translateY(e / 2), this.add(this._colliderMesh), this.rotateX(n.y * -Math.PI / 2), this.rotateY(n.x * Math.PI / 2);
234
- }
235
- set debug(t) {
236
- this._colliderMesh.visible = t;
237
- }
238
- get highlight() {
239
- return this._highlight;
240
- }
241
- set highlight(t) {
242
- this._highlight = t, this._lineMaterial.color = this._highlight || this._hovered ? this._colorHover : this._color;
243
- }
244
- get forwardVector() {
245
- return new c(0, 0, 1).applyQuaternion(this.quaternion).normalize();
246
- }
247
- get rightVector() {
248
- return new c(1, 0, 0).applyQuaternion(this.quaternion).normalize();
249
- }
250
- get upVector() {
251
- return new c(0, 1, 0).applyQuaternion(this.quaternion).normalize();
252
- }
253
- reset() {
254
- this._lineMaterial.color = this._color;
255
- }
256
- onPointerEnter() {
257
- this._hovered = !0, this.parent && this.parent.onHandleHover(this, !0);
258
- }
259
- onPointerLeave() {
260
- this._hovered = !1, this.parent && this.parent.onHandleHover(this, !1);
261
- }
262
- onDragStart() {
263
- this.parent && this.parent.onHandleDragStart(this);
264
- }
265
- onDrag(t) {
266
- this.parent && this.parent.onHandleDrag(this, t);
267
- }
268
- onDragEnd() {
269
- this.parent && this.parent.onHandleDragEnd(this);
270
- }
271
- }
272
- class W extends f {
273
- constructor(t) {
274
- super();
275
- i(this, "_controller");
276
- i(this, "children");
277
- i(this, "_startPos");
278
- this.name = "DIVETranslateGizmo", this.children = [], this._startPos = null, this._controller = t, this.add(
279
- new M("x", 1, new c(1, 0, 0), I)
280
- ), this.add(
281
- new M("y", 1, new c(0, 1, 0), P)
282
- ), this.add(
283
- new M("z", 1, new c(0, 0, 1), V)
284
- );
285
- }
286
- set debug(t) {
287
- this.children.forEach((e) => {
288
- e.debug = t;
289
- });
290
- }
291
- reset() {
292
- this.children.forEach((t) => {
293
- t.reset();
294
- });
295
- }
296
- handleHighlight(t, e, n) {
297
- this.children.forEach((o) => {
298
- n ? o.highlight = o.axis === t && n : o.highlight = o.axis === t && e;
299
- });
300
- }
301
- onHandleHover(t, e) {
302
- this._startPos || this.parent && this.parent.parent && (this.parent.parent.onHover(
303
- "translate",
304
- t.axis,
305
- e
306
- ), this.handleHighlight(t.axis, e, !1));
307
- }
308
- onHandleDragStart(t) {
309
- if (!this.parent || !this.parent.parent) return;
310
- const e = this.parent.parent.object;
311
- e && (this._startPos = e.position.clone(), this.handleHighlight(t.axis, !0, !0));
312
- }
313
- onHandleDrag(t, e) {
314
- if (!this._startPos || !this.parent || !this.parent.parent || !("onChange" in this.parent.parent)) return;
315
- const n = e.dragDelta.clone().projectOnVector(t.forwardVector);
316
- this.parent.parent.onChange(
317
- this._startPos.clone().add(n)
318
- );
319
- }
320
- onHandleDragEnd(t) {
321
- this._startPos = null, this.handleHighlight(t.axis, !1, !1);
322
- }
323
- }
324
- class x extends f {
325
- constructor(t, e, n, o, a = 0.05) {
326
- super();
327
- i(this, "isHoverable", !0);
328
- i(this, "isDraggable", !0);
329
- i(this, "parent", null);
330
- i(this, "axis");
331
- i(this, "_color", new b(16711935));
332
- i(this, "_colorHover");
333
- i(this, "_hovered");
334
- i(this, "_highlight");
335
- i(this, "_lineMaterial");
336
- i(this, "_colliderMesh");
337
- i(this, "_box");
338
- i(this, "_boxSize");
339
- this.name = "DIVEScaleHandle", this.axis = t, this._color.set(o), this._colorHover = this._color.clone().multiplyScalar(2), this._hovered = !1, this._highlight = !1, this._boxSize = a;
340
- const h = new E(
341
- 0.01,
342
- 0.01,
343
- e - a / 2,
344
- 13
345
- );
346
- this._lineMaterial = new g({
347
- color: o,
348
- depthTest: !1,
349
- depthWrite: !1
350
- });
351
- const l = new p(h, this._lineMaterial);
352
- l.layers.mask = d, l.renderOrder = 1 / 0, l.rotateX(Math.PI / 2), l.translateY(e / 2 - a / 4), this.add(l), this._box = new p(
353
- new L(a, a, a),
354
- this._lineMaterial
355
- ), this._box.layers.mask = d, this._box.renderOrder = 1 / 0, this._box.rotateX(Math.PI / 2), this._box.translateY(e - a / 2), this._box.rotateZ(n.x * Math.PI / 2), this._box.rotateX(n.z * Math.PI / 2), this.add(this._box);
356
- const _ = new E(
357
- 0.1,
358
- 0.1,
359
- e + a / 2,
360
- 3
361
- ), D = new g({
362
- color: 16711935,
363
- transparent: !0,
364
- opacity: 0.15,
365
- depthTest: !1,
366
- depthWrite: !1
367
- });
368
- this._colliderMesh = new p(_, D), this._colliderMesh.visible = !1, this._colliderMesh.layers.mask = d, this._colliderMesh.renderOrder = 1 / 0, this._colliderMesh.rotateX(Math.PI / 2), this._colliderMesh.translateY(e / 2), this.add(this._colliderMesh), this.rotateX(n.y * -Math.PI / 2), this.rotateY(n.x * Math.PI / 2);
369
- }
370
- set debug(t) {
371
- this._colliderMesh.visible = t;
372
- }
373
- get highlight() {
374
- return this._highlight;
375
- }
376
- set highlight(t) {
377
- this._highlight = t, this._lineMaterial.color = this._highlight || this._hovered ? this._colorHover : this._color;
378
- }
379
- get forwardVector() {
380
- return new c(0, 0, 1).applyQuaternion(this.quaternion).normalize();
381
- }
382
- get rightVector() {
383
- return new c(1, 0, 0).applyQuaternion(this.quaternion).normalize();
384
- }
385
- get upVector() {
386
- return new c(0, 1, 0).applyQuaternion(this.quaternion).normalize();
387
- }
388
- reset() {
389
- this._lineMaterial.color = this._color;
390
- }
391
- update(t) {
392
- this._box.scale.copy(
393
- new c(1, 1, 1).sub(this.forwardVector).add(
394
- // to then add ...
395
- t.clone().multiply(this.forwardVector)
396
- // that is scaled by the forward vector again to get the forward vector as the only direction
397
- )
398
- );
399
- }
400
- onPointerEnter() {
401
- this._hovered = !0, this.parent && this.parent.onHoverAxis(this, !0);
402
- }
403
- onPointerLeave() {
404
- this._hovered = !1, this.parent && this.parent.onHoverAxis(this, !1);
405
- }
406
- onDragStart() {
407
- this.parent && this.parent.onAxisDragStart(this);
408
- }
409
- onDrag(t) {
410
- this.parent && this.parent.onAxisDrag(this, t);
411
- }
412
- onDragEnd() {
413
- this.parent && this.parent.onAxisDragEnd(this);
414
- }
415
- }
416
- class k extends f {
417
- constructor(t) {
418
- super();
419
- i(this, "isHoverable", !0);
420
- i(this, "children");
421
- i(this, "_controller");
422
- i(this, "_startScale");
423
- this.name = "DIVEScaleGizmo", this.children = [], this._startScale = null, this._controller = t, this.add(
424
- new x("x", 1, new c(1, 0, 0), I)
425
- ), this.add(
426
- new x("y", 1, new c(0, 1, 0), P)
427
- ), this.add(
428
- new x("z", 1, new c(0, 0, 1), V)
429
- );
430
- }
431
- set debug(t) {
432
- this.children.forEach((e) => {
433
- e.debug = t;
434
- });
435
- }
436
- reset() {
437
- this.children.forEach((t) => {
438
- t.reset();
439
- });
440
- }
441
- update(t) {
442
- this.children.forEach((e) => {
443
- e.update(t);
444
- });
445
- }
446
- handleHighlight(t, e, n) {
447
- this.children.forEach((o) => {
448
- n ? o.highlight = o.axis === t && n : o.highlight = o.axis === t && e;
449
- });
450
- }
451
- onHoverAxis(t, e) {
452
- this._startScale || this.parent && this.parent.parent && (this.parent.parent.onHover(
453
- "translate",
454
- t.axis,
455
- e
456
- ), this.handleHighlight(t.axis, e, !1));
457
- }
458
- onAxisDragStart(t) {
459
- if (!this.parent || !this.parent.parent) return;
460
- const e = this.parent.parent.object;
461
- e && (this._startScale = e.scale.clone(), this.handleHighlight(t.axis, !0, !0));
462
- }
463
- onAxisDrag(t, e) {
464
- if (!this._startScale || !this.parent || !this.parent.parent || !("onChange" in this.parent.parent)) return;
465
- const n = e.dragDelta.clone().projectOnVector(t.forwardVector);
466
- this.parent.parent.onChange(
467
- void 0,
468
- void 0,
469
- this._startScale.clone().add(n)
470
- );
471
- }
472
- onAxisDragEnd(t) {
473
- this._startScale = null, this.handleHighlight(t.axis, !1, !1);
474
- }
475
- }
476
- class B extends f {
477
- constructor() {
478
- super();
479
- i(this, "_meshX");
480
- i(this, "_meshY");
481
- i(this, "_meshZ");
482
- this.name = "DIVEGizmoPlane";
483
- const t = new g({
484
- transparent: !0,
485
- opacity: 0.15,
486
- depthTest: !1,
487
- depthWrite: !1,
488
- side: 2
489
- }), e = new w(100, 100, 2, 2), n = t.clone();
490
- n.color.set(16711680), this._meshX = new p(e, n), this._meshX.layers.mask = d, this._meshX.rotateY(Math.PI / 2);
491
- const o = new w(100, 100, 2, 2), a = t.clone();
492
- a.color.set(65280), this._meshY = new p(o, a), this._meshY.layers.mask = d, this._meshY.rotateX(-Math.PI / 2);
493
- const h = new w(100, 100, 2, 2), l = t.clone();
494
- l.color.set(255), this._meshZ = new p(h, l), this._meshZ.layers.mask = d;
495
- }
496
- get XPlane() {
497
- return this._meshX;
498
- }
499
- get YPlane() {
500
- return this._meshY;
501
- }
502
- get ZPlane() {
503
- return this._meshZ;
504
- }
505
- assemble(t, e) {
506
- if (this.clear(), t === "translate" || t === "scale")
507
- switch (e) {
508
- case "x":
509
- this.add(this._meshY), this.add(this._meshZ);
510
- break;
511
- case "y":
512
- this.add(this._meshX), this.add(this._meshZ);
513
- break;
514
- case "z":
515
- this.add(this._meshX), this.add(this._meshY);
516
- break;
517
- }
518
- else if (t === "rotate")
519
- switch (e) {
520
- case "x":
521
- this.add(this._meshX);
522
- break;
523
- case "y":
524
- this.add(this._meshY);
525
- break;
526
- case "z":
527
- this.add(this._meshZ);
528
- break;
529
- }
530
- }
531
- }
532
- class it extends f {
533
- constructor(t) {
534
- super();
535
- i(this, "_mode");
536
- i(this, "_gizmoNode");
537
- i(this, "_translateGizmo");
538
- i(this, "_rotateGizmo");
539
- i(this, "_scaleGizmo");
540
- i(this, "_gizmoPlane");
541
- // attachment stuff
542
- i(this, "_object");
543
- this.name = "DIVEGizmo", t.addEventListener("change", () => {
544
- const e = t.getDistance() / 2.5;
545
- this.scale.set(e, e, e);
546
- }), this._mode = "translate", this._gizmoNode = new f(), this.add(this._gizmoNode), this._translateGizmo = new W(t), this._rotateGizmo = new U(t), this._scaleGizmo = new k(t), this._gizmoPlane = new B(), this._gizmoPlane.visible = !1, this._object = null;
547
- }
548
- get mode() {
549
- return this._mode;
550
- }
551
- set mode(t) {
552
- this._mode = t, this.assemble();
553
- }
554
- set debug(t) {
555
- this._translateGizmo.debug = t, this._rotateGizmo.debug = t, this._scaleGizmo.debug = t;
556
- }
557
- get gizmoNode() {
558
- return this._gizmoNode;
559
- }
560
- get gizmoPlane() {
561
- return this._gizmoPlane;
562
- }
563
- get object() {
564
- return this._object;
565
- }
566
- attach(t) {
567
- return this._object = t, this.assemble(), this;
568
- }
569
- detach() {
570
- return this._object = null, this.assemble(), this;
571
- }
572
- onHover(t, e, n) {
573
- n && this._gizmoPlane.assemble(t, e);
574
- }
575
- onChange(t, e, n) {
576
- this.object !== null && (t && (this.position.copy(t), this.object.position.copy(t)), e && this.object.rotation.copy(e), n && (this.object.scale.copy(n), this._scaleGizmo.update(n)));
577
- }
578
- assemble() {
579
- this._gizmoNode.clear(), this._gizmoPlane.clear(), this._translateGizmo.reset(), this._rotateGizmo.reset(), this._scaleGizmo.reset(), this.object !== null && (this._mode === "translate" && this._gizmoNode.add(this._translateGizmo), this._mode === "rotate" && this._gizmoNode.add(this._rotateGizmo), this._mode === "scale" && this._gizmoNode.add(this._scaleGizmo), this.add(this._gizmoPlane));
580
- }
581
- }
582
- class nt {
1
+ var g = Object.defineProperty;
2
+ var O = (e, t, r) => t in e ? g(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r;
3
+ var u = (e, t, r) => O(e, typeof t != "symbol" ? t + "" : t, r);
4
+ import { h as d } from "./chunks/FileTypes-DGSsi-AX.mjs";
5
+ import { B as G, i as j, c as v, j as H, D as b, k as J, l as W, a as q, b as z, m as X, n as Q, o as Z, f as $, d as k, p as ee, q as te, r as re, s as ne, t as oe, u as se, v as ae, w as ce, F as ie, x as fe, G as pe, y as ue, z as le, H as Ee, M as me, A as De, P as ge, S as Oe, C as de, E as Ae, e as Ie, I as ye, g as he, J as Ce } from "./chunks/FileTypes-DGSsi-AX.mjs";
6
+ import { b as Me, e as xe, a as Se, d as Re, A as Le, c as Ve } from "./chunks/AxisHelperColors-JLBHYQDi.mjs";
7
+ import { C as Te, D as we, F as Fe, H as Ne, P as Ye, a as Be, U as Ue, c as Ke } from "./chunks/contributesToBounds-DYmHYES4.mjs";
8
+ import { A as je, P as ve, a as He, d as be } from "./chunks/detachTransformControls-Dr3TIdVy.mjs";
9
+ import { M as We } from "./chunks/ModelComponent-DkfAgTL0.mjs";
10
+ import { S as ze } from "./chunks/SpriteTextComponent-CG5vfiFy.mjs";
11
+ import { c as Qe } from "./chunks/collectAnimations-BgYCN1le.mjs";
12
+ import { f as $e, i as ke, a as et } from "./chunks/isVisibleInHierarchy-KzVGvDEw.mjs";
13
+ import { i as A, g as I } from "./chunks/isFileExtensionSupported-CgcqpgqN.mjs";
14
+ import { MathUtils as E } from "three/webgpu";
15
+ import { F as rt, N as nt } from "./chunks/network-error-BONfHWQq.mjs";
16
+ import { F as st, P as at } from "./chunks/parse-error-DfOPyLWM.mjs";
17
+ class T {
583
18
  constructor() {
584
- i(this, "isMovable", !0);
19
+ u(this, "isMovable", !0);
585
20
  }
586
21
  }
587
- class at {
22
+ class w {
588
23
  constructor() {
589
- i(this, "isSelectable", !0);
24
+ u(this, "isSelectable", !0);
590
25
  }
591
26
  }
592
- function ot(r, s) {
593
- return s.forEach((t) => {
594
- Object.getOwnPropertyNames(t.prototype).forEach((n) => {
595
- if (n === "constructor")
27
+ function F(e, t) {
28
+ return t.forEach((r) => {
29
+ Object.getOwnPropertyNames(r.prototype).forEach((a) => {
30
+ if (a === "constructor")
596
31
  return;
597
- const o = Object.getOwnPropertyDescriptor(
598
- t.prototype,
599
- n
32
+ const c = Object.getOwnPropertyDescriptor(
33
+ r.prototype,
34
+ a
600
35
  );
601
- Object.defineProperty(r.prototype, n, o);
36
+ Object.defineProperty(e.prototype, a, c);
602
37
  });
603
- const e = new t();
604
- Object.getOwnPropertyNames(e).forEach((n) => {
605
- const o = Object.getOwnPropertyDescriptor(
606
- e,
607
- n
38
+ const n = new r();
39
+ Object.getOwnPropertyNames(n).forEach((a) => {
40
+ const c = Object.getOwnPropertyDescriptor(
41
+ n,
42
+ a
608
43
  );
609
- Object.defineProperty(r.prototype, n, o);
44
+ Object.defineProperty(e.prototype, a, c);
610
45
  });
611
- }), r;
46
+ }), e;
612
47
  }
613
- function m(r, s = /* @__PURE__ */ new WeakMap()) {
614
- if (r === null || typeof r != "object")
615
- return r;
616
- if (s.has(r))
617
- return s.get(r);
618
- if (r instanceof Date)
619
- return new Date(r.getTime());
620
- if (r instanceof RegExp)
621
- return new RegExp(r.source, r.flags);
622
- if (Array.isArray(r)) {
623
- const a = [];
624
- s.set(r, a);
625
- for (let h = 0; h < r.length; h++)
626
- a[h] = m(r[h], s);
627
- return a;
628
- }
629
- if (r instanceof Map) {
630
- const a = /* @__PURE__ */ new Map();
631
- s.set(r, a);
632
- for (const [
633
- h,
634
- l
635
- ] of r)
636
- a.set(m(h, s), m(l, s));
637
- return a;
638
- }
639
- if (r instanceof Set) {
640
- const a = /* @__PURE__ */ new Set();
641
- s.set(r, a);
642
- for (const h of r)
643
- a.add(m(h, s));
644
- return a;
645
- }
646
- const t = r;
647
- if (typeof t.clone == "function") {
648
- const a = t.clone();
649
- return s.set(r, a), a;
650
- }
651
- const e = Object.create(Object.getPrototypeOf(r));
652
- s.set(r, e);
653
- const n = Object.getOwnPropertyNames(r);
654
- for (const a of n) {
655
- const h = Object.getOwnPropertyDescriptor(r, a);
656
- if (h)
657
- if (h.value !== void 0) {
658
- const l = m(h.value, s);
659
- Object.defineProperty(e, a, {
660
- ...h,
661
- value: l
48
+ function p(e, t = /* @__PURE__ */ new WeakMap()) {
49
+ if (e === null || typeof e != "object")
50
+ return e;
51
+ if (t.has(e))
52
+ return t.get(e);
53
+ if (e instanceof Date)
54
+ return new Date(e.getTime());
55
+ if (e instanceof RegExp)
56
+ return new RegExp(e.source, e.flags);
57
+ if (Array.isArray(e)) {
58
+ const o = [];
59
+ t.set(e, o);
60
+ for (let s = 0; s < e.length; s++)
61
+ o[s] = p(e[s], t);
62
+ return o;
63
+ }
64
+ if (e instanceof Map) {
65
+ const o = /* @__PURE__ */ new Map();
66
+ t.set(e, o);
67
+ for (const [s, f] of e)
68
+ o.set(p(s, t), p(f, t));
69
+ return o;
70
+ }
71
+ if (e instanceof Set) {
72
+ const o = /* @__PURE__ */ new Set();
73
+ t.set(e, o);
74
+ for (const s of e)
75
+ o.add(p(s, t));
76
+ return o;
77
+ }
78
+ const r = e;
79
+ if (typeof r.clone == "function") {
80
+ const o = r.clone();
81
+ return t.set(e, o), o;
82
+ }
83
+ const n = Object.create(Object.getPrototypeOf(e));
84
+ t.set(e, n);
85
+ const a = Object.getOwnPropertyNames(e);
86
+ for (const o of a) {
87
+ const s = Object.getOwnPropertyDescriptor(e, o);
88
+ if (s)
89
+ if (s.value !== void 0) {
90
+ const f = p(s.value, t);
91
+ Object.defineProperty(n, o, {
92
+ ...s,
93
+ value: f
662
94
  });
663
95
  } else
664
- Object.defineProperty(e, a, h);
665
- }
666
- const o = Object.getOwnPropertySymbols(r);
667
- for (const a of o) {
668
- const h = Object.getOwnPropertyDescriptor(r, a);
669
- if (h)
670
- if (h.value !== void 0) {
671
- const l = m(h.value, s);
672
- Object.defineProperty(e, a, {
673
- ...h,
674
- value: l
96
+ Object.defineProperty(n, o, s);
97
+ }
98
+ const c = Object.getOwnPropertySymbols(e);
99
+ for (const o of c) {
100
+ const s = Object.getOwnPropertyDescriptor(e, o);
101
+ if (s)
102
+ if (s.value !== void 0) {
103
+ const f = p(s.value, t);
104
+ Object.defineProperty(n, o, {
105
+ ...s,
106
+ value: f
675
107
  });
676
108
  } else
677
- Object.defineProperty(e, a, h);
109
+ Object.defineProperty(n, o, s);
678
110
  }
679
- return e;
111
+ return n;
680
112
  }
681
- const z = (r, s) => {
682
- if (Object.keys(r).length === 0 && Object.keys(s).length === 0)
113
+ const l = (e, t) => {
114
+ if (Object.keys(e).length === 0 && Object.keys(t).length === 0)
683
115
  return {};
684
- if (typeof r != "object" || typeof s != "object")
685
- return s;
686
- let t = {};
687
- return Object.keys(s).forEach((e) => {
688
- if (!Object.keys(r).includes(e)) {
689
- t = { ...t, [e]: s[e] };
116
+ if (typeof e != "object" || typeof t != "object")
117
+ return t;
118
+ let r = {};
119
+ return Object.keys(t).forEach((n) => {
120
+ if (!Object.keys(e).includes(n)) {
121
+ r = { ...r, [n]: t[n] };
690
122
  return;
691
123
  }
692
- if (Array.isArray(s[e])) {
693
- if (!Array.isArray(r[e])) {
694
- t = { ...t, [e]: s[e] };
124
+ if (Array.isArray(t[n])) {
125
+ if (!Array.isArray(e[n])) {
126
+ r = { ...r, [n]: t[n] };
695
127
  return;
696
128
  }
697
- const n = r[e], o = s[e];
698
- if (n.length === 0 && o.length === 0) {
699
- t = { ...t };
129
+ const a = e[n], c = t[n];
130
+ if (a.length === 0 && c.length === 0) {
131
+ r = { ...r };
700
132
  return;
701
133
  }
702
- if (n.length !== o.length) {
703
- t = { ...t, [e]: s[e] };
134
+ if (a.length !== c.length) {
135
+ r = { ...r, [n]: t[n] };
704
136
  return;
705
137
  }
706
- const a = [];
707
- if (o.forEach((h, l) => {
708
- const _ = z(
709
- n[l],
710
- o[l]
138
+ const o = [];
139
+ if (c.forEach((s, f) => {
140
+ const D = l(
141
+ a[f],
142
+ c[f]
711
143
  );
712
- Object.keys(_).length && a.push(o[l]);
713
- }), Object.keys(a).length) {
714
- t = { ...t, [e]: a };
144
+ Object.keys(D).length && o.push(c[f]);
145
+ }), Object.keys(o).length) {
146
+ r = { ...r, [n]: o };
715
147
  return;
716
148
  }
717
149
  return;
718
150
  }
719
- if (typeof s[e] == "object") {
720
- if (typeof r[e] != "object") {
721
- t = { ...t, [e]: s[e] };
151
+ if (typeof t[n] == "object") {
152
+ if (typeof e[n] != "object") {
153
+ r = { ...r, [n]: t[n] };
722
154
  return;
723
155
  }
724
- const n = z(
725
- r[e],
726
- s[e]
156
+ const a = l(
157
+ e[n],
158
+ t[n]
727
159
  );
728
- if (Object.keys(n).length) {
729
- t = { ...t, [e]: n };
160
+ if (Object.keys(a).length) {
161
+ r = { ...r, [n]: a };
730
162
  return;
731
163
  }
732
164
  }
733
- r[e] !== s[e] && (t = { ...t, [e]: s[e] });
734
- }), t;
165
+ e[n] !== t[n] && (r = { ...r, [n]: t[n] });
166
+ }), r;
735
167
  };
736
- function ht(r) {
737
- return G.includes(r.toLowerCase());
168
+ function N(e) {
169
+ return d.includes(e.toLowerCase());
738
170
  }
739
- function K(r) {
740
- return r.toLowerCase() in R;
171
+ function Y(e) {
172
+ return A(I(e));
741
173
  }
742
- function lt(r) {
743
- return K(Y(r));
174
+ function i(e, t) {
175
+ const r = (e + "e").split("e");
176
+ return +(r[0] + "e" + (+r[1] + (t || 0)));
744
177
  }
745
- function ct(r) {
746
- return r.entityType === "group";
178
+ function y(e, t = 0) {
179
+ const r = i(e, +t);
180
+ return i(Math.ceil(r), -t);
747
181
  }
748
- function dt(r) {
749
- return r.entityType === "light";
182
+ function h(e, t = 0) {
183
+ const r = i(e, +t);
184
+ return i(Math.floor(r), -t);
750
185
  }
751
- function pt(r) {
752
- return r.entityType === "primitive";
186
+ function m(e, t = 0) {
187
+ if (e < 0) return -m(-e, t);
188
+ const r = i(e, +t);
189
+ return i(Math.round(r), -t);
753
190
  }
191
+ function C(e, t, r) {
192
+ return Math.atan2(
193
+ e.clone().cross(t).dot(r),
194
+ t.clone().dot(e)
195
+ );
196
+ }
197
+ function P(e, t = 0) {
198
+ const r = i(e, +t);
199
+ return i(Math.round(r), -t).toFixed(t);
200
+ }
201
+ function M(e, t = 0) {
202
+ const r = i(e, +t);
203
+ return i(Math.trunc(r), -t);
204
+ }
205
+ function x(e) {
206
+ return (E.radToDeg(e) + 360) % 360;
207
+ }
208
+ function S(e) {
209
+ return E.degToRad(e);
210
+ }
211
+ const B = {
212
+ ceilExp: y,
213
+ floorExp: h,
214
+ roundExp: m,
215
+ toFixedExp: P,
216
+ truncateExp: M,
217
+ signedAngleTo: C,
218
+ radToDeg: x,
219
+ degToRad: S
220
+ };
754
221
  export {
755
- V as AxesColorBlue,
756
- Kt as AxesColorBlueLetter,
757
- P as AxesColorGreen,
758
- Jt as AxesColorGreenLetter,
759
- I as AxesColorRed,
760
- $t as AxesColorRedLetter,
761
- _t as BoundingBox,
762
- Zt as COORDINATE_LAYER_MASK,
763
- qt as DEFAULT_LAYER_MASK,
764
- gt as DIVE,
765
- mt as DIVEAbortablePromise,
766
- Et as DIVEAmbientLight,
767
- Dt as DIVECanvasLifecycleManager,
768
- wt as DIVEClock,
769
- yt as DIVEDefaultSettings,
770
- Mt as DIVEDeferredPromise,
771
- xt as DIVEEnvironment,
772
- It as DIVEEnvironmentDefaultSettings,
773
- Pt as DIVEFloor,
774
- it as DIVEGizmo,
775
- Vt as DIVEGrid,
776
- bt as DIVEGroup,
777
- Q as DIVEMath,
778
- Ht as DIVEModel,
779
- nt as DIVEMovable,
780
- zt as DIVENode,
781
- Qt as DIVEPerspectiveCamera,
782
- Ut as DIVEPerspectiveCameraDefaultSettings,
783
- vt as DIVEPointLight,
784
- Ot as DIVEPrimitive,
785
- St as DIVERenderer,
786
- At as DIVERendererDefaultSettings,
787
- Gt as DIVERoot,
788
- Rt as DIVEScene,
789
- Tt as DIVESceneDefaultSettings,
790
- Lt as DIVESceneLight,
791
- at as DIVESelectable,
792
- Yt as DIVEView,
793
- R as FILE_TYPES,
794
- ae as FileContentError,
795
- le as FileTypeError,
796
- Ct as GRID_MAJOR_LINE_COLOR,
797
- jt as GRID_MINOR_LINE_COLOR,
798
- Wt as HELPER_LAYER_MASK,
799
- oe as NetworkError,
800
- kt as PRODUCT_LAYER_MASK,
801
- ce as ParseError,
802
- Nt as SUPPORTED_FILE_TYPES,
803
- G as SUPPORTED_MIME_TYPES,
804
- d as UI_LAYER_MASK,
805
- ot as applyMixins,
806
- m as deepClone,
807
- ee as findInterface,
808
- Xt as findSceneRecursive,
809
- Y as getFileTypeFromUri,
810
- z as getObjectDelta,
811
- re as implementsInterface,
812
- K as isFileExtensionSupported,
813
- ie as isFileTypeSupported,
814
- ct as isGroupSchema,
815
- dt as isLightSchema,
816
- ht as isMimeTypeSupported,
817
- pe as isModelSchema,
818
- ue as isPovSchema,
819
- pt as isPrimitiveSchema,
820
- lt as isURIFileExtensionSupported
222
+ je as AmbientLightComponent,
223
+ Me as AxesColorBlue,
224
+ xe as AxesColorBlueLetter,
225
+ Se as AxesColorGreen,
226
+ Re as AxesColorGreenLetter,
227
+ Le as AxesColorRed,
228
+ Ve as AxesColorRedLetter,
229
+ G as BoundingBox,
230
+ j as BoundingBoxComponent,
231
+ Te as COORDINATE_LAYER_MASK,
232
+ we as DEFAULT_LAYER_MASK,
233
+ v as DIVE,
234
+ H as DIVEAbortablePromise,
235
+ b as DIVECameraComponent,
236
+ J as DIVECanvasLifecycleManager,
237
+ W as DIVEClock,
238
+ q as DIVEComponent,
239
+ z as DIVEDefaultSettings,
240
+ X as DIVEDeferredPromise,
241
+ Q as DIVEEnvironment,
242
+ Z as DIVEEnvironmentDefaultSettings,
243
+ $ as DIVELightComponent,
244
+ B as DIVEMath,
245
+ T as DIVEMovable,
246
+ k as DIVENode,
247
+ ee as DIVEPerspectiveCameraDefaultSettings,
248
+ te as DIVERenderer,
249
+ re as DIVERendererDefaultSettings,
250
+ ne as DIVERoot,
251
+ oe as DIVEScene,
252
+ se as DIVESceneDefaultSettings,
253
+ w as DIVESelectable,
254
+ ae as DIVEView,
255
+ ce as DirectionalLightComponent,
256
+ ie as FILE_TYPES,
257
+ Fe as FLOOR_LAYER_MASK,
258
+ rt as FileContentError,
259
+ st as FileTypeError,
260
+ fe as FloorComponent,
261
+ pe as GRID_MAJOR_LINE_COLOR,
262
+ ue as GRID_MINOR_LINE_COLOR,
263
+ le as GridComponent,
264
+ Ne as HELPER_LAYER_MASK,
265
+ Ee as HemisphereLightComponent,
266
+ me as MeshComponent,
267
+ We as ModelComponent,
268
+ De as MultiLineComponent,
269
+ nt as NetworkError,
270
+ Ye as PRODUCT_LAYER_MASK,
271
+ Be as PROXY_LAYER_MASK,
272
+ at as ParseError,
273
+ ge as PerspectiveCameraComponent,
274
+ ve as PointLightComponent,
275
+ He as PrimitiveComponent,
276
+ Oe as SUPPORTED_FILE_TYPES,
277
+ d as SUPPORTED_MIME_TYPES,
278
+ ze as SpriteTextComponent,
279
+ Ue as UI_LAYER_MASK,
280
+ F as applyMixins,
281
+ Qe as collectAnimations,
282
+ de as computeProductBounds,
283
+ Ae as contributedBy,
284
+ Ke as contributesToBounds,
285
+ p as deepClone,
286
+ be as detachTransformControls,
287
+ Ie as disposeComponents,
288
+ ye as findComponent,
289
+ $e as findInterface,
290
+ he as findSceneRecursive,
291
+ I as getFileTypeFromUri,
292
+ l as getObjectDelta,
293
+ ke as implementsInterface,
294
+ Ce as isDIVEComponent,
295
+ A as isFileExtensionSupported,
296
+ N as isMimeTypeSupported,
297
+ Y as isURIFileExtensionSupported,
298
+ et as isVisibleInHierarchy
821
299
  };