@shopware-ag/dive 2.2.34 → 2.3.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/build/chunks/Animator-BGFdF70Z.mjs +47 -0
- package/build/chunks/Animator-Cu7NIkVg.cjs +1 -0
- package/build/chunks/{AssetCache-lGp7KKQA.mjs → AssetCache-BN-AmXc9.mjs} +1 -1
- package/build/chunks/{AssetCache-BOMaDRGn.cjs → AssetCache-CwK-0iP9.cjs} +1 -1
- package/build/chunks/{AssetExporter-brT7ogoM.mjs → AssetExporter-BBaDvZ8D.mjs} +68 -61
- package/build/chunks/{AssetExporter-DsbC2rqv.cjs → AssetExporter-Bqv27MWV.cjs} +15 -15
- package/build/chunks/{AssetLoader-BDP2bROu.mjs → AssetLoader-C-PfRr8Z.mjs} +20 -12
- package/build/chunks/{AssetLoader-B00ge8um.cjs → AssetLoader-uFMzuJWt.cjs} +2 -2
- package/build/chunks/ClipAnimator-BJZ4_C4B.mjs +83 -0
- package/build/chunks/ClipAnimator-CNKeT7rW.cjs +1 -0
- package/build/chunks/{FileTypes-DeUmmPCi.mjs → FileTypes-B8g1qxjR.mjs} +41 -38
- package/build/chunks/{FileTypes-DOUQk-mF.cjs → FileTypes-BHH0KUFf.cjs} +2 -2
- package/build/chunks/TargetAnimator-DUqkkdVb.mjs +79 -0
- package/build/chunks/TargetAnimator-DuqPk2eq.cjs +1 -0
- package/build/chunks/{isFileTypeSupported-D8QKkffJ.cjs → isFileTypeSupported-CFN9V48s.cjs} +1 -1
- package/build/chunks/{isFileTypeSupported-DsYDdT2J.mjs → isFileTypeSupported-DA7cjOZa.mjs} +1 -1
- package/build/dive.cjs +1 -1
- package/build/dive.mjs +2 -2
- package/build/plugins/animation/index.cjs +1 -1
- package/build/plugins/animation/index.d.ts +1 -1
- package/build/plugins/animation/index.mjs +84 -109
- package/build/plugins/animation/src/animator/Animator.d.ts +23 -22
- package/build/plugins/animation/src/animator/ClipAnimator.d.ts +33 -0
- package/build/plugins/animation/src/animator/TargetAnimator.d.ts +45 -0
- package/build/plugins/animation/src/index.d.ts +4 -2
- package/build/plugins/animation/src/system/AnimationSystem.d.ts +136 -14
- package/build/plugins/animation/src/types/AnimatorTypes.d.ts +11 -0
- package/build/plugins/ar/index.cjs +1 -1
- package/build/plugins/ar/index.mjs +2 -2
- package/build/plugins/assetcache/index.cjs +1 -1
- package/build/plugins/assetcache/index.mjs +1 -1
- package/build/plugins/assetexporter/index.cjs +1 -1
- package/build/plugins/assetexporter/index.mjs +1 -1
- package/build/plugins/assetexporter/src/AssetExporter.d.ts +1 -0
- package/build/plugins/assetloader/index.cjs +1 -1
- package/build/plugins/assetloader/index.mjs +2 -2
- package/build/plugins/orbitcontroller/index.cjs +1 -1
- package/build/plugins/orbitcontroller/index.mjs +1 -1
- package/build/plugins/orientationdisplay/index.cjs +1 -1
- package/build/plugins/orientationdisplay/index.mjs +1 -1
- package/build/plugins/quickview/index.cjs +1 -1
- package/build/plugins/quickview/index.mjs +7 -7
- package/build/plugins/quickview/src/QuickView.d.ts +2 -1
- package/build/plugins/state/index.cjs +4 -4
- package/build/plugins/state/index.mjs +791 -794
- package/build/plugins/toolbox/index.cjs +1 -1
- package/build/plugins/toolbox/index.mjs +1 -1
- package/package.json +2 -2
- package/build/plugins/animation/src/types/AnimatorParameters.d.ts +0 -7
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
var HA = Object.defineProperty;
|
|
2
2
|
var qA = (h, g, A) => g in h ? HA(h, g, { enumerable: !0, configurable: !0, writable: !0, value: A }) : h[g] = A;
|
|
3
3
|
var e = (h, g, A) => qA(h, typeof g != "symbol" ? g + "" : g, A);
|
|
4
|
-
import { DataTextureLoader as dA, HalfFloatType as j, FloatType as U, DataUtils as
|
|
4
|
+
import { DataTextureLoader as dA, HalfFloatType as j, FloatType as U, DataUtils as k, LinearSRGBColorSpace as CA, LinearFilter as hA, PMREMGenerator as aA, Scene as wA, SphereGeometry as S, MeshBasicMaterial as iA, BackSide as YA, Mesh as Z, NoToneMapping as bA, WebGLCubeRenderTarget as yA, CubeCamera as OA, EquirectangularReflectionMapping as MA, WebGLRenderer as LA, PCFSoftShadowMap as FA, PCFShadowMap as XA, BasicShadowMap as jA, SRGBColorSpace as EA, LinearToneMapping as ZA, MathUtils as eA, Object3D as O, AmbientLight as QA, PointLight as WA, FrontSide as uA, HemisphereLight as NA, DirectionalLight as kA, Vector3 as w, Box3 as y, Box3Helper as xA, Sphere as TA, MeshStandardMaterial as gA, Raycaster as JA, CylinderGeometry as SA, BufferGeometry as GA, BufferAttribute as rA, BoxGeometry as $, ConeGeometry as _A, LineDashedMaterial as VA, Line as RA, PlaneGeometry as UA, Color as J, GridHelper as $A, TOUCH as l, MOUSE as K, EventDispatcher as Ai, Spherical as BA, Vector2 as G, Quaternion as cA } from "three";
|
|
5
5
|
import { P as v, U as ii, H as ei, a as gi, D as PA } from "./PerspectiveCamera-BFzE2TQU.mjs";
|
|
6
6
|
class ti {
|
|
7
7
|
constructor() {
|
|
@@ -56,12 +56,12 @@ class oi extends dA {
|
|
|
56
56
|
}, Q = `
|
|
57
57
|
`, q = function(n, a, c) {
|
|
58
58
|
a = a || 1024;
|
|
59
|
-
let
|
|
60
|
-
for (; 0 > (
|
|
61
|
-
C += r, f += r.length,
|
|
62
|
-
return -1 <
|
|
59
|
+
let z = n.pos, I = -1, f = 0, C = "", r = String.fromCharCode.apply(null, new Uint16Array(n.subarray(z, z + 128)));
|
|
60
|
+
for (; 0 > (I = r.indexOf(Q)) && f < a && z < n.byteLength; )
|
|
61
|
+
C += r, f += r.length, z += 128, r += String.fromCharCode.apply(null, new Uint16Array(n.subarray(z, z + 128)));
|
|
62
|
+
return -1 < I ? (n.pos += f + I + 1, C + r.slice(0, I)) : !1;
|
|
63
63
|
}, M = function(n) {
|
|
64
|
-
const a = /^#\?(\S+)/, c = /^\s*GAMMA\s*=\s*(\d+(\.\d+)?)\s*$/, P = /^\s*EXPOSURE\s*=\s*(\d+(\.\d+)?)\s*$/,
|
|
64
|
+
const a = /^#\?(\S+)/, c = /^\s*GAMMA\s*=\s*(\d+(\.\d+)?)\s*$/, P = /^\s*EXPOSURE\s*=\s*(\d+(\.\d+)?)\s*$/, z = /^\s*FORMAT=(\S+)\s*$/, I = /^\s*\-Y\s+(\d+)\s+\+X\s+(\d+)\s*$/, f = {
|
|
65
65
|
valid: 0,
|
|
66
66
|
/* indicate which fields are valid */
|
|
67
67
|
string: "",
|
|
@@ -89,7 +89,7 @@ class oi extends dA {
|
|
|
89
89
|
`;
|
|
90
90
|
continue;
|
|
91
91
|
}
|
|
92
|
-
if ((r = C.match(c)) && (f.gamma = parseFloat(r[1])), (r = C.match(P)) && (f.exposure = parseFloat(r[1])), (r = C.match(
|
|
92
|
+
if ((r = C.match(c)) && (f.gamma = parseFloat(r[1])), (r = C.match(P)) && (f.exposure = parseFloat(r[1])), (r = C.match(z)) && (f.valid |= 2, f.format = r[1]), (r = C.match(I)) && (f.valid |= 4, f.height = parseInt(r[1], 10), f.width = parseInt(r[2], 10)), f.valid & 2 && f.valid & 4) break;
|
|
93
93
|
}
|
|
94
94
|
return f.valid & 2 || s(3, "missing format specifier"), f.valid & 4 || s(3, "missing image size specifier"), f;
|
|
95
95
|
}, d = function(n, a, c) {
|
|
@@ -101,9 +101,9 @@ class oi extends dA {
|
|
|
101
101
|
)
|
|
102
102
|
return new Uint8Array(n);
|
|
103
103
|
P !== (n[2] << 8 | n[3]) && s(3, "wrong scanline width");
|
|
104
|
-
const
|
|
105
|
-
|
|
106
|
-
let
|
|
104
|
+
const z = new Uint8Array(4 * a * c);
|
|
105
|
+
z.length || s(4, "unable to allocate buffer space");
|
|
106
|
+
let I = 0, f = 0;
|
|
107
107
|
const C = 4 * P, r = new Uint8Array(4), b = new Uint8Array(C);
|
|
108
108
|
let nA = c;
|
|
109
109
|
for (; nA > 0 && f < n.byteLength; ) {
|
|
@@ -122,34 +122,34 @@ class oi extends dA {
|
|
|
122
122
|
const vA = P;
|
|
123
123
|
for (let m = 0; m < vA; m++) {
|
|
124
124
|
let p = 0;
|
|
125
|
-
I
|
|
125
|
+
z[I] = b[m + p], p += P, z[I + 1] = b[m + p], p += P, z[I + 2] = b[m + p], p += P, z[I + 3] = b[m + p], I += 4;
|
|
126
126
|
}
|
|
127
127
|
nA--;
|
|
128
128
|
}
|
|
129
|
-
return
|
|
129
|
+
return z;
|
|
130
130
|
}, W = function(n, a, c, P) {
|
|
131
|
-
const
|
|
132
|
-
c[P + 0] = n[a + 0] *
|
|
131
|
+
const z = n[a + 3], I = Math.pow(2, z - 128) / 255;
|
|
132
|
+
c[P + 0] = n[a + 0] * I, c[P + 1] = n[a + 1] * I, c[P + 2] = n[a + 2] * I, c[P + 3] = 1;
|
|
133
133
|
}, _ = function(n, a, c, P) {
|
|
134
|
-
const
|
|
135
|
-
c[P + 0] =
|
|
134
|
+
const z = n[a + 3], I = Math.pow(2, z - 128) / 255;
|
|
135
|
+
c[P + 0] = k.toHalfFloat(Math.min(n[a + 0] * I, 65504)), c[P + 1] = k.toHalfFloat(Math.min(n[a + 1] * I, 65504)), c[P + 2] = k.toHalfFloat(Math.min(n[a + 2] * I, 65504)), c[P + 3] = k.toHalfFloat(1);
|
|
136
136
|
}, L = new Uint8Array(g);
|
|
137
137
|
L.pos = 0;
|
|
138
|
-
const F = M(L), oA = F.width, sA = F.height,
|
|
138
|
+
const F = M(L), oA = F.width, sA = F.height, N = d(L.subarray(L.pos), oA, sA);
|
|
139
139
|
let V, R, Y;
|
|
140
140
|
switch (this.type) {
|
|
141
141
|
case U:
|
|
142
|
-
Y =
|
|
142
|
+
Y = N.length / 4;
|
|
143
143
|
const n = new Float32Array(Y * 4);
|
|
144
144
|
for (let c = 0; c < Y; c++)
|
|
145
|
-
W(
|
|
145
|
+
W(N, c * 4, n, c * 4);
|
|
146
146
|
V = n, R = U;
|
|
147
147
|
break;
|
|
148
148
|
case j:
|
|
149
|
-
Y =
|
|
149
|
+
Y = N.length / 4;
|
|
150
150
|
const a = new Uint16Array(Y * 4);
|
|
151
151
|
for (let c = 0; c < Y; c++)
|
|
152
|
-
_(
|
|
152
|
+
_(N, c * 4, a, c * 4);
|
|
153
153
|
V = a, R = j;
|
|
154
154
|
break;
|
|
155
155
|
default:
|
|
@@ -369,8 +369,11 @@ class pA {
|
|
|
369
369
|
this._webglrenderer.dispose(), this._settings.canvas = g, this._webglrenderer = this._createWebGLRenderer(), this._environment.setRenderer(this._webglrenderer);
|
|
370
370
|
}
|
|
371
371
|
_createWebGLRenderer() {
|
|
372
|
-
|
|
373
|
-
|
|
372
|
+
var i;
|
|
373
|
+
const g = (i = this._settings.canvas) == null ? void 0 : i.getContext("webgl2");
|
|
374
|
+
g == null || g.pixelStorei(g.UNPACK_FLIP_Y_WEBGL, !1), g == null || g.pixelStorei(g.UNPACK_PREMULTIPLY_ALPHA_WEBGL, !1);
|
|
375
|
+
const A = new LA(this._settings);
|
|
376
|
+
return A.shadowMap.enabled = this._settings.shadows, A.shadowMap.type = this._settings.shadowQuality === "high" ? FA : this._settings.shadowQuality === "medium" ? XA : jA, A.setPixelRatio(window.devicePixelRatio), A.outputColorSpace = EA, A.toneMapping = ZA, A.toneMappingExposure = 1, A;
|
|
374
377
|
}
|
|
375
378
|
}
|
|
376
379
|
const Hi = pA;
|
|
@@ -403,7 +406,7 @@ class fi {
|
|
|
403
406
|
}
|
|
404
407
|
}
|
|
405
408
|
}
|
|
406
|
-
class
|
|
409
|
+
class IA {
|
|
407
410
|
constructor(g, A, i) {
|
|
408
411
|
e(this, "isDIVEView", !0);
|
|
409
412
|
e(this, "uuid", eA.generateUUID());
|
|
@@ -536,7 +539,7 @@ class ri extends O {
|
|
|
536
539
|
e(this, "isSelectable", !0);
|
|
537
540
|
e(this, "_hemiLight");
|
|
538
541
|
e(this, "_dirLight");
|
|
539
|
-
this.name = "DIVESceneLight", this._hemiLight = new
|
|
542
|
+
this.name = "DIVESceneLight", this._hemiLight = new NA(16777215, 16777215, 2), this._hemiLight.layers.mask = v, this._hemiLight.position.set(0, 50, 0), this._hemiLight.visible = !0, this.add(this._hemiLight), this._dirLight = new kA(16777215, 3), this._dirLight.layers.mask = v, this._dirLight.position.set(1, 1.75, 1), this._dirLight.position.multiplyScalar(30), this._dirLight.castShadow = !0, this._dirLight.visible = !0, this._dirLight.shadow.mapSize.width = 2048, this._dirLight.shadow.mapSize.height = 2048;
|
|
540
543
|
const A = 5;
|
|
541
544
|
this._dirLight.shadow.camera.left = -A, this._dirLight.shadow.camera.right = A, this._dirLight.shadow.camera.top = A, this._dirLight.shadow.camera.bottom = -A, this._dirLight.shadow.camera.far = 3500, this.add(this._dirLight);
|
|
542
545
|
}
|
|
@@ -775,7 +778,7 @@ class lA extends tA {
|
|
|
775
778
|
let i = null;
|
|
776
779
|
return A.traverse((t) => {
|
|
777
780
|
!i && t.userData.isDIVEModel && (i = t), t.castShadow = !0, t.receiveShadow = !0, t.layers.mask = this.layers.mask, this._boundingBox.expandByObject(t), !this._mesh && "isMesh" in t && (this._mesh = t, this._material ? this._mesh.material = this._material : this._material = t.material);
|
|
778
|
-
}), i || (i = A), this.position.copy(i.position), this.quaternion.copy(i.quaternion), this.scale.copy(i.scale), this.add(...i.children), this;
|
|
781
|
+
}), i || (i = A), this.position.copy(i.position), this.quaternion.copy(i.quaternion), this.scale.copy(i.scale), this.add(...i.children), this.animations = A.animations, this;
|
|
779
782
|
}
|
|
780
783
|
setMaterial(A) {
|
|
781
784
|
this._material || (this._material = new gA()), A.vertexColors !== void 0 && (this._material.vertexColors = A.vertexColors), A.color !== void 0 && this._material.color.set(A.color), A.map !== void 0 && (this._material.map = A.map), A.normalMap !== void 0 && (this._material.normalMap = A.normalMap), A.roughness !== void 0 && (this._material.roughness = A.roughness), A.roughnessMap !== void 0 && (this._material.roughnessMap = A.roughnessMap, this._material.roughnessMap && (this._material.roughness = 1)), A.metalness !== void 0 && (this._material.metalness = A.metalness), A.metalnessMap !== void 0 && (this._material.metalnessMap = A.metalnessMap, this._material.metalnessMap && (this._material.metalness = 1)), this._mesh && (this._mesh.material = this._material);
|
|
@@ -1095,7 +1098,7 @@ class Pi extends Z {
|
|
|
1095
1098
|
this.material.color = new J(A);
|
|
1096
1099
|
}
|
|
1097
1100
|
}
|
|
1098
|
-
class
|
|
1101
|
+
class Ii extends O {
|
|
1099
1102
|
constructor() {
|
|
1100
1103
|
super();
|
|
1101
1104
|
e(this, "isDIVERoot", !0);
|
|
@@ -1287,14 +1290,14 @@ class zi extends O {
|
|
|
1287
1290
|
return A.parent !== null ? this._findScene(A.parent) : A;
|
|
1288
1291
|
}
|
|
1289
1292
|
}
|
|
1290
|
-
const
|
|
1293
|
+
const zi = "#888888", Ci = "#dddddd";
|
|
1291
1294
|
class wi extends O {
|
|
1292
1295
|
constructor() {
|
|
1293
1296
|
super(), this.name = "Grid";
|
|
1294
1297
|
const g = new $A(
|
|
1295
1298
|
100,
|
|
1296
1299
|
100,
|
|
1297
|
-
|
|
1300
|
+
zi,
|
|
1298
1301
|
Ci
|
|
1299
1302
|
);
|
|
1300
1303
|
g.material.depthTest = !1, g.layers.mask = ei, this.add(g);
|
|
@@ -1316,7 +1319,7 @@ class ui extends wA {
|
|
|
1316
1319
|
e(this, "_grid");
|
|
1317
1320
|
this.setBackground(
|
|
1318
1321
|
(A == null ? void 0 : A.backgroundColor) ?? T.backgroundColor
|
|
1319
|
-
), this._root = new
|
|
1322
|
+
), this._root = new Ii(), this._root.floor.setVisibility(
|
|
1320
1323
|
(A == null ? void 0 : A.displayFloor) ?? T.displayFloor
|
|
1321
1324
|
), this.add(this._root), this._grid = new wi(), this._grid.setVisibility(
|
|
1322
1325
|
(A == null ? void 0 : A.displayGrid) ?? T.displayGrid
|
|
@@ -1896,7 +1899,7 @@ const Gi = {
|
|
|
1896
1899
|
}
|
|
1897
1900
|
};
|
|
1898
1901
|
e(E, "DEFAULT_ZOOM_FACTOR", 1);
|
|
1899
|
-
let
|
|
1902
|
+
let zA = E;
|
|
1900
1903
|
const Di = `
|
|
1901
1904
|
@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@
|
|
1902
1905
|
@@@@+-:::::::---------------------==------------------------------=#@@@@
|
|
@@ -1958,7 +1961,7 @@ class mi {
|
|
|
1958
1961
|
displayGrid: (g == null ? void 0 : g.displayGrid) ?? x.displayGrid,
|
|
1959
1962
|
displayFloor: (g == null ? void 0 : g.displayFloor) ?? x.displayFloor
|
|
1960
1963
|
});
|
|
1961
|
-
const A = new
|
|
1964
|
+
const A = new IA(
|
|
1962
1965
|
this._scene,
|
|
1963
1966
|
new PA(),
|
|
1964
1967
|
this._settings
|
|
@@ -1972,7 +1975,7 @@ class mi {
|
|
|
1972
1975
|
), this._clock.addTicker(this._orientationDisplay);
|
|
1973
1976
|
}
|
|
1974
1977
|
), this._settings.autoStart && this.start(), console.log(
|
|
1975
|
-
"DIVE 2.
|
|
1978
|
+
"DIVE 2.3.1 initialized successfully!"
|
|
1976
1979
|
), console.log(Di), window.DIVE.instances.push(this);
|
|
1977
1980
|
}
|
|
1978
1981
|
/**
|
|
@@ -2040,7 +2043,7 @@ class mi {
|
|
|
2040
2043
|
* @deprecated This method will be removed in a future version. To create a new view, use `QuickView` instead.
|
|
2041
2044
|
*/
|
|
2042
2045
|
createView(g) {
|
|
2043
|
-
const A = new
|
|
2046
|
+
const A = new IA(
|
|
2044
2047
|
this._scene,
|
|
2045
2048
|
g ?? new PA(),
|
|
2046
2049
|
{
|
|
@@ -2094,8 +2097,8 @@ export {
|
|
|
2094
2097
|
AA as B,
|
|
2095
2098
|
x as D,
|
|
2096
2099
|
pi as F,
|
|
2097
|
-
|
|
2098
|
-
|
|
2100
|
+
zi as G,
|
|
2101
|
+
zA as O,
|
|
2099
2102
|
di as S,
|
|
2100
2103
|
Gi as a,
|
|
2101
2104
|
mi as b,
|
|
@@ -2115,11 +2118,11 @@ export {
|
|
|
2115
2118
|
pA as p,
|
|
2116
2119
|
mA as q,
|
|
2117
2120
|
fi as r,
|
|
2118
|
-
|
|
2121
|
+
Ii as s,
|
|
2119
2122
|
ui as t,
|
|
2120
2123
|
T as u,
|
|
2121
2124
|
ri as v,
|
|
2122
|
-
|
|
2125
|
+
IA as w,
|
|
2123
2126
|
Ci as x,
|
|
2124
2127
|
KA as y
|
|
2125
2128
|
};
|