@shopware-ag/dive 2.0.1-beta.8 → 2.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.
Files changed (107) hide show
  1. package/README.md +7 -9
  2. package/build/chunks/AssetCache-BvUcYEFC.mjs +79 -0
  3. package/build/chunks/AssetCache-CSbNftve.cjs +1 -0
  4. package/build/chunks/{AssetExporter-TzKB2FHh.cjs → AssetExporter-DsbC2rqv.cjs} +1 -1
  5. package/build/chunks/{AssetExporter-QnOue3VT.mjs → AssetExporter-brT7ogoM.mjs} +1 -1
  6. package/build/chunks/{AssetLoader-C8Teswp4.mjs → AssetLoader-B07cARjB.mjs} +510 -507
  7. package/build/chunks/AssetLoader-CJNVpiKM.cjs +4 -0
  8. package/build/chunks/FileTypes-DQE3hqoS.cjs +30 -0
  9. package/build/chunks/{FileTypes-CXnW0NAe.mjs → FileTypes-rkWpMg2n.mjs} +155 -205
  10. package/build/chunks/OrbitController-BQ6SV1O_.mjs +1159 -0
  11. package/build/chunks/OrbitController-CpFQ3A1H.cjs +1 -0
  12. package/build/chunks/PerspectiveCamera-BByyG5R4.cjs +1 -0
  13. package/build/chunks/PerspectiveCamera-PMJPzAn3.mjs +34 -0
  14. package/build/chunks/{SelectTool-DFpr9XHT.mjs → SelectTool-7pU-VXgr.mjs} +4 -4
  15. package/build/chunks/SelectTool-BSlKpYbt.cjs +1 -0
  16. package/build/chunks/VisibilityLayerMask-BI7jPKdx.cjs +1 -0
  17. package/build/chunks/VisibilityLayerMask-CXgt1fJc.mjs +8 -0
  18. package/build/chunks/isFileTypeSupported-BSpswPHU.mjs +12 -0
  19. package/build/chunks/isFileTypeSupported-CrEqYiv9.cjs +1 -0
  20. package/build/chunks/network-error-BONfHWQq.mjs +14 -0
  21. package/build/chunks/network-error-CdDXil5g.cjs +1 -0
  22. package/build/chunks/package-CX-oVoMh.mjs +39 -0
  23. package/build/chunks/package-CubHy4zo.cjs +1 -0
  24. package/build/chunks/{parse-error-BFRJyIxM.mjs → parse-error-DfOPyLWM.mjs} +3 -3
  25. package/build/chunks/parse-error-Dy_EE4rL.cjs +1 -0
  26. package/build/dive.cjs +1 -1
  27. package/build/dive.mjs +295 -222
  28. package/build/plugins/ar/index.cjs +1 -1
  29. package/build/plugins/ar/index.mjs +59 -54
  30. package/build/plugins/assetcache/index.cjs +1 -0
  31. package/build/plugins/assetcache/index.d.ts +2 -0
  32. package/build/plugins/assetcache/index.mjs +5 -0
  33. package/build/plugins/assetexporter/index.cjs +1 -1
  34. package/build/plugins/assetexporter/index.mjs +1 -1
  35. package/build/plugins/assetloader/index.cjs +1 -1
  36. package/build/plugins/assetloader/index.mjs +1 -1
  37. package/build/plugins/mediacreator/index.cjs +1 -1
  38. package/build/plugins/mediacreator/index.mjs +13 -13
  39. package/build/plugins/orbitcontroller/index.cjs +1 -1
  40. package/build/plugins/orbitcontroller/index.mjs +1 -1
  41. package/build/plugins/orientationdisplay/index.cjs +1 -0
  42. package/build/plugins/orientationdisplay/index.d.ts +2 -0
  43. package/build/plugins/orientationdisplay/index.mjs +5 -0
  44. package/build/plugins/state/index.cjs +6 -6
  45. package/build/plugins/state/index.mjs +728 -728
  46. package/build/plugins/systeminfo/index.mjs +1 -1
  47. package/build/plugins/toolbox/index.cjs +1 -1
  48. package/build/plugins/toolbox/index.mjs +12 -12
  49. package/build/src/components/boundingbox/BoundingBox.d.ts +136 -0
  50. package/build/src/components/light/AmbientLight.d.ts +3 -1
  51. package/build/src/components/light/SceneLight.d.ts +3 -1
  52. package/build/src/core/Dive.d.ts +1 -1
  53. package/build/src/error/file-content/file-content-error.d.ts +4 -0
  54. package/build/src/error/index.d.ts +4 -0
  55. package/build/src/error/network/network-error.d.ts +1 -1
  56. package/build/src/error/parse/parse-error.d.ts +2 -1
  57. package/build/src/events/dispatcher/EventDispatcher.d.ts +6 -0
  58. package/build/src/events/index.d.ts +1 -1
  59. package/build/src/helpers/deepClone/deepClone.d.ts +34 -0
  60. package/build/src/helpers/index.d.ts +5 -4
  61. package/build/src/index.d.ts +1 -3
  62. package/build/src/plugins/ar/src/error/ar-errors.d.ts +7 -1
  63. package/build/src/plugins/ar/src/webxr/raycaster/WebXRRaycaster.d.ts +2 -2
  64. package/build/src/plugins/ar/src/webxr/touchscreencontrols/WebXRTouchscreenControls.d.ts +2 -2
  65. package/build/src/plugins/assetcache/index.d.ts +1 -0
  66. package/build/src/plugins/assetcache/src/cache/AssetCache.d.ts +12 -0
  67. package/build/src/plugins/assetcache/src/chunk/Chunk.d.ts +16 -0
  68. package/build/src/plugins/assetcache/src/index.d.ts +2 -0
  69. package/build/src/plugins/assetloader/src/loader/AssetLoader.d.ts +7 -1
  70. package/build/src/plugins/mediacreator/index.d.ts +1 -0
  71. package/build/src/plugins/mediacreator/src/MediaCreator.d.ts +2 -2
  72. package/build/src/plugins/mediacreator/types/MediaGenerationById.d.ts +5 -0
  73. package/build/src/plugins/mediacreator/types/MediaGenerationByPosition.d.ts +7 -0
  74. package/build/src/plugins/mediacreator/types/MediaGenerationResolution.d.ts +4 -0
  75. package/build/src/plugins/mediacreator/types/index.d.ts +3 -0
  76. package/build/src/plugins/orbitcontroller/src/OrbitController.d.ts +17 -2
  77. package/build/src/plugins/orientationdisplay/index.d.ts +2 -0
  78. package/build/src/plugins/{axiscamera/src/AxisCamera.d.ts → orientationdisplay/src/OrientationDisplay.d.ts} +5 -5
  79. package/build/src/plugins/orientationdisplay/src/axes/Axes.d.ts +6 -0
  80. package/build/src/plugins/state/src/actions/action.d.ts +4 -4
  81. package/build/src/plugins/state/src/actions/media/generatemedia.d.ts +2 -18
  82. package/build/src/plugins/state/src/actions/toolbox/setgizmovisible.d.ts +2 -2
  83. package/build/src/plugins/state/types/index.d.ts +2 -0
  84. package/build/src/plugins/systeminfo/src/SystemInfo.d.ts +1 -1
  85. package/build/src/plugins/toolbox/index.d.ts +1 -0
  86. package/build/src/plugins/toolbox/src/Toolbox.d.ts +2 -2
  87. package/build/src/plugins/toolbox/src/transform/TransformTool.d.ts +1 -1
  88. package/build/src/plugins/toolbox/types/ToolType.d.ts +1 -0
  89. package/build/src/plugins/toolbox/types/index.d.ts +1 -0
  90. package/package.json +12 -9
  91. package/build/chunks/AssetLoader-BfPa_oNd.cjs +0 -4
  92. package/build/chunks/FileTypes-B2JRjVgw.cjs +0 -30
  93. package/build/chunks/OrbitController-D-WNei2f.mjs +0 -940
  94. package/build/chunks/OrbitController-rMX8EHvJ.cjs +0 -1
  95. package/build/chunks/PerspectiveCamera-CONx93im.cjs +0 -1
  96. package/build/chunks/PerspectiveCamera-DUiWJJIj.mjs +0 -38
  97. package/build/chunks/SelectTool-DVqL2ebn.cjs +0 -1
  98. package/build/chunks/network-error-CHvryg-4.mjs +0 -18
  99. package/build/chunks/network-error-D_pq8VU6.cjs +0 -1
  100. package/build/chunks/package-BBfJ2Cc5.cjs +0 -1
  101. package/build/chunks/package-CHFUaMpF.mjs +0 -39
  102. package/build/chunks/parse-error-Bd09D_1L.cjs +0 -1
  103. package/build/plugins/axiscamera/index.cjs +0 -1
  104. package/build/plugins/axiscamera/index.d.ts +0 -2
  105. package/build/plugins/axiscamera/index.mjs +0 -4
  106. package/build/src/events/EventExecutor.d.ts +0 -5
  107. package/build/src/plugins/axiscamera/index.d.ts +0 -1
package/README.md CHANGED
@@ -25,7 +25,7 @@
25
25
  - [Getting Started](#getting-started)
26
26
  - [Basic Setup](#basic-setup)
27
27
  - [Quick View](#quick-view)
28
- - [Modules](#modules)
28
+ - [Plugins](#plugins)
29
29
  - [Documentation](#documentation)
30
30
 
31
31
  ## About
@@ -80,13 +80,12 @@ const myCanvasWrapper = document.createElement('div');
80
80
  myCanvasWrapper.appendChild(dive.canvas);
81
81
  ```
82
82
 
83
- ## Modules
83
+ ## Plugins
84
84
 
85
- DIVE comes with several built-in modules that provide specific functionality. Served modules are
86
- independent and can be accessed directly from the modules directory:
85
+ DIVE comes with several built-in plugins that provide specific functionality. They are self-contained and can be imported as a subpath export from the package:
87
86
 
88
87
  ```ts
89
- import { ARSystem } from '@shopware-ag/dive/modules/ARSystem';
88
+ import { ARSystem } from '@shopware-ag/dive/ar';
90
89
 
91
90
  // Initialize AR with options
92
91
  const arSystem = new ARSystem();
@@ -96,16 +95,15 @@ await arSystem.launch('path/to/model.glb', {
96
95
  });
97
96
  ```
98
97
 
99
- For detailed information about the module system, see
100
- [Module System Documentation](docs/module-system.md).
98
+ For detailed information about the plugin system, see
99
+ [Plugin System Documentation](docs/plugin-system.md).
101
100
 
102
101
  ## Documentation
103
102
 
104
103
  For detailed documentation, please refer to the following sections:
105
104
 
106
- - [Module System](docs/module-system.md) - Detailed module system architecture and usage
105
+ - [Plugin System](docs/plugin-system.md) - Detailed plugin system architecture and usage
107
106
  - [Shopware Integration](docs/shopware-integration.md) - Integration with Shopware projects
108
107
  - [Testing and Quality Assurance](docs/testing.md) - Testing guidelines and best practices
109
108
  - [Local Development](docs/local-development.md) - Local development setup and workflow
110
- - [Module Reference](docs/module-reference.md) - Complete list of available modules
111
109
  - [Actions Reference](docs/actions-reference.md) - Complete list of available actions
@@ -0,0 +1,79 @@
1
+ var h = Object.defineProperty;
2
+ var c = (s, e, t) => e in s ? h(s, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : s[e] = t;
3
+ var r = (s, e, t) => c(s, typeof e != "symbol" ? e + "" : e, t);
4
+ import "./FileTypes-rkWpMg2n.mjs";
5
+ import "three";
6
+ import { N as o, F as _ } from "./network-error-BONfHWQq.mjs";
7
+ class n {
8
+ constructor(e) {
9
+ r(this, "_promise");
10
+ r(this, "_resolve");
11
+ r(this, "_arrayBuffer", null);
12
+ // metadata
13
+ r(this, "_size", 0);
14
+ r(this, "_createdAt");
15
+ r(this, "_updatedAt");
16
+ this._uri = e, this._promise = new Promise((t) => {
17
+ this._resolve = t;
18
+ }), this._createdAt = /* @__PURE__ */ new Date(), this._updatedAt = /* @__PURE__ */ new Date();
19
+ }
20
+ get promise() {
21
+ return this._promise;
22
+ }
23
+ get size() {
24
+ return this._size;
25
+ }
26
+ get createdAt() {
27
+ return this._createdAt;
28
+ }
29
+ get updatedAt() {
30
+ return this._updatedAt;
31
+ }
32
+ get arrayBuffer() {
33
+ return this._arrayBuffer;
34
+ }
35
+ async load() {
36
+ const e = await fetch(this._uri);
37
+ if (!e.ok)
38
+ throw new o(this._uri);
39
+ try {
40
+ this._arrayBuffer = await e.arrayBuffer(), this._size += this._arrayBuffer.byteLength, this._updatedAt = /* @__PURE__ */ new Date();
41
+ } catch {
42
+ throw new _(this._uri);
43
+ }
44
+ return this._resolve(this._arrayBuffer), this._arrayBuffer;
45
+ }
46
+ }
47
+ class u {
48
+ constructor() {
49
+ r(this, "_cache", /* @__PURE__ */ new Map());
50
+ }
51
+ get() {
52
+ return this._cache;
53
+ }
54
+ create(e) {
55
+ const t = new n(e);
56
+ return this._cache.set(e, t), t;
57
+ }
58
+ write(e, t) {
59
+ this._cache.set(e, t);
60
+ }
61
+ read(e) {
62
+ return this._cache.get(e) ?? null;
63
+ }
64
+ delete(...e) {
65
+ e.forEach((t) => {
66
+ this._cache.delete(t);
67
+ });
68
+ }
69
+ clear() {
70
+ this._cache.clear();
71
+ }
72
+ }
73
+ const a = Symbol.for("@shopware-ag/dive/assetcache"), i = globalThis;
74
+ i[a] || (i[a] = new u());
75
+ const w = i[a];
76
+ export {
77
+ w as A,
78
+ n as C
79
+ };
@@ -0,0 +1 @@
1
+ "use strict";var n=Object.defineProperty;var u=(s,e,t)=>e in s?n(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t;var r=(s,e,t)=>u(s,typeof e!="symbol"?e+"":e,t);require("./FileTypes-DQE3hqoS.cjs");require("three");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;
@@ -1,4 +1,4 @@
1
- "use strict";var ue=Object.defineProperty;var le=(n,e,s)=>e in n?ue(n,e,{enumerable:!0,configurable:!0,writable:!0,value:s}):n[e]=s;var H=(n,e,s)=>le(n,typeof e!="symbol"?e+"":e,s);const d=require("three"),K=require("./fflate.module-DHdJvhNh.cjs"),L=require("./parse-error-Bd09D_1L.cjs");let O,V,C,D;function k(n,e=1/0,s=null){V||(V=new d.PlaneGeometry(2,2,1,1)),C||(C=new d.ShaderMaterial({uniforms:{blitTexture:new d.Uniform(n)},vertexShader:`
1
+ "use strict";var ue=Object.defineProperty;var le=(n,e,s)=>e in n?ue(n,e,{enumerable:!0,configurable:!0,writable:!0,value:s}):n[e]=s;var H=(n,e,s)=>le(n,typeof e!="symbol"?e+"":e,s);const d=require("three"),K=require("./fflate.module-DHdJvhNh.cjs"),L=require("./parse-error-Dy_EE4rL.cjs");let O,V,C,D;function k(n,e=1/0,s=null){V||(V=new d.PlaneGeometry(2,2,1,1)),C||(C=new d.ShaderMaterial({uniforms:{blitTexture:new d.Uniform(n)},vertexShader:`
2
2
  varying vec2 vUv;
3
3
  void main(){
4
4
  vUv = uv;
@@ -3,7 +3,7 @@ var Me = (n, e, s) => e in n ? Te(n, e, { enumerable: !0, configurable: !0, writ
3
3
  var Y = (n, e, s) => Me(n, typeof e != "symbol" ? e + "" : e, s);
4
4
  import { PlaneGeometry as ye, ShaderMaterial as we, Uniform as Ee, SRGBColorSpace as ue, Mesh as Ae, PerspectiveCamera as be, Scene as Z, WebGLRenderer as Ie, CanvasTexture as Re, Color as _e, Matrix4 as le, Vector3 as B, Quaternion as Se, BufferAttribute as L, CompressedTexture as j, Source as Ne, NoColorSpace as fe, MathUtils as q, RGBAFormat as Le, DoubleSide as pe, PropertyBinding as H, InterpolateDiscrete as ve, NearestFilter as Ce, NearestMipmapNearestFilter as Ue, NearestMipmapLinearFilter as Fe, LinearFilter as $e, LinearMipmapNearestFilter as Oe, LinearMipmapLinearFilter as Pe, ClampToEdgeWrapping as De, RepeatWrapping as Ge, MirroredRepeatWrapping as ke, InterpolateLinear as ze } from "three";
5
5
  import { s as he, z as Be } from "./fflate.module-xyO_T3Zm.mjs";
6
- import { F as He, P as N } from "./parse-error-BFRJyIxM.mjs";
6
+ import { F as He, P as N } from "./parse-error-DfOPyLWM.mjs";
7
7
  let O, K, C, G;
8
8
  function z(n, e = 1 / 0, s = null) {
9
9
  K || (K = new ye(2, 2, 1, 1)), C || (C = new we({