@roomle/embedding-lib 5.29.0-alpha.1 → 5.29.0-alpha.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (35) hide show
  1. package/docs/md/web/embedding/CHANGELOG.md +40 -4
  2. package/package.json +1 -1
  3. package/packages/embedding-lib/src/embedding-lib.d.ts +23 -1
  4. package/packages/embedding-lib/src/plugins/strategy/from-custom-view.d.ts +4 -3
  5. package/packages/embedding-lib/src/plugins/strategy/from-website.d.ts +3 -2
  6. package/packages/web-sdk/packages/common-core/src/input/input-manager.d.ts +2 -0
  7. package/packages/web-sdk/packages/common-core/src/light/light-source.d.ts +3 -1
  8. package/packages/web-sdk/packages/common-core/src/services/cache-holder.d.ts +17 -1
  9. package/packages/web-sdk/packages/common-core/src/utils/export-helpers.d.ts +4 -0
  10. package/packages/web-sdk/packages/common-core/src/webgl/roomle-component-factory.d.ts +1 -0
  11. package/packages/web-sdk/packages/configurator-core/src/roomle-configurator.d.ts +8 -0
  12. package/packages/web-sdk/packages/configurator-core/src/utils/raycast-helper.d.ts +3 -1
  13. package/packages/web-sdk/packages/homag-intelligence/src/api.d.ts +7 -3
  14. package/packages/web-sdk/packages/homag-intelligence/src/emulator.d.ts +26 -12
  15. package/packages/web-sdk/packages/homag-intelligence/src/homag-intelligence.d.ts +2 -2
  16. package/packages/web-sdk/packages/homag-intelligence/src/model/oc-scripts-domain.model.d.ts +1 -0
  17. package/packages/web-sdk/packages/planner-core/mock/planner-mock-helper.d.ts +11 -0
  18. package/packages/web-sdk/packages/planner-core/src/external-object-api-callbacks.d.ts +2 -2
  19. package/packages/web-sdk/packages/planner-core/src/external-object-api.d.ts +20 -3
  20. package/packages/web-sdk/packages/planner-core/src/roomle-planner.d.ts +31 -11
  21. package/packages/web-sdk/packages/planner-core/src/webgl/planner-scene-event-handler.d.ts +6 -3
  22. package/packages/web-sdk/packages/planner-core/src/webgl/planner-scene-manager.d.ts +10 -7
  23. package/packages/web-sdk/packages/typings/kernel.d.ts +2 -1
  24. package/packages/web-sdk/packages/typings/planner.d.ts +15 -3
  25. package/src/common/store/index.d.ts +2 -4
  26. package/src/common/utils/parameters.d.ts +0 -1
  27. package/src/common/utils/ui-actions.d.ts +1 -1
  28. package/src/configurator/components/addons/AddonsTrigger.vue.d.ts +5 -33
  29. package/src/configurator/components/grid-view/-utils/GridViewElement.vue.d.ts +2 -2
  30. package/src/configurator/embedding/drag-handler.d.ts +2 -1
  31. package/src/configurator/embedding/exposed-api.d.ts +2 -1
  32. package/src/configurator/embedding/types.d.ts +1 -1
  33. package/packages/web-sdk/packages/common-core/src/webgl/scene-manager.d.ts +0 -154
  34. package/src/common/store/sidebar-store-state.d.ts +0 -45
  35. package/src/planner/components/utils/ConfiguratorParameter.vue.d.ts +0 -23
@@ -1,8 +1,44 @@
1
- ## [5.29.0-alpha.1](https://github.com/roomle-dev/roomle-ui/compare/embedding-lib-v5.28.0...embedding-lib-v5.29.0-alpha.1) (2025-09-24)
1
+ ## [5.29.0-alpha.2](https://github.com/roomle-dev/roomle-ui/compare/embedding-lib-v5.29.0-alpha.1...embedding-lib-v5.29.0-alpha.2) (2025-10-01)
2
2
 
3
3
 
4
4
  ### Features
5
5
 
6
- * core api - external object update ([2dea816](https://github.com/roomle-dev/roomle-ui/commit/2dea81694e0257b6b2fb742d25cd5b0190ed3c23))
7
- * **core:** upgrade to version 2.61.0-alpha.1 ([540c602](https://github.com/roomle-dev/roomle-ui/commit/540c6025f6834a34b5167a6ed01e59a8ca8bdcfa))
8
- * **core:** upgrade to version 2.61.0-alpha.2 ([d364aff](https://github.com/roomle-dev/roomle-ui/commit/d364aff10df8e67b47900be7a7ef249546200a10))
6
+ * add the external object prefix to the ID if the object type is “tc_id” ([fa5188c](https://github.com/roomle-dev/roomle-ui/commit/fa5188cd5213fe7def41d5011231234df5eb4011))
7
+ * added "respondWithPositionInPlan" argument to "loadExternalObjectGroup" ([a3fceb3](https://github.com/roomle-dev/roomle-ui/commit/a3fceb3f9449ae35372721278cac95f640dbaf28))
8
+ * await group modification before calculating price ([8ce27c5](https://github.com/roomle-dev/roomle-ui/commit/8ce27c5e070cb75a7c1e112ebf47ffdee50f301e))
9
+ * core api - external configuration module id map ([039de3f](https://github.com/roomle-dev/roomle-ui/commit/039de3f6ee9aaddca28f3a5ca57214f3f86cd7ba))
10
+ * core api - object component ([bc8adfe](https://github.com/roomle-dev/roomle-ui/commit/bc8adfe0ccb6c926a083613ccc862846f7c9dcbc))
11
+ * core api - return object when child mode is changed ([0001b31](https://github.com/roomle-dev/roomle-ui/commit/0001b31bafcb4f9085e4faf7aa1090a79dd382e1))
12
+ * correct arrangement when swapping root modules ([6da5ed6](https://github.com/roomle-dev/roomle-ui/commit/6da5ed6c26d9524718f950ea9180b21564f7e5fa))
13
+ * first implementation of exporters ([e1b4538](https://github.com/roomle-dev/roomle-ui/commit/e1b4538e979d03aa9966737f0b71e6b949347748))
14
+ * glue layer - handle multiple libraries ([b91ff11](https://github.com/roomle-dev/roomle-ui/commit/b91ff11c14aa94765f6e216ccbe116acb2995bc7))
15
+ * glue-layer group modification callback ([3437dfa](https://github.com/roomle-dev/roomle-ui/commit/3437dfa2474bfce6a06e450c8476ae4401919dda))
16
+ * HI api - update attribute ([51d1a91](https://github.com/roomle-dev/roomle-ui/commit/51d1a91756fef48f9f1e31f4abf1c516bd876d84))
17
+ * HI api - update attribute ([2106e97](https://github.com/roomle-dev/roomle-ui/commit/2106e9789547dab91d330715c0d1c2c2d66d5d41))
18
+ * HI callback when group is laded from plan ([0e6392d](https://github.com/roomle-dev/roomle-ui/commit/0e6392da9989a05e744cee4afa7f981ced78a047))
19
+ * HI group callbacks ([9e500af](https://github.com/roomle-dev/roomle-ui/commit/9e500afef9bc67db9be957f75a7bf0483f9161c5))
20
+ * invoke HI group callbacks ([a72ddd5](https://github.com/roomle-dev/roomle-ui/commit/a72ddd5bec712b6b638df404914f7d78203fa1d7))
21
+ * keep selection when swapping root modules ([a3cb518](https://github.com/roomle-dev/roomle-ui/commit/a3cb518466d67296f8ed73cdd3d22ada32d7f766))
22
+ * make hi group callbacks optional ([589310e](https://github.com/roomle-dev/roomle-ui/commit/589310eb863fe9e6ecbe34443d276995e1e03afd))
23
+ * Merge product in RD scene UI v2 (Double click to un-merge component and click to select the entire configuration) ([831e298](https://github.com/roomle-dev/roomle-ui/commit/831e298b8ebc8255ee92e3339c1c5b921af0cdd7))
24
+ * onExternalObjectSwapRootModule request ([baafa95](https://github.com/roomle-dev/roomle-ui/commit/baafa95a89203427970b10a3ad89f3773161bd92))
25
+ * show "swap product" button in hi example ([99c7820](https://github.com/roomle-dev/roomle-ui/commit/99c782006a191462b44a3d52a29aaea9d719a825))
26
+ * show "undo" and "redo" buttons in hi example ([52dcda9](https://github.com/roomle-dev/roomle-ui/commit/52dcda958c82b0fc07cfa7c3342dc4f93f11c974))
27
+ * start new interaction when parameter is changed ([176d0ac](https://github.com/roomle-dev/roomle-ui/commit/176d0ac9c2b439a08135d20a2c895ff25b499830))
28
+ * swap root module in group ([45c3fea](https://github.com/roomle-dev/roomle-ui/commit/45c3fead5224417e22bc01f535d3da07b31c0596))
29
+ * **core:** upgrade to version 2.61.0-alpha.3 ([ecb1cf3](https://github.com/roomle-dev/roomle-ui/commit/ecb1cf3e8204fd74dbf11e9796978f08b61d5048))
30
+ * **core:** upgrade to version 2.61.0-alpha.4 ([999ef76](https://github.com/roomle-dev/roomle-ui/commit/999ef767b46fbe80cbeb49aaef6d41e2b60cb3ff))
31
+ * **core:** upgrade to version 2.61.0-alpha.6 ([101f9a8](https://github.com/roomle-dev/roomle-ui/commit/101f9a877603ef7b431145327a9d331ac8e11032))
32
+ * **core:** upgrade to version 2.61.0-alpha.7 ([c9419cc](https://github.com/roomle-dev/roomle-ui/commit/c9419ccf703f74e87ba2184113c82ba175dae2db))
33
+
34
+
35
+ ### Bug Fixes
36
+
37
+ * addons trigger should close open gridviews ([3fc7ba2](https://github.com/roomle-dev/roomle-ui/commit/3fc7ba2187a72f879eb468cbd0aca250fba09f48))
38
+ * close open gridViews when selection changes in configurator ([f23c8c6](https://github.com/roomle-dev/roomle-ui/commit/f23c8c6e2f9627038d2c937db58b7edd3be4eacc))
39
+ * configurator idb check not working ([702eb3b](https://github.com/roomle-dev/roomle-ui/commit/702eb3b0497d767853da672c9d2c5a5b078be2a6))
40
+ * discard textures with identical mapping and keep only the first occurrence ([5f34165](https://github.com/roomle-dev/roomle-ui/commit/5f34165da80cb2d93ce095eafe4ab30ef6ff5982))
41
+ * incorrect import ([674831f](https://github.com/roomle-dev/roomle-ui/commit/674831fd4961a69f001bf2a81a82cfd3c22da9b0))
42
+ * new icon versions ([e1381a9](https://github.com/roomle-dev/roomle-ui/commit/e1381a922e4c6e6bad8bac01026245cd3165b0d1))
43
+ * remove double click handler and make merge and un-merge based on toggle the click event ([ffc7e3a](https://github.com/roomle-dev/roomle-ui/commit/ffc7e3a6aa48f8541ccaf4e0c634f78cb9cc1e17))
44
+ * request the planning situation when a group is loaded from the plan ([f535c65](https://github.com/roomle-dev/roomle-ui/commit/f535c650dec30bcf0ab07a6a8f508382e3150072))
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@roomle/embedding-lib",
3
- "version": "5.29.0-alpha.1",
3
+ "version": "5.29.0-alpha.2",
4
4
  "description": "This is a small library which can be used to communicate with the Roomle Configurator",
5
5
  "type": "module",
6
6
  "main": "./roomle-embedding-lib.umd.js",
@@ -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?: string): Promise<void>;
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: string): void;
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?: string): void;
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?: string): void;
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?: string): void;
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: Light);
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 { RoomleEventedMesh } from '../../../common-core/src/utils/threejs-utils';
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): Promise<void>;
15
- deleteRootModule(rootModuleId: string): Promise<void>;
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): Promise<void>;
19
- deleteGroup(groupId: string, wasMerged?: boolean): Promise<void>;
20
- deleteRootModule(rootModuleId: string): Promise<void>;
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: RoomDesignerRequests;
56
- _libraryData: LibraryData;
57
- _posDataJsonMap: Map<string, any>;
58
- _groupMap: Map<string, GroupItem>;
59
- _nextPosDataId: number;
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 | undefined, moduleId: string, attributeId: string, attributeValue: string | boolean): Promise<void>;
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 { Emulator } from './emulator';
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
- getEmulator(): Emulator;
41
+ getGlueLogic(): GlueLogic;
42
42
  sendToOM(withPrice?: boolean): Promise<void>;
43
43
  fetchPrice(planId?: string): Promise<any>;
44
44
  }
@@ -156,6 +156,7 @@ export interface PosContour {
156
156
  segments: PosContourSegment[];
157
157
  }
158
158
  export interface PosGroup {
159
+ libraryId: string;
159
160
  /**
160
161
  * The unique id of the Group
161
162
  */
@@ -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 rootModuleId The ID of the root module.
130
- * @param subModuleId The ID of the sub module or "null".
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
- loadExternalObjectGroup(groupJson: object | string | string[], findFreeSpaceInPlan: boolean, verifyArrangement?: boolean, mergedGroups?: string[]): Promise<void>;
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): Promise<void>;
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): Promise<void>;
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, default as Main } from '../../common-core/src/main';
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, KernelAttic, PlanObject, WallSide } from '../../typings/planner';
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): void;
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): void;
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, verifyArrangement?: boolean, mergedGroups?: string[]): Promise<void>;
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): Promise<void>;
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): Promise<void>;
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(): Array<Map<number, RoomleLightSource>>;
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
- setLightsOnOffByIds(ids: number[], state: boolean): void;
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): any;
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,10 @@ 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;
110
113
  private _doubleClickElement;
111
114
  private _hoverOn;
112
115
  private _hoverOnMultiSelect;
@@ -137,8 +140,8 @@ export default class PlannerSceneEventHandler extends SceneEventHandler<SceneEve
137
140
  enableAdvancedDocking(): void;
138
141
  disableAdvancedDocking(): void;
139
142
  showsChildrenOfPlanObject(object: KernelObject): boolean;
140
- enableShowChildrenOfPlanObject(object: KernelObject): void;
141
- disableShowChildrenOfPlanObject(object: KernelObject): void;
143
+ enableShowChildrenOfPlanObject(object: KernelObject): KernelObject | null;
144
+ disableShowChildrenOfPlanObject(object: KernelObject): KernelObject | null;
142
145
  private _checkRaycasterSnapping;
143
146
  enableWallDrawing(): Group;
144
147
  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
- get scenePlanElementLightSources(): Map<number, RoomleLightSource>[];
58
+ getScenePlanElementLightSources(): RoomleLightSource[];
59
59
  setAllLightsOnOff(state: boolean): void;
60
- setLightsOnOffByIds(ids: number[], state: boolean): void;
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(_exportObjects?: Object3D[], _id?: string): void;
98
+ exportGLB(): Promise<void>;
99
+ exportUSDZ(): Promise<void>;
98
100
  importGLB(url: string): void;
99
101
  clearScene(): void;
100
102
  private _addSky;
@@ -160,8 +162,8 @@ export default class PlannerSceneManager extends ConfiguratorSceneManager implem
160
162
  enableAdvancedDocking(): void;
161
163
  disableAdvancedDocking(): void;
162
164
  showsChildrenOfPlanObject(planElementViewModel: PlanElementViewModel): boolean;
163
- enableShowChildrenOfPlanObject(planElementViewModel: PlanElementViewModel): void;
164
- disableShowChildrenOfPlanObject(planElementViewModel: PlanElementViewModel): void;
165
+ enableShowChildrenOfPlanObject(planElementViewModel: PlanElementViewModel): import('../../../typings/planner').KernelObject;
166
+ disableShowChildrenOfPlanObject(planElementViewModel: PlanElementViewModel): import('../../../typings/planner').KernelObject;
165
167
  dragIn(dragEvent: DragEvent): void;
166
168
  getPlannerSceneEventHandler(): PlannerSceneEventHandler;
167
169
  disablePlannerEvents(): void;
@@ -222,7 +224,8 @@ export default class PlannerSceneManager extends ConfiguratorSceneManager implem
222
224
  private _planObjectSelectionChanged;
223
225
  highlightExternalObject(planObjectComponent: KernelPlanObjectComponent): void;
224
226
  private _selectExternalObjectModule;
225
- getObjectComponent(id: number): KernelPlanObjectComponent;
227
+ getObjectComponent(id: number, typeOfId: Enumify<typeof CORE_TYPE_OF_CORE_ID>): KernelPlanObjectComponent;
228
+ getExternalObjectComponent(groupId: string, moduleId: string): KernelPlanObjectComponent;
226
229
  getCameraParameters3d(): NonNullable<CameraParameter>;
227
230
  private _createCeilingLightGroup;
228
231
  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): void;
257
- setShowChildrenOfExternalObject(objectId: string, mode: ChildEntityMode, switchChildModeOffForAllOtherObjects: boolean): void;
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, aComponentOrConfigurationId: number): KernelPlanObjectComponent;
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]: `PLANNER_CORE_STATE_${string}` | `PLANNER_UI_STATE_${string}` | `UI_STATE_${string}` | `SIDEBAR_${string}` | `CORE_DATA_${string}` | `CORE_STATE_${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]: `PLANNER_CORE_STATE_${string}` | `PLANNER_UI_STATE_${string}` | `UI_STATE_${string}` | `CORE_DATA_${string}` | `CORE_STATE_${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(): any;
31
+ showBack(): boolean;
32
32
  preparePartList(buttonAction: number): Promise<void>;
33
33
  private _toggleAction;
34
34
  switchProduct(): Promise<void>;
@@ -1,34 +1,6 @@
1
- import { BUTTON_ACTIONS } from '../../store/ui-state';
2
-
3
- declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
4
- onShowAddons: FunctionConstructor;
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-state';
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?: string): Promise<number>;
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?: string): Promise<number>;
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-state';
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;