@shopware-ag/dive 1.19.1-beta.0 → 1.19.1-beta.2

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 (188) hide show
  1. package/build/dive.cjs +362 -199
  2. package/build/dive.cjs.map +1 -1
  3. package/build/dive.js +330 -167
  4. package/build/dive.js.map +1 -1
  5. package/build/dive.mjs +10803 -8714
  6. package/build/dive.mjs.map +1 -1
  7. package/build/src/converter/Converter.d.ts +3 -12
  8. package/build/src/dive.d.ts +1 -0
  9. package/build/src/exporter/Exporter.d.ts +20 -2
  10. package/build/src/loader/Loader.d.ts +0 -4
  11. package/build/src/types/error/index.d.ts +12 -0
  12. package/build/src/types/file/FileTypes.d.ts +17 -0
  13. package/build/src/types/file/index.d.ts +1 -0
  14. package/build/src/types/index.d.ts +5 -8
  15. package/package.json +2 -3
  16. package/build/src/types/ExporterOptions.d.ts +0 -15
  17. package/build/src/types/FileTypes.d.ts +0 -27
  18. package/src/__test__/DIVE.test.ts +0 -274
  19. package/src/animation/AnimationSystem.ts +0 -34
  20. package/src/animation/__test__/AnimationSystem.test.ts +0 -40
  21. package/src/ar/AR.ts +0 -101
  22. package/src/ar/__test__/AR.test.ts +0 -276
  23. package/src/ar/arquicklook/ARQuickLook.ts +0 -53
  24. package/src/ar/arquicklook/__test__/ARQuickLook.test.ts +0 -144
  25. package/src/ar/sceneviewer/SceneViewer.ts +0 -119
  26. package/src/ar/sceneviewer/__test__/SceneViewer.test.ts +0 -190
  27. package/src/ar/webxr/WebXR.ts +0 -177
  28. package/src/ar/webxr/controller/WebXRController.ts +0 -340
  29. package/src/ar/webxr/crosshair/WebXRCrosshair.ts +0 -35
  30. package/src/ar/webxr/origin/WebXROrigin.ts +0 -192
  31. package/src/ar/webxr/overlay/Overlay.ts +0 -50
  32. package/src/ar/webxr/raycaster/WebXRRaycaster.ts +0 -131
  33. package/src/ar/webxr/raycaster/ar/WebXRRaycasterAR.ts +0 -102
  34. package/src/ar/webxr/raycaster/three/WebXRRaycasterTHREE.ts +0 -49
  35. package/src/ar/webxr/touchscreencontrols/WebXRTouchscreenControls.ts +0 -356
  36. package/src/axiscamera/AxisCamera.ts +0 -108
  37. package/src/axiscamera/__test__/AxisCamera.test.ts +0 -150
  38. package/src/camera/PerspectiveCamera.ts +0 -63
  39. package/src/camera/__test__/PerspectiveCamera.test.ts +0 -36
  40. package/src/com/Communication.ts +0 -806
  41. package/src/com/__test__/Communication.test.ts +0 -1030
  42. package/src/com/actions/camera/computeencompassingview.ts +0 -10
  43. package/src/com/actions/camera/getcameratransform.ts +0 -10
  44. package/src/com/actions/camera/movecamera.ts +0 -18
  45. package/src/com/actions/camera/resetcamera.ts +0 -5
  46. package/src/com/actions/camera/setcameralayer.ts +0 -5
  47. package/src/com/actions/camera/setcameratransform.ts +0 -10
  48. package/src/com/actions/camera/zoomcamera.ts +0 -5
  49. package/src/com/actions/index.ts +0 -61
  50. package/src/com/actions/media/generatemedia.ts +0 -18
  51. package/src/com/actions/object/addobject.ts +0 -7
  52. package/src/com/actions/object/deleteobject.ts +0 -7
  53. package/src/com/actions/object/deselectobject.ts +0 -7
  54. package/src/com/actions/object/getallobjects.ts +0 -7
  55. package/src/com/actions/object/getobjects.ts +0 -7
  56. package/src/com/actions/object/model/dropit.ts +0 -5
  57. package/src/com/actions/object/model/modelloaded.ts +0 -5
  58. package/src/com/actions/object/model/placeonfloor.ts +0 -5
  59. package/src/com/actions/object/selectobject.ts +0 -7
  60. package/src/com/actions/object/setparent.ts +0 -10
  61. package/src/com/actions/object/updateobject.ts +0 -7
  62. package/src/com/actions/renderer/startrender.ts +0 -5
  63. package/src/com/actions/scene/exportscene.ts +0 -7
  64. package/src/com/actions/scene/getallscenedata.ts +0 -7
  65. package/src/com/actions/scene/launchar.ts +0 -7
  66. package/src/com/actions/scene/setbackground.ts +0 -5
  67. package/src/com/actions/scene/updatescene.ts +0 -11
  68. package/src/com/actions/toolbox/select/setgizmomode.ts +0 -5
  69. package/src/com/actions/toolbox/transform/setgizmoscalelinked.ts +0 -5
  70. package/src/com/actions/toolbox/transform/setgizmovisible.ts +0 -5
  71. package/src/com/actions/toolbox/usetool.ts +0 -7
  72. package/src/com/types/COMBaseEntity.ts +0 -9
  73. package/src/com/types/COMEntity.ts +0 -7
  74. package/src/com/types/COMEntityType.ts +0 -1
  75. package/src/com/types/COMGeometry.ts +0 -8
  76. package/src/com/types/COMGeometryType.ts +0 -9
  77. package/src/com/types/COMGroup.ts +0 -9
  78. package/src/com/types/COMLight.ts +0 -11
  79. package/src/com/types/COMMaterial.ts +0 -12
  80. package/src/com/types/COMModel.ts +0 -12
  81. package/src/com/types/COMPov.ts +0 -8
  82. package/src/com/types/COMPrimitive.ts +0 -12
  83. package/src/com/types/index.ts +0 -23
  84. package/src/constant/AxisHelperColors.ts +0 -7
  85. package/src/constant/GridColors.ts +0 -2
  86. package/src/constant/VisibilityLayerMask.ts +0 -5
  87. package/src/controls/OrbitControls.ts +0 -211
  88. package/src/controls/__test__/OrbitControls.test.ts +0 -256
  89. package/src/converter/Converter.ts +0 -117
  90. package/src/dive.ts +0 -363
  91. package/src/events/EventExecutor.ts +0 -35
  92. package/src/exporter/Exporter.ts +0 -75
  93. package/src/gizmo/Gizmo.ts +0 -144
  94. package/src/gizmo/handles/AxisHandle.ts +0 -153
  95. package/src/gizmo/handles/RadialHandle.ts +0 -149
  96. package/src/gizmo/handles/ScaleHandle.ts +0 -195
  97. package/src/gizmo/plane/GizmoPlane.ts +0 -84
  98. package/src/gizmo/rotate/RotateGizmo.ts +0 -143
  99. package/src/gizmo/scale/ScaleGizmo.ts +0 -125
  100. package/src/gizmo/translate/TranslateGizmo.ts +0 -114
  101. package/src/grid/Grid.ts +0 -34
  102. package/src/grid/__test__/Grid.test.ts +0 -28
  103. package/src/group/Group.ts +0 -184
  104. package/src/group/__test__/Group.test.ts +0 -212
  105. package/src/helper/applyMixins/__test__/applyMixins.test.ts +0 -30
  106. package/src/helper/applyMixins/applyMixins.ts +0 -70
  107. package/src/helper/findInterface/__test__/findInterface.test.ts +0 -63
  108. package/src/helper/findInterface/findInterface.ts +0 -13
  109. package/src/helper/findSceneRecursive/__test__/findSceneRecursive.test.ts +0 -40
  110. package/src/helper/findSceneRecursive/findSceneRecursive.ts +0 -16
  111. package/src/helper/getObjectDelta/__test__/getObjectDelta.test.ts +0 -186
  112. package/src/helper/getObjectDelta/getObjectDelta.ts +0 -105
  113. package/src/helper/isInterface/__test__/implementsInterface.test.ts +0 -19
  114. package/src/helper/isInterface/implementsInterface.ts +0 -9
  115. package/src/info/Info.ts +0 -178
  116. package/src/info/__test__/Info.test.ts +0 -346
  117. package/src/interface/Draggable.ts +0 -14
  118. package/src/interface/Hoverable.ts +0 -14
  119. package/src/interface/Movable.ts +0 -12
  120. package/src/interface/Rotatable.ts +0 -10
  121. package/src/interface/Scalable.ts +0 -10
  122. package/src/interface/Selectable.ts +0 -11
  123. package/src/io/IO.ts +0 -62
  124. package/src/io/__test__/IO.test.ts +0 -116
  125. package/src/io/gltf/GLTFIO.ts +0 -56
  126. package/src/io/gltf/__test__/GLTFIO.test.ts +0 -108
  127. package/src/light/AmbientLight.ts +0 -39
  128. package/src/light/PointLight.ts +0 -115
  129. package/src/light/SceneLight.ts +0 -63
  130. package/src/light/__test__/AmbientLight.test.ts +0 -29
  131. package/src/light/__test__/PointLight.test.ts +0 -74
  132. package/src/light/__test__/SceneLight.test.ts +0 -47
  133. package/src/loader/Loader.ts +0 -48
  134. package/src/math/__test__/DIVEMath.test.ts +0 -12
  135. package/src/math/ceil/__test__/ceilExp.test.ts +0 -12
  136. package/src/math/ceil/ceilExp.ts +0 -6
  137. package/src/math/degToRad/__test__/degToRad.test.ts +0 -172
  138. package/src/math/degToRad/degToRad.ts +0 -5
  139. package/src/math/floor/__test__/floorExp.test.ts +0 -14
  140. package/src/math/floor/floorExp.ts +0 -6
  141. package/src/math/helper/__test__/shift.test.ts +0 -12
  142. package/src/math/helper/shift.ts +0 -4
  143. package/src/math/index.ts +0 -28
  144. package/src/math/radToDeg/__test__/radToDeg.test.ts +0 -155
  145. package/src/math/radToDeg/radToDeg.ts +0 -5
  146. package/src/math/round/__test__/roundExp.test.ts +0 -14
  147. package/src/math/round/roundExp.ts +0 -10
  148. package/src/math/signedAngleTo/__test__/signedAngleTo.test.ts +0 -20
  149. package/src/math/signedAngleTo/signedAngleTo.ts +0 -20
  150. package/src/math/toFixed/__test__/toFixedExp.test.ts +0 -14
  151. package/src/math/toFixed/toFixedExp.ts +0 -9
  152. package/src/math/truncate/__test__/truncateExp.test.ts +0 -14
  153. package/src/math/truncate/truncateExp.ts +0 -9
  154. package/src/mediacreator/MediaCreator.ts +0 -75
  155. package/src/mediacreator/__test__/MediaCreator.test.ts +0 -155
  156. package/src/model/Model.ts +0 -190
  157. package/src/model/__test__/Model.test.ts +0 -215
  158. package/src/module/Module.ts +0 -45
  159. package/src/module/__test__/Module.test.ts +0 -54
  160. package/src/node/Node.ts +0 -100
  161. package/src/node/__test__/Node.test.ts +0 -120
  162. package/src/primitive/Primitive.ts +0 -299
  163. package/src/primitive/__test__/Primitive.test.ts +0 -281
  164. package/src/primitive/floor/Floor.ts +0 -45
  165. package/src/primitive/floor/__test__/Floor.test.ts +0 -24
  166. package/src/renderer/Renderer.ts +0 -215
  167. package/src/renderer/__test__/Renderer.test.ts +0 -228
  168. package/src/scene/Scene.ts +0 -106
  169. package/src/scene/__test__/Scene.test.ts +0 -124
  170. package/src/scene/root/Root.ts +0 -426
  171. package/src/scene/root/__test__/Root.test.ts +0 -903
  172. package/src/scene/xrroot/XRRoot.ts +0 -56
  173. package/src/scene/xrroot/xrlightroot/XRLightRoot.ts +0 -80
  174. package/src/toolbox/BaseTool.ts +0 -319
  175. package/src/toolbox/Toolbox.ts +0 -129
  176. package/src/toolbox/__test__/BaseTool.test.ts +0 -627
  177. package/src/toolbox/__test__/Toolbox.test.ts +0 -143
  178. package/src/toolbox/select/SelectTool.ts +0 -92
  179. package/src/toolbox/select/__test__/SelectTool.test.ts +0 -237
  180. package/src/toolbox/transform/TransformTool.ts +0 -166
  181. package/src/toolbox/transform/__test__/TransformTool.test.ts +0 -147
  182. package/src/types/ExporterOptions.ts +0 -14
  183. package/src/types/FileTypes.ts +0 -37
  184. package/src/types/SceneData.ts +0 -26
  185. package/src/types/SceneObjects.ts +0 -14
  186. package/src/types/SceneType.ts +0 -14
  187. package/src/types/index.ts +0 -31
  188. package/src/types/info/index.ts +0 -76
@@ -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 ARSystemOptions } 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: { uri: string; options?: ARSystemOptions };
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