@shopware-ag/dive 1.19.0 → 1.19.1-beta.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 (197) hide show
  1. package/build/dive.cjs +388 -220
  2. package/build/dive.cjs.map +1 -1
  3. package/build/dive.js +395 -21946
  4. package/build/dive.js.map +1 -1
  5. package/build/dive.mjs +28206 -0
  6. package/build/dive.mjs.map +1 -0
  7. package/build/src/ar/AR.d.ts +37 -14
  8. package/build/src/ar/arquicklook/ARQuickLook.d.ts +5 -6
  9. package/build/src/ar/sceneviewer/SceneViewer.d.ts +42 -6
  10. package/build/src/com/actions/scene/launchar.d.ts +5 -2
  11. package/build/src/converter/Converter.d.ts +21 -0
  12. package/build/src/dive.d.ts +3 -2
  13. package/build/src/exporter/Exporter.d.ts +11 -0
  14. package/build/src/helper/applyMixins/applyMixins.d.ts +22 -6
  15. package/build/src/info/Info.d.ts +37 -13
  16. package/build/src/interface/Movable.d.ts +5 -5
  17. package/build/src/interface/Selectable.d.ts +4 -4
  18. package/build/src/loader/Loader.d.ts +11 -0
  19. package/build/src/model/Model.d.ts +2 -2
  20. package/build/src/node/Node.d.ts +3 -3
  21. package/build/src/scene/root/Root.d.ts +1 -1
  22. package/build/src/types/ExporterOptions.d.ts +15 -0
  23. package/build/src/types/FileTypes.d.ts +27 -0
  24. package/build/src/types/index.d.ts +4 -0
  25. package/build/src/types/info/index.d.ts +66 -0
  26. package/package.json +17 -3
  27. package/build/src/exporters/usdz/USDZExporter.d.ts +0 -15
  28. package/build/src/loadingmanager/LoadingManager.d.ts +0 -14
  29. package/src/__test__/DIVE.test.ts +0 -274
  30. package/src/animation/AnimationSystem.ts +0 -34
  31. package/src/animation/__test__/AnimationSystem.test.ts +0 -40
  32. package/src/ar/AR.ts +0 -98
  33. package/src/ar/__test__/AR.test.ts +0 -187
  34. package/src/ar/arquicklook/ARQuickLook.ts +0 -93
  35. package/src/ar/arquicklook/__test__/ARQuickLook.test.ts +0 -93
  36. package/src/ar/sceneviewer/SceneViewer.ts +0 -74
  37. package/src/ar/sceneviewer/__test__/SceneViewer.test.ts +0 -93
  38. package/src/ar/webxr/WebXR.ts +0 -176
  39. package/src/ar/webxr/controller/WebXRController.ts +0 -340
  40. package/src/ar/webxr/crosshair/WebXRCrosshair.ts +0 -35
  41. package/src/ar/webxr/origin/WebXROrigin.ts +0 -192
  42. package/src/ar/webxr/overlay/Overlay.ts +0 -50
  43. package/src/ar/webxr/raycaster/WebXRRaycaster.ts +0 -131
  44. package/src/ar/webxr/raycaster/ar/WebXRRaycasterAR.ts +0 -102
  45. package/src/ar/webxr/raycaster/three/WebXRRaycasterTHREE.ts +0 -49
  46. package/src/ar/webxr/touchscreencontrols/WebXRTouchscreenControls.ts +0 -356
  47. package/src/axiscamera/AxisCamera.ts +0 -108
  48. package/src/axiscamera/__test__/AxisCamera.test.ts +0 -150
  49. package/src/camera/PerspectiveCamera.ts +0 -63
  50. package/src/camera/__test__/PerspectiveCamera.test.ts +0 -36
  51. package/src/com/Communication.ts +0 -808
  52. package/src/com/__test__/Communication.test.ts +0 -1024
  53. package/src/com/actions/camera/computeencompassingview.ts +0 -10
  54. package/src/com/actions/camera/getcameratransform.ts +0 -10
  55. package/src/com/actions/camera/movecamera.ts +0 -18
  56. package/src/com/actions/camera/resetcamera.ts +0 -5
  57. package/src/com/actions/camera/setcameralayer.ts +0 -5
  58. package/src/com/actions/camera/setcameratransform.ts +0 -10
  59. package/src/com/actions/camera/zoomcamera.ts +0 -5
  60. package/src/com/actions/index.ts +0 -61
  61. package/src/com/actions/media/generatemedia.ts +0 -18
  62. package/src/com/actions/object/addobject.ts +0 -7
  63. package/src/com/actions/object/deleteobject.ts +0 -7
  64. package/src/com/actions/object/deselectobject.ts +0 -7
  65. package/src/com/actions/object/getallobjects.ts +0 -7
  66. package/src/com/actions/object/getobjects.ts +0 -7
  67. package/src/com/actions/object/model/dropit.ts +0 -5
  68. package/src/com/actions/object/model/modelloaded.ts +0 -5
  69. package/src/com/actions/object/model/placeonfloor.ts +0 -5
  70. package/src/com/actions/object/selectobject.ts +0 -7
  71. package/src/com/actions/object/setparent.ts +0 -10
  72. package/src/com/actions/object/updateobject.ts +0 -7
  73. package/src/com/actions/renderer/startrender.ts +0 -5
  74. package/src/com/actions/scene/exportscene.ts +0 -7
  75. package/src/com/actions/scene/getallscenedata.ts +0 -7
  76. package/src/com/actions/scene/launchar.ts +0 -7
  77. package/src/com/actions/scene/setbackground.ts +0 -5
  78. package/src/com/actions/scene/updatescene.ts +0 -11
  79. package/src/com/actions/toolbox/select/setgizmomode.ts +0 -5
  80. package/src/com/actions/toolbox/transform/setgizmoscalelinked.ts +0 -5
  81. package/src/com/actions/toolbox/transform/setgizmovisible.ts +0 -5
  82. package/src/com/actions/toolbox/usetool.ts +0 -7
  83. package/src/com/types/COMBaseEntity.ts +0 -9
  84. package/src/com/types/COMEntity.ts +0 -7
  85. package/src/com/types/COMEntityType.ts +0 -1
  86. package/src/com/types/COMGeometry.ts +0 -8
  87. package/src/com/types/COMGeometryType.ts +0 -9
  88. package/src/com/types/COMGroup.ts +0 -9
  89. package/src/com/types/COMLight.ts +0 -11
  90. package/src/com/types/COMMaterial.ts +0 -12
  91. package/src/com/types/COMModel.ts +0 -12
  92. package/src/com/types/COMPov.ts +0 -8
  93. package/src/com/types/COMPrimitive.ts +0 -12
  94. package/src/com/types/index.ts +0 -23
  95. package/src/constant/AxisHelperColors.ts +0 -7
  96. package/src/constant/GridColors.ts +0 -2
  97. package/src/constant/VisibilityLayerMask.ts +0 -5
  98. package/src/controls/OrbitControls.ts +0 -211
  99. package/src/controls/__test__/OrbitControls.test.ts +0 -256
  100. package/src/dive.ts +0 -363
  101. package/src/events/EventExecutor.ts +0 -35
  102. package/src/exporters/usdz/USDZExporter.ts +0 -21
  103. package/src/exporters/usdz/__test__/USDZExporter.test.ts +0 -57
  104. package/src/gizmo/Gizmo.ts +0 -144
  105. package/src/gizmo/handles/AxisHandle.ts +0 -153
  106. package/src/gizmo/handles/RadialHandle.ts +0 -149
  107. package/src/gizmo/handles/ScaleHandle.ts +0 -195
  108. package/src/gizmo/plane/GizmoPlane.ts +0 -84
  109. package/src/gizmo/rotate/RotateGizmo.ts +0 -143
  110. package/src/gizmo/scale/ScaleGizmo.ts +0 -125
  111. package/src/gizmo/translate/TranslateGizmo.ts +0 -114
  112. package/src/grid/Grid.ts +0 -34
  113. package/src/grid/__test__/Grid.test.ts +0 -28
  114. package/src/group/Group.ts +0 -184
  115. package/src/group/__test__/Group.test.ts +0 -212
  116. package/src/helper/applyMixins/__test__/applyMixins.test.ts +0 -30
  117. package/src/helper/applyMixins/applyMixins.ts +0 -18
  118. package/src/helper/findInterface/__test__/findInterface.test.ts +0 -63
  119. package/src/helper/findInterface/findInterface.ts +0 -13
  120. package/src/helper/findSceneRecursive/__test__/findSceneRecursive.test.ts +0 -40
  121. package/src/helper/findSceneRecursive/findSceneRecursive.ts +0 -16
  122. package/src/helper/getObjectDelta/__test__/getObjectDelta.test.ts +0 -186
  123. package/src/helper/getObjectDelta/getObjectDelta.ts +0 -105
  124. package/src/helper/isInterface/__test__/implementsInterface.test.ts +0 -19
  125. package/src/helper/isInterface/implementsInterface.ts +0 -9
  126. package/src/info/Info.ts +0 -154
  127. package/src/info/__test__/Info.test.ts +0 -338
  128. package/src/interface/Draggable.ts +0 -14
  129. package/src/interface/Hoverable.ts +0 -14
  130. package/src/interface/Movable.ts +0 -12
  131. package/src/interface/Rotatable.ts +0 -10
  132. package/src/interface/Scalable.ts +0 -10
  133. package/src/interface/Selectable.ts +0 -11
  134. package/src/io/IO.ts +0 -62
  135. package/src/io/__test__/IO.test.ts +0 -116
  136. package/src/io/gltf/GLTFIO.ts +0 -56
  137. package/src/io/gltf/__test__/GLTFIO.test.ts +0 -108
  138. package/src/light/AmbientLight.ts +0 -39
  139. package/src/light/PointLight.ts +0 -115
  140. package/src/light/SceneLight.ts +0 -63
  141. package/src/light/__test__/AmbientLight.test.ts +0 -29
  142. package/src/light/__test__/PointLight.test.ts +0 -74
  143. package/src/light/__test__/SceneLight.test.ts +0 -47
  144. package/src/loadingmanager/LoadingManager.ts +0 -50
  145. package/src/loadingmanager/__test__/LoadingManager.test.ts +0 -27
  146. package/src/math/__test__/DIVEMath.test.ts +0 -12
  147. package/src/math/ceil/__test__/ceilExp.test.ts +0 -12
  148. package/src/math/ceil/ceilExp.ts +0 -6
  149. package/src/math/degToRad/__test__/degToRad.test.ts +0 -172
  150. package/src/math/degToRad/degToRad.ts +0 -5
  151. package/src/math/floor/__test__/floorExp.test.ts +0 -14
  152. package/src/math/floor/floorExp.ts +0 -6
  153. package/src/math/helper/__test__/shift.test.ts +0 -12
  154. package/src/math/helper/shift.ts +0 -4
  155. package/src/math/index.ts +0 -28
  156. package/src/math/radToDeg/__test__/radToDeg.test.ts +0 -155
  157. package/src/math/radToDeg/radToDeg.ts +0 -5
  158. package/src/math/round/__test__/roundExp.test.ts +0 -14
  159. package/src/math/round/roundExp.ts +0 -10
  160. package/src/math/signedAngleTo/__test__/signedAngleTo.test.ts +0 -20
  161. package/src/math/signedAngleTo/signedAngleTo.ts +0 -20
  162. package/src/math/toFixed/__test__/toFixedExp.test.ts +0 -14
  163. package/src/math/toFixed/toFixedExp.ts +0 -9
  164. package/src/math/truncate/__test__/truncateExp.test.ts +0 -14
  165. package/src/math/truncate/truncateExp.ts +0 -9
  166. package/src/mediacreator/MediaCreator.ts +0 -75
  167. package/src/mediacreator/__test__/MediaCreator.test.ts +0 -155
  168. package/src/model/Model.ts +0 -185
  169. package/src/model/__test__/Model.test.ts +0 -222
  170. package/src/module/Module.ts +0 -45
  171. package/src/module/__test__/Module.test.ts +0 -54
  172. package/src/node/Node.ts +0 -98
  173. package/src/node/__test__/Node.test.ts +0 -120
  174. package/src/primitive/Primitive.ts +0 -299
  175. package/src/primitive/__test__/Primitive.test.ts +0 -281
  176. package/src/primitive/floor/Floor.ts +0 -45
  177. package/src/primitive/floor/__test__/Floor.test.ts +0 -24
  178. package/src/renderer/Renderer.ts +0 -215
  179. package/src/renderer/__test__/Renderer.test.ts +0 -228
  180. package/src/scene/Scene.ts +0 -106
  181. package/src/scene/__test__/Scene.test.ts +0 -124
  182. package/src/scene/root/Root.ts +0 -426
  183. package/src/scene/root/__test__/Root.test.ts +0 -903
  184. package/src/scene/xrroot/XRRoot.ts +0 -56
  185. package/src/scene/xrroot/xrlightroot/XRLightRoot.ts +0 -80
  186. package/src/toolbox/BaseTool.ts +0 -319
  187. package/src/toolbox/Toolbox.ts +0 -129
  188. package/src/toolbox/__test__/BaseTool.test.ts +0 -627
  189. package/src/toolbox/__test__/Toolbox.test.ts +0 -143
  190. package/src/toolbox/select/SelectTool.ts +0 -92
  191. package/src/toolbox/select/__test__/SelectTool.test.ts +0 -237
  192. package/src/toolbox/transform/TransformTool.ts +0 -166
  193. package/src/toolbox/transform/__test__/TransformTool.test.ts +0 -147
  194. package/src/types/SceneData.ts +0 -26
  195. package/src/types/SceneObjects.ts +0 -14
  196. package/src/types/SceneType.ts +0 -14
  197. package/src/types/index.ts +0 -5
@@ -1,10 +0,0 @@
1
- import { Vector3Like } from 'three';
2
-
3
- export default interface COMPUTE_ENCOMPASSING_VIEW {
4
- DESCRIPTION: 'Calculates the camera position and target to view the whole scene. (experimental)';
5
- PAYLOAD: object;
6
- RETURN: {
7
- position: Vector3Like;
8
- target: Vector3Like;
9
- };
10
- }
@@ -1,10 +0,0 @@
1
- import { Vector3Like } from 'three';
2
-
3
- export default interface GET_CAMERA_TRANSFORM {
4
- DESCRIPTION: 'Returns the current camera position and target.';
5
- PAYLOAD: object;
6
- RETURN: {
7
- position: Vector3Like;
8
- target: Vector3Like;
9
- };
10
- }
@@ -1,18 +0,0 @@
1
- import { Vector3Like } from 'three';
2
-
3
- export default interface MOVE_CAMERA {
4
- DESCRIPTION: 'Moves the camera to a new position and target.';
5
- PAYLOAD:
6
- | {
7
- position: Vector3Like;
8
- target: Vector3Like;
9
- locked: boolean;
10
- duration: number;
11
- }
12
- | {
13
- id: string;
14
- locked: boolean;
15
- duration: number;
16
- };
17
- RETURN: boolean;
18
- }
@@ -1,5 +0,0 @@
1
- export default interface RESET_CAMERA {
2
- DESCRIPTION: 'Reset the camera to its initial position and rotation.';
3
- PAYLOAD: { duration: number };
4
- RETURN: boolean;
5
- }
@@ -1,5 +0,0 @@
1
- export default interface SET_CAMERA_LAYER {
2
- DESCRIPTION: 'Sets the camera layer to a certain layer.';
3
- PAYLOAD: { layer: 'LIVE' | 'EDITOR' };
4
- RETURN: boolean;
5
- }
@@ -1,10 +0,0 @@
1
- import { Vector3Like } from 'three';
2
-
3
- export default interface SET_CAMERA_TRANSFORM {
4
- DESCRIPTION: 'Sets the camera position and target.';
5
- PAYLOAD: {
6
- position: Vector3Like;
7
- target: Vector3Like;
8
- };
9
- RETURN: boolean;
10
- }
@@ -1,5 +0,0 @@
1
- export default interface ZOOM_CAMERA {
2
- DESCRIPTION: 'Zooms the camera in or out by a certain amount.';
3
- PAYLOAD: { direction: 'IN' | 'OUT'; by: number };
4
- RETURN: boolean;
5
- }
@@ -1,61 +0,0 @@
1
- import START_RENDER from './renderer/startrender.ts';
2
- import SET_BACKGROUND from './scene/setbackground.ts';
3
- import RESET_CAMERA from './camera/resetcamera.ts';
4
- import SET_CAMERA_LAYER from './camera/setcameralayer.ts';
5
- import ZOOM_CAMERA from './camera/zoomcamera.ts';
6
- import SET_GIZMO_MODE from './toolbox/select/setgizmomode.ts';
7
- import SET_CAMERA_TRANSFORM from './camera/setcameratransform.ts';
8
- import MOVE_CAMERA from './camera/movecamera.ts';
9
- import PLACE_ON_FLOOR from './object/model/placeonfloor.ts';
10
- import GET_ALL_OBJECTS from './object/getallobjects.ts';
11
- import GET_OBJECTS from './object/getobjects.ts';
12
- import ADD_OBJECT from './object/addobject.ts';
13
- import DELETE_OBJECT from './object/deleteobject.ts';
14
- import UPDATE_OBJECT from './object/updateobject.ts';
15
- import MODEL_LOADED from './object/model/modelloaded.ts';
16
- import UPDATE_SCENE from './scene/updatescene.ts';
17
- import GENERATE_MEDIA from './media/generatemedia.ts';
18
- import GET_ALL_SCENE_DATA from './scene/getallscenedata.ts';
19
- import SELECT_OBJECT from './object/selectobject.ts';
20
- import DESELECT_OBJECT from './object/deselectobject.ts';
21
- import GET_CAMERA_TRANSFORM from './camera/getcameratransform.ts';
22
- import DROP_IT from './object/model/dropit.ts';
23
- import SET_GIZMO_VISIBILITY from './toolbox/transform/setgizmovisible.js';
24
- import SET_GIZMO_SCALE_LINKED from './toolbox/transform/setgizmoscalelinked.ts';
25
- import COMPUTE_ENCOMPASSING_VIEW from './camera/computeencompassingview.ts';
26
- import USE_TOOL from './toolbox/usetool.ts';
27
- import SET_PARENT from './object/setparent.ts';
28
- import EXPORT_SCENE from './scene/exportscene.ts';
29
- import LAUNCH_AR from './scene/launchar.ts';
30
-
31
- export interface Actions {
32
- START_RENDER: START_RENDER;
33
- GET_ALL_SCENE_DATA: GET_ALL_SCENE_DATA;
34
- GET_ALL_OBJECTS: GET_ALL_OBJECTS;
35
- GET_OBJECTS: GET_OBJECTS;
36
- ADD_OBJECT: ADD_OBJECT;
37
- UPDATE_OBJECT: UPDATE_OBJECT;
38
- DELETE_OBJECT: DELETE_OBJECT;
39
- SELECT_OBJECT: SELECT_OBJECT;
40
- DESELECT_OBJECT: DESELECT_OBJECT;
41
- SET_BACKGROUND: SET_BACKGROUND;
42
- DROP_IT: DROP_IT;
43
- PLACE_ON_FLOOR: PLACE_ON_FLOOR;
44
- SET_CAMERA_TRANSFORM: SET_CAMERA_TRANSFORM;
45
- GET_CAMERA_TRANSFORM: GET_CAMERA_TRANSFORM;
46
- MOVE_CAMERA: MOVE_CAMERA;
47
- RESET_CAMERA: RESET_CAMERA;
48
- COMPUTE_ENCOMPASSING_VIEW: COMPUTE_ENCOMPASSING_VIEW;
49
- SET_CAMERA_LAYER: SET_CAMERA_LAYER;
50
- ZOOM_CAMERA: ZOOM_CAMERA;
51
- SET_GIZMO_MODE: SET_GIZMO_MODE;
52
- SET_GIZMO_VISIBILITY: SET_GIZMO_VISIBILITY;
53
- SET_GIZMO_SCALE_LINKED: SET_GIZMO_SCALE_LINKED;
54
- USE_TOOL: USE_TOOL;
55
- MODEL_LOADED: MODEL_LOADED;
56
- UPDATE_SCENE: UPDATE_SCENE;
57
- GENERATE_MEDIA: GENERATE_MEDIA;
58
- SET_PARENT: SET_PARENT;
59
- EXPORT_SCENE: EXPORT_SCENE;
60
- LAUNCH_AR: LAUNCH_AR;
61
- }
@@ -1,18 +0,0 @@
1
- import { Vector3Like } from 'three';
2
-
3
- export default interface GENERATE_MEDIA {
4
- DESCRIPTION: 'Generates a screenshot, stores it in a Blob and returns a Promise of a valid URI.';
5
- PAYLOAD: (
6
- | {
7
- position: Vector3Like;
8
- target: Vector3Like;
9
- }
10
- | {
11
- id: string;
12
- }
13
- ) & {
14
- width: number; // image width in pixels
15
- height: number; // image height in pixels
16
- };
17
- RETURN: Promise<string>;
18
- }
@@ -1,7 +0,0 @@
1
- import { COMEntity } from '../../types';
2
-
3
- export default interface ADD_OBJECT {
4
- DESCRIPTION: 'Adds an object to the scene.';
5
- PAYLOAD: COMEntity;
6
- RETURN: boolean;
7
- }
@@ -1,7 +0,0 @@
1
- import { COMEntity } from '../../types';
2
-
3
- export default interface DELETE_OBJECT {
4
- DESCRIPTION: 'Deletes an object from the scene.';
5
- PAYLOAD: Partial<COMEntity> & { id: string };
6
- RETURN: boolean;
7
- }
@@ -1,7 +0,0 @@
1
- import { COMEntity } from '../../types';
2
-
3
- export default interface DESELECT_OBJECT {
4
- DESCRIPTION: 'Deselects an existing object.';
5
- PAYLOAD: Partial<COMEntity> & { id: string };
6
- RETURN: boolean;
7
- }
@@ -1,7 +0,0 @@
1
- import { COMEntity } from '../../types';
2
-
3
- export default interface GET_ALL_OBJECTS {
4
- readonly DESCRIPTION: 'Retrieves all objects in the scene.';
5
- PAYLOAD: Map<string, COMEntity>;
6
- RETURN: Map<string, COMEntity>;
7
- }
@@ -1,7 +0,0 @@
1
- import { COMEntity } from '../../types';
2
-
3
- export default interface GET_OBJECTS {
4
- DESCRIPTION: 'Returns a list of objects of given IDs.';
5
- PAYLOAD: { ids: string[] };
6
- RETURN: COMEntity[];
7
- }
@@ -1,5 +0,0 @@
1
- export default interface DROP_IT {
2
- DESCRIPTION: 'Places an object on top of an underlying object or the floor.';
3
- PAYLOAD: { id: string };
4
- RETURN: boolean;
5
- }
@@ -1,5 +0,0 @@
1
- export default interface MODEL_LOADED {
2
- DESCRIPTION: 'Is triggered when a model is loaded.';
3
- PAYLOAD: { id: string };
4
- RETURN: boolean;
5
- }
@@ -1,5 +0,0 @@
1
- export default interface PLACE_ON_FLOOR {
2
- DESCRIPTION: 'Places an object on the floor.';
3
- PAYLOAD: { id: string };
4
- RETURN: boolean;
5
- }
@@ -1,7 +0,0 @@
1
- import { COMEntity } from '../../types';
2
-
3
- export default interface SELECT_OBJECT {
4
- DESCRIPTION: 'Selects an existing object.';
5
- PAYLOAD: Partial<COMEntity> & { id: string };
6
- RETURN: boolean;
7
- }
@@ -1,10 +0,0 @@
1
- import { type COMEntity } from '../../types';
2
-
3
- export default interface SET_PARENT {
4
- DESCRIPTION: 'Attach an object to another object.';
5
- PAYLOAD: {
6
- object: Partial<COMEntity> & { id: string };
7
- parent: (Partial<COMEntity> & { id: string }) | null;
8
- };
9
- RETURN: boolean;
10
- }
@@ -1,7 +0,0 @@
1
- import { COMEntity } from '../../types';
2
-
3
- export default interface UPDATE_OBJECT {
4
- DESCRIPTION: 'Updates an existing object.';
5
- PAYLOAD: Partial<COMEntity> & { id: string };
6
- RETURN: boolean;
7
- }
@@ -1,5 +0,0 @@
1
- export default interface START_RENDER {
2
- DESCRIPTION: 'Starts the render process.';
3
- PAYLOAD: undefined;
4
- RETURN: boolean;
5
- }
@@ -1,7 +0,0 @@
1
- import { type DIVESceneFileType } from '../../../types';
2
-
3
- export default interface EXPORT_SCENE {
4
- DESCRIPTION: 'Exports the current scene to a blob and returns the URL.';
5
- PAYLOAD: { type: keyof DIVESceneFileType };
6
- RETURN: Promise<string | null>;
7
- }
@@ -1,7 +0,0 @@
1
- import { DIVESceneData } from '../../../types';
2
-
3
- export default interface GET_ALL_SCENE_DATA {
4
- DESCRIPTION: 'Retrieves all current scene data.';
5
- PAYLOAD: object;
6
- RETURN: DIVESceneData;
7
- }
@@ -1,7 +0,0 @@
1
- import { type DIVEAROptions } from '../../../ar/AR';
2
-
3
- export default interface LAUNCH_AR {
4
- DESCRIPTION: 'Launches AR mode in native capabilities. (iOS: AR Quick Look, Android: Google Scene Viewer)';
5
- PAYLOAD?: DIVEAROptions;
6
- RETURN: Promise<void>;
7
- }
@@ -1,5 +0,0 @@
1
- export default interface SET_BACKGROUND {
2
- DESCRIPTION: 'Set the background color of the scene.';
3
- PAYLOAD: { color: string | number };
4
- RETURN: boolean;
5
- }
@@ -1,11 +0,0 @@
1
- export default interface UPDATE_SCENE {
2
- DESCRIPTION: 'Updates global scene data.';
3
- PAYLOAD: {
4
- name?: string;
5
- backgroundColor?: string | number;
6
- gridEnabled?: boolean;
7
- floorEnabled?: boolean;
8
- floorColor?: string | number;
9
- };
10
- RETURN: boolean;
11
- }
@@ -1,5 +0,0 @@
1
- export default interface SET_GIZMO_MODE {
2
- DESCRIPTION: "Sets the gizmo's mode.";
3
- PAYLOAD: { mode: 'translate' | 'rotate' | 'scale' };
4
- RETURN: boolean;
5
- }
@@ -1,5 +0,0 @@
1
- export default interface SET_GIZMO_SCALE_LINKED {
2
- DESCRIPTION: "Sets the gizmo's unified scale mode.";
3
- PAYLOAD: boolean;
4
- RETURN: boolean;
5
- }
@@ -1,5 +0,0 @@
1
- export default interface SET_GIZMO_VISIBILITY {
2
- DESCRIPTION: "Sets the gizmo's visibility.";
3
- PAYLOAD: boolean;
4
- RETURN: boolean;
5
- }
@@ -1,7 +0,0 @@
1
- import { type ToolType } from '../../../toolbox/Toolbox';
2
-
3
- export default interface USE_TOOL {
4
- DESCRIPTION: 'Activates a specific tool from the toolbox.';
5
- PAYLOAD: { tool: ToolType };
6
- RETURN: boolean;
7
- }
@@ -1,9 +0,0 @@
1
- import { COMEntityType } from './COMEntityType';
2
-
3
- export type COMBaseEntity = {
4
- id: string;
5
- name: string;
6
- entityType: COMEntityType;
7
- visible: boolean;
8
- parentId?: string | null;
9
- };
@@ -1,7 +0,0 @@
1
- import { type COMPov } from './COMPov';
2
- import { type COMLight } from './COMLight';
3
- import { type COMModel } from './COMModel';
4
- import { type COMPrimitive } from './COMPrimitive';
5
- import { type COMGroup } from './COMGroup';
6
-
7
- export type COMEntity = COMPov | COMLight | COMModel | COMPrimitive | COMGroup;
@@ -1 +0,0 @@
1
- export type COMEntityType = 'pov' | 'light' | 'model' | 'primitive' | 'group';
@@ -1,8 +0,0 @@
1
- import { COMGeometryType } from './COMGeometryType';
2
-
3
- export type COMGeometry = {
4
- name: COMGeometryType;
5
- width: number;
6
- height: number;
7
- depth: number;
8
- };
@@ -1,9 +0,0 @@
1
- export type COMGeometryType =
2
- | 'cylinder'
3
- | 'sphere'
4
- | 'pyramid'
5
- | 'cube'
6
- | 'box'
7
- | 'cone'
8
- | 'wall'
9
- | 'plane';
@@ -1,9 +0,0 @@
1
- import { type Vector3Like } from 'three';
2
- import { type COMBaseEntity } from './COMBaseEntity';
3
-
4
- export type COMGroup = COMBaseEntity & {
5
- position: Vector3Like;
6
- rotation: Vector3Like;
7
- scale: Vector3Like;
8
- bbVisible?: boolean;
9
- };
@@ -1,11 +0,0 @@
1
- import { type Vector3Like } from 'three';
2
- import { type COMBaseEntity } from './COMBaseEntity';
3
-
4
- export type COMLight = COMBaseEntity & {
5
- type: 'ambient' | 'point' | 'scene';
6
- intensity: number;
7
- color: string | number;
8
- enabled: boolean;
9
- position?: Vector3Like;
10
- rotation?: Vector3Like;
11
- };
@@ -1,12 +0,0 @@
1
- import { type Texture } from 'three';
2
-
3
- export type COMMaterial = {
4
- vertexColors: boolean;
5
- color: string | number;
6
- map: Texture | null;
7
- normalMap: Texture | null;
8
- roughness: number;
9
- roughnessMap: Texture | null;
10
- metalness: number;
11
- metalnessMap: Texture | null;
12
- };
@@ -1,12 +0,0 @@
1
- import { type Vector3Like } from 'three';
2
- import { type COMMaterial } from './COMMaterial';
3
- import { type COMBaseEntity } from './COMBaseEntity';
4
-
5
- export type COMModel = COMBaseEntity & {
6
- uri: string;
7
- position: Vector3Like;
8
- rotation: Vector3Like;
9
- scale: Vector3Like;
10
- loaded: boolean;
11
- material?: Partial<COMMaterial>;
12
- };
@@ -1,8 +0,0 @@
1
- import { type Vector3Like } from 'three';
2
- import { type COMBaseEntity } from './COMBaseEntity';
3
-
4
- export type COMPov = COMBaseEntity & {
5
- position: Vector3Like;
6
- target: Vector3Like;
7
- locked?: boolean;
8
- };
@@ -1,12 +0,0 @@
1
- import { type Vector3Like } from 'three';
2
- import { type COMBaseEntity } from './COMBaseEntity';
3
- import { type COMGeometry } from './COMGeometry';
4
- import { type COMMaterial } from './COMMaterial';
5
-
6
- export type COMPrimitive = COMBaseEntity & {
7
- position: Vector3Like;
8
- rotation: Vector3Like;
9
- scale: Vector3Like;
10
- geometry: COMGeometry;
11
- material?: Partial<COMMaterial>;
12
- };
@@ -1,23 +0,0 @@
1
- import { type COMEntity } from './COMEntity';
2
- import { type COMPrimitive } from './COMPrimitive';
3
- import { type COMModel } from './COMModel';
4
- import { type COMLight } from './COMLight';
5
- import { type COMPov } from './COMPov';
6
- import { type COMGeometry } from './COMGeometry';
7
- import { type COMMaterial } from './COMMaterial';
8
- import { type COMGroup } from './COMGroup';
9
- import { type COMEntityType } from './COMEntityType';
10
- import { type COMGeometryType } from './COMGeometryType';
11
-
12
- export type {
13
- COMEntity,
14
- COMPrimitive,
15
- COMModel,
16
- COMLight,
17
- COMPov,
18
- COMGeometry,
19
- COMMaterial,
20
- COMGroup,
21
- COMEntityType,
22
- COMGeometryType,
23
- };
@@ -1,7 +0,0 @@
1
- export const AxesColorRedLetter = '#c20017';
2
- export const AxesColorGreenLetter = '#00ab26';
3
- export const AxesColorBlueLetter = '#0081d4';
4
-
5
- export const AxesColorRed = AxesColorRedLetter;
6
- export const AxesColorGreen = AxesColorGreenLetter;
7
- export const AxesColorBlue = AxesColorBlueLetter;
@@ -1,2 +0,0 @@
1
- export const GRID_CENTER_LINE_COLOR = '#888888';
2
- export const GRID_SIDE_LINE_COLOR = '#dddddd';
@@ -1,5 +0,0 @@
1
- export const DEFAULT_LAYER_MASK = 0b00000001; // 1
2
- export const COORDINATE_LAYER_MASK = 0b00000010; // 2
3
- export const UI_LAYER_MASK = 0b00000100; // 4
4
- export const HELPER_LAYER_MASK = 0b00001000; // 8
5
- export const PRODUCT_LAYER_MASK = 0b00010000; // 16