@shopware-ag/dive 1.18.4 → 1.18.5-beta.0

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 (128) hide show
  1. package/build/dive.cjs +3764 -4767
  2. package/build/dive.cjs.map +1 -1
  3. package/build/dive.d.ts +6 -1186
  4. package/build/dive.js +24006 -4173
  5. package/build/dive.js.map +1 -1
  6. package/build/src/animation/AnimationSystem.d.ts +16 -0
  7. package/build/src/ar/AR.d.ts +21 -0
  8. package/build/src/ar/arquicklook/ARQuickLook.d.ts +8 -0
  9. package/build/src/ar/sceneviewer/SceneViewer.d.ts +7 -0
  10. package/build/src/ar/webxr/WebXR.d.ts +21 -0
  11. package/build/src/ar/webxr/controller/WebXRController.d.ts +46 -0
  12. package/build/src/ar/webxr/crosshair/WebXRCrosshair.d.ts +7 -0
  13. package/build/src/ar/webxr/origin/WebXROrigin.d.ts +31 -0
  14. package/build/src/ar/webxr/overlay/Overlay.d.ts +8 -0
  15. package/build/src/ar/webxr/raycaster/WebXRRaycaster.d.ts +40 -0
  16. package/build/src/ar/webxr/raycaster/ar/WebXRRaycasterAR.d.ts +15 -0
  17. package/build/src/ar/webxr/raycaster/three/WebXRRaycasterTHREE.d.ts +12 -0
  18. package/build/src/ar/webxr/touchscreencontrols/WebXRTouchscreenControls.d.ts +73 -0
  19. package/build/src/axiscamera/AxisCamera.d.ts +18 -0
  20. package/build/src/camera/PerspectiveCamera.d.ts +20 -0
  21. package/build/src/com/Communication.d.ts +77 -0
  22. package/build/src/com/actions/camera/computeencompassingview.d.ts +9 -0
  23. package/build/src/com/actions/camera/getcameratransform.d.ts +9 -0
  24. package/build/src/com/actions/camera/movecamera.d.ts +15 -0
  25. package/build/src/com/actions/camera/resetcamera.d.ts +7 -0
  26. package/build/src/com/actions/camera/setcameralayer.d.ts +7 -0
  27. package/build/src/com/actions/camera/setcameratransform.d.ts +9 -0
  28. package/build/src/com/actions/camera/zoomcamera.d.ts +8 -0
  29. package/build/src/com/actions/index.d.ts +58 -0
  30. package/build/src/com/actions/media/generatemedia.d.ts +15 -0
  31. package/build/src/com/actions/object/addobject.d.ts +6 -0
  32. package/build/src/com/actions/object/deleteobject.d.ts +8 -0
  33. package/build/src/com/actions/object/deselectobject.d.ts +8 -0
  34. package/build/src/com/actions/object/getallobjects.d.ts +6 -0
  35. package/build/src/com/actions/object/getobjects.d.ts +8 -0
  36. package/build/src/com/actions/object/model/dropit.d.ts +7 -0
  37. package/build/src/com/actions/object/model/modelloaded.d.ts +7 -0
  38. package/build/src/com/actions/object/model/placeonfloor.d.ts +7 -0
  39. package/build/src/com/actions/object/selectobject.d.ts +8 -0
  40. package/build/src/com/actions/object/setparent.d.ts +13 -0
  41. package/build/src/com/actions/object/updateobject.d.ts +8 -0
  42. package/build/src/com/actions/scene/exportscene.d.ts +8 -0
  43. package/build/src/com/actions/scene/getallscenedata.d.ts +6 -0
  44. package/build/src/com/actions/scene/launchar.d.ts +6 -0
  45. package/build/src/com/actions/scene/setbackground.d.ts +7 -0
  46. package/build/src/com/actions/scene/updatescene.d.ts +11 -0
  47. package/build/src/com/actions/toolbox/select/setgizmomode.d.ts +7 -0
  48. package/build/src/com/actions/toolbox/transform/setgizmoscalelinked.d.ts +5 -0
  49. package/build/src/com/actions/toolbox/transform/setgizmovisible.d.ts +5 -0
  50. package/build/src/com/actions/toolbox/usetool.d.ts +8 -0
  51. package/build/src/com/types/COMBaseEntity.d.ts +8 -0
  52. package/build/src/com/types/COMEntity.d.ts +6 -0
  53. package/build/src/com/types/COMEntityType.d.ts +1 -0
  54. package/build/src/com/types/COMGeometry.d.ts +7 -0
  55. package/build/src/com/types/COMGeometryType.d.ts +1 -0
  56. package/build/src/com/types/COMGroup.d.ts +8 -0
  57. package/build/src/com/types/COMLight.d.ts +10 -0
  58. package/build/src/com/types/COMMaterial.d.ts +11 -0
  59. package/build/src/com/types/COMModel.d.ts +11 -0
  60. package/build/src/com/types/COMPov.d.ts +7 -0
  61. package/build/src/com/types/COMPrimitive.d.ts +11 -0
  62. package/build/src/com/types/index.d.ts +11 -0
  63. package/build/src/constant/AxisHelperColors.d.ts +6 -0
  64. package/build/src/constant/GridColors.d.ts +2 -0
  65. package/build/src/constant/VisibilityLayerMask.d.ts +5 -0
  66. package/build/src/controls/OrbitControls.d.ts +38 -0
  67. package/build/src/dive.d.ts +64 -0
  68. package/build/src/events/EventExecutor.d.ts +5 -0
  69. package/build/src/exporters/usdz/USDZExporter.d.ts +15 -0
  70. package/build/src/gizmo/Gizmo.d.ts +27 -0
  71. package/build/src/gizmo/handles/AxisHandle.d.ts +30 -0
  72. package/build/src/gizmo/handles/RadialHandle.d.ts +30 -0
  73. package/build/src/gizmo/handles/ScaleHandle.d.ts +33 -0
  74. package/build/src/gizmo/plane/GizmoPlane.d.ts +12 -0
  75. package/build/src/gizmo/rotate/RotateGizmo.d.ts +17 -0
  76. package/build/src/gizmo/scale/ScaleGizmo.d.ts +20 -0
  77. package/build/src/gizmo/translate/TranslateGizmo.d.ts +17 -0
  78. package/build/src/grid/Grid.d.ts +10 -0
  79. package/build/src/group/Group.d.ts +23 -0
  80. package/build/src/helper/applyMixins/applyMixins.d.ts +8 -0
  81. package/build/src/helper/findInterface/findInterface.d.ts +2 -0
  82. package/build/src/helper/findSceneRecursive/findSceneRecursive.d.ts +9 -0
  83. package/build/src/helper/getObjectDelta/getObjectDelta.d.ts +4 -0
  84. package/build/src/helper/isInterface/implementsInterface.d.ts +2 -0
  85. package/build/src/info/Info.d.ts +39 -0
  86. package/build/src/interface/Draggable.d.ts +7 -0
  87. package/build/src/interface/Hoverable.d.ts +7 -0
  88. package/build/src/interface/Movable.d.ts +11 -0
  89. package/build/src/interface/Rotatable.d.ts +9 -0
  90. package/build/src/interface/Scalable.d.ts +9 -0
  91. package/build/src/interface/Selectable.d.ts +10 -0
  92. package/build/src/io/IO.d.ts +10 -0
  93. package/build/src/io/gltf/GLTFIO.d.ts +12 -0
  94. package/build/src/light/AmbientLight.d.ts +17 -0
  95. package/build/src/light/PointLight.d.ts +29 -0
  96. package/build/src/light/SceneLight.d.ts +18 -0
  97. package/build/src/loadingmanager/LoadingManager.d.ts +14 -0
  98. package/build/src/math/ceil/ceilExp.d.ts +1 -0
  99. package/build/src/math/degToRad/degToRad.d.ts +1 -0
  100. package/build/src/math/floor/floorExp.d.ts +1 -0
  101. package/build/src/math/helper/shift.d.ts +1 -0
  102. package/build/src/math/index.d.ts +18 -0
  103. package/build/src/math/radToDeg/radToDeg.d.ts +1 -0
  104. package/build/src/math/round/roundExp.d.ts +1 -0
  105. package/build/src/math/signedAngleTo/signedAngleTo.d.ts +9 -0
  106. package/build/src/math/toFixed/toFixedExp.d.ts +1 -0
  107. package/build/src/math/truncate/truncateExp.d.ts +1 -0
  108. package/build/src/mediacreator/MediaCreator.d.ts +17 -0
  109. package/build/src/model/Model.d.ts +21 -0
  110. package/build/src/node/Node.d.ts +24 -0
  111. package/build/src/primitive/Primitive.d.ts +28 -0
  112. package/build/src/primitive/floor/Floor.d.ts +14 -0
  113. package/build/src/renderer/Renderer.d.ts +69 -0
  114. package/build/src/scene/Scene.d.ts +46 -0
  115. package/build/src/scene/root/Root.d.ts +42 -0
  116. package/build/src/scene/xrroot/XRRoot.d.ts +17 -0
  117. package/build/src/scene/xrroot/xrlightroot/XRLightRoot.d.ts +13 -0
  118. package/build/src/toolbox/BaseTool.d.ts +48 -0
  119. package/build/src/toolbox/Toolbox.d.ts +31 -0
  120. package/build/src/toolbox/select/SelectTool.d.ts +26 -0
  121. package/build/src/toolbox/transform/TransformTool.d.ts +27 -0
  122. package/build/src/types/SceneData.d.ts +19 -0
  123. package/build/src/types/SceneObjects.d.ts +7 -0
  124. package/build/src/types/SceneType.d.ts +4 -0
  125. package/build/src/types/index.d.ts +4 -0
  126. package/package.json +9 -8
  127. package/src/dive.ts +0 -3
  128. package/build/dive.d.cts +0 -1186
@@ -0,0 +1,26 @@
1
+ import { DIVEScene } from '../../scene/Scene.ts';
2
+ import { default as DIVETransformTool } from '../transform/TransformTool.ts';
3
+ import { default as DIVEOrbitControls } from '../../controls/OrbitControls.ts';
4
+ import { DIVESelectable } from '../../interface/Selectable.ts';
5
+ import { DIVEBaseTool } from '../BaseTool.ts';
6
+ export declare const isSelectTool: (tool: DIVEBaseTool) => tool is DIVESelectTool;
7
+ export interface DIVEObjectEventMap {
8
+ select: object;
9
+ }
10
+ /**
11
+ * A Tool to select and move objects in the scene.
12
+ *
13
+ * Objects have to implement the DIVESelectable interface to be selectable and DIVEMovable to be movable.
14
+ *
15
+ * @module
16
+ */
17
+ export declare class DIVESelectTool extends DIVETransformTool {
18
+ readonly isSelectTool: boolean;
19
+ constructor(scene: DIVEScene, controller: DIVEOrbitControls);
20
+ Activate(): void;
21
+ Select(selectable: DIVESelectable): void;
22
+ Deselect(selectable: DIVESelectable): void;
23
+ AttachGizmo(selectable: DIVESelectable): void;
24
+ DetachGizmo(): void;
25
+ onClick(e: PointerEvent): void;
26
+ }
@@ -0,0 +1,27 @@
1
+ import { DIVEBaseTool } from '../BaseTool.ts';
2
+ import { DIVEScene } from '../../scene/Scene.ts';
3
+ import { default as DIVEOrbitControls } from '../../controls/OrbitControls.ts';
4
+ import { TransformControls } from 'three/examples/jsm/controls/TransformControls';
5
+ import { DIVEGizmo } from '../../gizmo/Gizmo.ts';
6
+ export declare const isTransformTool: (tool: DIVEBaseTool) => tool is DIVETransformTool;
7
+ export interface DIVEObjectEventMap {
8
+ select: object;
9
+ }
10
+ /**
11
+ * A Tool to select and move objects in the scene.
12
+ *
13
+ * Objects have to implement the DIVESelectable interface to be selectable and DIVEMovable to be movable.
14
+ *
15
+ * @module
16
+ */
17
+ export default class DIVETransformTool extends DIVEBaseTool {
18
+ readonly isTransformTool: boolean;
19
+ private _scaleLinked;
20
+ protected _gizmo: TransformControls | DIVEGizmo;
21
+ constructor(scene: DIVEScene, controller: DIVEOrbitControls);
22
+ Activate(): void;
23
+ SetGizmoMode(mode: 'translate' | 'rotate' | 'scale'): void;
24
+ SetGizmoVisibility(active: boolean): void;
25
+ SetGizmoScaleLinked(linked: boolean): void;
26
+ private initGizmo;
27
+ }
@@ -0,0 +1,19 @@
1
+ import { Vector3Like } from 'three';
2
+ import { COMGroup, COMLight, COMModel, COMPov, COMPrimitive } from '../dive';
3
+ export type DIVESceneData = {
4
+ name: string;
5
+ mediaItem: null;
6
+ backgroundColor: string;
7
+ floorEnabled: boolean;
8
+ floorColor: string;
9
+ userCamera: {
10
+ position: Vector3Like;
11
+ target: Vector3Like;
12
+ };
13
+ spotmarks: object[];
14
+ lights: COMLight[];
15
+ objects: COMModel[];
16
+ cameras: COMPov[];
17
+ primitives: COMPrimitive[];
18
+ groups: COMGroup[];
19
+ };
@@ -0,0 +1,7 @@
1
+ import { DIVEGroup } from '../group/Group';
2
+ import { default as DIVEAmbientLight } from '../light/AmbientLight';
3
+ import { default as DIVEPointLight } from '../light/PointLight';
4
+ import { default as DIVESceneLight } from '../light/SceneLight';
5
+ import { DIVEModel } from '../model/Model';
6
+ import { DIVEPrimitive } from '../primitive/Primitive';
7
+ export type DIVESceneObject = DIVEModel | DIVEGroup | DIVEPrimitive | DIVEAmbientLight | DIVEPointLight | DIVESceneLight;
@@ -0,0 +1,4 @@
1
+ import { GLTF } from 'three/examples/jsm/loaders/GLTFLoader';
2
+ export type DIVESceneFileType = {
3
+ glb: GLTF;
4
+ };
@@ -0,0 +1,4 @@
1
+ import { DIVESceneObject } from './SceneObjects';
2
+ import { DIVESceneFileType } from './SceneType';
3
+ import { DIVESceneData } from './SceneData';
4
+ export { type DIVESceneObject, type DIVESceneFileType, type DIVESceneData };
package/package.json CHANGED
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "name": "@shopware-ag/dive",
3
- "version": "1.18.4",
3
+ "version": "1.18.5-beta.0",
4
4
  "description": "Shopware Spatial Framework",
5
5
  "type": "module",
6
- "main": "./build/dive.cjs",
7
- "module": "./build/dive.js",
8
- "types": "./build/dive.d.ts",
6
+ "main": "build/dive.cjs",
7
+ "module": "build/dive.js",
8
+ "types": "build/dive.d.ts",
9
9
  "files": [
10
10
  "build",
11
11
  "LICENSE",
@@ -51,13 +51,14 @@
51
51
  "ts-jest": "^29.1.2",
52
52
  "ts-node": "^10.9.2",
53
53
  "tsc": "^2.0.4",
54
- "tsup": "^8.0.2",
55
54
  "typescript": "^5.4.5",
56
- "typescript-eslint": "^7.7.1"
55
+ "typescript-eslint": "^7.7.1",
56
+ "vite": "^6.2.1",
57
+ "vite-plugin-dts": "^4.5.3"
57
58
  },
58
59
  "scripts": {
59
- "build": "tsup --env.DIVE_NODE_ENV production",
60
- "dev": "tsup --watch --env.DIVE_NODE_ENV development",
60
+ "build": "vite build",
61
+ "dev": "vite build --watch",
61
62
  "lint": "eslint",
62
63
  "lint:actions": "yarn lint:actions:transpile && yarn lint:actions:check && yarn lint:actions:cleanup",
63
64
  "lint:actions:transpile": "yarn tsc --resolveJsonModule --esModuleInterop ci/lint/lint-actions.ts && mv ci/lint/lint-actions.js ci/lint/lint-actions.cjs",
package/src/dive.ts CHANGED
@@ -277,9 +277,6 @@ export default class DIVE {
277
277
  };
278
278
 
279
279
  console.log(`DIVE ${pkgjson.version} initialized successfully!`);
280
- if (process.env.DIVE_NODE_ENV === 'development') {
281
- console.log('DIVE is running in development mode.');
282
- }
283
280
  console.log(`
284
281
  @@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@
285
282
  @@@@+-:::::::---------------------==------------------------------=#@@@@