@roomle/embedding-lib 5.29.0-alpha.1 → 5.29.0-alpha.3
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/docs/md/web/embedding/CHANGELOG.md +8 -4
- package/package.json +1 -1
- package/packages/embedding-lib/src/embedding-lib.d.ts +23 -1
- package/packages/embedding-lib/src/plugins/strategy/from-custom-view.d.ts +4 -3
- package/packages/embedding-lib/src/plugins/strategy/from-website.d.ts +3 -2
- package/packages/web-sdk/packages/common-core/src/input/input-manager.d.ts +2 -0
- package/packages/web-sdk/packages/common-core/src/light/light-source.d.ts +3 -1
- package/packages/web-sdk/packages/common-core/src/services/cache-holder.d.ts +17 -1
- package/packages/web-sdk/packages/common-core/src/utils/export-helpers.d.ts +4 -0
- package/packages/web-sdk/packages/common-core/src/webgl/roomle-component-factory.d.ts +1 -0
- package/packages/web-sdk/packages/configurator-core/src/roomle-configurator.d.ts +8 -0
- package/packages/web-sdk/packages/configurator-core/src/utils/raycast-helper.d.ts +3 -1
- package/packages/web-sdk/packages/homag-intelligence/src/api.d.ts +7 -3
- package/packages/web-sdk/packages/homag-intelligence/src/emulator.d.ts +26 -12
- package/packages/web-sdk/packages/homag-intelligence/src/homag-intelligence.d.ts +2 -2
- package/packages/web-sdk/packages/homag-intelligence/src/model/oc-scripts-domain.model.d.ts +1 -0
- package/packages/web-sdk/packages/planner-core/mock/planner-mock-helper.d.ts +11 -0
- package/packages/web-sdk/packages/planner-core/src/external-object-api-callbacks.d.ts +2 -2
- package/packages/web-sdk/packages/planner-core/src/external-object-api.d.ts +20 -3
- package/packages/web-sdk/packages/planner-core/src/roomle-planner.d.ts +31 -11
- package/packages/web-sdk/packages/planner-core/src/webgl/planner-scene-event-handler.d.ts +8 -3
- package/packages/web-sdk/packages/planner-core/src/webgl/planner-scene-manager.d.ts +10 -12
- package/packages/web-sdk/packages/typings/kernel.d.ts +2 -1
- package/packages/web-sdk/packages/typings/planner.d.ts +15 -3
- package/src/common/store/index.d.ts +2 -4
- package/src/common/utils/parameters.d.ts +0 -1
- package/src/common/utils/ui-actions.d.ts +1 -1
- package/src/configurator/components/addons/AddonsTrigger.vue.d.ts +5 -33
- package/src/configurator/components/grid-view/-utils/GridViewElement.vue.d.ts +2 -2
- package/src/configurator/embedding/drag-handler.d.ts +2 -1
- package/src/configurator/embedding/exposed-api.d.ts +2 -1
- package/src/configurator/embedding/types.d.ts +1 -1
- package/packages/web-sdk/packages/common-core/src/webgl/scene-manager.d.ts +0 -154
- package/src/common/store/sidebar-store-state.d.ts +0 -45
- package/src/planner/components/utils/ConfiguratorParameter.vue.d.ts +0 -23
|
@@ -1,8 +1,12 @@
|
|
|
1
|
-
## [5.29.0-alpha.
|
|
1
|
+
## [5.29.0-alpha.3](https://github.com/roomle-dev/roomle-ui/compare/embedding-lib-v5.29.0-alpha.2...embedding-lib-v5.29.0-alpha.3) (2025-10-02)
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
### Features
|
|
5
5
|
|
|
6
|
-
*
|
|
7
|
-
|
|
8
|
-
|
|
6
|
+
* keep the child selection when clicking on a sibling ([a2f6e1f](https://github.com/roomle-dev/roomle-ui/commit/a2f6e1f40a408075d21284b18cbbe359bccdf8f0))
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* only allow child selection if advanced docking is enabled ([8daeb5b](https://github.com/roomle-dev/roomle-ui/commit/8daeb5bba7ce591fed4c3a5c77341cb7a61f9a84))
|
|
12
|
+
* only select child if object is already selected ([e05e69b](https://github.com/roomle-dev/roomle-ui/commit/e05e69b15478fac67b6e6a980227e7c4a49dbffe))
|
package/package.json
CHANGED
|
@@ -5,7 +5,7 @@ import { default as RoomleGLBViewer } from '@roomle/web-sdk/glb-viewer-core/src/
|
|
|
5
5
|
import { default as RoomlePlanner } from '@roomle/web-sdk/planner-core/src/roomle-planner';
|
|
6
6
|
import { DragIn } from './plugins/drag-in';
|
|
7
7
|
import { Connector } from './connector';
|
|
8
|
-
import { MasterData } from '@roomle/web-sdk/homag-intelligence/src/model/oc-scripts-domain.model';
|
|
8
|
+
import { MasterData, PosGroup } from '@roomle/web-sdk/homag-intelligence/src/model/oc-scripts-domain.model';
|
|
9
9
|
|
|
10
10
|
interface PluginMap {
|
|
11
11
|
dragIn: typeof DragIn;
|
|
@@ -14,6 +14,28 @@ export interface HiCallbacks {
|
|
|
14
14
|
onLoadJavascript: (libraryId: string) => Promise<string>;
|
|
15
15
|
onLoadMasterData: (libraryId: string) => Promise<MasterData>;
|
|
16
16
|
onLoadArticleCatalog: (libraryId: string) => Promise<any>;
|
|
17
|
+
onPriceCalc?: (posGroups: PosGroup[]) => Promise<void>;
|
|
18
|
+
/**
|
|
19
|
+
* "onLoadPosGroup" is invoked when a group is loaded from a plan.
|
|
20
|
+
* @param groupData The new group data JSON.
|
|
21
|
+
*/
|
|
22
|
+
onLoadPosGroup?: (posGroup: PosGroup) => Promise<boolean>;
|
|
23
|
+
/**
|
|
24
|
+
* "onPosGroupAdded" is invoked when a new group was created. (e.g. duplicate object)
|
|
25
|
+
* @param groupData The new group data JSON.
|
|
26
|
+
*/
|
|
27
|
+
onPosGroupAdded?: (posGroups: PosGroup[]) => Promise<void>;
|
|
28
|
+
/**
|
|
29
|
+
* "onPosGroupChanged" is invoked when a new group was modified and recalculated. (e.g. split, merge, change, attribute)
|
|
30
|
+
*
|
|
31
|
+
* @param groupData The new group data JSON.
|
|
32
|
+
*/
|
|
33
|
+
onPosGroupChanged?: (posGroups: PosGroup[]) => Promise<void>;
|
|
34
|
+
/**
|
|
35
|
+
* "onPosGroupDeleted" is invoked when a group was delete. (e.g. delete button in scene)
|
|
36
|
+
* @param groupData The ID of the group which was deleted.
|
|
37
|
+
*/
|
|
38
|
+
onPosGroupDeleted?: (posGroupIds: string[]) => Promise<void>;
|
|
17
39
|
}
|
|
18
40
|
export type AvailablePlugins = {
|
|
19
41
|
[K in keyof PluginMap]?: InstanceType<PluginMap[K]>;
|
|
@@ -4,6 +4,7 @@ import { ExposedApi } from '../../../../../src/configurator/embedding/exposed-ap
|
|
|
4
4
|
import { DragInSettings } from '../types';
|
|
5
5
|
import { PossibleCustomViewsAndMain } from '../../../../../src/configurator/embedding/types';
|
|
6
6
|
import { OnBeforeUpdateDragGhost } from '../../../../common/src/utils/drag';
|
|
7
|
+
import { ID_TYPE } from '@roomle/web-sdk/planner-core/src/roomle-planner';
|
|
7
8
|
|
|
8
9
|
export declare class DragInFromCustomViewStrategy implements DragInStrategy {
|
|
9
10
|
private _options;
|
|
@@ -17,13 +18,13 @@ export declare class DragInFromCustomViewStrategy implements DragInStrategy {
|
|
|
17
18
|
isDragging: boolean;
|
|
18
19
|
constructor(instance: ExposedApi, mainDomElement: HTMLIFrameElement, options: DragInSettings, viewName: PossibleCustomViewsAndMain);
|
|
19
20
|
beforeUpdateGhost(handler: OnBeforeUpdateDragGhost): void;
|
|
20
|
-
_dragStart(id: RapiId, event: MouseEvent | TouchEvent, type?:
|
|
21
|
+
_dragStart(id: RapiId, event: MouseEvent | TouchEvent, type?: ID_TYPE): Promise<void>;
|
|
21
22
|
_dragUpdate(event: MouseEvent | TouchEvent): void;
|
|
22
23
|
_dragEnd(): void;
|
|
23
|
-
dragStart(id: RapiId, event: MouseEvent | TouchEvent, type:
|
|
24
|
+
dragStart(id: RapiId, event: MouseEvent | TouchEvent, type: ID_TYPE): void;
|
|
24
25
|
dragEnd(): void;
|
|
25
26
|
dragUpdate(event: MouseEvent | TouchEvent): void;
|
|
26
|
-
touchStart(id: RapiId, event: TouchEvent, type?:
|
|
27
|
+
touchStart(id: RapiId, event: TouchEvent, type?: ID_TYPE): void;
|
|
27
28
|
touchMove(event: TouchEvent): void;
|
|
28
29
|
touchEnd(): void;
|
|
29
30
|
dispose(): void;
|
|
@@ -3,6 +3,7 @@ import { RapiId } from '@roomle/web-sdk/typings/rapi-types';
|
|
|
3
3
|
import { ExposedApi } from '../../../../../src/configurator/embedding/exposed-api';
|
|
4
4
|
import { DragInOptions } from '../types';
|
|
5
5
|
import { OnBeforeUpdateDragGhost } from '../../../../common/src/utils/drag';
|
|
6
|
+
import { ID_TYPE } from '@roomle/web-sdk/planner-core/src/roomle-planner';
|
|
6
7
|
|
|
7
8
|
export declare class DragInFromWebsiteStrategy implements DragInStrategy {
|
|
8
9
|
private _options;
|
|
@@ -16,10 +17,10 @@ export declare class DragInFromWebsiteStrategy implements DragInStrategy {
|
|
|
16
17
|
private _firefoxFallback;
|
|
17
18
|
constructor(instance: ExposedApi, mainDomElement: HTMLIFrameElement, options: DragInOptions);
|
|
18
19
|
beforeUpdateGhost(handler: OnBeforeUpdateDragGhost): void;
|
|
19
|
-
dragStart(id: RapiId, event: DragEvent | TouchEvent, type?:
|
|
20
|
+
dragStart(id: RapiId, event: DragEvent | TouchEvent, type?: ID_TYPE): void;
|
|
20
21
|
dragUpdate(event: DragEvent | TouchEvent): void;
|
|
21
22
|
dragEnd(): void;
|
|
22
|
-
touchStart(id: RapiId, event: TouchEvent, type?:
|
|
23
|
+
touchStart(id: RapiId, event: TouchEvent, type?: ID_TYPE): void;
|
|
23
24
|
touchMove(event: TouchEvent): void;
|
|
24
25
|
touchEnd(): void;
|
|
25
26
|
dispose(): void;
|
|
@@ -75,7 +75,9 @@ export default class InputManager extends EventDispatcher<InputEvent> implements
|
|
|
75
75
|
private _dragEV;
|
|
76
76
|
private _boundingClientRect;
|
|
77
77
|
private _boundingClientRectInvalid;
|
|
78
|
+
private _lastPosition;
|
|
78
79
|
constructor(creator: string);
|
|
80
|
+
getLastPosition(): Position2;
|
|
79
81
|
enableDragIn(dragEvent?: DragEvent): void;
|
|
80
82
|
isMouseUp(): boolean;
|
|
81
83
|
forceMouseUp(): void;
|
|
@@ -5,7 +5,9 @@ export declare const generateLightSource: (lightSourceAttributes: KernelLightSou
|
|
|
5
5
|
export declare class RoomleLightSource {
|
|
6
6
|
private _lightSourceId;
|
|
7
7
|
private _light;
|
|
8
|
-
constructor(lightSourceId: number, lightSource
|
|
8
|
+
constructor(lightSourceId: number, lightSource?: Light);
|
|
9
|
+
get light(): Light;
|
|
10
|
+
set light(light: Light);
|
|
9
11
|
get lightSourceId(): number;
|
|
10
12
|
get isLightOn(): boolean;
|
|
11
13
|
addToScene(object3d: Object3D): void;
|
|
@@ -1,12 +1,28 @@
|
|
|
1
1
|
import { RoomleComponent } from '../webgl/roomle-component-factory';
|
|
2
|
-
import { BufferGeometry, Material } from 'three';
|
|
2
|
+
import { BufferGeometry, Light, Material, Scene } from 'three';
|
|
3
|
+
import { KernelLightSourceType } from '../../../typings/kernel';
|
|
3
4
|
|
|
5
|
+
declare class LightCache {
|
|
6
|
+
private _scene;
|
|
7
|
+
availableLights: Light[];
|
|
8
|
+
activeLights: Map<string, Light>;
|
|
9
|
+
private readonly _inactivePosition;
|
|
10
|
+
constructor(scene: Scene);
|
|
11
|
+
addActiveLight(light: Light): void;
|
|
12
|
+
cacheLight(light: Light): void;
|
|
13
|
+
getLightFromCache(type: KernelLightSourceType): Light<import('three').LightShadow<import('three').Camera>>;
|
|
14
|
+
clear(): void;
|
|
15
|
+
}
|
|
4
16
|
export default class CacheHolder {
|
|
5
17
|
private _componentCache;
|
|
6
18
|
private _geometryCache;
|
|
7
19
|
private _materialCache;
|
|
20
|
+
private _lightCache;
|
|
21
|
+
get lightCache(): LightCache;
|
|
8
22
|
get componentCache(): Map<string, RoomleComponent>;
|
|
9
23
|
get geometryCache(): Map<string, BufferGeometry>;
|
|
10
24
|
get materialCache(): Map<string, Material>;
|
|
11
25
|
clear(): void;
|
|
26
|
+
setupLightCache(scene: Scene): void;
|
|
12
27
|
}
|
|
28
|
+
export {};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { Object3D, Scene } from 'three';
|
|
2
|
+
|
|
3
|
+
export declare const prepareObjectsForExport: (scene: Scene, isPartOfScene: (object: Object3D) => boolean) => Object3D<import('three').Object3DEventMap>[];
|
|
4
|
+
export declare const fixUSDZCompatibility: (objects: Object3D[]) => void;
|
|
@@ -28,6 +28,7 @@ export interface RoomleComponent extends RoomleEventedObject3D {
|
|
|
28
28
|
removeMeshById(meshId: number): void;
|
|
29
29
|
getLightSourceById(lightSourceId: number): RoomleLightSource | null;
|
|
30
30
|
removeLightSourceById(lightSourceId: number): void;
|
|
31
|
+
addExistingLightSource(lightSource: RoomleLightSource): void;
|
|
31
32
|
addLightSource(lightSource: RoomleLightSource): void;
|
|
32
33
|
getAllLightSources(): Map<number, RoomleLightSource>;
|
|
33
34
|
getMeshById(meshId: number): Mesh;
|
|
@@ -718,5 +718,13 @@ export default class RoomleConfigurator<P extends readonly PluginName[] = readon
|
|
|
718
718
|
* @param value - The new value to set for the parameter.
|
|
719
719
|
*/
|
|
720
720
|
updateComponentParameter(runtimeId: number, parameterKey: string, value: string): void;
|
|
721
|
+
/**
|
|
722
|
+
* Downloads the current configuration model in GLTF .GLB model file.
|
|
723
|
+
*/
|
|
724
|
+
exportGLB(): Promise<void>;
|
|
725
|
+
/**
|
|
726
|
+
* Downloads the current configuration model to Universal Scene Descriptor Zip .USDZ model file.
|
|
727
|
+
*/
|
|
728
|
+
exportUSDZ(): Promise<void>;
|
|
721
729
|
}
|
|
722
730
|
export {};
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { default as InputManager, InputEvent } from '../../../common-core/src/input/input-manager';
|
|
2
2
|
import { SceneEventInfo } from '../webgl/configurator-scene-event-handler';
|
|
3
3
|
import { default as EventDispatcher } from './event-dispatcher';
|
|
4
|
-
import {
|
|
4
|
+
import { Position2 } from '../../../common-core/src/common-interfaces';
|
|
5
|
+
import { RoomleEventedIntersection, RoomleEventedMesh } from '../../../common-core/src/utils/threejs-utils';
|
|
5
6
|
import { Camera, Layers, Object3D, Scene, Vector3 } from 'three';
|
|
6
7
|
|
|
7
8
|
export declare const enum OBJECT_EVENT {
|
|
@@ -60,6 +61,7 @@ export default class RaycastHelper extends EventDispatcher<SceneEventInfo> {
|
|
|
60
61
|
private _findHover;
|
|
61
62
|
private _intersection;
|
|
62
63
|
private _intersect;
|
|
64
|
+
intersectAtPosition(position: Position2): RoomleEventedIntersection;
|
|
63
65
|
private _findObjectWithHandler;
|
|
64
66
|
private _onDragStart;
|
|
65
67
|
private _onDrag;
|
|
@@ -2,17 +2,21 @@ import { RoomDesignerRequests } from './emulator';
|
|
|
2
2
|
import { MasterData, PosGroup } from './model/oc-scripts-domain.model';
|
|
3
3
|
import { RoomlePlannerType } from '../../typings/external-objects';
|
|
4
4
|
|
|
5
|
+
export interface ExternalObjectModuleIdMap {
|
|
6
|
+
originalModuleId: string;
|
|
7
|
+
newModuleId: string;
|
|
8
|
+
}
|
|
5
9
|
export declare class RoomDesignerApi implements RoomDesignerRequests {
|
|
6
10
|
private _roomlePlanner;
|
|
7
11
|
constructor(roomlePlanner: RoomlePlannerType);
|
|
8
12
|
loadMasterData(masterData: MasterData): void;
|
|
9
|
-
loadPosGroups(posDataJson: PosGroup | PosGroup[], findFreeSpaceInPlan: boolean, verifyArrangement: boolean, mergedGroups?: string[]): Promise<void>;
|
|
13
|
+
loadPosGroups(posDataJson: PosGroup | PosGroup[], findFreeSpaceInPlan: boolean, verifyArrangement: boolean, mergedGroups?: string[], respondWithPositionInPlan?: boolean, moduleIdMap?: ExternalObjectModuleIdMap[]): Promise<void>;
|
|
10
14
|
selectGroup(groupId: string): Promise<void>;
|
|
11
15
|
selectRoot(rootModuleId: string): Promise<void>;
|
|
12
16
|
selectModule(rootModuleId: string, subModuleId: string): Promise<void>;
|
|
13
17
|
openCloseGroup(groupOrRootModuleId: string, subModuleId: string | null, open: boolean, animate: boolean): Promise<void>;
|
|
14
|
-
deleteGroup(groupId: string, wasMerged?: boolean):
|
|
15
|
-
deleteRootModule(rootModuleId: string):
|
|
18
|
+
deleteGroup(groupId: string, wasMerged?: boolean): void;
|
|
19
|
+
deleteRootModule(rootModuleId: string): void;
|
|
16
20
|
getPosDataOfAllGroups(): Promise<PosGroup[]>;
|
|
17
21
|
getRoomInformation(): Promise<import('../../planner-core/src/external-object-api').ExternalRoomInformation>;
|
|
18
22
|
generatePlanSnapshot(): Promise<void>;
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
import { ExternalModuleInformation, ExternalObjectGroup } from './callbacks';
|
|
2
2
|
import { MasterData, PosModuleAttribute, PosGroup, PosModuleData, PosModuleRootData } from './model/oc-scripts-domain.model';
|
|
3
|
+
import { HiCallbacks } from '../../../../embedding-lib/src/embedding-lib';
|
|
4
|
+
import { ExternalObjectModuleIdMap } from './api';
|
|
3
5
|
|
|
4
6
|
export interface LibraryData {
|
|
7
|
+
libraryId: string;
|
|
5
8
|
get masterData(): MasterData | null;
|
|
6
9
|
get posGroupVersion(): number;
|
|
7
10
|
calculateGroup(posGroup: PosGroup): PosGroup;
|
|
@@ -11,13 +14,13 @@ export interface LibraryData {
|
|
|
11
14
|
}
|
|
12
15
|
export interface RoomDesignerRequests {
|
|
13
16
|
loadMasterData(masterData: MasterData): void;
|
|
14
|
-
loadPosGroups(posDataJson: PosGroup | PosGroup[], findFreeSpaceInPlan: boolean, verifyArrangement: boolean, mergedGroups?: string[]): Promise<void>;
|
|
17
|
+
loadPosGroups(posDataJson: PosGroup | PosGroup[], findFreeSpaceInPlan: boolean, verifyArrangement: boolean, mergedGroups?: string[], respondWithPositionInPlan?: boolean, moduleIdMap?: ExternalObjectModuleIdMap[]): Promise<void>;
|
|
15
18
|
selectGroup(groupId: string): Promise<void>;
|
|
16
19
|
selectRoot(rootModuleId: string): Promise<void>;
|
|
17
20
|
selectModule(rootModuleId: string, subModuleId: string): Promise<void>;
|
|
18
|
-
openCloseGroup(groupOrRootModuleId: string, subModuleId: string | null, open: boolean, animate: boolean):
|
|
19
|
-
deleteGroup(groupId: string, wasMerged?: boolean):
|
|
20
|
-
deleteRootModule(rootModuleId: string):
|
|
21
|
+
openCloseGroup(groupOrRootModuleId: string, subModuleId: string | null, open: boolean, animate: boolean): void;
|
|
22
|
+
deleteGroup(groupId: string, wasMerged?: boolean): void;
|
|
23
|
+
deleteRootModule(rootModuleId: string): void;
|
|
21
24
|
getPosDataOfAllGroups(): Promise<PosGroup[]>;
|
|
22
25
|
getRoomInformation(): Promise<any>;
|
|
23
26
|
generatePlanSnapshot(): Promise<void>;
|
|
@@ -25,11 +28,14 @@ export interface RoomDesignerRequests {
|
|
|
25
28
|
saveCurrentPlanSnapshot(): Promise<any>;
|
|
26
29
|
}
|
|
27
30
|
export interface GlueLogic {
|
|
31
|
+
hiCallbacks?: HiCallbacks;
|
|
28
32
|
mergeGroups(targetGroup: ExternalObjectGroup, idsOfGroupsMerged: string | string[], idOfTargetRootModule: string): void;
|
|
29
33
|
deleteRootModule(remainingGroup: ExternalObjectGroup, rootModuleIdToDelete: string, splitOffGroups: ExternalObjectGroup[]): void;
|
|
30
34
|
splitRootModuleFromGroup(splitGroup: ExternalObjectGroup, newGroupedRootModules: ExternalObjectGroup[]): void;
|
|
31
35
|
duplicateGroup(sourceGroupId: string, duplicatedGroup: ExternalObjectGroup): void;
|
|
32
36
|
modifyAttribute(groupId: string, moduleIdObjects: ExternalModuleInformation[], attributeName: string, value: string): void;
|
|
37
|
+
updateAttribute(rootModuleId: string, moduleId: string, attributeId: string, attributeValue: string | boolean): void;
|
|
38
|
+
swapRootModule(groupId: string, rootModuleId: string, articleId: string): void;
|
|
33
39
|
arrangeRootModulesOfGroup(changedGroup: ExternalObjectGroup): void;
|
|
34
40
|
changedGroupPlanningSituation(changedGroup: ExternalObjectGroup): void;
|
|
35
41
|
deleteGroup(groupId: string): Promise<void>;
|
|
@@ -37,6 +43,7 @@ export interface GlueLogic {
|
|
|
37
43
|
loadedGroup(posDataJson: PosGroup): void;
|
|
38
44
|
removedGroup(groupId: string): void;
|
|
39
45
|
openCloseGroup(groupId: string): void;
|
|
46
|
+
newPosDataFromId(id: string): PosGroup | undefined;
|
|
40
47
|
getGroupDataForOrder(roomlePlannerId?: string): Promise<any>;
|
|
41
48
|
savePlanSnapshot(): Promise<PlanSnapshot>;
|
|
42
49
|
}
|
|
@@ -52,17 +59,21 @@ interface GroupItem {
|
|
|
52
59
|
opened: boolean;
|
|
53
60
|
}
|
|
54
61
|
export declare class Emulator implements GlueLogic {
|
|
55
|
-
_designerRequests
|
|
56
|
-
_libraryData
|
|
57
|
-
_posDataJsonMap
|
|
58
|
-
_groupMap
|
|
59
|
-
_nextPosDataId
|
|
62
|
+
private _designerRequests;
|
|
63
|
+
private _libraryData;
|
|
64
|
+
private _posDataJsonMap;
|
|
65
|
+
private _groupMap;
|
|
66
|
+
private _nextPosDataId;
|
|
67
|
+
private _hiCallbacks;
|
|
60
68
|
constructor(designerRequests: RoomDesignerRequests, libraryData: LibraryData);
|
|
69
|
+
set hiCallbacks(value: HiCallbacks | null);
|
|
70
|
+
getLibraryData(libraryId: string): LibraryData | null;
|
|
71
|
+
addLibrary(libraryData: LibraryData): void;
|
|
61
72
|
loadPosData(articleCatalogJson: any, libraryId: string): void;
|
|
62
73
|
newPosDataFromId(id: string): any;
|
|
63
74
|
deleteGroup(groupId: string): Promise<void>;
|
|
64
75
|
selectGroup(groupId: string): Promise<void>;
|
|
65
|
-
selectCheckAttributes(root: PosModuleRootData): Promise<void>;
|
|
76
|
+
selectCheckAttributes(libraryId: string, root: PosModuleRootData): Promise<void>;
|
|
66
77
|
selectRoot(_groupId: any, rootId: string): Promise<void>;
|
|
67
78
|
deleteRoot(_groupId: any, rootId: string): Promise<void>;
|
|
68
79
|
selectSubModule(_groupId: any, rootId: string, moduleId: string): Promise<void>;
|
|
@@ -76,7 +87,7 @@ export declare class Emulator implements GlueLogic {
|
|
|
76
87
|
removedGroup(groupId: string): void;
|
|
77
88
|
changedGroup(posDataJson: PosGroup): void;
|
|
78
89
|
changedGroupPlanningSituation(changedGroup: ExternalObjectGroup): void;
|
|
79
|
-
loadedGroup(posDataJson: PosGroup): void
|
|
90
|
+
loadedGroup(posDataJson: PosGroup): Promise<void>;
|
|
80
91
|
getGroupDataForOrder(roomlePlannerId?: string): Promise<any>;
|
|
81
92
|
private _setGroupContour;
|
|
82
93
|
private _setGroupPosition;
|
|
@@ -89,8 +100,9 @@ export declare class Emulator implements GlueLogic {
|
|
|
89
100
|
private _calculateAndUpdateGroupMap;
|
|
90
101
|
private _addNewGroup;
|
|
91
102
|
private _addGroupToMap;
|
|
92
|
-
updateAttribute(rootModuleId: string
|
|
103
|
+
updateAttribute(rootModuleId: string, moduleId: string, attributeId: string, attributeValue: string | boolean): void;
|
|
93
104
|
modifyAttribute(groupId: string, moduleIdObjects: ExternalModuleInformation[], attributeName: string, value: string): void;
|
|
105
|
+
swapRootModule(groupId: string, rootModuleId: string, articleId: string): void;
|
|
94
106
|
_modifyAttributeOfModules(emulatorGroupItem: GroupItem, moduleIds: string[] | string, attributeName: string, value: string | boolean): PosGroup;
|
|
95
107
|
private _setAttribute;
|
|
96
108
|
savePlanSnapshot(): Promise<PlanSnapshot>;
|
|
@@ -98,5 +110,7 @@ export declare class Emulator implements GlueLogic {
|
|
|
98
110
|
private _replacesIDs;
|
|
99
111
|
private _replacesModuleIDs;
|
|
100
112
|
private _getNextID;
|
|
113
|
+
private _groupsModified;
|
|
114
|
+
private _calculatePrice;
|
|
101
115
|
}
|
|
102
116
|
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { RmlPlugin } from './rml-plugin';
|
|
2
|
-
import {
|
|
2
|
+
import { GlueLogic } from './emulator';
|
|
3
3
|
import { ApiOptions } from './loader';
|
|
4
4
|
import { MasterData } from './model/oc-scripts-domain.model';
|
|
5
5
|
import { default as RoomlePlanner } from '../../planner-core/src/roomle-planner';
|
|
@@ -38,7 +38,7 @@ export declare class HomagIntelligence extends RmlPlugin {
|
|
|
38
38
|
init(articles: any, catalogCallbacks: HiTagCatalogCallbacks, roomlePlanner: RoomlePlanner, libraryId: string, apiOptions: ApiOptions, hiCallbacks: HiCallbacks): Promise<this>;
|
|
39
39
|
private _loadMasterData;
|
|
40
40
|
private _initCalcScript;
|
|
41
|
-
|
|
41
|
+
getGlueLogic(): GlueLogic;
|
|
42
42
|
sendToOM(withPrice?: boolean): Promise<void>;
|
|
43
43
|
fetchPrice(planId?: string): Promise<any>;
|
|
44
44
|
}
|
|
@@ -2,6 +2,7 @@ import { PlanMeasure, PlanObject, WallPlanObject } from '../../typings/planner';
|
|
|
2
2
|
import { RapiItem } from '../../typings/rapi-types';
|
|
3
3
|
import { PlanElementType } from '../../typings/planner-kernel-container';
|
|
4
4
|
import { Point } from 'roomle-core-hsc/src/embind/configuratorCoreInterface';
|
|
5
|
+
import { Vector3 } from 'three';
|
|
5
6
|
|
|
6
7
|
export declare const PLAN_OBJECT_ROTATION: number;
|
|
7
8
|
export declare const getDoorArches: (size?: number, openingDirection?: number) => {
|
|
@@ -38,3 +39,13 @@ export declare const MOCK_PLANNER_SCENE_EVENT_HANDLER: {
|
|
|
38
39
|
addWallHandlers: () => void;
|
|
39
40
|
addFloorHandlers: () => void;
|
|
40
41
|
};
|
|
42
|
+
export declare const MOCK_LAMP_LIGHT_ATTRIBUTES: {
|
|
43
|
+
lightPos: Vector3;
|
|
44
|
+
targetPos: Vector3;
|
|
45
|
+
color: number;
|
|
46
|
+
angle: number;
|
|
47
|
+
intensity: number;
|
|
48
|
+
distance: number;
|
|
49
|
+
penumbra: number;
|
|
50
|
+
decay: number;
|
|
51
|
+
};
|
|
@@ -126,8 +126,8 @@ export interface ExternalObjectUiCallback {
|
|
|
126
126
|
* The attribute with the ID "attributeId" of the sub module with the ID "subModuleId"
|
|
127
127
|
* of the root module with the ID "rootModuleId" has the new value "value".
|
|
128
128
|
* If "subModuleId" is "null", an attribute of the root module has changed.
|
|
129
|
-
* @param
|
|
130
|
-
* @param
|
|
129
|
+
* @param groupId The ID of the group.
|
|
130
|
+
* @param moduleIds The ID of the modules or "null".
|
|
131
131
|
* @param attributeId The ID of the attribute.
|
|
132
132
|
* @param value The new value of the attribute.
|
|
133
133
|
*/
|
|
@@ -35,6 +35,10 @@ export interface ExternalObjectApiConfiguration {
|
|
|
35
35
|
export interface ExternalRoomInformation {
|
|
36
36
|
rooms: PosContour[];
|
|
37
37
|
}
|
|
38
|
+
export interface ExternalObjectModuleIdMap {
|
|
39
|
+
originalModuleId: string;
|
|
40
|
+
newModuleId: string;
|
|
41
|
+
}
|
|
38
42
|
export interface ExternalObjectAPI {
|
|
39
43
|
/**
|
|
40
44
|
* With "configureExternalObjectApi" the default representation of the objects and UI and
|
|
@@ -60,8 +64,21 @@ export interface ExternalObjectAPI {
|
|
|
60
64
|
* @param findFreeSpaceInPlan A free space is automatically searched for in the plane.
|
|
61
65
|
* @param verifyArrangement Verify whether the root modules of the group need to be rearranged as they have changed in size.
|
|
62
66
|
* @param mergedGroups Groups that were merged into another group and have to be delete (this is required to generate correct undo/redo steps).
|
|
67
|
+
* @param respondWithPositionInPlan If true, loading the group is responded with the new planning situation of the group (`onChangedExternalObjectGroupPlan`).
|
|
68
|
+
* @param moduleIdMap Optional mapping of module IDs that associates original module IDs with new module IDs (required for the correction of the arrangement of root modules).
|
|
69
|
+
*/
|
|
70
|
+
loadExternalObjectGroup(groupJson: object | string | string[], findFreeSpaceInPlan: boolean, verifyArrangement?: boolean, mergedGroups?: string[], respondWithPositionInPlan?: boolean, moduleIdMap?: ExternalObjectModuleIdMap[]): Promise<void>;
|
|
71
|
+
/**
|
|
72
|
+
* "updateExternalObjectGroupAttribute" modifies an attribute of a root module or sub module.
|
|
73
|
+
* The attribute with the ID "attributeId" of the sub module with the ID "moduleId"
|
|
74
|
+
* of the root module with the ID "rootModuleId" is set to the new value "attributeValue".
|
|
75
|
+
* If "subModuleId" is "null", an attribute of the root module is modified.
|
|
76
|
+
* @param rootModuleId The ID of the root module.
|
|
77
|
+
* @param moduleId The ID of the sub module.
|
|
78
|
+
* @param attributeId The ID of the attribute.
|
|
79
|
+
* @param attributeValue The new value of the attribute (string or boolean).
|
|
63
80
|
*/
|
|
64
|
-
|
|
81
|
+
updateExternalObjectGroupAttribute(rootModuleId: string, moduleId: string, attributeId: string, attributeValue: string | boolean): void;
|
|
65
82
|
/**
|
|
66
83
|
* "renderImagesOfExternalObjectGroups" renders images of groups of modules.
|
|
67
84
|
* @param groupJson The group JSON as string or object.
|
|
@@ -74,7 +91,7 @@ export interface ExternalObjectAPI {
|
|
|
74
91
|
* @param groupId The ID of the group of modules.
|
|
75
92
|
* @param wasMerged Should be set to true if the group has been merged with another group (this is required to generate correct undo/redo steps).
|
|
76
93
|
*/
|
|
77
|
-
removeExternalObjectGroup(groupId: string, wasMerged: boolean):
|
|
94
|
+
removeExternalObjectGroup(groupId: string, wasMerged: boolean): void;
|
|
78
95
|
/**
|
|
79
96
|
* "removeExternalObjectRootModule" removes a root module from a group and splits the remaining group if the removed root module is located between other root modules.
|
|
80
97
|
* If the group consists of only one root module, the group is removed.
|
|
@@ -110,7 +127,7 @@ export interface ExternalObjectAPI {
|
|
|
110
127
|
* @param open If true, the modules are opened, if false, they are closed, if the geometry is already in the desired state, nothing happens.
|
|
111
128
|
* @param animate If true the opening or closing is animated else the geometry is switched instantly.
|
|
112
129
|
*/
|
|
113
|
-
openOrCloseGeometryOfExternalObject(groupIdOrRootModuleId: string, subModuleId: string | null, open: boolean, animate: boolean):
|
|
130
|
+
openOrCloseGeometryOfExternalObject(groupIdOrRootModuleId: string, subModuleId: string | null, open: boolean, animate: boolean): void;
|
|
114
131
|
/**
|
|
115
132
|
* "getExternalObjectGroups" returns all groups of external objects modules (PosData) that are currently loaded in the plan.
|
|
116
133
|
*/
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { default as RapiAccess } from '../../common-core/src/rapi-access';
|
|
2
2
|
import { default as RoomlePlannerUiCallback } from './roomle-planner-ui-callback';
|
|
3
3
|
import { GlbViewer } from '../../glb-viewer-core/src/glb-viewer';
|
|
4
|
-
import { ExternalEmbeddable, GlobalAPI, KernelUtilityForUi, RubensAPI
|
|
4
|
+
import { default as Main, ExternalEmbeddable, GlobalAPI, KernelUtilityForUi, RubensAPI } from '../../common-core/src/main';
|
|
5
5
|
import { Configurator } from '../../configurator-core/src/configurator';
|
|
6
6
|
import { GlobalInitDataDefinition, InitDataDefinition } from '../../common-core/src/utils/shims';
|
|
7
7
|
import { ConfigurationString, RapiConfiguration, RapiId, RapiItem, RapiPlan, RapiPlanSnapshotGetData, RapiPlanSnapshotGetDataWith3dUrls } from '../../typings/rapi-types';
|
|
8
8
|
import { Context } from '../../common-core/src/di/context';
|
|
9
|
-
import { CancelSelectionReasons, KernelObject, KernelWall, PlanInteractionHandler, PlanModelViewHelper, PlanOverview
|
|
9
|
+
import { KernelAttic, PlanObject, WallSide, CancelSelectionReasons, KernelObject, KernelWall, PlanInteractionHandler, PlanModelViewHelper, PlanOverview } from '../../typings/planner';
|
|
10
10
|
import { KernelAccessCallbackI } from '../../common-core/src/kernel-access-callback';
|
|
11
11
|
import { default as InitData } from '../../common-core/src/utils/init-data';
|
|
12
12
|
import { CanvasOffset, Position3 } from '../../common-core/src/common-interfaces';
|
|
@@ -21,7 +21,7 @@ import { default as PlanElementViewModel } from '../../common-core/src/view-mode
|
|
|
21
21
|
import { default as WallPlanElementViewModel } from './view-model/wall-plan-element-view-model';
|
|
22
22
|
import { default as ConfiguratorContext } from '../../common-core/src/webgl/configurator-context';
|
|
23
23
|
import { default as IdbManager } from '../../common-core/src/services/idb-manager';
|
|
24
|
-
import { ExternalObjectAPI, ExternalObjectApiConfiguration, ExternalRoomInformation } from './external-object-api';
|
|
24
|
+
import { ExternalObjectAPI, ExternalObjectApiConfiguration, ExternalObjectModuleIdMap, ExternalRoomInformation } from './external-object-api';
|
|
25
25
|
import { GlobalCallback } from '../../common-core/src/services/global-callback';
|
|
26
26
|
import { ExternalGroupData, ExternalObject, ExtObjId } from '../../typings/external-objects';
|
|
27
27
|
import { PluginName } from '../../configurator-core/src/utils/plugin-types';
|
|
@@ -75,6 +75,18 @@ export interface InsertItemResult {
|
|
|
75
75
|
runtimeId: RuntimeId;
|
|
76
76
|
originalIndex: number;
|
|
77
77
|
}
|
|
78
|
+
export interface LoadExternalObjectOptions {
|
|
79
|
+
dragIn?: boolean;
|
|
80
|
+
findFreeSpaceInPlan?: boolean;
|
|
81
|
+
correctArrangement?: boolean;
|
|
82
|
+
moduleIdMap?: Array<{
|
|
83
|
+
originalModuleId: string;
|
|
84
|
+
newModuleId: string;
|
|
85
|
+
}>;
|
|
86
|
+
respondWithPositionInPlan?: boolean;
|
|
87
|
+
position?: Position3;
|
|
88
|
+
rotation?: number;
|
|
89
|
+
}
|
|
78
90
|
export default class RoomlePlanner<P extends readonly PluginName[] = readonly []> implements KernelAccessCallbackI, RoomlePlannerCallback, GlobalAPI, Context, KernelUtilityForUi, ExternalEmbeddable<RoomlePlannerUiCallback>, RubensAPI, ExternalObjectAPI {
|
|
79
91
|
_creator_: string;
|
|
80
92
|
private _activePlugins;
|
|
@@ -138,7 +150,14 @@ export default class RoomlePlanner<P extends readonly PluginName[] = readonly []
|
|
|
138
150
|
switch3D(): void;
|
|
139
151
|
switchToFirstPerson(): void;
|
|
140
152
|
resetCameraPosition(): void;
|
|
153
|
+
/**
|
|
154
|
+
* Downloads the current plan/scene to a GLTF .GLB model file.
|
|
155
|
+
*/
|
|
141
156
|
exportGLB(): void;
|
|
157
|
+
/**
|
|
158
|
+
* Downloads the current plan/scene to a Universal Scene Descriptor Zip .USDZ model file.
|
|
159
|
+
*/
|
|
160
|
+
exportUSDZ(): Promise<void>;
|
|
142
161
|
importGLB(url: string): void;
|
|
143
162
|
private _initPromiseCallback;
|
|
144
163
|
isReady(): void;
|
|
@@ -294,11 +313,11 @@ export default class RoomlePlanner<P extends readonly PluginName[] = readonly []
|
|
|
294
313
|
/**
|
|
295
314
|
* enable interaction with child components of configurable objects in the plan
|
|
296
315
|
*/
|
|
297
|
-
enableShowChildrenOfPlanObject(planElementViewModel: PlanElementViewModel):
|
|
316
|
+
enableShowChildrenOfPlanObject(planElementViewModel: PlanElementViewModel): KernelObject;
|
|
298
317
|
/**
|
|
299
318
|
* disable interaction with child components of configurable objects in the plan
|
|
300
319
|
*/
|
|
301
|
-
disableShowChildrenOfPlanObject(planElementViewModel: PlanElementViewModel):
|
|
320
|
+
disableShowChildrenOfPlanObject(planElementViewModel: PlanElementViewModel): KernelObject;
|
|
302
321
|
/**
|
|
303
322
|
* get the Partlist of certain runtimeID
|
|
304
323
|
* can be used if partlist of a selected Item is needed
|
|
@@ -414,22 +433,23 @@ export default class RoomlePlanner<P extends readonly PluginName[] = readonly []
|
|
|
414
433
|
downloadHomagIxExportPoC(): Promise<any>;
|
|
415
434
|
configureExternalObjectApi(configurationJson: string | ExternalObjectApiConfiguration): Promise<void>;
|
|
416
435
|
loadExternalObjectLibrary(libraryJson: string | object): void;
|
|
417
|
-
loadExternalObjectGroup(groupData: ExternalGroupData, findFreeSpaceInPlan: boolean,
|
|
436
|
+
loadExternalObjectGroup(groupData: ExternalGroupData, findFreeSpaceInPlan: boolean, correctArrangement?: boolean, mergedGroups?: string[], respondWithPositionInPlan?: boolean, moduleIdMap?: ExternalObjectModuleIdMap[]): Promise<void>;
|
|
418
437
|
private _loadExternalObjectGroup;
|
|
419
438
|
private _loadExternalObjectGroupInConfigurator;
|
|
420
439
|
private _loadExternalObjectGroupInPlanner;
|
|
421
440
|
private _loadOrUpdateExternalObjectGroup;
|
|
441
|
+
updateExternalObjectGroupAttribute(rootModuleId: string, moduleId: string, attributeId: string, attributeValue: string | boolean): void;
|
|
422
442
|
private _createSerializedGroupCollection;
|
|
423
443
|
private _getFaceTheCameraAngle;
|
|
424
444
|
renderImagesOfExternalObjectGroup(groups: object): Promise<{
|
|
425
445
|
[key: string]: string;
|
|
426
446
|
}>;
|
|
427
|
-
removeExternalObjectGroup(groupId: string, wasMerged?: boolean):
|
|
447
|
+
removeExternalObjectGroup(groupId: string, wasMerged?: boolean): void;
|
|
428
448
|
removeExternalObjectRootModule(rootModuleId: string): void;
|
|
429
449
|
selectExternalObjectGroup(groupId: string): Promise<void>;
|
|
430
450
|
selectExternalObjectRootModule(rootModuleId: string): Promise<void>;
|
|
431
451
|
selectExternalObjectSubModule(rootModuleId: string, subModuleId: string): Promise<void>;
|
|
432
|
-
openOrCloseGeometryOfExternalObject(groupIdOrRootModuleId: string, _subModuleId: string | null, open: boolean, animate: boolean):
|
|
452
|
+
openOrCloseGeometryOfExternalObject(groupIdOrRootModuleId: string, _subModuleId: string | null, open: boolean, animate: boolean): void;
|
|
433
453
|
private _selectKernelComponent;
|
|
434
454
|
_selectExternalObjectGroup(groupId: string, switchToPlanner: boolean): Promise<void>;
|
|
435
455
|
_selectExternalObjectModule(rootModuleId: string, subModuleId: string | null, selectPlanObject: boolean, switchToConfigurator: boolean, selectComponent: boolean, highlightSelection: boolean): Promise<void>;
|
|
@@ -502,7 +522,7 @@ export default class RoomlePlanner<P extends readonly PluginName[] = readonly []
|
|
|
502
522
|
/**
|
|
503
523
|
* Returns all configurable element's light/lamp sources in the scene.
|
|
504
524
|
*/
|
|
505
|
-
getScenePlanElementLightSources():
|
|
525
|
+
getScenePlanElementLightSources(): RoomleLightSource[];
|
|
506
526
|
/**
|
|
507
527
|
* Turns all lights in the scene on or off.
|
|
508
528
|
* @param state whether the lights should be on or off
|
|
@@ -513,7 +533,7 @@ export default class RoomlePlanner<P extends readonly PluginName[] = readonly []
|
|
|
513
533
|
* @param state whether the lights should be on or off
|
|
514
534
|
* @param ids array of light IDs, see type interface RoomleLightSource._lightSourceId
|
|
515
535
|
*/
|
|
516
|
-
|
|
536
|
+
setElementLightsOnOff(planElementViewModel: PlanElementViewModel, state: boolean): void;
|
|
517
537
|
getPlanObjectForRuntimeId(runtimeId: number): Promise<PlanElementViewModel | null>;
|
|
518
538
|
rotateByRuntimeId(runtimeId: number, rotateBy: number): Promise<void>;
|
|
519
539
|
deleteByRuntimeId(runtimeId: number): Promise<void>;
|
|
@@ -528,7 +548,7 @@ export default class RoomlePlanner<P extends readonly PluginName[] = readonly []
|
|
|
528
548
|
*/
|
|
529
549
|
redo(): Promise<void>;
|
|
530
550
|
setHomagIntelligence(homagIntelligence: HomagIntelligence): void;
|
|
531
|
-
newPosDataFromId(id: string):
|
|
551
|
+
newPosDataFromId(id: string): import('../../homag-intelligence/src/model/oc-scripts-domain.model').PosGroup;
|
|
532
552
|
sendToOM(withPrice?: boolean): Promise<void>;
|
|
533
553
|
fetchPrice(planId?: string): Promise<any>;
|
|
534
554
|
getOrderManagerGroupData(planId?: string): Promise<any>;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { default as InputManager, InputEvent } from '../../../common-core/src/input/input-manager';
|
|
2
|
-
import { default as PlanObjectViewModel } from '../../../common-core/src/view-model/plan-object-view-model';
|
|
3
2
|
import { SELECTION_MODE } from '../../../configurator-core/src/utils/selection-handler';
|
|
4
3
|
import { default as PlanViewModel } from '../view-model/plan-view-model';
|
|
5
4
|
import { default as PlanElementViewModel } from '../../../common-core/src/view-model/plan-element-view-model';
|
|
@@ -10,6 +9,7 @@ import { Camera, Object3D, Scene, Group } from 'three';
|
|
|
10
9
|
import { RoomleEventedObject3D } from '../../../common-core/src/utils/threejs-utils';
|
|
11
10
|
import { default as MeasurementLinePlanElementViewModel } from '../view-model/measurement-line-plan-element-view-model';
|
|
12
11
|
import { default as InitData } from './../../../common-core/src/utils/init-data';
|
|
12
|
+
import { default as PlanObjectViewModel } from '../../../common-core/src/view-model/plan-object-view-model';
|
|
13
13
|
|
|
14
14
|
export declare const enum PLANNER_SCENE_EVENT {
|
|
15
15
|
SELECT_PLAN_ELEMENT = 0,
|
|
@@ -106,7 +106,12 @@ export default class PlannerSceneEventHandler extends SceneEventHandler<SceneEve
|
|
|
106
106
|
private _doubleClickOnPlane;
|
|
107
107
|
private _closeToPoint;
|
|
108
108
|
private _close;
|
|
109
|
+
private _selectClickedChild;
|
|
109
110
|
private _clickElement;
|
|
111
|
+
private _selectElement;
|
|
112
|
+
private _handleSingleClick;
|
|
113
|
+
private _isObjectOrSiblingSelected;
|
|
114
|
+
getRootPlanObjectId(id: number): number;
|
|
110
115
|
private _doubleClickElement;
|
|
111
116
|
private _hoverOn;
|
|
112
117
|
private _hoverOnMultiSelect;
|
|
@@ -137,8 +142,8 @@ export default class PlannerSceneEventHandler extends SceneEventHandler<SceneEve
|
|
|
137
142
|
enableAdvancedDocking(): void;
|
|
138
143
|
disableAdvancedDocking(): void;
|
|
139
144
|
showsChildrenOfPlanObject(object: KernelObject): boolean;
|
|
140
|
-
enableShowChildrenOfPlanObject(object: KernelObject):
|
|
141
|
-
disableShowChildrenOfPlanObject(object: KernelObject):
|
|
145
|
+
enableShowChildrenOfPlanObject(object: KernelObject): KernelObject | null;
|
|
146
|
+
disableShowChildrenOfPlanObject(object: KernelObject): KernelObject | null;
|
|
142
147
|
private _checkRaycasterSnapping;
|
|
143
148
|
enableWallDrawing(): Group;
|
|
144
149
|
cancelWallDrawing(): Group;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Base64Image, CanvasOffset } from '../../../common-core/src/common-interfaces';
|
|
2
2
|
import { PlannerKernelCallbackI } from '../services/planner-kernel-access';
|
|
3
|
-
import { CancelSelectionReasons, Plan, PlanElement } from '../../../typings/planner';
|
|
3
|
+
import { CORE_TYPE_OF_CORE_ID, CancelSelectionReasons, Plan, PlanElement } from '../../../typings/planner';
|
|
4
4
|
import { KernelPlanObjectComponent, KernelEnum, KernelPlanObject, KernelVector3, RuntimeId } from '../../../typings/kernel';
|
|
5
5
|
import { default as PlannerSceneEventHandler } from './planner-scene-event-handler';
|
|
6
6
|
import { BatchPaintMaterial, InsertItemIdInfo, InsertItemResult, RoomlePlannerCallback, SceneEvents } from '../roomle-planner';
|
|
@@ -55,9 +55,9 @@ export default class PlannerSceneManager extends ConfiguratorSceneManager implem
|
|
|
55
55
|
constructor(creator: string, offset: CanvasOffset, plannerCallback: RoomlePlannerCallback, mode: Enumify<typeof CAMERA_TYPE>);
|
|
56
56
|
get configuratorContext(): import('../../../common-core/src/webgl/configurator-context').default;
|
|
57
57
|
get hasSingleRoom(): boolean;
|
|
58
|
-
|
|
58
|
+
getScenePlanElementLightSources(): RoomleLightSource[];
|
|
59
59
|
setAllLightsOnOff(state: boolean): void;
|
|
60
|
-
|
|
60
|
+
setElementLightsOnOff(planElementViewModel: PlanElementViewModel, state: boolean): void;
|
|
61
61
|
private _activateElement;
|
|
62
62
|
planCleared(): void;
|
|
63
63
|
planHistoryStateChanged(): void;
|
|
@@ -92,9 +92,11 @@ export default class PlannerSceneManager extends ConfiguratorSceneManager implem
|
|
|
92
92
|
addPlanMesh(_plan: Plan, _material: any, _vertices: Float32Array, _indices: Int32Array, _uvCoords: Float32Array, _normals: Float32Array, _type: KernelEnum): void;
|
|
93
93
|
endPlanConstruction(_plan: Plan): void;
|
|
94
94
|
addPlanObjectToScene(planViewModel: PlanObjectViewModel): Promise<void>;
|
|
95
|
+
private _recycleLights;
|
|
95
96
|
removePlanObjectFromScene(planViewModel: PlanElementViewModel): void;
|
|
96
97
|
planElementChanged(plan: Plan, planElementViewModel: PlanElementViewModel): void;
|
|
97
|
-
exportGLB(
|
|
98
|
+
exportGLB(): Promise<void>;
|
|
99
|
+
exportUSDZ(): Promise<void>;
|
|
98
100
|
importGLB(url: string): void;
|
|
99
101
|
clearScene(): void;
|
|
100
102
|
private _addSky;
|
|
@@ -130,11 +132,6 @@ export default class PlannerSceneManager extends ConfiguratorSceneManager implem
|
|
|
130
132
|
getBounds(): Box3;
|
|
131
133
|
getGeometryBounds(): Box3;
|
|
132
134
|
getPlanObject(id: number): KernelPlanObject;
|
|
133
|
-
/**
|
|
134
|
-
* This is needed to get the root plan object id in case a plan element is selected
|
|
135
|
-
* which has been docked using `advanced docking`
|
|
136
|
-
* @param id
|
|
137
|
-
*/
|
|
138
135
|
getRootPlanObjectId(id: number): number;
|
|
139
136
|
cancelPlanElementSelection(reason: CancelSelectionReasons): void;
|
|
140
137
|
deletePlanElements(runtimeIds: RuntimeId[]): Promise<void>;
|
|
@@ -160,8 +157,8 @@ export default class PlannerSceneManager extends ConfiguratorSceneManager implem
|
|
|
160
157
|
enableAdvancedDocking(): void;
|
|
161
158
|
disableAdvancedDocking(): void;
|
|
162
159
|
showsChildrenOfPlanObject(planElementViewModel: PlanElementViewModel): boolean;
|
|
163
|
-
enableShowChildrenOfPlanObject(planElementViewModel: PlanElementViewModel):
|
|
164
|
-
disableShowChildrenOfPlanObject(planElementViewModel: PlanElementViewModel):
|
|
160
|
+
enableShowChildrenOfPlanObject(planElementViewModel: PlanElementViewModel): import('../../../typings/planner').KernelObject;
|
|
161
|
+
disableShowChildrenOfPlanObject(planElementViewModel: PlanElementViewModel): import('../../../typings/planner').KernelObject;
|
|
165
162
|
dragIn(dragEvent: DragEvent): void;
|
|
166
163
|
getPlannerSceneEventHandler(): PlannerSceneEventHandler;
|
|
167
164
|
disablePlannerEvents(): void;
|
|
@@ -222,7 +219,8 @@ export default class PlannerSceneManager extends ConfiguratorSceneManager implem
|
|
|
222
219
|
private _planObjectSelectionChanged;
|
|
223
220
|
highlightExternalObject(planObjectComponent: KernelPlanObjectComponent): void;
|
|
224
221
|
private _selectExternalObjectModule;
|
|
225
|
-
getObjectComponent(id: number): KernelPlanObjectComponent;
|
|
222
|
+
getObjectComponent(id: number, typeOfId: Enumify<typeof CORE_TYPE_OF_CORE_ID>): KernelPlanObjectComponent;
|
|
223
|
+
getExternalObjectComponent(groupId: string, moduleId: string): KernelPlanObjectComponent;
|
|
226
224
|
getCameraParameters3d(): NonNullable<CameraParameter>;
|
|
227
225
|
private _createCeilingLightGroup;
|
|
228
226
|
toggleInteriorLightsSceneSettings(on: boolean): void;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { PARAMETER_KERNEL_TYPE, PARAMETER_UNIT_TYPES } from '../common-core/src/utils/parameter-types';
|
|
2
2
|
import { AdditionalInfo, ConfigurationHash, ConfigurationString, PriceId, RapiConfiguration, RapiElement, RapiId, RapiItem, RapiJson, RapiTag } from './rapi-types';
|
|
3
|
-
import { KernelObject } from './planner';
|
|
3
|
+
import { ChildEntityMode, KernelObject } from './planner';
|
|
4
4
|
import { Enumify } from '../common-core/src/types';
|
|
5
5
|
|
|
6
6
|
import * as ems from './ems';
|
|
@@ -255,6 +255,7 @@ export declare const CORE_PLAN_COMPONENT_TYPE_DTO: {
|
|
|
255
255
|
readonly SUB_MODULE: 3;
|
|
256
256
|
};
|
|
257
257
|
export interface KernelPlanObjectComponent extends KernelPlanObjectBase {
|
|
258
|
+
objectMode: ChildEntityMode;
|
|
258
259
|
planComponentRuntimeId: number;
|
|
259
260
|
componentId: string;
|
|
260
261
|
type: KernelComponentTypeDto;
|
|
@@ -156,12 +156,24 @@ export declare const CORE_CHILD_ENTITY_MODE: {
|
|
|
156
156
|
export interface ChildEntityMode {
|
|
157
157
|
value: Enumify<typeof CORE_CHILD_ENTITY_MODE>;
|
|
158
158
|
}
|
|
159
|
+
export declare const CORE_TYPE_OF_CORE_ID: {
|
|
160
|
+
readonly CONFIGURATOR: 0;
|
|
161
|
+
readonly PLANNER: 1;
|
|
162
|
+
};
|
|
163
|
+
export interface TypeOfCoreId {
|
|
164
|
+
value: Enumify<typeof CORE_TYPE_OF_CORE_ID>;
|
|
165
|
+
}
|
|
166
|
+
export interface ExternalObjectLoadingIdMap {
|
|
167
|
+
originalModuleId: string;
|
|
168
|
+
newModuleId: string;
|
|
169
|
+
}
|
|
159
170
|
export interface ExternalObjectLoadConfiguration {
|
|
160
171
|
applyGlobalChildMode: boolean;
|
|
161
172
|
correctArrangement: boolean;
|
|
162
173
|
findFreeSpaceInPlan: boolean;
|
|
163
174
|
isVisible: boolean;
|
|
164
175
|
respondWithPositionInPlan: boolean;
|
|
176
|
+
moduleIdMap: ExternalObjectLoadingIdMap[];
|
|
165
177
|
}
|
|
166
178
|
export interface PlanInteractionHandler {
|
|
167
179
|
init(reference: PlanInteractionHandler, zoomFactor: number, viewSnapDist: number, wallSnapMode: any, objectSnapMode: any, shouldSnap: boolean, drawingType: any): PlanInteractionHandler;
|
|
@@ -253,8 +265,8 @@ export interface PlanInteractionHandler {
|
|
|
253
265
|
setSnapFeedbackWhileDrawing(enabled: boolean): void;
|
|
254
266
|
consistsOfMergedComponents(object: KernelObject): boolean;
|
|
255
267
|
getShowChildrenOfPlanObject(object: KernelObject): ChildEntityMode;
|
|
256
|
-
setShowChildrenOfPlanObject(object: KernelObject, mode: ChildEntityMode, switchChildModeOffForAllOtherObjects: boolean):
|
|
257
|
-
setShowChildrenOfExternalObject(objectId: string, mode: ChildEntityMode, switchChildModeOffForAllOtherObjects: boolean):
|
|
268
|
+
setShowChildrenOfPlanObject(object: KernelObject, mode: ChildEntityMode, switchChildModeOffForAllOtherObjects: boolean): KernelObject;
|
|
269
|
+
setShowChildrenOfExternalObject(objectId: string, mode: ChildEntityMode, switchChildModeOffForAllOtherObjects: boolean): KernelObject;
|
|
258
270
|
setObjectSize(anObject: KernelObject, aNewSize: KernelVector3, anAnchor: Anchor): void;
|
|
259
271
|
setObjectFlipX(anObject: KernelObject, shouldFlipX: boolean): void;
|
|
260
272
|
setObjectFlipY(anObject: KernelObject, shouldFlipY: boolean): void;
|
|
@@ -311,7 +323,7 @@ export interface PlanModelViewHelper {
|
|
|
311
323
|
getPlanOverview(planObject: KernelObject): PlanOverview;
|
|
312
324
|
getPlanObject(plan: Plan, aRuntimeId: number): KernelPlanObject;
|
|
313
325
|
getRootPlanObjectId(plan: Plan, aRuntimeId: number): number;
|
|
314
|
-
getObjectComponent(plan: Plan,
|
|
326
|
+
getObjectComponent(plan: Plan, typeOfId: TypeOfCoreId, anId: number): KernelPlanObjectComponent;
|
|
315
327
|
getExternalObjectComponent(plan: Plan, groupId: string, moduleId: string): KernelPlanObjectComponent;
|
|
316
328
|
getExternalComponentModuleIdsForSelection(plan: Plan, groupOrRootModuleId: string, subModuleId: string): ExternalModuleInformation;
|
|
317
329
|
requestMesh3d(element: PlanElement): void;
|
|
@@ -2,7 +2,6 @@ import { CoreState } from '../../configurator/store/core-state';
|
|
|
2
2
|
import { CoreData } from '../../configurator/store/core-data';
|
|
3
3
|
import { BUTTON_ACTIONS, UiState } from '../../configurator/store/ui-state';
|
|
4
4
|
import { PlannerUiState } from '../../planner/store/planner-ui-state';
|
|
5
|
-
import { SidebarStoreState } from './sidebar-store-state';
|
|
6
5
|
import { Nullable } from '../utils/types';
|
|
7
6
|
import { PlannerCoreData } from '../../planner/store/planner-core-data';
|
|
8
7
|
|
|
@@ -16,10 +15,10 @@ export interface SharedUiState {
|
|
|
16
15
|
topBarSelectedActions: BUTTON_ACTIONS[];
|
|
17
16
|
}
|
|
18
17
|
export declare const MUTATIONS: {
|
|
19
|
-
[x: string]: `
|
|
18
|
+
[x: string]: `UI_STATE_${string}` | `PLANNER_UI_STATE_${string}` | `CORE_DATA_${string}` | `CORE_STATE_${string}` | `PLANNER_CORE_STATE_${string}`;
|
|
20
19
|
};
|
|
21
20
|
export declare const ACTIONS: {
|
|
22
|
-
[x: string]: `
|
|
21
|
+
[x: string]: `UI_STATE_${string}` | `PLANNER_UI_STATE_${string}` | `CORE_DATA_${string}` | `CORE_STATE_${string}` | `PLANNER_CORE_STATE_${string}`;
|
|
23
22
|
};
|
|
24
23
|
export interface StoreState {
|
|
25
24
|
coreState: CoreState;
|
|
@@ -27,7 +26,6 @@ export interface StoreState {
|
|
|
27
26
|
uiState: UiState;
|
|
28
27
|
plannerUiState: PlannerUiState;
|
|
29
28
|
plannerCoreData: PlannerCoreData;
|
|
30
|
-
sidebarState: SidebarStoreState;
|
|
31
29
|
}
|
|
32
30
|
declare const _default: any;
|
|
33
31
|
export default _default;
|
|
@@ -21,4 +21,3 @@ export declare const getCurrentVariants: (api: RoomleConfiguratorType, id: strin
|
|
|
21
21
|
export declare const prepareParametersForUi: (parameters: KernelPartListParameter[]) => KernelPartListParameter[];
|
|
22
22
|
export declare const createDisabledParamsElement: (elements: ParameterData[], intl: Translator) => ParameterData<ParameterData[]>;
|
|
23
23
|
export declare const getElementLightSources: (configuration: PlanElementViewModel) => RoomleLightSource[] | undefined;
|
|
24
|
-
export declare const getLightSourcesAsArray: (sources: Array<Map<number, RoomleLightSource>>) => RoomleLightSource[];
|
|
@@ -28,7 +28,7 @@ export default class UiActions {
|
|
|
28
28
|
private _expandInteraction;
|
|
29
29
|
startConfiguring(embeddingCallbacks: ExposedCallbacks): Promise<void>;
|
|
30
30
|
formatCartItemCount(cartItemsLength: number): string;
|
|
31
|
-
showBack():
|
|
31
|
+
showBack(): boolean;
|
|
32
32
|
preparePartList(buttonAction: number): Promise<void>;
|
|
33
33
|
private _toggleAction;
|
|
34
34
|
switchProduct(): Promise<void>;
|
|
@@ -1,34 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
onShowAddons
|
|
5
|
-
}>, {}, {}, {
|
|
6
|
-
BUTTON_ACTIONS(): typeof BUTTON_ACTIONS;
|
|
7
|
-
isExpanded(): boolean;
|
|
8
|
-
isFullscreen(): boolean;
|
|
9
|
-
}, {
|
|
10
|
-
onClick(): Promise<void>;
|
|
11
|
-
}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
12
|
-
onShowAddons: FunctionConstructor;
|
|
13
|
-
}>> & Readonly<{}>, {}, {}, {
|
|
14
|
-
SvgIcon: import('vue').DefineComponent<{
|
|
15
|
-
icon: string;
|
|
16
|
-
}, {
|
|
17
|
-
svgIcon: import('vue').Ref<HTMLOrSVGElement, HTMLOrSVGElement>;
|
|
18
|
-
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{
|
|
19
|
-
icon: string;
|
|
20
|
-
}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
21
|
-
IconButton: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
22
|
-
isCtaButton: BooleanConstructor;
|
|
23
|
-
onClick: import('vue').PropType<(_payload: MouseEvent) => void>;
|
|
24
|
-
isActive: BooleanConstructor;
|
|
25
|
-
}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
26
|
-
isCtaButton: BooleanConstructor;
|
|
27
|
-
onClick: import('vue').PropType<(_payload: MouseEvent) => void>;
|
|
28
|
-
isActive: BooleanConstructor;
|
|
29
|
-
}>> & Readonly<{}>, {
|
|
30
|
-
isActive: boolean;
|
|
31
|
-
isCtaButton: boolean;
|
|
32
|
-
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
33
|
-
}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
1
|
+
declare const _default: import('vue').DefineComponent<{
|
|
2
|
+
onShowAddons?: () => void;
|
|
3
|
+
}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{
|
|
4
|
+
onShowAddons?: () => void;
|
|
5
|
+
}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
34
6
|
export default _default;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { GridViewUiState } from '../../../../common/store/sidebar-store
|
|
1
|
+
import { GridViewUiState } from '../../../../common/store/sidebar-store';
|
|
2
2
|
|
|
3
3
|
declare const _default: import('vue').DefineComponent<{
|
|
4
4
|
expanded?: boolean;
|
|
@@ -18,7 +18,7 @@ declare const _default: import('vue').DefineComponent<{
|
|
|
18
18
|
customColorSelected?: any;
|
|
19
19
|
}> & Readonly<{}>, {
|
|
20
20
|
isDesktop: boolean;
|
|
21
|
-
expanded: boolean;
|
|
22
21
|
selected: boolean;
|
|
22
|
+
expanded: boolean;
|
|
23
23
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
24
24
|
export default _default;
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { SdkConnector } from '../business-logic/sdk-connector';
|
|
2
2
|
import { DragInOptions } from '../../../packages/embedding-lib/src/plugins/types';
|
|
3
|
+
import { ID_TYPE } from '@roomle/web-sdk/planner-core/src/roomle-planner';
|
|
3
4
|
|
|
4
5
|
export declare class ExposedApiDragHandler {
|
|
5
6
|
private _dragGhost;
|
|
6
7
|
private _sdkConnector;
|
|
7
8
|
constructor(sdkConnector: SdkConnector);
|
|
8
|
-
dragInObject(id: string, x: number, y: number, type?:
|
|
9
|
+
dragInObject(id: string, x: number, y: number, type?: ID_TYPE): Promise<number>;
|
|
9
10
|
updateDrag(x: number, y: number, options: DragInOptions): void;
|
|
10
11
|
dragInObjectEnd(): void;
|
|
11
12
|
}
|
|
@@ -17,6 +17,7 @@ import { default as EventEmitter } from '../../common/business-logic/event-emitt
|
|
|
17
17
|
import { DragInOptions } from '../../../packages/embedding-lib/src/plugins/types';
|
|
18
18
|
import { CustomViewSettingsForIframe, PossibleCustomViews } from './types';
|
|
19
19
|
import { default as RapiAccess } from '@roomle/web-sdk/common-core/src/rapi-access';
|
|
20
|
+
import { ID_TYPE } from '@roomle/web-sdk/planner-core/src/roomle-planner';
|
|
20
21
|
|
|
21
22
|
export declare class ExposedApi {
|
|
22
23
|
private _sdk;
|
|
@@ -128,7 +129,7 @@ export declare class ExposedApi {
|
|
|
128
129
|
* @param type type of the id, default is 'rml_id' for example: usm:frame, 'rml_serialized' for serialized configurations like {"componentId": "usm:frame"} (currently not supported), 'tc_serialized' for serialized TecConfig Object, 'tc_id' for TecConfig ID (currently not supported)
|
|
129
130
|
* @returns number runtimeId of the dragged object
|
|
130
131
|
*/
|
|
131
|
-
dragInObject(id: string, x: number, y: number, type?:
|
|
132
|
+
dragInObject(id: string, x: number, y: number, type?: ID_TYPE): Promise<number>;
|
|
132
133
|
getBoundingClientRect(selector: string): DOMRect;
|
|
133
134
|
private _getComputedStyle;
|
|
134
135
|
getDrawerAnimation(): {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { FeatureFlags, GlobalInitDataDefinition, InitDataDefinition } from '@roomle/web-sdk/common-core/src/utils/shims';
|
|
2
2
|
import { HexColorString, RapiConfiguratorSettings, RapiId } from '@roomle/web-sdk/typings/rapi-types';
|
|
3
3
|
import { Enumify, MEASUREMENT_UNIT, MEASUREMENT_SYSTEM, Nullable, TutorialData } from '../../common/utils/types';
|
|
4
|
-
import { ViewTypeState } from '../../common/store/sidebar-store
|
|
4
|
+
import { ViewTypeState } from '../../common/store/sidebar-store';
|
|
5
5
|
import { KernelPartList } from '@roomle/web-sdk/typings/kernel';
|
|
6
6
|
import { INTERACTION_NOTIFICATIONS, NOTIFICATIONS } from '../../common/components/utils/-utils/notifications';
|
|
7
7
|
import { SidebarEventTypes } from '../../common/composables/use-event-emitter-listener';
|
|
@@ -1,154 +0,0 @@
|
|
|
1
|
-
import { CanvasOffset } from '../common-interfaces';
|
|
2
|
-
import { default as DomHelper } from '../utils/dom-helper';
|
|
3
|
-
import { default as CameraControl3D } from '../cameracontrol/camera-control-3d';
|
|
4
|
-
import { default as InputManager } from '../input/input-manager';
|
|
5
|
-
import { GUI } from 'dat.gui';
|
|
6
|
-
import { default as ScriptLoader } from '../script-loader';
|
|
7
|
-
import { CameraParameter } from '../cameracontrol/camera-control';
|
|
8
|
-
import { default as LightSetting } from '../lightsetting/light-setting';
|
|
9
|
-
import { CAMERA_TYPE } from '../cameracontrol/camera-type';
|
|
10
|
-
import { Context } from '../di/context';
|
|
11
|
-
import { default as CameraControlFirstPerson } from '../../../planner-core/src/camera-control/camera-control-first-person';
|
|
12
|
-
import { SceneSettings } from '../scene-settings-loader';
|
|
13
|
-
import { default as Environment } from '../environment/environment';
|
|
14
|
-
import { DynamicLightSettingSource } from '../lightsetting/dynamic-light-setting-loader';
|
|
15
|
-
import { default as InitData } from '../utils/init-data';
|
|
16
|
-
import { OrthographicOffsetCamera, PerspectiveOffsetCamera } from './roomle-component-factory';
|
|
17
|
-
import { default as PluginSystem } from '../../../configurator-core/src/webgl/plugin-system';
|
|
18
|
-
import { Enumify } from '../types';
|
|
19
|
-
import { Object3D, Box3, Scene, Vector3, WebGLRenderer } from 'three';
|
|
20
|
-
import { RoomleWebGLRenderer } from './roomle-webgl-renderer';
|
|
21
|
-
import { default as ImageRenderer } from './image-renderer';
|
|
22
|
-
import { LifeCycleCallbacks } from '../life-cycle-manager';
|
|
23
|
-
import { default as HdrEnvironmentLoader } from '../services/hdr-environment-loader';
|
|
24
|
-
import { default as IdbManager } from '../services/idb-manager';
|
|
25
|
-
import { default as CameraBehaviourState } from '../cameracontrol/camera-behaviour-state';
|
|
26
|
-
import { default as CameraBehaviour } from '../cameracontrol/camera-behaviour';
|
|
27
|
-
import { Nullable } from '../../../typings/helper';
|
|
28
|
-
import { default as GlobalInitData } from '../utils/global-init-data';
|
|
29
|
-
import { GlobalCallback } from '../services/global-callback';
|
|
30
|
-
import { default as CameraControl2D } from '../cameracontrol/camera-control-2d';
|
|
31
|
-
|
|
32
|
-
export declare const INTERIOR_LIGHTS_ENV_MAP_INTENSITY = 0.35;
|
|
33
|
-
export declare const INTERIOR_LIGHTS_ENV_MAP_ROTATION = 1.16;
|
|
34
|
-
export default abstract class SceneManager implements Context, LifeCycleCallbacks, EventListenerObject {
|
|
35
|
-
_creator_: string;
|
|
36
|
-
protected _domHelper: DomHelper;
|
|
37
|
-
protected _scriptLoader: ScriptLoader;
|
|
38
|
-
private _lifeCycleManager;
|
|
39
|
-
private _staticItemLoader;
|
|
40
|
-
protected _hdrEnvironmentLoader: HdrEnvironmentLoader;
|
|
41
|
-
protected _initData: InitData;
|
|
42
|
-
protected _globalInitData: GlobalInitData;
|
|
43
|
-
protected _globalCallback: GlobalCallback;
|
|
44
|
-
protected _idbManager: IdbManager;
|
|
45
|
-
protected _pluginSystem: PluginSystem;
|
|
46
|
-
protected _imageRenderer: ImageRenderer;
|
|
47
|
-
protected _cameraBehaviourState: CameraBehaviourState;
|
|
48
|
-
private _cameraControl3D;
|
|
49
|
-
private _cameraControl2D;
|
|
50
|
-
private _cameraControlFirstPerson;
|
|
51
|
-
protected _scene: Scene;
|
|
52
|
-
protected _uiScene: Scene;
|
|
53
|
-
private _depthWriteMaterial;
|
|
54
|
-
private _cameraBehaviour;
|
|
55
|
-
protected _lightSetting: LightSetting;
|
|
56
|
-
protected _environment: Environment;
|
|
57
|
-
protected _maxAnisotropy: number;
|
|
58
|
-
protected _renderer: WebGLRenderer;
|
|
59
|
-
private _clock;
|
|
60
|
-
private _delta;
|
|
61
|
-
protected _renderLoopFunction: () => void;
|
|
62
|
-
protected _renderListener: () => void;
|
|
63
|
-
protected _stopRendering: boolean;
|
|
64
|
-
protected _roomleRenderer: Nullable<RoomleWebGLRenderer>;
|
|
65
|
-
private _forceRender;
|
|
66
|
-
private _lastChange;
|
|
67
|
-
private _running;
|
|
68
|
-
private _statsHelper;
|
|
69
|
-
private _canvasID;
|
|
70
|
-
protected _isInteriorLightActive: boolean;
|
|
71
|
-
protected _perspectiveOffsetCamera: PerspectiveOffsetCamera;
|
|
72
|
-
protected _orthographicOffsetCamera: OrthographicOffsetCamera;
|
|
73
|
-
protected abstract createCameraControl(mode: Enumify<typeof CAMERA_TYPE>, offset: CanvasOffset): void;
|
|
74
|
-
protected abstract _getInputManager(): InputManager;
|
|
75
|
-
protected get cameraBehaviour(): CameraBehaviour;
|
|
76
|
-
abstract sceneChanged(): void;
|
|
77
|
-
abstract getBounds(): Box3;
|
|
78
|
-
abstract getGeometryBounds(): Box3;
|
|
79
|
-
protected onBeforeRender(): void;
|
|
80
|
-
protected _onAfterRender: () => void;
|
|
81
|
-
protected constructor(creator: string, offset: CanvasOffset, canvasID: string, mode: Enumify<typeof CAMERA_TYPE>);
|
|
82
|
-
addEventListener(_listener: LifeCycleCallbacks): void;
|
|
83
|
-
removeEventListener(_listener: LifeCycleCallbacks): void;
|
|
84
|
-
protected _changeCameraBehaviour(cameraBehaviour: CameraBehaviour): void;
|
|
85
|
-
protected onCameraChanged(): void;
|
|
86
|
-
cameraBehaviourChanged(): void;
|
|
87
|
-
protected _addCameraControlListener(): void;
|
|
88
|
-
/**
|
|
89
|
-
* Start render loop and update everything (AA, AO, Shadows, etc)
|
|
90
|
-
* @private
|
|
91
|
-
*/
|
|
92
|
-
protected _renderEverything(): void;
|
|
93
|
-
/**
|
|
94
|
-
* Start render loop and render the scene but keep shadows and AO, needed for material changes
|
|
95
|
-
* @private
|
|
96
|
-
*/
|
|
97
|
-
protected _renderWithoutShadowsAndAO(): void;
|
|
98
|
-
protected _requestRender(): void;
|
|
99
|
-
protected _shouldRenderUi(): boolean;
|
|
100
|
-
private _renderUi;
|
|
101
|
-
private _animateCamera;
|
|
102
|
-
protected shouldClearShadowsAndAO(): boolean;
|
|
103
|
-
protected _setupScene(_offset?: CanvasOffset, transparent?: boolean): void;
|
|
104
|
-
loadEnvMap(url: string): Promise<void>;
|
|
105
|
-
private _getEnvMapIntensityAndRotation;
|
|
106
|
-
protected _setDefaultEnvironmentScene(): void;
|
|
107
|
-
private _setEnvMap;
|
|
108
|
-
private _tabVisible;
|
|
109
|
-
private _releaseKeystrokeStates;
|
|
110
|
-
updateCamera(_changeCamera?: boolean): void;
|
|
111
|
-
private _onWindowResize;
|
|
112
|
-
protected _isPartOfScene(object: Object3D): boolean;
|
|
113
|
-
cleanUp(): void;
|
|
114
|
-
clearScene(): void;
|
|
115
|
-
enableHD(source?: DynamicLightSettingSource): void;
|
|
116
|
-
protected _loadGLTF(gltfJSON: string, position?: Vector3, rotation?: number, size?: Vector3, scale?: Vector3, color?: number, callback?: (percent: number) => void): Promise<Object3D>;
|
|
117
|
-
protected _loadGLB(url: string, position?: Vector3, rotation?: number, size?: Vector3, scale?: Vector3, color?: number, colorable?: boolean, callback?: (percent: number) => void): Promise<Object3D>;
|
|
118
|
-
showGUI(): void;
|
|
119
|
-
protected _guiLoaded(): void;
|
|
120
|
-
protected _addGUIListener(gui: GUI): void;
|
|
121
|
-
protected _guiParamChanged(): void;
|
|
122
|
-
showStats(): void;
|
|
123
|
-
protected _onKeyDown(_event: KeyboardEvent): void;
|
|
124
|
-
protected _onKeyUp(_event: KeyboardEvent, _cleanup?: boolean): void;
|
|
125
|
-
pause(): void;
|
|
126
|
-
resume(): void;
|
|
127
|
-
destroy(): void;
|
|
128
|
-
handleEvent(evt: Event): void;
|
|
129
|
-
loadSceneSettings(sceneSetting: SceneSettings): Promise<void>;
|
|
130
|
-
setBackgroundColor(hex: string): void;
|
|
131
|
-
setBackgroundImage(url: string): void;
|
|
132
|
-
protected _setEnvironment(environment: Environment): void;
|
|
133
|
-
loadDynamicLightSetting(source: DynamicLightSettingSource): Promise<void>;
|
|
134
|
-
getScene(): Scene;
|
|
135
|
-
updateScene(): void;
|
|
136
|
-
protected _updateBounds(bounds: Box3, geometryBounds?: Box3, geometryChanged?: boolean): void;
|
|
137
|
-
setCameraOffset(offset: CanvasOffset): void;
|
|
138
|
-
getCameraOffset(): CanvasOffset;
|
|
139
|
-
getOrthographicOffsetCamera(): OrthographicOffsetCamera;
|
|
140
|
-
protected getPerspectiveOffsetCamera(): PerspectiveOffsetCamera;
|
|
141
|
-
protected updateEnvironment(bounds?: Box3, force?: boolean): void;
|
|
142
|
-
protected _onCameraIdle(): boolean;
|
|
143
|
-
protected _onCameraMove(): boolean;
|
|
144
|
-
protected _waitForAssets(): Promise<void>;
|
|
145
|
-
exportCanvasScreenshot(quality?: number): Promise<string>;
|
|
146
|
-
exportImageFromCamera(filename: string, shouldWaitForAssets?: boolean): Promise<void>;
|
|
147
|
-
changeEnvironmentMapIntensity(intensity: number): void;
|
|
148
|
-
lockCamera(): void;
|
|
149
|
-
unlockCamera(): void;
|
|
150
|
-
setEnvironmentMap(url?: string, intensity?: number, rotation?: number, maxLightSources?: number): void;
|
|
151
|
-
protected _getCameraControl3D(cameraParameters?: CameraParameter): CameraControl3D;
|
|
152
|
-
protected _getCameraControl2D(): CameraControl2D;
|
|
153
|
-
protected _getCameraControlFirstPerson(): CameraControlFirstPerson;
|
|
154
|
-
}
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import { Module } from 'vuex';
|
|
2
|
-
import { Enumify, Nullable } from '../utils/types';
|
|
3
|
-
import { ParameterData } from '../components/side-bar/utils/types';
|
|
4
|
-
import { StoreState } from '.';
|
|
5
|
-
import { EnsurePrefix } from '../../configurator/store/ui-state';
|
|
6
|
-
import { MaterialsForObjects } from '../../planner/business-logic/rooms';
|
|
7
|
-
|
|
8
|
-
export type ViewTypeState = 'list' | 'small' | 'big';
|
|
9
|
-
export interface GridViewUiState {
|
|
10
|
-
filter: string[];
|
|
11
|
-
search: Nullable<string>;
|
|
12
|
-
userInitiatedSearch: boolean;
|
|
13
|
-
viewType: ViewTypeState;
|
|
14
|
-
showSearchInput: boolean;
|
|
15
|
-
ignoreSearchThreshold: boolean;
|
|
16
|
-
showLabels: boolean;
|
|
17
|
-
}
|
|
18
|
-
export declare const SIDEBAR_VIEW_TYPES: {
|
|
19
|
-
readonly PLANNER_SIDE_BAR: "planner_side_bar";
|
|
20
|
-
readonly CONFIGURATOR_SIDE_BAR: "configurator_side_bar";
|
|
21
|
-
readonly DUMMY: "dummy_side_bar";
|
|
22
|
-
readonly WALL_SIDE_BAR: "wall_side_bar";
|
|
23
|
-
readonly PRODUCT_SETTINGS: "product_settings";
|
|
24
|
-
readonly FLOOR_SIDE_BAR: "floor_side_bar";
|
|
25
|
-
readonly UNIT_TEST: "test_state";
|
|
26
|
-
};
|
|
27
|
-
export type SidebarViewTypes = Enumify<typeof SIDEBAR_VIEW_TYPES>;
|
|
28
|
-
export interface SidebarStoreState {
|
|
29
|
-
debugId: SidebarViewTypes;
|
|
30
|
-
isUsingSlider: boolean;
|
|
31
|
-
selected: Nullable<ParameterData>;
|
|
32
|
-
showsDetails: boolean;
|
|
33
|
-
gridView: GridViewUiState;
|
|
34
|
-
lastSetExteriorMaterial: Nullable<MaterialsForObjects>;
|
|
35
|
-
lastSetInteriorMaterial: Nullable<MaterialsForObjects>;
|
|
36
|
-
lastSetFloorsMaterial: Nullable<MaterialsForObjects>;
|
|
37
|
-
}
|
|
38
|
-
export declare const getInitialGridViewState: () => GridViewUiState;
|
|
39
|
-
export declare const getInitialSidebarViewState: (debugId: SidebarViewTypes) => SidebarStoreState;
|
|
40
|
-
export declare const getInitialViewType: (initialType?: ViewTypeState) => ViewTypeState;
|
|
41
|
-
type SidebarStateIdentifier = EnsurePrefix<'SIDEBAR_'>;
|
|
42
|
-
export declare const SIDEBAR_STATE_MUTATIONS: SidebarStateIdentifier;
|
|
43
|
-
export declare const GRID_VIEW_STATE_MUTATIONS: SidebarStateIdentifier;
|
|
44
|
-
export declare const sidebarState: Module<SidebarStoreState, StoreState>;
|
|
45
|
-
export {};
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { SidebarStoreState } from '../../../common/store/sidebar-store-state';
|
|
2
|
-
import { ParameterData } from '../../../common/components/side-bar/utils/types';
|
|
3
|
-
|
|
4
|
-
declare const _default: import('vue').DefineComponent<{
|
|
5
|
-
element: ParameterData<any>;
|
|
6
|
-
onExpandGridView?: (element: any) => void;
|
|
7
|
-
onCollapse?: () => void;
|
|
8
|
-
onSelect?: (...args: any[]) => void;
|
|
9
|
-
isDesktop?: boolean;
|
|
10
|
-
state?: SidebarStoreState;
|
|
11
|
-
onSetColor?: any;
|
|
12
|
-
originalPayload?: any;
|
|
13
|
-
}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{
|
|
14
|
-
element: ParameterData<any>;
|
|
15
|
-
onExpandGridView?: (element: any) => void;
|
|
16
|
-
onCollapse?: () => void;
|
|
17
|
-
onSelect?: (...args: any[]) => void;
|
|
18
|
-
isDesktop?: boolean;
|
|
19
|
-
state?: SidebarStoreState;
|
|
20
|
-
onSetColor?: any;
|
|
21
|
-
originalPayload?: any;
|
|
22
|
-
}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
23
|
-
export default _default;
|