@shopware-ag/dive 1.19.1-beta.9 → 2.0.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.
- package/build/chunks/FileTypes-BjZ0rrIV.cjs +1 -0
- package/build/chunks/FileTypes-qgYnI0Jg.mjs +30 -0
- package/build/chunks/ModuleRegistry-NyNtjHb2.cjs +1 -0
- package/build/chunks/ModuleRegistry-RSub8W0G.mjs +13 -0
- package/build/chunks/PerspectiveCamera-BByyG5R4.cjs +1 -0
- package/build/chunks/PerspectiveCamera-sm4_81KJ.mjs +34 -0
- package/build/chunks/SelectTool-BAXTVyWs.cjs +1 -0
- package/build/chunks/SelectTool-Bd8cC9nb.mjs +712 -0
- package/build/chunks/{SystemInfo-DYq9x4Ch.mjs → SystemInfo-DPAQG-S5.mjs} +37 -40
- package/build/chunks/SystemInfo-oX-NNneO.cjs +1 -0
- package/build/chunks/VisibilityLayerMask-BI7jPKdx.cjs +1 -0
- package/build/chunks/VisibilityLayerMask-CXgt1fJc.mjs +8 -0
- package/build/chunks/findInterface-BEdL2iUQ.cjs +1 -0
- package/build/chunks/findInterface-OrXgmwxj.mjs +18 -0
- package/build/chunks/index-C_uFFwT2.mjs +5 -0
- package/build/chunks/index-DAwIH9xh.cjs +1 -0
- package/build/chunks/package-BHjZWYD6.mjs +39 -0
- package/build/chunks/package-JHvTSNgQ.cjs +1 -0
- package/build/chunks/{fflate.module-Chbb_O8w.cjs → parse-error-2f5qpXP5.cjs} +2 -3
- package/build/chunks/{fflate.module-BQhIETD7.mjs → parse-error-DRBVHL9E.mjs} +16 -17
- package/build/dive.cjs +30 -0
- package/build/dive.mjs +1663 -0
- package/build/src/components/floor/Floor.d.ts +2 -2
- package/build/src/components/gizmo/Gizmo.d.ts +4 -4
- package/build/src/components/gizmo/handles/AxisHandle.d.ts +4 -4
- package/build/src/components/gizmo/handles/RadialHandle.d.ts +4 -4
- package/build/src/components/gizmo/handles/ScaleHandle.d.ts +4 -4
- package/build/src/components/gizmo/plane/GizmoPlane.d.ts +1 -1
- package/build/src/components/gizmo/rotate/RotateGizmo.d.ts +4 -4
- package/build/src/components/gizmo/scale/ScaleGizmo.d.ts +5 -5
- package/build/src/components/gizmo/translate/TranslateGizmo.d.ts +4 -4
- package/build/src/components/grid/Grid.d.ts +1 -1
- package/build/src/components/light/AmbientLight.d.ts +3 -3
- package/build/src/components/light/PointLight.d.ts +6 -6
- package/build/src/components/light/SceneLight.d.ts +3 -3
- package/build/src/components/model/Model.d.ts +9 -6
- package/build/src/components/node/Node.d.ts +4 -4
- package/build/src/components/primitive/Primitive.d.ts +4 -4
- package/build/src/components/root/Root.d.ts +20 -29
- package/build/src/core/Dive.d.ts +26 -14
- package/build/src/engine/Engine.d.ts +7 -11
- package/build/src/engine/clock/Clock.d.ts +4 -0
- package/build/src/engine/renderer/Renderer.d.ts +12 -8
- package/build/src/engine/resize/ResizeManager.d.ts +4 -2
- package/build/src/engine/scene/Scene.d.ts +6 -24
- package/build/src/engine/scene/xrroot/XRRoot.d.ts +5 -5
- package/build/src/engine/scene/xrroot/xrlightroot/XRLightRoot.d.ts +3 -3
- package/build/src/helpers/findSceneRecursive/findSceneRecursive.d.ts +1 -1
- package/build/src/helpers/isFileTypeSupported/isFileTypeSupported.d.ts +1 -1
- package/build/src/index.d.ts +6 -9
- package/build/src/interfaces/Draggable.d.ts +1 -1
- package/build/src/modules/ModuleRegistry.d.ts +19 -0
- package/build/src/modules/animation/AnimationSystem.cjs +1 -0
- package/build/src/modules/animation/AnimationSystem.d.ts +28 -4
- package/build/src/modules/animation/AnimationSystem.mjs +95 -0
- package/build/src/modules/animation/animator/Animator.d.ts +26 -0
- package/build/src/modules/animation/types/AnimatorParameters.d.ts +7 -0
- package/build/src/modules/ar/ARSystem.cjs +1 -2
- package/build/src/modules/ar/ARSystem.mjs +5 -5
- package/build/src/modules/ar/arquicklook/ARQuickLook.d.ts +1 -1
- package/build/src/modules/ar/sceneviewer/SceneViewer.d.ts +1 -1
- package/build/src/modules/ar/webxr/WebXR.d.ts +3 -3
- package/build/src/modules/ar/webxr/controller/WebXRController.d.ts +3 -3
- package/build/src/modules/ar/webxr/origin/WebXROrigin.d.ts +2 -2
- package/build/src/modules/ar/webxr/raycaster/WebXRRaycaster.d.ts +4 -4
- package/build/src/modules/ar/webxr/raycaster/ar/WebXRRaycasterAR.d.ts +3 -3
- package/build/src/modules/ar/webxr/raycaster/three/WebXRRaycasterTHREE.d.ts +4 -4
- package/build/src/modules/ar/webxr/touchscreencontrols/WebXRTouchscreenControls.d.ts +1 -1
- package/build/src/modules/asset/converter/AssetConverter.cjs +0 -1
- package/build/src/modules/asset/converter/AssetConverter.d.ts +3 -3
- package/build/src/modules/asset/converter/AssetConverter.mjs +0 -1
- package/build/src/modules/asset/draco/README.md +32 -0
- package/build/src/modules/asset/draco/draco_decoder.js +33 -0
- package/build/src/modules/asset/draco/draco_decoder.wasm +0 -0
- package/build/src/modules/asset/draco/draco_encoder.js +33 -0
- package/build/src/modules/asset/draco/draco_wasm_wrapper.js +116 -0
- package/build/src/modules/asset/draco/gltf/draco_decoder.js +33 -0
- package/build/src/modules/asset/draco/gltf/draco_decoder.wasm +0 -0
- package/build/src/modules/asset/draco/gltf/draco_encoder.js +33 -0
- package/build/src/modules/asset/draco/gltf/draco_wasm_wrapper.js +116 -0
- package/build/src/modules/asset/exporter/AssetExporter.cjs +1 -2
- package/build/src/modules/asset/exporter/AssetExporter.d.ts +3 -3
- package/build/src/modules/asset/exporter/AssetExporter.mjs +1 -2
- package/build/src/modules/asset/loader/AssetLoader.cjs +3 -2
- package/build/src/modules/asset/loader/AssetLoader.mjs +2152 -5
- package/build/src/modules/axiscamera/AxisCamera.d.ts +8 -9
- package/build/src/modules/controller/orbit/OrbitController.d.ts +13 -24
- package/build/src/modules/mediacreator/MediaCreator.cjs +1 -2
- package/build/src/modules/mediacreator/MediaCreator.d.ts +4 -4
- package/build/src/modules/mediacreator/MediaCreator.mjs +28 -3
- package/build/src/modules/state/ActionRegistry.d.ts +26 -0
- package/build/src/modules/state/State.cjs +27 -0
- package/build/src/modules/state/State.d.ts +58 -0
- package/build/src/modules/state/State.mjs +4296 -0
- package/build/src/modules/state/actions/action.d.ts +36 -0
- package/build/src/modules/state/actions/ar/index.d.ts +1 -0
- package/build/src/modules/state/actions/ar/launchar.d.ts +15 -0
- package/build/src/modules/state/actions/camera/computeencompassingview.d.ts +12 -0
- package/build/src/modules/state/actions/camera/getcameratransform.d.ts +12 -0
- package/build/src/modules/state/actions/camera/index.d.ts +6 -0
- package/build/src/modules/state/actions/camera/lockcamera.d.ts +8 -0
- package/build/src/modules/state/actions/camera/movecamera.d.ts +29 -0
- package/build/src/modules/state/actions/camera/setcameralayer.d.ts +12 -0
- package/build/src/modules/state/actions/camera/setcameratransform.d.ts +15 -0
- package/build/src/modules/state/actions/camera/zoomcamera.d.ts +14 -0
- package/build/src/modules/state/actions/index.d.ts +7 -0
- package/build/src/modules/state/actions/media/generatemedia.d.ts +25 -0
- package/build/src/modules/state/actions/media/index.d.ts +1 -0
- package/build/src/modules/state/actions/object/addobject.d.ts +8 -0
- package/build/src/modules/state/actions/object/deleteobject.d.ts +12 -0
- package/build/src/modules/state/actions/object/deselectobject.d.ts +12 -0
- package/build/src/modules/state/actions/object/dropit.d.ts +12 -0
- package/build/src/modules/state/actions/object/getallobjects.d.ts +8 -0
- package/build/src/modules/state/actions/object/getobjects.d.ts +12 -0
- package/build/src/modules/state/actions/object/index.d.ts +11 -0
- package/build/src/modules/state/actions/object/modelloaded.d.ts +12 -0
- package/build/src/modules/state/actions/object/placeonfloor.d.ts +12 -0
- package/build/src/modules/state/actions/object/selectobject.d.ts +12 -0
- package/build/src/modules/state/actions/object/setparent.d.ts +22 -0
- package/build/src/modules/state/actions/object/updateobject.d.ts +12 -0
- package/build/src/modules/state/actions/renderer/index.d.ts +1 -0
- package/build/src/modules/state/actions/renderer/startrender.d.ts +8 -0
- package/build/src/modules/state/actions/scene/exportscene.d.ts +13 -0
- package/build/src/modules/state/actions/scene/getallscenedata.d.ts +9 -0
- package/build/src/modules/state/actions/scene/index.d.ts +4 -0
- package/build/src/modules/state/actions/scene/setbackground.d.ts +12 -0
- package/build/src/modules/state/actions/scene/updatescene.d.ts +20 -0
- package/build/src/modules/state/actions/toolbox/index.d.ts +4 -0
- package/build/src/modules/state/actions/toolbox/setgizmomode.d.ts +12 -0
- package/build/src/modules/state/actions/toolbox/setgizmoscalelinked.d.ts +8 -0
- package/build/src/modules/state/actions/toolbox/setgizmovisible.d.ts +8 -0
- package/build/src/modules/state/actions/toolbox/usetool.d.ts +13 -0
- package/build/src/modules/state/types/ActionTypes.d.ts +18 -0
- package/build/src/modules/{com → state}/types/COMBaseEntity.d.ts +1 -1
- package/build/src/modules/state/types/COMEntity.d.ts +11 -0
- package/build/src/modules/{com → state}/types/COMGeometry.d.ts +1 -1
- package/build/src/modules/state/types/COMGroup.d.ts +11 -0
- package/build/src/modules/state/types/COMLight.d.ts +28 -0
- package/build/src/modules/state/types/COMModel.d.ts +14 -0
- package/build/src/modules/state/types/COMPov.d.ts +10 -0
- package/build/src/modules/state/types/COMPrimitive.d.ts +14 -0
- package/build/src/modules/state/types/index.d.ts +11 -0
- package/build/src/modules/systeminfo/SystemInfo.cjs +1 -2
- package/build/src/modules/systeminfo/SystemInfo.d.ts +1 -1
- package/build/src/modules/systeminfo/SystemInfo.mjs +3 -3
- package/build/src/modules/toolbox/BaseTool.d.ts +6 -6
- package/build/src/modules/toolbox/Toolbox.cjs +1 -0
- package/build/src/modules/toolbox/Toolbox.d.ts +12 -8
- package/build/src/modules/toolbox/Toolbox.mjs +99 -0
- package/build/src/modules/toolbox/select/SelectTool.d.ts +6 -6
- package/build/src/modules/toolbox/transform/TransformTool.d.ts +6 -6
- package/build/src/types/SceneData.d.ts +1 -1
- package/build/src/types/SceneObjects.d.ts +9 -7
- package/build/src/types/SceneType.d.ts +1 -1
- package/build/src/types/UUID.d.ts +1 -0
- package/build/src/types/file/index.d.ts +1 -1
- package/build/src/types/index.d.ts +6 -6
- package/package.json +34 -23
- package/build/chunks/AssetLoader-BYhwzCxs.cjs +0 -3
- package/build/chunks/AssetLoader-BYhwzCxs.cjs.map +0 -1
- package/build/chunks/AssetLoader-Bmcx40wo.mjs +0 -1948
- package/build/chunks/AssetLoader-Bmcx40wo.mjs.map +0 -1
- package/build/chunks/MediaCreator-CAXBbn15.mjs +0 -59
- package/build/chunks/MediaCreator-CAXBbn15.mjs.map +0 -1
- package/build/chunks/MediaCreator-DDXQIlRv.cjs +0 -2
- package/build/chunks/MediaCreator-DDXQIlRv.cjs.map +0 -1
- package/build/chunks/SystemInfo--669uW1p.cjs +0 -2
- package/build/chunks/SystemInfo--669uW1p.cjs.map +0 -1
- package/build/chunks/SystemInfo-DYq9x4Ch.mjs.map +0 -1
- package/build/chunks/fflate.module-BQhIETD7.mjs.map +0 -1
- package/build/chunks/fflate.module-Chbb_O8w.cjs.map +0 -1
- package/build/index.cjs +0 -57
- package/build/index.cjs.map +0 -1
- package/build/index.mjs +0 -6793
- package/build/index.mjs.map +0 -1
- package/build/src/engine/index.d.ts +0 -1
- package/build/src/engine/pipeline/RenderPipeline.d.ts +0 -26
- package/build/src/error/index.d.ts +0 -4
- package/build/src/modules/_system/ModuleImporter.d.ts +0 -43
- package/build/src/modules/ar/ARSystem.cjs.map +0 -1
- package/build/src/modules/ar/ARSystem.mjs.map +0 -1
- package/build/src/modules/asset/converter/AssetConverter.cjs.map +0 -1
- package/build/src/modules/asset/converter/AssetConverter.mjs.map +0 -1
- package/build/src/modules/asset/exporter/AssetExporter.cjs.map +0 -1
- package/build/src/modules/asset/exporter/AssetExporter.mjs.map +0 -1
- package/build/src/modules/asset/loader/AssetLoader.cjs.map +0 -1
- package/build/src/modules/asset/loader/AssetLoader.mjs.map +0 -1
- package/build/src/modules/com/Communication.d.ts +0 -72
- package/build/src/modules/com/actions/camera/computeencompassingview.d.ts +0 -9
- package/build/src/modules/com/actions/camera/getcameratransform.d.ts +0 -9
- package/build/src/modules/com/actions/camera/movecamera.d.ts +0 -15
- package/build/src/modules/com/actions/camera/resetcamera.d.ts +0 -7
- package/build/src/modules/com/actions/camera/setcameralayer.d.ts +0 -7
- package/build/src/modules/com/actions/camera/setcameratransform.d.ts +0 -9
- package/build/src/modules/com/actions/camera/zoomcamera.d.ts +0 -8
- package/build/src/modules/com/actions/index.d.ts +0 -60
- package/build/src/modules/com/actions/media/generatemedia.d.ts +0 -14
- package/build/src/modules/com/actions/object/addobject.d.ts +0 -6
- package/build/src/modules/com/actions/object/deleteobject.d.ts +0 -8
- package/build/src/modules/com/actions/object/deselectobject.d.ts +0 -8
- package/build/src/modules/com/actions/object/getallobjects.d.ts +0 -6
- package/build/src/modules/com/actions/object/getobjects.d.ts +0 -8
- package/build/src/modules/com/actions/object/model/dropit.d.ts +0 -7
- package/build/src/modules/com/actions/object/model/modelloaded.d.ts +0 -7
- package/build/src/modules/com/actions/object/model/placeonfloor.d.ts +0 -7
- package/build/src/modules/com/actions/object/selectobject.d.ts +0 -8
- package/build/src/modules/com/actions/object/setparent.d.ts +0 -13
- package/build/src/modules/com/actions/object/updateobject.d.ts +0 -8
- package/build/src/modules/com/actions/renderer/startrender.d.ts +0 -5
- package/build/src/modules/com/actions/scene/exportscene.d.ts +0 -8
- package/build/src/modules/com/actions/scene/getallscenedata.d.ts +0 -6
- package/build/src/modules/com/actions/scene/launchar.d.ts +0 -9
- package/build/src/modules/com/actions/scene/setbackground.d.ts +0 -7
- package/build/src/modules/com/actions/scene/updatescene.d.ts +0 -11
- package/build/src/modules/com/actions/toolbox/select/setgizmomode.d.ts +0 -7
- package/build/src/modules/com/actions/toolbox/transform/setgizmoscalelinked.d.ts +0 -5
- package/build/src/modules/com/actions/toolbox/transform/setgizmovisible.d.ts +0 -5
- package/build/src/modules/com/actions/toolbox/usetool.d.ts +0 -8
- package/build/src/modules/com/types/COMEntity.d.ts +0 -6
- package/build/src/modules/com/types/COMGroup.d.ts +0 -8
- package/build/src/modules/com/types/COMLight.d.ts +0 -10
- package/build/src/modules/com/types/COMModel.d.ts +0 -11
- package/build/src/modules/com/types/COMPov.d.ts +0 -7
- package/build/src/modules/com/types/COMPrimitive.d.ts +0 -11
- package/build/src/modules/com/types/index.d.ts +0 -11
- package/build/src/modules/index.d.ts +0 -2
- package/build/src/modules/mediacreator/MediaCreator.cjs.map +0 -1
- package/build/src/modules/mediacreator/MediaCreator.mjs.map +0 -1
- package/build/src/modules/systeminfo/SystemInfo.cjs.map +0 -1
- package/build/src/modules/systeminfo/SystemInfo.mjs.map +0 -1
- /package/build/{index.d.ts → dive.d.ts} +0 -0
- /package/build/src/modules/{com → state}/types/COMEntityType.d.ts +0 -0
- /package/build/src/modules/{com → state}/types/COMGeometryType.d.ts +0 -0
- /package/build/src/modules/{com → state}/types/COMMaterial.d.ts +0 -0
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { ActionDependencies } from '../types/index.ts';
|
|
2
|
+
/**
|
|
3
|
+
* Abstract base class for implementing actions in the system.
|
|
4
|
+
* Actions represent discrete units of work that can be executed with specific payloads and dependencies.
|
|
5
|
+
* To define a new action, you can call `Action.define` method.
|
|
6
|
+
*
|
|
7
|
+
* @template P - The type of the payload that the action will receive (optional)
|
|
8
|
+
* @template R - The return type of the action's execution
|
|
9
|
+
* @template D - The type of dependencies required by the action, extending ActionDependencies
|
|
10
|
+
*/
|
|
11
|
+
export declare abstract class Action<P = void, D extends Partial<ActionDependencies> = Partial<ActionDependencies>, R = void> {
|
|
12
|
+
protected abstract readonly _description: string;
|
|
13
|
+
protected _payload: P;
|
|
14
|
+
protected readonly _dependencies: D;
|
|
15
|
+
/**
|
|
16
|
+
* Executes the action with the provided payload and dependencies.
|
|
17
|
+
* @returns A promise that resolves to the result of the action
|
|
18
|
+
*/
|
|
19
|
+
abstract execute(): R;
|
|
20
|
+
constructor(payload: P, dependencies: D);
|
|
21
|
+
/**
|
|
22
|
+
* Factory method to create a new Action class with the specified description and execution logic.
|
|
23
|
+
*
|
|
24
|
+
* @template T - The type of the payload (use void for actions without payload)
|
|
25
|
+
* @template D - The type of dependencies
|
|
26
|
+
* @template R - The return type of the action
|
|
27
|
+
* @param options - Configuration options for the action
|
|
28
|
+
* @param options.description - A description of what the action does
|
|
29
|
+
* @param options.execute - The function that implements the action's logic
|
|
30
|
+
* @returns A new Action class that can be instantiated with payload and dependencies
|
|
31
|
+
*/
|
|
32
|
+
static define<T = void, D extends Partial<ActionDependencies> = Partial<ActionDependencies>, R = void>({ description, execute, }: {
|
|
33
|
+
description: string;
|
|
34
|
+
execute: (payload: T, dependencies: D) => R;
|
|
35
|
+
}): new (payload: T, dependencies: D) => Action<T, D, R>;
|
|
36
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './launchar.ts';
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Action } from '../action.ts';
|
|
2
|
+
import { ActionDependencies } from '../../types/index.ts';
|
|
3
|
+
import { ARSystemOptions } from '../../../ar/ARSystem.ts';
|
|
4
|
+
export declare const LaunchARAction: new (payload: {
|
|
5
|
+
uri: string;
|
|
6
|
+
options?: ARSystemOptions;
|
|
7
|
+
}, dependencies: Pick<ActionDependencies, "getARSystem">) => Action<{
|
|
8
|
+
uri: string;
|
|
9
|
+
options?: ARSystemOptions;
|
|
10
|
+
}, Pick<ActionDependencies, "getARSystem">, Promise<void>>;
|
|
11
|
+
declare global {
|
|
12
|
+
interface ActionTypes {
|
|
13
|
+
LAUNCH_AR: typeof LaunchARAction;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Action } from '../action.ts';
|
|
2
|
+
import { Vector3Like } from 'three';
|
|
3
|
+
import { ActionDependencies } from '../../types/index.ts';
|
|
4
|
+
export declare const ComputeEncompassingViewAction: new (payload: void, dependencies: Pick<ActionDependencies, "engine" | "controller">) => Action<void, Pick<ActionDependencies, "engine" | "controller">, {
|
|
5
|
+
position: Vector3Like;
|
|
6
|
+
target: Vector3Like;
|
|
7
|
+
}>;
|
|
8
|
+
declare global {
|
|
9
|
+
interface ActionTypes {
|
|
10
|
+
COMPUTE_ENCOMPASSING_VIEW: typeof ComputeEncompassingViewAction;
|
|
11
|
+
}
|
|
12
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Action } from '../action.ts';
|
|
2
|
+
import { ActionDependencies } from '../../types/index.ts';
|
|
3
|
+
import { Vector3Like } from 'three';
|
|
4
|
+
export declare const GetCameraTransformAction: new (payload: void, dependencies: Pick<ActionDependencies, "controller">) => Action<void, Pick<ActionDependencies, "controller">, {
|
|
5
|
+
position: Vector3Like;
|
|
6
|
+
target: Vector3Like;
|
|
7
|
+
}>;
|
|
8
|
+
declare global {
|
|
9
|
+
interface ActionTypes {
|
|
10
|
+
GET_CAMERA_TRANSFORM: typeof GetCameraTransformAction;
|
|
11
|
+
}
|
|
12
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Action } from '../action.ts';
|
|
2
|
+
import { ActionDependencies } from '../../types/index.ts';
|
|
3
|
+
export declare const SetCameraLockedAction: new (payload: boolean, dependencies: Pick<ActionDependencies, "controller">) => Action<boolean, Pick<ActionDependencies, "controller">, void>;
|
|
4
|
+
declare global {
|
|
5
|
+
interface ActionTypes {
|
|
6
|
+
SET_CAMERA_LOCKED: typeof SetCameraLockedAction;
|
|
7
|
+
}
|
|
8
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { Action } from '../action.ts';
|
|
2
|
+
import { ActionDependencies } from '../../types/index.ts';
|
|
3
|
+
import { Vector3Like } from 'three';
|
|
4
|
+
export declare const MoveCameraAction: new (payload: {
|
|
5
|
+
position: Vector3Like;
|
|
6
|
+
target: Vector3Like;
|
|
7
|
+
locked: boolean;
|
|
8
|
+
duration: number;
|
|
9
|
+
} | {
|
|
10
|
+
id: string;
|
|
11
|
+
locked: boolean;
|
|
12
|
+
duration: number;
|
|
13
|
+
}, dependencies: Pick<ActionDependencies, "engine" | "registered" | "controller" | "getAnimationSystem">) => Action<{
|
|
14
|
+
position: Vector3Like;
|
|
15
|
+
target: Vector3Like;
|
|
16
|
+
locked: boolean;
|
|
17
|
+
duration: number;
|
|
18
|
+
} | {
|
|
19
|
+
id: string;
|
|
20
|
+
locked: boolean;
|
|
21
|
+
duration: number;
|
|
22
|
+
}, Pick<ActionDependencies, "engine" | "registered" | "controller" | "getAnimationSystem">, Promise<{
|
|
23
|
+
stop: () => void;
|
|
24
|
+
}>>;
|
|
25
|
+
declare global {
|
|
26
|
+
interface ActionTypes {
|
|
27
|
+
MOVE_CAMERA: typeof MoveCameraAction;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Action } from '../action.ts';
|
|
2
|
+
import { ActionDependencies } from '../../types/index.ts';
|
|
3
|
+
export declare const SetCameraLayerAction: new (payload: {
|
|
4
|
+
layer: "LIVE" | "EDITOR";
|
|
5
|
+
}, dependencies: Pick<ActionDependencies, "controller">) => Action<{
|
|
6
|
+
layer: "LIVE" | "EDITOR";
|
|
7
|
+
}, Pick<ActionDependencies, "controller">, void>;
|
|
8
|
+
declare global {
|
|
9
|
+
interface ActionTypes {
|
|
10
|
+
SET_CAMERA_LAYER: typeof SetCameraLayerAction;
|
|
11
|
+
}
|
|
12
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Action } from '../action.ts';
|
|
2
|
+
import { ActionDependencies } from '../../types/index.ts';
|
|
3
|
+
import { Vector3Like } from 'three';
|
|
4
|
+
export declare const SetCameraTransformAction: new (payload: {
|
|
5
|
+
position: Vector3Like;
|
|
6
|
+
target: Vector3Like;
|
|
7
|
+
}, dependencies: Pick<ActionDependencies, "controller">) => Action<{
|
|
8
|
+
position: Vector3Like;
|
|
9
|
+
target: Vector3Like;
|
|
10
|
+
}, Pick<ActionDependencies, "controller">, void>;
|
|
11
|
+
declare global {
|
|
12
|
+
interface ActionTypes {
|
|
13
|
+
SET_CAMERA_TRANSFORM: typeof SetCameraTransformAction;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Action } from '../action.ts';
|
|
2
|
+
import { ActionDependencies } from '../../types/index.ts';
|
|
3
|
+
export declare const ZoomCameraAction: new (payload: {
|
|
4
|
+
direction: "IN" | "OUT";
|
|
5
|
+
by: number;
|
|
6
|
+
}, dependencies: Pick<ActionDependencies, "controller">) => Action<{
|
|
7
|
+
direction: "IN" | "OUT";
|
|
8
|
+
by: number;
|
|
9
|
+
}, Pick<ActionDependencies, "controller">, void>;
|
|
10
|
+
declare global {
|
|
11
|
+
interface ActionTypes {
|
|
12
|
+
ZOOM_CAMERA: typeof ZoomCameraAction;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { Action } from '../action.ts';
|
|
2
|
+
import { ActionDependencies } from '../../types/index.ts';
|
|
3
|
+
import { Vector3Like } from 'three';
|
|
4
|
+
export declare const GenerateMediaAction: new (payload: ({
|
|
5
|
+
position: Vector3Like;
|
|
6
|
+
target: Vector3Like;
|
|
7
|
+
} | {
|
|
8
|
+
id: string;
|
|
9
|
+
}) & {
|
|
10
|
+
width: number;
|
|
11
|
+
height: number;
|
|
12
|
+
}, dependencies: Pick<ActionDependencies, "registered" | "getMediaCreator">) => Action<({
|
|
13
|
+
position: Vector3Like;
|
|
14
|
+
target: Vector3Like;
|
|
15
|
+
} | {
|
|
16
|
+
id: string;
|
|
17
|
+
}) & {
|
|
18
|
+
width: number;
|
|
19
|
+
height: number;
|
|
20
|
+
}, Pick<ActionDependencies, "registered" | "getMediaCreator">, Promise<string>>;
|
|
21
|
+
declare global {
|
|
22
|
+
interface ActionTypes {
|
|
23
|
+
GENERATE_MEDIA: typeof GenerateMediaAction;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './generatemedia.ts';
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Action } from '../action.ts';
|
|
2
|
+
import { ActionDependencies, COMEntity } from '../../types/index.ts';
|
|
3
|
+
export declare const AddObjectAction: new (payload: COMEntity, dependencies: Pick<ActionDependencies, "engine" | "registered">) => Action<COMEntity, Pick<ActionDependencies, "engine" | "registered">, void>;
|
|
4
|
+
declare global {
|
|
5
|
+
interface ActionTypes {
|
|
6
|
+
ADD_OBJECT: typeof AddObjectAction;
|
|
7
|
+
}
|
|
8
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Action } from '../action.ts';
|
|
2
|
+
import { ActionDependencies, COMEntity } from '../../types/index.ts';
|
|
3
|
+
export declare const DeleteObjectAction: new (payload: Partial<COMEntity> & {
|
|
4
|
+
id: string;
|
|
5
|
+
}, dependencies: Pick<ActionDependencies, "engine" | "registered">) => Action<Partial<COMEntity> & {
|
|
6
|
+
id: string;
|
|
7
|
+
}, Pick<ActionDependencies, "engine" | "registered">, void>;
|
|
8
|
+
declare global {
|
|
9
|
+
interface ActionTypes {
|
|
10
|
+
DELETE_OBJECT: typeof DeleteObjectAction;
|
|
11
|
+
}
|
|
12
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Action } from '../action.ts';
|
|
2
|
+
import { ActionDependencies, COMEntity } from '../../types/index.ts';
|
|
3
|
+
export declare const DeselectObjectAction: new (payload: Partial<COMEntity> & {
|
|
4
|
+
id: string;
|
|
5
|
+
}, dependencies: Pick<ActionDependencies, "engine" | "registered" | "getToolbox">) => Action<Partial<COMEntity> & {
|
|
6
|
+
id: string;
|
|
7
|
+
}, Pick<ActionDependencies, "engine" | "registered" | "getToolbox">, Promise<void>>;
|
|
8
|
+
declare global {
|
|
9
|
+
interface ActionTypes {
|
|
10
|
+
DESELECT_OBJECT: typeof DeselectObjectAction;
|
|
11
|
+
}
|
|
12
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Action } from '../action.ts';
|
|
2
|
+
import { ActionDependencies } from '../../types/index.ts';
|
|
3
|
+
export declare const DropItAction: new (payload: {
|
|
4
|
+
id: string;
|
|
5
|
+
}, dependencies: Pick<ActionDependencies, "engine" | "registered">) => Action<{
|
|
6
|
+
id: string;
|
|
7
|
+
}, Pick<ActionDependencies, "engine" | "registered">, void>;
|
|
8
|
+
declare global {
|
|
9
|
+
interface ActionTypes {
|
|
10
|
+
DROP_IT: typeof DropItAction;
|
|
11
|
+
}
|
|
12
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Action } from '../action.ts';
|
|
2
|
+
import { ActionDependencies, COMEntity } from '../../types/index.ts';
|
|
3
|
+
export declare const GetAllObjectsAction: new (payload: void, dependencies: Pick<ActionDependencies, "registered">) => Action<void, Pick<ActionDependencies, "registered">, Map<string, COMEntity>>;
|
|
4
|
+
declare global {
|
|
5
|
+
interface ActionTypes {
|
|
6
|
+
GET_ALL_OBJECTS: typeof GetAllObjectsAction;
|
|
7
|
+
}
|
|
8
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Action } from '../action.ts';
|
|
2
|
+
import { ActionDependencies, COMEntity } from '../../types/index.ts';
|
|
3
|
+
export declare const GetObjectsAction: new (payload: {
|
|
4
|
+
ids: string[];
|
|
5
|
+
}, dependencies: Pick<ActionDependencies, "engine" | "registered">) => Action<{
|
|
6
|
+
ids: string[];
|
|
7
|
+
}, Pick<ActionDependencies, "engine" | "registered">, COMEntity[]>;
|
|
8
|
+
declare global {
|
|
9
|
+
interface ActionTypes {
|
|
10
|
+
GET_OBJECTS: typeof GetObjectsAction;
|
|
11
|
+
}
|
|
12
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export * from './addobject.ts';
|
|
2
|
+
export * from './deleteobject.ts';
|
|
3
|
+
export * from './deselectobject.ts';
|
|
4
|
+
export * from './dropit.ts';
|
|
5
|
+
export * from './getallobjects.ts';
|
|
6
|
+
export * from './getobjects.ts';
|
|
7
|
+
export * from './modelloaded.ts';
|
|
8
|
+
export * from './placeonfloor.ts';
|
|
9
|
+
export * from './selectobject.ts';
|
|
10
|
+
export * from './setparent.ts';
|
|
11
|
+
export * from './updateobject.ts';
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Action } from '../action.ts';
|
|
2
|
+
import { ActionDependencies } from '../../types/index.ts';
|
|
3
|
+
export declare const ModelLoadedAction: new (payload: {
|
|
4
|
+
id: string;
|
|
5
|
+
}, dependencies: Pick<ActionDependencies, "registered">) => Action<{
|
|
6
|
+
id: string;
|
|
7
|
+
}, Pick<ActionDependencies, "registered">, void>;
|
|
8
|
+
declare global {
|
|
9
|
+
interface ActionTypes {
|
|
10
|
+
MODEL_LOADED: typeof ModelLoadedAction;
|
|
11
|
+
}
|
|
12
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Action } from '../action.ts';
|
|
2
|
+
import { ActionDependencies } from '../../types/index.ts';
|
|
3
|
+
export declare const PlaceOnFloorAction: new (payload: {
|
|
4
|
+
id: string;
|
|
5
|
+
}, dependencies: Pick<ActionDependencies, "engine" | "registered">) => Action<{
|
|
6
|
+
id: string;
|
|
7
|
+
}, Pick<ActionDependencies, "engine" | "registered">, void>;
|
|
8
|
+
declare global {
|
|
9
|
+
interface ActionTypes {
|
|
10
|
+
PLACE_ON_FLOOR: typeof PlaceOnFloorAction;
|
|
11
|
+
}
|
|
12
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Action } from '../action.ts';
|
|
2
|
+
import { ActionDependencies, COMEntity } from '../../types/index.ts';
|
|
3
|
+
export declare const SelectObjectAction: new (payload: Partial<COMEntity> & {
|
|
4
|
+
id: string;
|
|
5
|
+
}, dependencies: Pick<ActionDependencies, "engine" | "registered" | "getToolbox">) => Action<Partial<COMEntity> & {
|
|
6
|
+
id: string;
|
|
7
|
+
}, Pick<ActionDependencies, "engine" | "registered" | "getToolbox">, Promise<void>>;
|
|
8
|
+
declare global {
|
|
9
|
+
interface ActionTypes {
|
|
10
|
+
SELECT_OBJECT: typeof SelectObjectAction;
|
|
11
|
+
}
|
|
12
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { Action } from '../action.ts';
|
|
2
|
+
import { ActionDependencies, COMEntity } from '../../types/index.ts';
|
|
3
|
+
export declare const SetParentAction: new (payload: {
|
|
4
|
+
object: Partial<COMEntity> & {
|
|
5
|
+
id: string;
|
|
6
|
+
};
|
|
7
|
+
parent: (Partial<COMEntity> & {
|
|
8
|
+
id: string;
|
|
9
|
+
}) | null;
|
|
10
|
+
}, dependencies: Pick<ActionDependencies, "engine" | "registered">) => Action<{
|
|
11
|
+
object: Partial<COMEntity> & {
|
|
12
|
+
id: string;
|
|
13
|
+
};
|
|
14
|
+
parent: (Partial<COMEntity> & {
|
|
15
|
+
id: string;
|
|
16
|
+
}) | null;
|
|
17
|
+
}, Pick<ActionDependencies, "engine" | "registered">, void>;
|
|
18
|
+
declare global {
|
|
19
|
+
interface ActionTypes {
|
|
20
|
+
SET_PARENT: typeof SetParentAction;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Action } from '../action.ts';
|
|
2
|
+
import { ActionDependencies, COMEntity } from '../../types/index.ts';
|
|
3
|
+
export declare const UpdateObjectAction: new (payload: Partial<COMEntity> & {
|
|
4
|
+
id: string;
|
|
5
|
+
}, dependencies: Pick<ActionDependencies, "engine" | "registered">) => Action<Partial<COMEntity> & {
|
|
6
|
+
id: string;
|
|
7
|
+
}, Pick<ActionDependencies, "engine" | "registered">, void>;
|
|
8
|
+
declare global {
|
|
9
|
+
interface ActionTypes {
|
|
10
|
+
UPDATE_OBJECT: typeof UpdateObjectAction;
|
|
11
|
+
}
|
|
12
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './startrender.ts';
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Action } from '../action.ts';
|
|
2
|
+
import { ActionDependencies } from '../../types/index.ts';
|
|
3
|
+
export declare const StartRenderAction: new (payload: void, dependencies: Pick<ActionDependencies, "engine">) => Action<void, Pick<ActionDependencies, "engine">, void>;
|
|
4
|
+
declare global {
|
|
5
|
+
interface ActionTypes {
|
|
6
|
+
START_RENDER: typeof StartRenderAction;
|
|
7
|
+
}
|
|
8
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Action } from '../action.ts';
|
|
2
|
+
import { ActionDependencies } from '../../types/index.ts';
|
|
3
|
+
import { DIVESceneFileType } from '../../../../types/index.ts';
|
|
4
|
+
export declare const ExportSceneAction: new (payload: {
|
|
5
|
+
type: keyof DIVESceneFileType;
|
|
6
|
+
}, dependencies: Pick<ActionDependencies, "engine" | "getAssetExporter">) => Action<{
|
|
7
|
+
type: keyof DIVESceneFileType;
|
|
8
|
+
}, Pick<ActionDependencies, "engine" | "getAssetExporter">, Promise<ArrayBuffer | null>>;
|
|
9
|
+
declare global {
|
|
10
|
+
interface ActionTypes {
|
|
11
|
+
EXPORT_SCENE: typeof ExportSceneAction;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Action } from '../action.ts';
|
|
2
|
+
import { ActionDependencies } from '../../types/index.ts';
|
|
3
|
+
import { DIVESceneData } from '../../../../types/index.ts';
|
|
4
|
+
export declare const GetAllSceneDataAction: new (payload: object, dependencies: Pick<ActionDependencies, "engine" | "registered" | "controller">) => Action<object, Pick<ActionDependencies, "engine" | "registered" | "controller">, DIVESceneData>;
|
|
5
|
+
declare global {
|
|
6
|
+
interface ActionTypes {
|
|
7
|
+
GET_ALL_SCENE_DATA: typeof GetAllSceneDataAction;
|
|
8
|
+
}
|
|
9
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Action } from '../action.ts';
|
|
2
|
+
import { ActionDependencies } from '../../types/index.ts';
|
|
3
|
+
export declare const SetBackgroundAction: new (payload: {
|
|
4
|
+
color: string | number;
|
|
5
|
+
}, dependencies: Pick<ActionDependencies, "engine">) => Action<{
|
|
6
|
+
color: string | number;
|
|
7
|
+
}, Pick<ActionDependencies, "engine">, void>;
|
|
8
|
+
declare global {
|
|
9
|
+
interface ActionTypes {
|
|
10
|
+
SET_BACKGROUND: typeof SetBackgroundAction;
|
|
11
|
+
}
|
|
12
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { Action } from '../action.ts';
|
|
2
|
+
import { ActionDependencies } from '../../types/index.ts';
|
|
3
|
+
export declare const UpdateSceneAction: new (payload: Partial<{
|
|
4
|
+
name: string;
|
|
5
|
+
backgroundColor: string | number;
|
|
6
|
+
gridEnabled: boolean;
|
|
7
|
+
floorEnabled: boolean;
|
|
8
|
+
floorColor: string | number;
|
|
9
|
+
}>, dependencies: Pick<ActionDependencies, "engine">) => Action<Partial<{
|
|
10
|
+
name: string;
|
|
11
|
+
backgroundColor: string | number;
|
|
12
|
+
gridEnabled: boolean;
|
|
13
|
+
floorEnabled: boolean;
|
|
14
|
+
floorColor: string | number;
|
|
15
|
+
}>, Pick<ActionDependencies, "engine">, void>;
|
|
16
|
+
declare global {
|
|
17
|
+
interface ActionTypes {
|
|
18
|
+
UPDATE_SCENE: typeof UpdateSceneAction;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Action } from '../action.ts';
|
|
2
|
+
import { ActionDependencies } from '../../types/index.ts';
|
|
3
|
+
export declare const SetGizmoModeAction: new (payload: {
|
|
4
|
+
mode: "translate" | "rotate" | "scale";
|
|
5
|
+
}, dependencies: Pick<ActionDependencies, "getToolbox">) => Action<{
|
|
6
|
+
mode: "translate" | "rotate" | "scale";
|
|
7
|
+
}, Pick<ActionDependencies, "getToolbox">, Promise<void>>;
|
|
8
|
+
declare global {
|
|
9
|
+
interface ActionTypes {
|
|
10
|
+
SET_GIZMO_MODE: typeof SetGizmoModeAction;
|
|
11
|
+
}
|
|
12
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Action } from '../action.ts';
|
|
2
|
+
import { ActionDependencies } from '../../types/index.ts';
|
|
3
|
+
export declare const SetGizmoScaleLinkedAction: new (payload: boolean, dependencies: Pick<ActionDependencies, "getToolbox">) => Action<boolean, Pick<ActionDependencies, "getToolbox">, Promise<void>>;
|
|
4
|
+
declare global {
|
|
5
|
+
interface ActionTypes {
|
|
6
|
+
SET_GIZMO_SCALE_LINKED: typeof SetGizmoScaleLinkedAction;
|
|
7
|
+
}
|
|
8
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Action } from '../action.ts';
|
|
2
|
+
import { ActionDependencies } from '../../types/index.ts';
|
|
3
|
+
export declare const SetGizmoVisibilityAction: new (payload: boolean, dependencies: Pick<ActionDependencies, "getToolbox">) => Action<boolean, Pick<ActionDependencies, "getToolbox">, Promise<void>>;
|
|
4
|
+
declare global {
|
|
5
|
+
interface ActionTypes {
|
|
6
|
+
SET_GIZMO_VISIBILITY: typeof SetGizmoVisibilityAction;
|
|
7
|
+
}
|
|
8
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Action } from '../action.ts';
|
|
2
|
+
import { ActionDependencies } from '../../types/index.ts';
|
|
3
|
+
import { ToolType } from '../../../toolbox/Toolbox.ts';
|
|
4
|
+
export declare const UseToolAction: new (payload: {
|
|
5
|
+
tool: ToolType;
|
|
6
|
+
}, dependencies: Pick<ActionDependencies, "getToolbox">) => Action<{
|
|
7
|
+
tool: ToolType;
|
|
8
|
+
}, Pick<ActionDependencies, "getToolbox">, Promise<void>>;
|
|
9
|
+
declare global {
|
|
10
|
+
interface ActionTypes {
|
|
11
|
+
USE_TOOL: typeof UseToolAction;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { DIVEEngine } from '../../../engine/Engine.ts';
|
|
2
|
+
import { OrbitController } from '../../controller/orbit/OrbitController.ts';
|
|
3
|
+
import { COMEntity } from '../types/index.ts';
|
|
4
|
+
export type ActionPayload<T> = T extends new (payload: infer P, dependencies: infer D) => unknown ? P : never;
|
|
5
|
+
export type ActionReturn<T> = T extends new (payload: infer P, dependencies: infer D) => infer ClassInstance ? ClassInstance extends {
|
|
6
|
+
execute(): infer E;
|
|
7
|
+
} ? E : never : never;
|
|
8
|
+
export type ActionDeps<T> = T extends new (payload: unknown, dependencies: infer D) => unknown ? D extends Partial<ActionDependencies> ? D : never : never;
|
|
9
|
+
export interface ActionDependencies {
|
|
10
|
+
registered: Map<string, COMEntity>;
|
|
11
|
+
engine: DIVEEngine;
|
|
12
|
+
controller: OrbitController;
|
|
13
|
+
getAnimationSystem: () => Promise<import('../../animation/AnimationSystem.ts').AnimationSystem>;
|
|
14
|
+
getARSystem: () => Promise<import('../../ar/ARSystem.ts').ARSystem>;
|
|
15
|
+
getAssetExporter: () => Promise<import('../../asset/exporter/AssetExporter.ts').AssetExporter>;
|
|
16
|
+
getMediaCreator: () => Promise<import('../../mediacreator/MediaCreator.ts').MediaCreator>;
|
|
17
|
+
getToolbox: () => Promise<import('../../toolbox/Toolbox.ts').Toolbox>;
|
|
18
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { COMPov } from './COMPov.ts';
|
|
2
|
+
import { COMLight } from './COMLight.ts';
|
|
3
|
+
import { COMModel } from './COMModel.ts';
|
|
4
|
+
import { COMPrimitive } from './COMPrimitive.ts';
|
|
5
|
+
import { COMGroup } from './COMGroup.ts';
|
|
6
|
+
export type COMMinimal<T extends COMEntity> = T extends COMEntity ? {
|
|
7
|
+
id: string;
|
|
8
|
+
entityType: T['entityType'];
|
|
9
|
+
} : never;
|
|
10
|
+
export type COMPartial<T extends COMEntity | void = void> = T extends COMEntity ? COMMinimal<T> & Partial<T> : COMMinimal<COMEntity> & Partial<COMEntity>;
|
|
11
|
+
export type COMEntity = COMPov | COMLight | COMModel | COMPrimitive | COMGroup;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Vector3Like } from 'three';
|
|
2
|
+
import { COMBaseEntity } from './COMBaseEntity.ts';
|
|
3
|
+
import { COMEntity } from './COMEntity.ts';
|
|
4
|
+
export declare function isCOMGroup(entity: COMEntity): entity is COMGroup;
|
|
5
|
+
export type COMGroup = COMBaseEntity & {
|
|
6
|
+
entityType: 'group';
|
|
7
|
+
position: Vector3Like;
|
|
8
|
+
rotation: Vector3Like;
|
|
9
|
+
scale: Vector3Like;
|
|
10
|
+
bbVisible?: boolean;
|
|
11
|
+
};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { Vector3Like } from 'three';
|
|
2
|
+
import { COMBaseEntity } from './COMBaseEntity.ts';
|
|
3
|
+
import { COMEntity } from './COMEntity.ts';
|
|
4
|
+
export declare function isCOMLight(entity: COMEntity): entity is COMLight;
|
|
5
|
+
export type COMBaseLight = COMBaseEntity & {
|
|
6
|
+
type: LightType;
|
|
7
|
+
intensity: number;
|
|
8
|
+
color: string | number;
|
|
9
|
+
enabled: boolean;
|
|
10
|
+
position?: Vector3Like;
|
|
11
|
+
rotation?: Vector3Like;
|
|
12
|
+
};
|
|
13
|
+
export type COMAmbientLight = COMBaseLight & {
|
|
14
|
+
entityType: 'light';
|
|
15
|
+
type: 'ambient';
|
|
16
|
+
};
|
|
17
|
+
export type COMPointLight = COMBaseLight & {
|
|
18
|
+
entityType: 'light';
|
|
19
|
+
type: 'point';
|
|
20
|
+
position: Vector3Like;
|
|
21
|
+
};
|
|
22
|
+
export type COMSceneLight = COMBaseLight & {
|
|
23
|
+
entityType: 'light';
|
|
24
|
+
type: 'scene';
|
|
25
|
+
};
|
|
26
|
+
type LightType = 'ambient' | 'point' | 'scene';
|
|
27
|
+
export type COMLight = COMAmbientLight | COMPointLight | COMSceneLight;
|
|
28
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Vector3Like } from 'three';
|
|
2
|
+
import { COMMaterial } from './COMMaterial.ts';
|
|
3
|
+
import { COMBaseEntity } from './COMBaseEntity.ts';
|
|
4
|
+
import { COMEntity } from './COMEntity.ts';
|
|
5
|
+
export declare function isCOMModel(entity: COMEntity): entity is COMModel;
|
|
6
|
+
export type COMModel = COMBaseEntity & {
|
|
7
|
+
entityType: 'model';
|
|
8
|
+
uri: string;
|
|
9
|
+
position: Vector3Like;
|
|
10
|
+
rotation: Vector3Like;
|
|
11
|
+
scale: Vector3Like;
|
|
12
|
+
loaded: boolean;
|
|
13
|
+
material?: Partial<COMMaterial>;
|
|
14
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Vector3Like } from 'three';
|
|
2
|
+
import { COMBaseEntity } from './COMBaseEntity.ts';
|
|
3
|
+
import { COMEntity } from './COMEntity.ts';
|
|
4
|
+
export declare function isCOMPov(entity: COMEntity): entity is COMPov;
|
|
5
|
+
export type COMPov = COMBaseEntity & {
|
|
6
|
+
entityType: 'pov';
|
|
7
|
+
position: Vector3Like;
|
|
8
|
+
target: Vector3Like;
|
|
9
|
+
locked?: boolean;
|
|
10
|
+
};
|