@shopware-ag/dive 2.3.8 → 3.0.0-beta.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.
Files changed (142) hide show
  1. package/build/chunks/Animator-DHnpWRt_.mjs +16 -0
  2. package/build/chunks/Animator-YDE8aFEd.cjs +1 -0
  3. package/build/chunks/AssetCache-Bk3ov4KH.cjs +1 -0
  4. package/build/chunks/{AssetCache-CJPVU7kz.mjs → AssetCache-DNcSNSJk.mjs} +6 -5
  5. package/build/chunks/AssetExporter-Cdxb04b3.cjs +1 -0
  6. package/build/chunks/AssetExporter-DLL_vJae.mjs +67 -0
  7. package/build/chunks/AssetLoader-D6ScugS-.cjs +3 -0
  8. package/build/chunks/AssetLoader-Dvq0Wk28.mjs +499 -0
  9. package/build/chunks/{ClipAnimator-keFLDMNZ.mjs → ClipAnimator-D8Gho4Ec.mjs} +2 -2
  10. package/build/chunks/ClipAnimator-SdDq2wk1.cjs +1 -0
  11. package/build/chunks/FileTypes-CGEeONh9.cjs +29 -0
  12. package/build/chunks/FileTypes-DU8bBa_V.mjs +1976 -0
  13. package/build/chunks/GridNode-0R5ZnzR6.mjs +30 -0
  14. package/build/chunks/GridNode-iqnu86_v.cjs +1 -0
  15. package/build/chunks/{PerspectiveCamera-BFzE2TQU.mjs → PerspectiveCamera-B5TvUzTa.mjs} +1 -1
  16. package/build/chunks/PerspectiveCamera-DwQUmkDv.cjs +1 -0
  17. package/build/chunks/{TargetAnimator-DuqPk2eq.cjs → TargetAnimator-D37bWNKD.cjs} +1 -1
  18. package/build/chunks/{TargetAnimator-DUqkkdVb.mjs → TargetAnimator-DL_9b921.mjs} +1 -1
  19. package/build/chunks/{isFileTypeSupported-CqzOKCiV.mjs → isFileTypeSupported-DY4QOFj7.mjs} +1 -1
  20. package/build/chunks/{isFileTypeSupported-D97zmt1P.cjs → isFileTypeSupported-DrMUwnQx.cjs} +1 -1
  21. package/build/components/boundingbox/BoundingBox.d.ts +1 -1
  22. package/build/components/floor/Floor.d.ts +1 -1
  23. package/build/components/gizmo/Gizmo.d.ts +1 -1
  24. package/build/components/gizmo/handles/AxisHandle.d.ts +1 -1
  25. package/build/components/gizmo/handles/RadialHandle.d.ts +1 -1
  26. package/build/components/gizmo/handles/ScaleHandle.d.ts +1 -1
  27. package/build/components/gizmo/plane/GizmoPlane.d.ts +1 -1
  28. package/build/components/gizmo/rotate/RotateGizmo.d.ts +1 -1
  29. package/build/components/gizmo/scale/ScaleGizmo.d.ts +1 -1
  30. package/build/components/gizmo/translate/TranslateGizmo.d.ts +1 -1
  31. package/build/components/grid/Grid.d.ts +2 -1
  32. package/build/components/group/Group.d.ts +1 -1
  33. package/build/components/light/AmbientLight.d.ts +1 -1
  34. package/build/components/light/PointLight.d.ts +1 -1
  35. package/build/components/light/SceneLight.d.ts +1 -1
  36. package/build/components/model/Model.d.ts +1 -1
  37. package/build/components/node/Node.d.ts +1 -1
  38. package/build/components/primitive/Primitive.d.ts +1 -1
  39. package/build/components/root/Root.d.ts +1 -1
  40. package/build/dive.cjs +1 -1
  41. package/build/dive.mjs +58 -60
  42. package/build/engine/Dive.d.ts +4 -31
  43. package/build/engine/camera/PerspectiveCamera.d.ts +1 -1
  44. package/build/engine/environment/Environment.d.ts +12 -27
  45. package/build/engine/renderer/Renderer.d.ts +7 -8
  46. package/build/engine/scene/Scene.d.ts +1 -1
  47. package/build/engine/scene/xrroot/XRRoot.d.ts +2 -3
  48. package/build/engine/scene/xrroot/xrlightroot/XRLightRoot.d.ts +3 -3
  49. package/build/helpers/findInterface/findInterface.d.ts +1 -1
  50. package/build/helpers/findSceneRecursive/findSceneRecursive.d.ts +1 -1
  51. package/build/helpers/implementsInterface/implementsInterface.d.ts +1 -1
  52. package/build/helpers/math/signedAngleTo/signedAngleTo.d.ts +1 -1
  53. package/build/interfaces/Hoverable.d.ts +1 -1
  54. package/build/plugins/animation/index.cjs +1 -1
  55. package/build/plugins/animation/index.mjs +12 -20
  56. package/build/plugins/animation/src/animator/Animator.d.ts +1 -1
  57. package/build/plugins/animation/src/animator/ClipAnimator.d.ts +1 -1
  58. package/build/plugins/animation/src/system/AnimationSystem.d.ts +1 -6
  59. package/build/plugins/animation/src/types/AnimatorTypes.d.ts +1 -1
  60. package/build/plugins/ar/index.cjs +1 -1
  61. package/build/plugins/ar/index.mjs +5 -4
  62. package/build/plugins/ar/src/webxr/controller/WebXRController.d.ts +1 -1
  63. package/build/plugins/ar/src/webxr/crosshair/WebXRCrosshair.d.ts +1 -1
  64. package/build/plugins/ar/src/webxr/origin/WebXROrigin.d.ts +1 -1
  65. package/build/plugins/ar/src/webxr/raycaster/WebXRRaycaster.d.ts +1 -1
  66. package/build/plugins/ar/src/webxr/touchscreencontrols/WebXRTouchscreenControls.d.ts +1 -1
  67. package/build/plugins/assetcache/index.cjs +1 -1
  68. package/build/plugins/assetcache/index.mjs +1 -1
  69. package/build/plugins/assetexporter/index.cjs +1 -1
  70. package/build/plugins/assetexporter/index.mjs +1 -1
  71. package/build/plugins/assetexporter/src/AssetExporter.d.ts +1 -1
  72. package/build/plugins/assetloader/index.cjs +1 -1
  73. package/build/plugins/assetloader/index.mjs +2 -2
  74. package/build/plugins/assetloader/src/loader/AssetLoader.d.ts +2 -2
  75. package/build/plugins/assetloader/src/step/STEPLoader.d.ts +1 -1
  76. package/build/plugins/mediacreator/index.cjs +1 -1
  77. package/build/plugins/mediacreator/index.mjs +52 -24
  78. package/build/plugins/mediacreator/src/MediaCreator.d.ts +4 -3
  79. package/build/plugins/mediacreator/types/MediaGenerationByPosition.d.ts +1 -1
  80. package/build/plugins/orbitcontroller/index.cjs +1 -1
  81. package/build/plugins/orbitcontroller/index.mjs +1 -1
  82. package/build/plugins/orbitcontroller/src/OrbitController.d.ts +1 -1
  83. package/build/plugins/orbitcontroller/types/OrbitControllerState.types.d.ts +1 -1
  84. package/build/plugins/orientationdisplay/index.cjs +1 -1
  85. package/build/plugins/orientationdisplay/index.mjs +17 -16
  86. package/build/plugins/orientationdisplay/src/axes/Axes.d.ts +1 -1
  87. package/build/plugins/quickview/index.cjs +1 -1
  88. package/build/plugins/quickview/index.mjs +9 -8
  89. package/build/plugins/shader/index.cjs +1 -1
  90. package/build/plugins/shader/index.mjs +2 -3
  91. package/build/plugins/shader/src/index.d.ts +1 -3
  92. package/build/plugins/shader/src/shaders/GridNode.d.ts +16 -0
  93. package/build/plugins/state/index.cjs +9 -9
  94. package/build/plugins/state/index.mjs +939 -936
  95. package/build/plugins/state/src/actions/camera/computeencompassingview.d.ts +1 -1
  96. package/build/plugins/state/src/actions/camera/getcameratransform.d.ts +1 -1
  97. package/build/plugins/state/src/actions/camera/movecamera.d.ts +1 -1
  98. package/build/plugins/state/src/actions/camera/setcameratransform.d.ts +1 -1
  99. package/build/plugins/state/types/StateSceneData.d.ts +1 -1
  100. package/build/plugins/toolbox/index.cjs +1 -1
  101. package/build/plugins/toolbox/index.d.ts +0 -1
  102. package/build/plugins/toolbox/index.mjs +224 -853
  103. package/build/plugins/toolbox/src/PointerContext.d.ts +1 -1
  104. package/build/plugins/toolbox/src/SelectionState.d.ts +1 -1
  105. package/build/plugins/toolbox/src/Toolbox.d.ts +0 -10
  106. package/build/plugins/toolbox/src/drag/DragTool.d.ts +1 -1
  107. package/build/plugins/toolbox/src/drag/DraggableEvent.d.ts +1 -1
  108. package/build/plugins/toolbox/src/hover/HoverTool.d.ts +1 -1
  109. package/build/plugins/toolbox/src/select/SelectTool.d.ts +1 -1
  110. package/build/plugins/toolbox/src/transform/TransformTool.d.ts +2 -1
  111. package/build/types/schema/GroupSchema.d.ts +1 -1
  112. package/build/types/schema/LightSchema.d.ts +1 -1
  113. package/build/types/schema/MaterialSchema.d.ts +1 -1
  114. package/build/types/schema/ModelSchema.d.ts +1 -1
  115. package/build/types/schema/PovSchema.d.ts +1 -1
  116. package/build/types/schema/PrimitiveSchema.d.ts +1 -1
  117. package/package.json +5 -4
  118. package/build/chunks/Animator-BGFdF70Z.mjs +0 -47
  119. package/build/chunks/Animator-Cu7NIkVg.cjs +0 -1
  120. package/build/chunks/AssetCache-B74AQgyY.cjs +0 -1
  121. package/build/chunks/AssetExporter-PFiNYi50.mjs +0 -1628
  122. package/build/chunks/AssetExporter-yVhYmVXW.cjs +0 -164
  123. package/build/chunks/AssetLoader-BCI944C9.mjs +0 -2590
  124. package/build/chunks/AssetLoader-BIU78Bv9.cjs +0 -5
  125. package/build/chunks/ClipAnimator-tjhLo851.cjs +0 -1
  126. package/build/chunks/DIVEShaderMaterial-Bt0d8oJB.mjs +0 -3468
  127. package/build/chunks/DIVEShaderMaterial-DE8YRWj9.cjs +0 -1554
  128. package/build/chunks/FileTypes-B0qjl7u2.cjs +0 -33
  129. package/build/chunks/FileTypes-DJxyD4wK.mjs +0 -2155
  130. package/build/chunks/PerspectiveCamera-iAsZqrnY.cjs +0 -1
  131. package/build/chunks/draco_decoder-Bh9flJPu.cjs +0 -1
  132. package/build/chunks/draco_decoder-CEzwqP9o.mjs +0 -38
  133. package/build/chunks/draco_decoder-DtHHc5d0.mjs +0 -4
  134. package/build/chunks/draco_decoder-DvYjcLz_.cjs +0 -35
  135. package/build/chunks/draco_wasm_wrapper-FoEVV9af.cjs +0 -118
  136. package/build/chunks/draco_wasm_wrapper-yQy2VLhb.mjs +0 -121
  137. package/build/chunks/fflate.module-DHdJvhNh.cjs +0 -6
  138. package/build/chunks/fflate.module-xyO_T3Zm.mjs +0 -602
  139. package/build/plugins/shader/src/material/DIVEShaderMaterial.d.ts +0 -5
  140. package/build/plugins/shader/src/shaders/DIVEShaderLib.d.ts +0 -2
  141. package/build/plugins/shader/src/shaders/grid/index.d.ts +0 -40
  142. package/build/plugins/toolbox/src/BaseTool.d.ts +0 -59
@@ -1,4 +1,4 @@
1
- import { Intersection, Vector2 } from 'three';
1
+ import { Intersection, Vector2 } from 'three/webgpu';
2
2
  /**
3
3
  * Context object passed to tools on pointer events.
4
4
  *
@@ -1,4 +1,4 @@
1
- import { Object3D } from 'three';
1
+ import { Object3D } from 'three/webgpu';
2
2
  import { DIVESelectable } from '../../../index.ts';
3
3
  type SelectionChangeCallback = (selected: (Object3D & DIVESelectable) | null) => void;
4
4
  /**
@@ -69,14 +69,4 @@ export declare class Toolbox {
69
69
  private filterIntersectsByLayer;
70
70
  private updateSortedTools;
71
71
  private pointerWasDragged;
72
- /**
73
- * @deprecated Use enableTool/disableTool instead.
74
- * Enable or disable a tool by type.
75
- */
76
- useTool(tool: ToolType): void;
77
- /**
78
- * @deprecated Use getActiveTools instead.
79
- * Get the first active tool (for legacy compatibility).
80
- */
81
- getActiveTool(): Tool | null;
82
72
  }
@@ -1,4 +1,4 @@
1
- import { Object3D } from 'three';
1
+ import { Object3D } from 'three/webgpu';
2
2
  import { DIVEDraggable } from '../../../../index.ts';
3
3
  import { OrbitController } from '../../../orbitcontroller/index.ts';
4
4
  import { Tool } from '../Tool.ts';
@@ -1,4 +1,4 @@
1
- import { Vector3 } from 'three';
1
+ import { Vector3 } from 'three/webgpu';
2
2
  /**
3
3
  * Event data passed to DIVEDraggable callbacks during drag operations.
4
4
  *
@@ -1,4 +1,4 @@
1
- import { Object3D } from 'three';
1
+ import { Object3D } from 'three/webgpu';
2
2
  import { DIVEHoverable } from '../../../../index.ts';
3
3
  import { Tool } from '../Tool.ts';
4
4
  import { PointerContext } from '../PointerContext.ts';
@@ -1,4 +1,4 @@
1
- import { Object3D } from 'three';
1
+ import { Object3D } from 'three/webgpu';
2
2
  import { DIVESelectable } from '../../../../index.ts';
3
3
  import { Tool } from '../Tool.ts';
4
4
  import { PointerContext } from '../PointerContext.ts';
@@ -1,5 +1,5 @@
1
1
  import { TransformControls } from 'three/examples/jsm/controls/TransformControls.js';
2
- import { Object3D, EventDispatcher } from 'three';
2
+ import { Object3D, EventDispatcher } from 'three/webgpu';
3
3
  import { DIVEMovable, DIVEScene } from '../../../../index.ts';
4
4
  import { OrbitController } from '../../../orbitcontroller/index.ts';
5
5
  import { Tool } from '../Tool.ts';
@@ -38,6 +38,7 @@ export declare class TransformTool extends EventDispatcher<TransformToolEvents>
38
38
  private _controller;
39
39
  private _selectionState;
40
40
  private _gizmo;
41
+ private _gizmoHelper;
41
42
  private _scaleLinked;
42
43
  private _gizmoVisible;
43
44
  private _selectionChangeHandler;
@@ -1,4 +1,4 @@
1
- import { Vector3Like } from 'three';
1
+ import { Vector3Like } from 'three/webgpu';
2
2
  import { BaseEntitySchema } from './BaseEntitySchema.ts';
3
3
  import { EntitySchema } from './EntitySchema.ts';
4
4
  export declare function isGroupSchema(entity: EntitySchema): entity is GroupSchema;
@@ -1,4 +1,4 @@
1
- import { Vector3Like } from 'three';
1
+ import { Vector3Like } from 'three/webgpu';
2
2
  import { BaseEntitySchema } from './BaseEntitySchema.ts';
3
3
  import { EntitySchema } from './EntitySchema.ts';
4
4
  export declare function isLightSchema(entity: EntitySchema): entity is LightSchema;
@@ -1,4 +1,4 @@
1
- import { Texture } from 'three';
1
+ import { Texture } from 'three/webgpu';
2
2
  export type MaterialSchema = {
3
3
  vertexColors: boolean;
4
4
  color: string | number;
@@ -1,4 +1,4 @@
1
- import { Vector3Like } from 'three';
1
+ import { Vector3Like } from 'three/webgpu';
2
2
  import { MaterialSchema } from './MaterialSchema.ts';
3
3
  import { BaseEntitySchema } from './BaseEntitySchema.ts';
4
4
  import { EntitySchema } from './EntitySchema.ts';
@@ -1,4 +1,4 @@
1
- import { Vector3Like } from 'three';
1
+ import { Vector3Like } from 'three/webgpu';
2
2
  import { BaseEntitySchema } from './BaseEntitySchema.ts';
3
3
  import { EntitySchema } from './EntitySchema.ts';
4
4
  export declare function isPovSchema(entity: EntitySchema): entity is PovSchema;
@@ -1,4 +1,4 @@
1
- import { Vector3Like } from 'three';
1
+ import { Vector3Like } from 'three/webgpu';
2
2
  import { BaseEntitySchema } from './BaseEntitySchema.ts';
3
3
  import { GeometrySchema } from './GeometrySchema.ts';
4
4
  import { MaterialSchema } from './MaterialSchema.ts';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shopware-ag/dive",
3
- "version": "2.3.8",
3
+ "version": "3.0.0-beta.1",
4
4
  "description": "Shopware Spatial Framework",
5
5
  "type": "module",
6
6
  "main": "build/dive.cjs",
@@ -107,7 +107,7 @@
107
107
  "> 1%, not dead, not ie 11, not op_mini all"
108
108
  ],
109
109
  "dependencies": {
110
- "three": "^0.163.0",
110
+ "three": "^0.183.0",
111
111
  "@tweenjs/tween.js": "^25.0.0",
112
112
  "three-spritetext": "^1.8.2",
113
113
  "lodash": "^4.17.21",
@@ -119,7 +119,7 @@
119
119
  "@types/jest": "^29.5.12",
120
120
  "@types/lodash": "^4.17.12",
121
121
  "@types/node": "^20.12.7",
122
- "@types/three": "^0.163.0",
122
+ "@types/three": "^0.183.0",
123
123
  "@vitest/coverage-v8": "3.1.2",
124
124
  "acorn": "^8.14.1",
125
125
  "acorn-walk": "^8.3.4",
@@ -153,10 +153,11 @@
153
153
  "lint": "eslint",
154
154
  "prettier:check": "prettier --check .",
155
155
  "prettier:fix": "prettier --write .",
156
+ "typecheck": "tsc --noEmit --project tsconfig.json",
156
157
  "unit": "vitest --run",
157
158
  "coverage": "vitest --coverage --run",
158
159
  "docs": "yarn docs:actions",
159
160
  "docs:actions": "tsx docs/generators/generate-actions-docs.ts",
160
- "ci": "yarn && yarn lint && yarn prettier:check && yarn coverage && yarn build"
161
+ "ci": "yarn && yarn lint && yarn prettier:check && yarn typecheck && yarn coverage && yarn build"
161
162
  }
162
163
  }
@@ -1,47 +0,0 @@
1
- var f = Object.defineProperty;
2
- var u = (n, e, s) => e in n ? f(n, e, { enumerable: !0, configurable: !0, writable: !0, value: s }) : n[e] = s;
3
- var l = (n, e, s) => u(n, typeof e != "symbol" ? e + "" : e, s);
4
- import { MathUtils as a } from "three";
5
- class h {
6
- addEventListener(e, s) {
7
- this._listeners === void 0 && (this._listeners = {});
8
- const i = this._listeners;
9
- i[e] === void 0 && (i[e] = []), i[e].indexOf(s) === -1 && i[e].push(s);
10
- }
11
- hasEventListener(e, s) {
12
- if (this._listeners === void 0) return !1;
13
- const i = this._listeners;
14
- return i[e] !== void 0 && i[e].indexOf(s) !== -1;
15
- }
16
- removeEventListener(e, s) {
17
- if (this._listeners === void 0) return;
18
- const t = this._listeners[e];
19
- if (t !== void 0) {
20
- const r = t.indexOf(s);
21
- r !== -1 && t.splice(r, 1);
22
- }
23
- }
24
- dispatchEvent(e) {
25
- if (this._listeners === void 0) return;
26
- const i = this._listeners[e.type];
27
- if (i !== void 0) {
28
- e.target = this;
29
- const t = i.slice(0);
30
- for (let r = 0, d = t.length; r < d; r++)
31
- t[r].call(this, e);
32
- e.target = null;
33
- }
34
- }
35
- }
36
- class _ extends h {
37
- constructor() {
38
- super(...arguments);
39
- l(this, "_uuid", a.generateUUID());
40
- }
41
- get uuid() {
42
- return this._uuid;
43
- }
44
- }
45
- export {
46
- _ as A
47
- };
@@ -1 +0,0 @@
1
- "use strict";var u=Object.defineProperty;var f=(t,e,s)=>e in t?u(t,e,{enumerable:!0,configurable:!0,writable:!0,value:s}):t[e]=s;var l=(t,e,s)=>f(t,typeof e!="symbol"?e+"":e,s);const h=require("three");class a{addEventListener(e,s){this._listeners===void 0&&(this._listeners={});const i=this._listeners;i[e]===void 0&&(i[e]=[]),i[e].indexOf(s)===-1&&i[e].push(s)}hasEventListener(e,s){if(this._listeners===void 0)return!1;const i=this._listeners;return i[e]!==void 0&&i[e].indexOf(s)!==-1}removeEventListener(e,s){if(this._listeners===void 0)return;const n=this._listeners[e];if(n!==void 0){const r=n.indexOf(s);r!==-1&&n.splice(r,1)}}dispatchEvent(e){if(this._listeners===void 0)return;const i=this._listeners[e.type];if(i!==void 0){e.target=this;const n=i.slice(0);for(let r=0,d=n.length;r<d;r++)n[r].call(this,e);e.target=null}}}class c extends a{constructor(){super(...arguments);l(this,"_uuid",h.MathUtils.generateUUID())}get uuid(){return this._uuid}}exports.Animator=c;
@@ -1 +0,0 @@
1
- "use strict";var u=Object.defineProperty;var n=(s,e,t)=>e in s?u(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t;var r=(s,e,t)=>n(s,typeof e!="symbol"?e+"":e,t);require("./FileTypes-B0qjl7u2.cjs");require("three");require("./DIVEShaderMaterial-DE8YRWj9.cjs");const h=require("./network-error-CdDXil5g.cjs");class c{constructor(e){r(this,"_promise");r(this,"_resolve");r(this,"_arrayBuffer",null);r(this,"_size",0);r(this,"_createdAt");r(this,"_updatedAt");this._uri=e,this._promise=new Promise(t=>{this._resolve=t}),this._createdAt=new Date,this._updatedAt=new Date}get promise(){return this._promise}get size(){return this._size}get createdAt(){return this._createdAt}get updatedAt(){return this._updatedAt}get arrayBuffer(){return this._arrayBuffer}async load(){const e=await fetch(this._uri);if(!e.ok)throw new h.NetworkError(this._uri);try{this._arrayBuffer=await e.arrayBuffer(),this._size+=this._arrayBuffer.byteLength,this._updatedAt=new Date}catch{throw new h.FileContentError(this._uri)}return this._resolve(this._arrayBuffer),this._arrayBuffer}}class o{constructor(){r(this,"_cache",new Map)}get(){return this._cache}create(e){const t=new c(e);return this._cache.set(e,t),t}write(e,t){this._cache.set(e,t)}read(e){return this._cache.get(e)??null}delete(...e){e.forEach(t=>{this._cache.delete(t)})}clear(){this._cache.clear()}}const a=Symbol.for("@shopware-ag/dive/assetcache"),i=globalThis;i[a]||(i[a]=new o);const _=i[a];exports.AssetCache=_;exports.Chunk=c;