@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.
- package/build/dive.cjs +362 -199
- package/build/dive.cjs.map +1 -1
- package/build/dive.js +330 -167
- package/build/dive.js.map +1 -1
- package/build/dive.mjs +10803 -8714
- package/build/dive.mjs.map +1 -1
- package/build/src/converter/Converter.d.ts +3 -12
- package/build/src/dive.d.ts +1 -0
- package/build/src/exporter/Exporter.d.ts +20 -2
- package/build/src/loader/Loader.d.ts +0 -4
- package/build/src/types/error/index.d.ts +12 -0
- package/build/src/types/file/FileTypes.d.ts +17 -0
- package/build/src/types/file/index.d.ts +1 -0
- package/build/src/types/index.d.ts +5 -8
- package/package.json +2 -3
- package/build/src/types/ExporterOptions.d.ts +0 -15
- package/build/src/types/FileTypes.d.ts +0 -27
- package/src/__test__/DIVE.test.ts +0 -274
- package/src/animation/AnimationSystem.ts +0 -34
- package/src/animation/__test__/AnimationSystem.test.ts +0 -40
- package/src/ar/AR.ts +0 -101
- package/src/ar/__test__/AR.test.ts +0 -276
- package/src/ar/arquicklook/ARQuickLook.ts +0 -53
- package/src/ar/arquicklook/__test__/ARQuickLook.test.ts +0 -144
- package/src/ar/sceneviewer/SceneViewer.ts +0 -119
- package/src/ar/sceneviewer/__test__/SceneViewer.test.ts +0 -190
- package/src/ar/webxr/WebXR.ts +0 -177
- package/src/ar/webxr/controller/WebXRController.ts +0 -340
- package/src/ar/webxr/crosshair/WebXRCrosshair.ts +0 -35
- package/src/ar/webxr/origin/WebXROrigin.ts +0 -192
- package/src/ar/webxr/overlay/Overlay.ts +0 -50
- package/src/ar/webxr/raycaster/WebXRRaycaster.ts +0 -131
- package/src/ar/webxr/raycaster/ar/WebXRRaycasterAR.ts +0 -102
- package/src/ar/webxr/raycaster/three/WebXRRaycasterTHREE.ts +0 -49
- package/src/ar/webxr/touchscreencontrols/WebXRTouchscreenControls.ts +0 -356
- package/src/axiscamera/AxisCamera.ts +0 -108
- package/src/axiscamera/__test__/AxisCamera.test.ts +0 -150
- package/src/camera/PerspectiveCamera.ts +0 -63
- package/src/camera/__test__/PerspectiveCamera.test.ts +0 -36
- package/src/com/Communication.ts +0 -806
- package/src/com/__test__/Communication.test.ts +0 -1030
- package/src/com/actions/camera/computeencompassingview.ts +0 -10
- package/src/com/actions/camera/getcameratransform.ts +0 -10
- package/src/com/actions/camera/movecamera.ts +0 -18
- package/src/com/actions/camera/resetcamera.ts +0 -5
- package/src/com/actions/camera/setcameralayer.ts +0 -5
- package/src/com/actions/camera/setcameratransform.ts +0 -10
- package/src/com/actions/camera/zoomcamera.ts +0 -5
- package/src/com/actions/index.ts +0 -61
- package/src/com/actions/media/generatemedia.ts +0 -18
- package/src/com/actions/object/addobject.ts +0 -7
- package/src/com/actions/object/deleteobject.ts +0 -7
- package/src/com/actions/object/deselectobject.ts +0 -7
- package/src/com/actions/object/getallobjects.ts +0 -7
- package/src/com/actions/object/getobjects.ts +0 -7
- package/src/com/actions/object/model/dropit.ts +0 -5
- package/src/com/actions/object/model/modelloaded.ts +0 -5
- package/src/com/actions/object/model/placeonfloor.ts +0 -5
- package/src/com/actions/object/selectobject.ts +0 -7
- package/src/com/actions/object/setparent.ts +0 -10
- package/src/com/actions/object/updateobject.ts +0 -7
- package/src/com/actions/renderer/startrender.ts +0 -5
- package/src/com/actions/scene/exportscene.ts +0 -7
- package/src/com/actions/scene/getallscenedata.ts +0 -7
- package/src/com/actions/scene/launchar.ts +0 -7
- package/src/com/actions/scene/setbackground.ts +0 -5
- package/src/com/actions/scene/updatescene.ts +0 -11
- package/src/com/actions/toolbox/select/setgizmomode.ts +0 -5
- package/src/com/actions/toolbox/transform/setgizmoscalelinked.ts +0 -5
- package/src/com/actions/toolbox/transform/setgizmovisible.ts +0 -5
- package/src/com/actions/toolbox/usetool.ts +0 -7
- package/src/com/types/COMBaseEntity.ts +0 -9
- package/src/com/types/COMEntity.ts +0 -7
- package/src/com/types/COMEntityType.ts +0 -1
- package/src/com/types/COMGeometry.ts +0 -8
- package/src/com/types/COMGeometryType.ts +0 -9
- package/src/com/types/COMGroup.ts +0 -9
- package/src/com/types/COMLight.ts +0 -11
- package/src/com/types/COMMaterial.ts +0 -12
- package/src/com/types/COMModel.ts +0 -12
- package/src/com/types/COMPov.ts +0 -8
- package/src/com/types/COMPrimitive.ts +0 -12
- package/src/com/types/index.ts +0 -23
- package/src/constant/AxisHelperColors.ts +0 -7
- package/src/constant/GridColors.ts +0 -2
- package/src/constant/VisibilityLayerMask.ts +0 -5
- package/src/controls/OrbitControls.ts +0 -211
- package/src/controls/__test__/OrbitControls.test.ts +0 -256
- package/src/converter/Converter.ts +0 -117
- package/src/dive.ts +0 -363
- package/src/events/EventExecutor.ts +0 -35
- package/src/exporter/Exporter.ts +0 -75
- package/src/gizmo/Gizmo.ts +0 -144
- package/src/gizmo/handles/AxisHandle.ts +0 -153
- package/src/gizmo/handles/RadialHandle.ts +0 -149
- package/src/gizmo/handles/ScaleHandle.ts +0 -195
- package/src/gizmo/plane/GizmoPlane.ts +0 -84
- package/src/gizmo/rotate/RotateGizmo.ts +0 -143
- package/src/gizmo/scale/ScaleGizmo.ts +0 -125
- package/src/gizmo/translate/TranslateGizmo.ts +0 -114
- package/src/grid/Grid.ts +0 -34
- package/src/grid/__test__/Grid.test.ts +0 -28
- package/src/group/Group.ts +0 -184
- package/src/group/__test__/Group.test.ts +0 -212
- package/src/helper/applyMixins/__test__/applyMixins.test.ts +0 -30
- package/src/helper/applyMixins/applyMixins.ts +0 -70
- package/src/helper/findInterface/__test__/findInterface.test.ts +0 -63
- package/src/helper/findInterface/findInterface.ts +0 -13
- package/src/helper/findSceneRecursive/__test__/findSceneRecursive.test.ts +0 -40
- package/src/helper/findSceneRecursive/findSceneRecursive.ts +0 -16
- package/src/helper/getObjectDelta/__test__/getObjectDelta.test.ts +0 -186
- package/src/helper/getObjectDelta/getObjectDelta.ts +0 -105
- package/src/helper/isInterface/__test__/implementsInterface.test.ts +0 -19
- package/src/helper/isInterface/implementsInterface.ts +0 -9
- package/src/info/Info.ts +0 -178
- package/src/info/__test__/Info.test.ts +0 -346
- package/src/interface/Draggable.ts +0 -14
- package/src/interface/Hoverable.ts +0 -14
- package/src/interface/Movable.ts +0 -12
- package/src/interface/Rotatable.ts +0 -10
- package/src/interface/Scalable.ts +0 -10
- package/src/interface/Selectable.ts +0 -11
- package/src/io/IO.ts +0 -62
- package/src/io/__test__/IO.test.ts +0 -116
- package/src/io/gltf/GLTFIO.ts +0 -56
- package/src/io/gltf/__test__/GLTFIO.test.ts +0 -108
- package/src/light/AmbientLight.ts +0 -39
- package/src/light/PointLight.ts +0 -115
- package/src/light/SceneLight.ts +0 -63
- package/src/light/__test__/AmbientLight.test.ts +0 -29
- package/src/light/__test__/PointLight.test.ts +0 -74
- package/src/light/__test__/SceneLight.test.ts +0 -47
- package/src/loader/Loader.ts +0 -48
- package/src/math/__test__/DIVEMath.test.ts +0 -12
- package/src/math/ceil/__test__/ceilExp.test.ts +0 -12
- package/src/math/ceil/ceilExp.ts +0 -6
- package/src/math/degToRad/__test__/degToRad.test.ts +0 -172
- package/src/math/degToRad/degToRad.ts +0 -5
- package/src/math/floor/__test__/floorExp.test.ts +0 -14
- package/src/math/floor/floorExp.ts +0 -6
- package/src/math/helper/__test__/shift.test.ts +0 -12
- package/src/math/helper/shift.ts +0 -4
- package/src/math/index.ts +0 -28
- package/src/math/radToDeg/__test__/radToDeg.test.ts +0 -155
- package/src/math/radToDeg/radToDeg.ts +0 -5
- package/src/math/round/__test__/roundExp.test.ts +0 -14
- package/src/math/round/roundExp.ts +0 -10
- package/src/math/signedAngleTo/__test__/signedAngleTo.test.ts +0 -20
- package/src/math/signedAngleTo/signedAngleTo.ts +0 -20
- package/src/math/toFixed/__test__/toFixedExp.test.ts +0 -14
- package/src/math/toFixed/toFixedExp.ts +0 -9
- package/src/math/truncate/__test__/truncateExp.test.ts +0 -14
- package/src/math/truncate/truncateExp.ts +0 -9
- package/src/mediacreator/MediaCreator.ts +0 -75
- package/src/mediacreator/__test__/MediaCreator.test.ts +0 -155
- package/src/model/Model.ts +0 -190
- package/src/model/__test__/Model.test.ts +0 -215
- package/src/module/Module.ts +0 -45
- package/src/module/__test__/Module.test.ts +0 -54
- package/src/node/Node.ts +0 -100
- package/src/node/__test__/Node.test.ts +0 -120
- package/src/primitive/Primitive.ts +0 -299
- package/src/primitive/__test__/Primitive.test.ts +0 -281
- package/src/primitive/floor/Floor.ts +0 -45
- package/src/primitive/floor/__test__/Floor.test.ts +0 -24
- package/src/renderer/Renderer.ts +0 -215
- package/src/renderer/__test__/Renderer.test.ts +0 -228
- package/src/scene/Scene.ts +0 -106
- package/src/scene/__test__/Scene.test.ts +0 -124
- package/src/scene/root/Root.ts +0 -426
- package/src/scene/root/__test__/Root.test.ts +0 -903
- package/src/scene/xrroot/XRRoot.ts +0 -56
- package/src/scene/xrroot/xrlightroot/XRLightRoot.ts +0 -80
- package/src/toolbox/BaseTool.ts +0 -319
- package/src/toolbox/Toolbox.ts +0 -129
- package/src/toolbox/__test__/BaseTool.test.ts +0 -627
- package/src/toolbox/__test__/Toolbox.test.ts +0 -143
- package/src/toolbox/select/SelectTool.ts +0 -92
- package/src/toolbox/select/__test__/SelectTool.test.ts +0 -237
- package/src/toolbox/transform/TransformTool.ts +0 -166
- package/src/toolbox/transform/__test__/TransformTool.test.ts +0 -147
- package/src/types/ExporterOptions.ts +0 -14
- package/src/types/FileTypes.ts +0 -37
- package/src/types/SceneData.ts +0 -26
- package/src/types/SceneObjects.ts +0 -14
- package/src/types/SceneType.ts +0 -14
- package/src/types/index.ts +0 -31
- package/src/types/info/index.ts +0 -76
|
@@ -1,147 +0,0 @@
|
|
|
1
|
-
import DIVETransformTool, { isTransformTool } from '../TransformTool';
|
|
2
|
-
import { DIVEScene } from '../../../scene/Scene';
|
|
3
|
-
import DIVEOrbitControls from '../../../controls/OrbitControls';
|
|
4
|
-
import DIVEPerspectiveCamera from '../../../camera/PerspectiveCamera';
|
|
5
|
-
import { DIVERenderer } from '../../../renderer/Renderer';
|
|
6
|
-
import { type DIVEBaseTool } from '../../BaseTool';
|
|
7
|
-
import { Tween } from '@tweenjs/tween.js';
|
|
8
|
-
import { DIVEAnimationSystem } from '../../../animation/AnimationSystem';
|
|
9
|
-
import { type TransformControls } from 'three/examples/jsm/controls/TransformControls';
|
|
10
|
-
|
|
11
|
-
jest.mock('../../../renderer/Renderer', () => {
|
|
12
|
-
return jest.fn(function () {
|
|
13
|
-
return this;
|
|
14
|
-
});
|
|
15
|
-
});
|
|
16
|
-
|
|
17
|
-
jest.mock('../../../camera/PerspectiveCamera', () => {
|
|
18
|
-
return jest.fn(function () {
|
|
19
|
-
this.isPerspectiveCamera = true;
|
|
20
|
-
this.layers = {
|
|
21
|
-
mask: 0,
|
|
22
|
-
};
|
|
23
|
-
return this;
|
|
24
|
-
});
|
|
25
|
-
});
|
|
26
|
-
|
|
27
|
-
jest.mock('../../../controls/OrbitControls', () => {
|
|
28
|
-
return jest.fn(function () {
|
|
29
|
-
this.enabled = true;
|
|
30
|
-
this.domElement = {
|
|
31
|
-
clientWIdth: 0,
|
|
32
|
-
clientHeight: 0,
|
|
33
|
-
};
|
|
34
|
-
this.object = {
|
|
35
|
-
layers: {
|
|
36
|
-
mask: 0,
|
|
37
|
-
},
|
|
38
|
-
};
|
|
39
|
-
return this;
|
|
40
|
-
});
|
|
41
|
-
});
|
|
42
|
-
|
|
43
|
-
jest.mock('../../../scene/Scene', () => {
|
|
44
|
-
return {
|
|
45
|
-
DIVEScene: jest.fn(function () {
|
|
46
|
-
this.add = jest.fn();
|
|
47
|
-
this.remove = jest.fn();
|
|
48
|
-
this.Root = {
|
|
49
|
-
children: [],
|
|
50
|
-
};
|
|
51
|
-
this.children = [];
|
|
52
|
-
return this;
|
|
53
|
-
}),
|
|
54
|
-
};
|
|
55
|
-
});
|
|
56
|
-
|
|
57
|
-
jest.mock('../../../animation/AnimationSystem', () => {
|
|
58
|
-
return {
|
|
59
|
-
DIVEAnimationSystem: jest.fn(function () {
|
|
60
|
-
this.domElement = {
|
|
61
|
-
style: {},
|
|
62
|
-
};
|
|
63
|
-
this.Animate = <T extends object>(obj: T) => {
|
|
64
|
-
return new Tween<T>(obj);
|
|
65
|
-
};
|
|
66
|
-
|
|
67
|
-
return this;
|
|
68
|
-
}),
|
|
69
|
-
};
|
|
70
|
-
});
|
|
71
|
-
|
|
72
|
-
const mockCamera: DIVEPerspectiveCamera = {} as DIVEPerspectiveCamera;
|
|
73
|
-
const mockRenderer = {
|
|
74
|
-
render: jest.fn(),
|
|
75
|
-
OnResize: jest.fn(),
|
|
76
|
-
getViewport: jest.fn(),
|
|
77
|
-
setViewport: jest.fn(),
|
|
78
|
-
AddPreRenderCallback: jest.fn((callback) => {
|
|
79
|
-
callback();
|
|
80
|
-
}),
|
|
81
|
-
AddPostRenderCallback: jest.fn((callback) => {
|
|
82
|
-
callback();
|
|
83
|
-
}),
|
|
84
|
-
RemovePreRenderCallback: jest.fn(),
|
|
85
|
-
RemovePostRenderCallback: jest.fn(),
|
|
86
|
-
} as unknown as DIVERenderer;
|
|
87
|
-
const mockScene: DIVEScene = new DIVEScene();
|
|
88
|
-
const mockAnimSystem = new DIVEAnimationSystem(mockRenderer);
|
|
89
|
-
const mockController: DIVEOrbitControls = new DIVEOrbitControls(
|
|
90
|
-
mockCamera,
|
|
91
|
-
mockRenderer,
|
|
92
|
-
mockAnimSystem,
|
|
93
|
-
);
|
|
94
|
-
|
|
95
|
-
let transformTool: DIVETransformTool;
|
|
96
|
-
let intersectObjectsSpy: jest.SpyInstance;
|
|
97
|
-
|
|
98
|
-
describe('dive/toolbox/select/DIVETransformTool', () => {
|
|
99
|
-
beforeEach(() => {
|
|
100
|
-
transformTool = new DIVETransformTool(mockScene, mockController);
|
|
101
|
-
intersectObjectsSpy = jest
|
|
102
|
-
.spyOn(transformTool['_raycaster'], 'intersectObjects')
|
|
103
|
-
.mockReturnValue([]);
|
|
104
|
-
});
|
|
105
|
-
|
|
106
|
-
it('should test if it is SelectTool', () => {
|
|
107
|
-
const transformTool = {
|
|
108
|
-
isTransformTool: true,
|
|
109
|
-
} as unknown as DIVEBaseTool;
|
|
110
|
-
expect(isTransformTool(transformTool)).toBeDefined();
|
|
111
|
-
});
|
|
112
|
-
|
|
113
|
-
it('should instantiate', () => {
|
|
114
|
-
expect(transformTool).toBeDefined();
|
|
115
|
-
});
|
|
116
|
-
|
|
117
|
-
it('should activate', () => {
|
|
118
|
-
expect(() => transformTool.Activate()).not.toThrow();
|
|
119
|
-
});
|
|
120
|
-
|
|
121
|
-
it('should set gizmo mode', () => {
|
|
122
|
-
expect(() => transformTool.SetGizmoMode('translate')).not.toThrow();
|
|
123
|
-
});
|
|
124
|
-
|
|
125
|
-
it('should set gizmo active', () => {
|
|
126
|
-
expect(() => transformTool.SetGizmoVisibility(true)).not.toThrow();
|
|
127
|
-
|
|
128
|
-
// mock that gizmo is in scene
|
|
129
|
-
jest.spyOn(mockScene.children, 'includes').mockReturnValueOnce(true);
|
|
130
|
-
|
|
131
|
-
expect(() => transformTool.SetGizmoVisibility(false)).not.toThrow();
|
|
132
|
-
});
|
|
133
|
-
|
|
134
|
-
it('should set gizmo unified scaling', () => {
|
|
135
|
-
expect(() => transformTool.SetGizmoScaleLinked(true)).not.toThrow();
|
|
136
|
-
|
|
137
|
-
// mock that gizmo is in scene
|
|
138
|
-
jest.spyOn(mockScene.children, 'includes').mockReturnValueOnce(true);
|
|
139
|
-
|
|
140
|
-
expect(() => transformTool.SetGizmoVisibility(false)).not.toThrow();
|
|
141
|
-
});
|
|
142
|
-
|
|
143
|
-
it('should scale unified if linked', () => {
|
|
144
|
-
transformTool.SetGizmoScaleLinked(true);
|
|
145
|
-
transformTool['initGizmo']();
|
|
146
|
-
});
|
|
147
|
-
});
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { GLTFExporterOptions as THREEGLTFExporterOptions } from 'three/examples/jsm/exporters/GLTFExporter';
|
|
2
|
-
import { USDZExporterOptions as THREEUSDZExporterOptions } from 'three/examples/jsm/exporters/USDZExporter';
|
|
3
|
-
import { type FileType, type FileTypeOptions } from './FileTypes';
|
|
4
|
-
|
|
5
|
-
export type USDZExporterOptions = THREEUSDZExporterOptions & {
|
|
6
|
-
ar?: {
|
|
7
|
-
anchoring: { type: 'plane' | 'image' | 'face' | 'none' }; // source: https://developer.apple.com/documentation/realitykit/preliminary-anchoring-type
|
|
8
|
-
planeAnchoring: { alignment: 'horizontal' | 'vertical' | 'any' }; // source: https://developer.apple.com/documentation/realitykit/preliminary-planeanchoring-alignment
|
|
9
|
-
};
|
|
10
|
-
};
|
|
11
|
-
|
|
12
|
-
export type GLTFExporterOptions = THREEGLTFExporterOptions;
|
|
13
|
-
|
|
14
|
-
export type ExportOptions<T extends FileType> = FileTypeOptions<T>;
|
package/src/types/FileTypes.ts
DELETED
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
type GLTFExporterOptions,
|
|
3
|
-
type USDZExporterOptions,
|
|
4
|
-
} from './ExporterOptions';
|
|
5
|
-
|
|
6
|
-
export type FileTypeDefinition<T extends string, O> = {
|
|
7
|
-
key: T;
|
|
8
|
-
extension: string;
|
|
9
|
-
options: O;
|
|
10
|
-
};
|
|
11
|
-
|
|
12
|
-
export const FILE_TYPES = {
|
|
13
|
-
glb: {
|
|
14
|
-
key: 'glb' as const,
|
|
15
|
-
extension: '.glb',
|
|
16
|
-
options: {} as GLTFExporterOptions,
|
|
17
|
-
},
|
|
18
|
-
gltf: {
|
|
19
|
-
key: 'gltf' as const,
|
|
20
|
-
extension: '.gltf',
|
|
21
|
-
options: {} as GLTFExporterOptions,
|
|
22
|
-
},
|
|
23
|
-
usdz: {
|
|
24
|
-
key: 'usdz' as const,
|
|
25
|
-
extension: '.usdz',
|
|
26
|
-
options: {} as USDZExporterOptions,
|
|
27
|
-
},
|
|
28
|
-
} as const;
|
|
29
|
-
|
|
30
|
-
export type FileType = keyof typeof FILE_TYPES;
|
|
31
|
-
export type FileTypeKey = (typeof FILE_TYPES)[FileType]['key'];
|
|
32
|
-
export type FileTypeOptions<T extends FileType> =
|
|
33
|
-
(typeof FILE_TYPES)[T]['options'];
|
|
34
|
-
|
|
35
|
-
export const SUPPORTED_FILE_TYPES = Object.values(FILE_TYPES).map(
|
|
36
|
-
(type) => type.extension,
|
|
37
|
-
) as readonly string[];
|
package/src/types/SceneData.ts
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import type { Vector3Like } from 'three';
|
|
2
|
-
import type {
|
|
3
|
-
COMGroup,
|
|
4
|
-
COMLight,
|
|
5
|
-
COMModel,
|
|
6
|
-
COMPov,
|
|
7
|
-
COMPrimitive,
|
|
8
|
-
} from '../dive';
|
|
9
|
-
|
|
10
|
-
export type DIVESceneData = {
|
|
11
|
-
name: string;
|
|
12
|
-
mediaItem: null;
|
|
13
|
-
backgroundColor: string;
|
|
14
|
-
floorEnabled: boolean;
|
|
15
|
-
floorColor: string;
|
|
16
|
-
userCamera: {
|
|
17
|
-
position: Vector3Like;
|
|
18
|
-
target: Vector3Like;
|
|
19
|
-
};
|
|
20
|
-
spotmarks: object[];
|
|
21
|
-
lights: COMLight[];
|
|
22
|
-
objects: COMModel[];
|
|
23
|
-
cameras: COMPov[];
|
|
24
|
-
primitives: COMPrimitive[];
|
|
25
|
-
groups: COMGroup[];
|
|
26
|
-
};
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { DIVEGroup } from '../group/Group';
|
|
2
|
-
import DIVEAmbientLight from '../light/AmbientLight';
|
|
3
|
-
import DIVEPointLight from '../light/PointLight';
|
|
4
|
-
import DIVESceneLight from '../light/SceneLight';
|
|
5
|
-
import { DIVEModel } from '../model/Model';
|
|
6
|
-
import { DIVEPrimitive } from '../primitive/Primitive';
|
|
7
|
-
|
|
8
|
-
export type DIVESceneObject =
|
|
9
|
-
| DIVEModel
|
|
10
|
-
| DIVEGroup
|
|
11
|
-
| DIVEPrimitive
|
|
12
|
-
| DIVEAmbientLight
|
|
13
|
-
| DIVEPointLight
|
|
14
|
-
| DIVESceneLight;
|
package/src/types/SceneType.ts
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { type GLTF } from 'three/examples/jsm/loaders/GLTFLoader';
|
|
2
|
-
|
|
3
|
-
export type DIVESceneFileType = {
|
|
4
|
-
glb: GLTF;
|
|
5
|
-
|
|
6
|
-
// more types will be added at a later point in time
|
|
7
|
-
|
|
8
|
-
// 'gltf': GLTF,
|
|
9
|
-
// 'obj': ArrayBuffer,
|
|
10
|
-
// 'fbx': ArrayBuffer,
|
|
11
|
-
// 'usdz': ArrayBuffer,
|
|
12
|
-
// 'usda': ArrayBuffer,
|
|
13
|
-
// 'usdc': ArrayBuffer,
|
|
14
|
-
};
|
package/src/types/index.ts
DELETED
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { type DIVESceneObject } from './SceneObjects';
|
|
2
|
-
import { type DIVESceneFileType } from './SceneType';
|
|
3
|
-
import { type DIVESceneData } from './SceneData';
|
|
4
|
-
import {
|
|
5
|
-
type FileType,
|
|
6
|
-
type FileTypeKey,
|
|
7
|
-
type FileTypeOptions,
|
|
8
|
-
type FileTypeDefinition,
|
|
9
|
-
FILE_TYPES,
|
|
10
|
-
SUPPORTED_FILE_TYPES,
|
|
11
|
-
} from './FileTypes';
|
|
12
|
-
import {
|
|
13
|
-
type GLTFExporterOptions,
|
|
14
|
-
type USDZExporterOptions,
|
|
15
|
-
type ExportOptions,
|
|
16
|
-
} from './ExporterOptions';
|
|
17
|
-
|
|
18
|
-
export { type DIVESceneObject, type DIVESceneFileType, type DIVESceneData };
|
|
19
|
-
export {
|
|
20
|
-
type FileType,
|
|
21
|
-
type FileTypeKey,
|
|
22
|
-
type FileTypeOptions,
|
|
23
|
-
type FileTypeDefinition,
|
|
24
|
-
FILE_TYPES,
|
|
25
|
-
SUPPORTED_FILE_TYPES,
|
|
26
|
-
};
|
|
27
|
-
export {
|
|
28
|
-
type GLTFExporterOptions,
|
|
29
|
-
type USDZExporterOptions,
|
|
30
|
-
type ExportOptions,
|
|
31
|
-
};
|
package/src/types/info/index.ts
DELETED
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Enum representing supported operating systems
|
|
3
|
-
*/
|
|
4
|
-
export enum ESystem {
|
|
5
|
-
/**
|
|
6
|
-
* iOS devices (iPhone, iPad)
|
|
7
|
-
*/
|
|
8
|
-
IOS = 'iOS',
|
|
9
|
-
|
|
10
|
-
/**
|
|
11
|
-
* Android devices
|
|
12
|
-
*/
|
|
13
|
-
ANDROID = 'Android',
|
|
14
|
-
|
|
15
|
-
/**
|
|
16
|
-
* Windows operating system
|
|
17
|
-
*/
|
|
18
|
-
WINDOWS = 'Windows',
|
|
19
|
-
|
|
20
|
-
/**
|
|
21
|
-
* macOS operating system
|
|
22
|
-
*/
|
|
23
|
-
MACOS = 'MacOS',
|
|
24
|
-
|
|
25
|
-
/**
|
|
26
|
-
* Linux operating system
|
|
27
|
-
*/
|
|
28
|
-
LINUX = 'Linux',
|
|
29
|
-
|
|
30
|
-
/**
|
|
31
|
-
* Unknown or unsupported system
|
|
32
|
-
*/
|
|
33
|
-
UNKNOWN = 'Unknown',
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
/**
|
|
37
|
-
* Enum representing reasons why WebXR AR might not be supported
|
|
38
|
-
*/
|
|
39
|
-
export enum EWebXRUnsupportedReason {
|
|
40
|
-
/**
|
|
41
|
-
* The browser doesn't implement the WebXR API at all.
|
|
42
|
-
* This typically means the browser is outdated or doesn't support WebXR.
|
|
43
|
-
*/
|
|
44
|
-
NO_WEBXR_API = 'NO_WEBXR_API',
|
|
45
|
-
|
|
46
|
-
/**
|
|
47
|
-
* The page is not served over HTTPS.
|
|
48
|
-
* WebXR requires a secure context (HTTPS) to work.
|
|
49
|
-
*/
|
|
50
|
-
NO_HTTPS = 'NO_HTTPS',
|
|
51
|
-
|
|
52
|
-
/**
|
|
53
|
-
* The device doesn't support immersive AR sessions.
|
|
54
|
-
* This could be because:
|
|
55
|
-
* - The device doesn't have AR capabilities
|
|
56
|
-
* - The browser doesn't support AR features
|
|
57
|
-
* - The device's AR features are disabled
|
|
58
|
-
*/
|
|
59
|
-
IMMERSIVE_AR_NOT_SUPPORTED_BY_DEVICE = 'IMMERSIVE_AR_NOT_SUPPORTED_BY_DEVICE',
|
|
60
|
-
|
|
61
|
-
/**
|
|
62
|
-
* Access to AR features has been denied by the system or browser.
|
|
63
|
-
* This could be due to:
|
|
64
|
-
* - Privacy settings
|
|
65
|
-
* - System restrictions
|
|
66
|
-
* - Browser policies
|
|
67
|
-
* - Hardware limitations
|
|
68
|
-
*/
|
|
69
|
-
AR_PERMISSION_DENIED = 'AR_PERMISSION_DENIED',
|
|
70
|
-
|
|
71
|
-
/**
|
|
72
|
-
* An unexpected error occurred while checking for WebXR support.
|
|
73
|
-
* This is a fallback for any unhandled cases.
|
|
74
|
-
*/
|
|
75
|
-
UNKNOWN_ERROR = 'UNKNOWN_ERROR',
|
|
76
|
-
}
|