@shopware-ag/dive 1.16.16-beta.0 → 1.16.16

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 (44) hide show
  1. package/build/dive.cjs +203 -1652
  2. package/build/dive.cjs.map +1 -1
  3. package/build/dive.d.cts +8 -50
  4. package/build/dive.d.ts +8 -50
  5. package/build/dive.js +159 -1619
  6. package/build/dive.js.map +1 -1
  7. package/package.json +1 -1
  8. package/src/axiscamera/AxisCamera.ts +4 -4
  9. package/src/axiscamera/__test__/AxisCamera.test.ts +0 -4
  10. package/src/com/Communication.ts +0 -17
  11. package/src/com/__test__/Communication.test.ts +1 -1
  12. package/src/com/actions/index.ts +0 -2
  13. package/src/dive.ts +9 -51
  14. package/src/helper/findSceneRecursive/findSceneRecursive.ts +2 -2
  15. package/src/info/Info.ts +1 -37
  16. package/src/info/__test__/Info.test.ts +5 -45
  17. package/src/mediacreator/MediaCreator.ts +4 -4
  18. package/src/mediacreator/__test__/MediaCreator.test.ts +2 -7
  19. package/src/renderer/Renderer.ts +11 -21
  20. package/src/renderer/__test__/Renderer.test.ts +1 -19
  21. package/src/scene/Scene.ts +12 -35
  22. package/src/scene/__test__/Scene.test.ts +5 -39
  23. package/src/scene/root/Root.ts +0 -1
  24. package/src/toolbox/BaseTool.ts +3 -9
  25. package/src/toolbox/Toolbox.ts +1 -1
  26. package/src/toolbox/__test__/Toolbox.test.ts +1 -1
  27. package/src/toolbox/select/SelectTool.ts +1 -1
  28. package/src/toolbox/select/__test__/SelectTool.test.ts +1 -1
  29. package/src/toolbox/transform/TransformTool.ts +4 -4
  30. package/src/toolbox/transform/__test__/TransformTool.test.ts +4 -2
  31. package/src/ar/AR.ts +0 -164
  32. package/src/ar/arquicklook/ARQuickLook.ts +0 -42
  33. package/src/ar/webxr/WebXR.ts +0 -176
  34. package/src/ar/webxr/controller/WebXRController.ts +0 -334
  35. package/src/ar/webxr/crosshair/WebXRCrosshair.ts +0 -35
  36. package/src/ar/webxr/origin/WebXROrigin.ts +0 -191
  37. package/src/ar/webxr/overlay/Overlay.ts +0 -50
  38. package/src/ar/webxr/raycaster/WebXRRaycaster.ts +0 -131
  39. package/src/ar/webxr/raycaster/ar/WebXRRaycasterAR.ts +0 -102
  40. package/src/ar/webxr/raycaster/three/WebXRRaycasterTHREE.ts +0 -49
  41. package/src/ar/webxr/touchscreencontrols/WebXRTouchscreenControls.ts +0 -356
  42. package/src/events/EventExecutor.ts +0 -35
  43. package/src/scene/xrroot/XRRoot.ts +0 -56
  44. package/src/scene/xrroot/xrlightroot/XRLightRoot.ts +0 -80
@@ -1,56 +0,0 @@
1
- import { Mesh, Object3D, PlaneGeometry, ShadowMaterial } from 'three';
2
- import { DIVERoot } from '../root/Root';
3
- import { type DIVERenderer } from '../../renderer/Renderer';
4
- import { DIVEXRLightRoot } from './xrlightroot/XRLightRoot';
5
- import { type DIVEScene } from '../Scene';
6
-
7
- export class DIVEXRRoot extends Object3D {
8
- private _xrLightRoot: DIVEXRLightRoot;
9
- private _xrModelRoot: DIVERoot;
10
- private _xrHandNode: Object3D;
11
-
12
- public get XRModelRoot(): DIVERoot {
13
- return this._xrModelRoot;
14
- }
15
-
16
- public get XRLightRoot(): DIVEXRLightRoot {
17
- return this._xrLightRoot;
18
- }
19
-
20
- public get XRHandNode(): Object3D {
21
- return this._xrHandNode;
22
- }
23
-
24
- private _xrShadowPlane: Mesh;
25
-
26
- constructor(scene: DIVEScene) {
27
- super();
28
- this.name = 'XRRoot';
29
-
30
- this._xrModelRoot = new DIVERoot();
31
- this._xrModelRoot.name = 'XRModelRoot';
32
- this.add(this._xrModelRoot);
33
-
34
- this._xrShadowPlane = new Mesh(
35
- new PlaneGeometry(100, 100),
36
- new ShadowMaterial({ opacity: 1, transparent: true }),
37
- );
38
- this._xrModelRoot.add(this._xrShadowPlane);
39
-
40
- this._xrLightRoot = new DIVEXRLightRoot(scene);
41
- this._xrLightRoot.name = 'XRLightRoot';
42
- this.add(this._xrLightRoot);
43
-
44
- this._xrHandNode = new Object3D();
45
- this._xrHandNode.name = 'XRHandNode';
46
- this.add(this._xrHandNode);
47
- }
48
-
49
- public InitLightEstimation(renderer: DIVERenderer): void {
50
- this._xrLightRoot.InitLightEstimation(renderer);
51
- }
52
-
53
- public DisposeLightEstimation(): void {
54
- this._xrLightRoot.DisposeLightEstimation();
55
- }
56
- }
@@ -1,80 +0,0 @@
1
- import { XREstimatedLight } from 'three/examples/jsm/webxr/XREstimatedLight';
2
- import { type DIVERenderer } from '../../../renderer/Renderer';
3
- import { Object3D } from 'three';
4
- import { type DIVEScene } from '../../Scene';
5
- import { PRODUCT_LAYER_MASK } from '../../../constant/VisibilityLayerMask';
6
- import { DIVERoot } from '../../root/Root';
7
-
8
- export class DIVEXRLightRoot extends Object3D {
9
- private _scene: DIVEScene;
10
-
11
- private _xrLight: XREstimatedLight | null;
12
- private _lightRoot: DIVERoot;
13
-
14
- constructor(scene: DIVEScene) {
15
- super();
16
- this.name = 'XRLightRoot';
17
-
18
- this._scene = scene;
19
-
20
- // placeholder for XR light
21
- this._xrLight = null;
22
-
23
- // add scene
24
- this._lightRoot = new DIVERoot();
25
- this._lightRoot.UpdateSceneObject({
26
- id: 'XRSceneLight',
27
- entityType: 'light',
28
- name: 'XRSceneLight',
29
- type: 'scene',
30
- color: 0xffffff,
31
- intensity: 1,
32
- enabled: true,
33
- visible: true,
34
- });
35
- this.add(this._lightRoot);
36
- }
37
-
38
- public InitLightEstimation(renderer: DIVERenderer): void {
39
- if (!this._xrLight) {
40
- this._xrLight = new XREstimatedLight(renderer, true);
41
- this._xrLight.layers.mask = PRODUCT_LAYER_MASK;
42
- this.add(this._xrLight);
43
- }
44
-
45
- this._xrLight.addEventListener('estimationstart', () => {
46
- this.onEstimationStart();
47
- });
48
- this._xrLight.addEventListener('estimationend', () => {
49
- this.onEstimationEnd();
50
- });
51
- }
52
-
53
- public DisposeLightEstimation(): void {
54
- if (!this._xrLight) return;
55
-
56
- this._xrLight.removeEventListener('estimationstart', () => {
57
- this.onEstimationStart();
58
- });
59
- this._xrLight.removeEventListener('estimationend', () => {
60
- this.onEstimationEnd();
61
- });
62
- }
63
-
64
- private onEstimationStart(): void {
65
- this._lightRoot.visible = false;
66
-
67
- if (!this._xrLight) return;
68
-
69
- if (this._xrLight.environment) {
70
- this._scene.environment = this._xrLight.environment;
71
- }
72
- }
73
-
74
- private onEstimationEnd(): void {
75
- this._lightRoot.visible = true;
76
- this._scene.environment = null;
77
-
78
- if (!this._xrLight) return;
79
- }
80
- }