@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.
- package/README.md +7 -9
- package/build/chunks/AssetCache-BvUcYEFC.mjs +79 -0
- package/build/chunks/AssetCache-CSbNftve.cjs +1 -0
- package/build/chunks/{AssetExporter-TzKB2FHh.cjs → AssetExporter-DsbC2rqv.cjs} +1 -1
- package/build/chunks/{AssetExporter-QnOue3VT.mjs → AssetExporter-brT7ogoM.mjs} +1 -1
- package/build/chunks/{AssetLoader-C8Teswp4.mjs → AssetLoader-B07cARjB.mjs} +510 -507
- package/build/chunks/AssetLoader-CJNVpiKM.cjs +4 -0
- package/build/chunks/FileTypes-DQE3hqoS.cjs +30 -0
- package/build/chunks/{FileTypes-CXnW0NAe.mjs → FileTypes-rkWpMg2n.mjs} +155 -205
- package/build/chunks/OrbitController-BQ6SV1O_.mjs +1159 -0
- package/build/chunks/OrbitController-CpFQ3A1H.cjs +1 -0
- package/build/chunks/PerspectiveCamera-BByyG5R4.cjs +1 -0
- package/build/chunks/PerspectiveCamera-PMJPzAn3.mjs +34 -0
- package/build/chunks/{SelectTool-DFpr9XHT.mjs → SelectTool-7pU-VXgr.mjs} +4 -4
- package/build/chunks/SelectTool-BSlKpYbt.cjs +1 -0
- package/build/chunks/VisibilityLayerMask-BI7jPKdx.cjs +1 -0
- package/build/chunks/VisibilityLayerMask-CXgt1fJc.mjs +8 -0
- package/build/chunks/isFileTypeSupported-BSpswPHU.mjs +12 -0
- package/build/chunks/isFileTypeSupported-CrEqYiv9.cjs +1 -0
- package/build/chunks/network-error-BONfHWQq.mjs +14 -0
- package/build/chunks/network-error-CdDXil5g.cjs +1 -0
- package/build/chunks/package-CX-oVoMh.mjs +39 -0
- package/build/chunks/package-CubHy4zo.cjs +1 -0
- package/build/chunks/{parse-error-BFRJyIxM.mjs → parse-error-DfOPyLWM.mjs} +3 -3
- package/build/chunks/parse-error-Dy_EE4rL.cjs +1 -0
- package/build/dive.cjs +1 -1
- package/build/dive.mjs +295 -222
- package/build/plugins/ar/index.cjs +1 -1
- package/build/plugins/ar/index.mjs +59 -54
- package/build/plugins/assetcache/index.cjs +1 -0
- package/build/plugins/assetcache/index.d.ts +2 -0
- package/build/plugins/assetcache/index.mjs +5 -0
- package/build/plugins/assetexporter/index.cjs +1 -1
- package/build/plugins/assetexporter/index.mjs +1 -1
- package/build/plugins/assetloader/index.cjs +1 -1
- package/build/plugins/assetloader/index.mjs +1 -1
- package/build/plugins/mediacreator/index.cjs +1 -1
- package/build/plugins/mediacreator/index.mjs +13 -13
- package/build/plugins/orbitcontroller/index.cjs +1 -1
- package/build/plugins/orbitcontroller/index.mjs +1 -1
- package/build/plugins/orientationdisplay/index.cjs +1 -0
- package/build/plugins/orientationdisplay/index.d.ts +2 -0
- package/build/plugins/orientationdisplay/index.mjs +5 -0
- package/build/plugins/state/index.cjs +6 -6
- package/build/plugins/state/index.mjs +728 -728
- package/build/plugins/systeminfo/index.mjs +1 -1
- package/build/plugins/toolbox/index.cjs +1 -1
- package/build/plugins/toolbox/index.mjs +12 -12
- package/build/src/components/boundingbox/BoundingBox.d.ts +136 -0
- package/build/src/components/light/AmbientLight.d.ts +3 -1
- package/build/src/components/light/SceneLight.d.ts +3 -1
- package/build/src/core/Dive.d.ts +1 -1
- package/build/src/error/file-content/file-content-error.d.ts +4 -0
- package/build/src/error/index.d.ts +4 -0
- package/build/src/error/network/network-error.d.ts +1 -1
- package/build/src/error/parse/parse-error.d.ts +2 -1
- package/build/src/events/dispatcher/EventDispatcher.d.ts +6 -0
- package/build/src/events/index.d.ts +1 -1
- package/build/src/helpers/deepClone/deepClone.d.ts +34 -0
- package/build/src/helpers/index.d.ts +5 -4
- package/build/src/index.d.ts +1 -3
- package/build/src/plugins/ar/src/error/ar-errors.d.ts +7 -1
- package/build/src/plugins/ar/src/webxr/raycaster/WebXRRaycaster.d.ts +2 -2
- package/build/src/plugins/ar/src/webxr/touchscreencontrols/WebXRTouchscreenControls.d.ts +2 -2
- package/build/src/plugins/assetcache/index.d.ts +1 -0
- package/build/src/plugins/assetcache/src/cache/AssetCache.d.ts +12 -0
- package/build/src/plugins/assetcache/src/chunk/Chunk.d.ts +16 -0
- package/build/src/plugins/assetcache/src/index.d.ts +2 -0
- package/build/src/plugins/assetloader/src/loader/AssetLoader.d.ts +7 -1
- package/build/src/plugins/mediacreator/index.d.ts +1 -0
- package/build/src/plugins/mediacreator/src/MediaCreator.d.ts +2 -2
- package/build/src/plugins/mediacreator/types/MediaGenerationById.d.ts +5 -0
- package/build/src/plugins/mediacreator/types/MediaGenerationByPosition.d.ts +7 -0
- package/build/src/plugins/mediacreator/types/MediaGenerationResolution.d.ts +4 -0
- package/build/src/plugins/mediacreator/types/index.d.ts +3 -0
- package/build/src/plugins/orbitcontroller/src/OrbitController.d.ts +17 -2
- package/build/src/plugins/orientationdisplay/index.d.ts +2 -0
- package/build/src/plugins/{axiscamera/src/AxisCamera.d.ts → orientationdisplay/src/OrientationDisplay.d.ts} +5 -5
- package/build/src/plugins/orientationdisplay/src/axes/Axes.d.ts +6 -0
- package/build/src/plugins/state/src/actions/action.d.ts +4 -4
- package/build/src/plugins/state/src/actions/media/generatemedia.d.ts +2 -18
- package/build/src/plugins/state/src/actions/toolbox/setgizmovisible.d.ts +2 -2
- package/build/src/plugins/state/types/index.d.ts +2 -0
- package/build/src/plugins/systeminfo/src/SystemInfo.d.ts +1 -1
- package/build/src/plugins/toolbox/index.d.ts +1 -0
- package/build/src/plugins/toolbox/src/Toolbox.d.ts +2 -2
- package/build/src/plugins/toolbox/src/transform/TransformTool.d.ts +1 -1
- package/build/src/plugins/toolbox/types/ToolType.d.ts +1 -0
- package/build/src/plugins/toolbox/types/index.d.ts +1 -0
- package/package.json +12 -9
- package/build/chunks/AssetLoader-BfPa_oNd.cjs +0 -4
- package/build/chunks/FileTypes-B2JRjVgw.cjs +0 -30
- package/build/chunks/OrbitController-D-WNei2f.mjs +0 -940
- package/build/chunks/OrbitController-rMX8EHvJ.cjs +0 -1
- package/build/chunks/PerspectiveCamera-CONx93im.cjs +0 -1
- package/build/chunks/PerspectiveCamera-DUiWJJIj.mjs +0 -38
- package/build/chunks/SelectTool-DVqL2ebn.cjs +0 -1
- package/build/chunks/network-error-CHvryg-4.mjs +0 -18
- package/build/chunks/network-error-D_pq8VU6.cjs +0 -1
- package/build/chunks/package-BBfJ2Cc5.cjs +0 -1
- package/build/chunks/package-CHFUaMpF.mjs +0 -39
- package/build/chunks/parse-error-Bd09D_1L.cjs +0 -1
- package/build/plugins/axiscamera/index.cjs +0 -1
- package/build/plugins/axiscamera/index.d.ts +0 -2
- package/build/plugins/axiscamera/index.mjs +0 -4
- package/build/src/events/EventExecutor.d.ts +0 -5
- 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
|
-
- [
|
|
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
|
-
##
|
|
83
|
+
## Plugins
|
|
84
84
|
|
|
85
|
-
DIVE comes with several built-in
|
|
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/
|
|
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
|
|
100
|
-
[
|
|
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
|
-
- [
|
|
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-
|
|
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-
|
|
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({
|