@roomle/web-sdk 5.2.0-alpha.1 → 5.2.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 (57) hide show
  1. package/lib/ConfiguratorKernel.wasm +0 -0
  2. package/lib/RoomleCore.wasm +0 -0
  3. package/lib/RoomleToolsCore.wasm +0 -0
  4. package/lib/{api-B4TrOz4F.mjs → api-DgmvQKJM.mjs} +5 -2
  5. package/lib/{api-B4TrOz4F.mjs.map → api-DgmvQKJM.mjs.map} +1 -1
  6. package/lib/asset-loader.worker-CE4O0JU-.mjs.map +1 -1
  7. package/lib/budgeteer.sw-yR2xApHT.mjs.map +1 -1
  8. package/lib/{component-raycast-helper-CaY2UMli.mjs → component-raycast-helper-BKwofixp.mjs} +2 -2
  9. package/lib/{component-raycast-helper-CaY2UMli.mjs.map → component-raycast-helper-BKwofixp.mjs.map} +1 -1
  10. package/lib/{configurator-DrF49jhK.mjs → configurator-B8BvHTky.mjs} +4 -4
  11. package/lib/{configurator-DrF49jhK.mjs.map → configurator-B8BvHTky.mjs.map} +1 -1
  12. package/lib/configurator-CaIbtRET.mjs +2 -0
  13. package/lib/glb-viewer-CZvZ1erY.mjs +2 -0
  14. package/lib/{glb-viewer-DfTibwy-.mjs → glb-viewer-DamedzN_.mjs} +4 -4
  15. package/lib/{glb-viewer-DfTibwy-.mjs.map → glb-viewer-DamedzN_.mjs.map} +1 -1
  16. package/lib/{highlight-coordinator-DKMaPGPo.mjs → highlight-coordinator-DiTRPUXt.mjs} +3 -3
  17. package/lib/{highlight-coordinator-DKMaPGPo.mjs.map → highlight-coordinator-DiTRPUXt.mjs.map} +1 -1
  18. package/lib/{homag-intelligence-BpYU-Dit.mjs → homag-intelligence-Kd23hknu.mjs} +6 -3
  19. package/lib/homag-intelligence-Kd23hknu.mjs.map +1 -0
  20. package/lib/{material-viewer-D2SC_WGL.mjs → material-viewer-CArm5Sbd.mjs} +4 -4
  21. package/lib/{material-viewer-D2SC_WGL.mjs.map → material-viewer-CArm5Sbd.mjs.map} +1 -1
  22. package/lib/{packages-Dq64FLqO.mjs → packages-Cl6mO8eL.mjs} +5 -5
  23. package/lib/{packages-Dq64FLqO.mjs.map → packages-Cl6mO8eL.mjs.map} +1 -1
  24. package/lib/{planner-BflojXJm.mjs → planner-BvSAoyAE.mjs} +3 -3
  25. package/lib/{planner-BflojXJm.mjs.map → planner-BvSAoyAE.mjs.map} +1 -1
  26. package/lib/planner-CGH5CX5Q.mjs +2 -0
  27. package/lib/roomle-headless.d.ts +128 -7
  28. package/lib/roomle-headless.js +9 -9
  29. package/lib/roomle-renderer-nCUrLU_S.mjs.map +1 -1
  30. package/lib/{roomle-sdk-AuHoyXQw.mjs → roomle-sdk-CyuyR7se.mjs} +3457 -3125
  31. package/lib/roomle-sdk-CyuyR7se.mjs.map +1 -0
  32. package/lib/roomle-sdk.d.ts +128 -7
  33. package/lib/roomle-sdk.js +7 -7
  34. package/lib/{roomle-webgpu-renderer-C26OAfkn.mjs → roomle-webgpu-renderer-__fKL0NL.mjs} +7 -7
  35. package/lib/roomle-webgpu-renderer-__fKL0NL.mjs.map +1 -0
  36. package/lib/{scene-renderer-DGSgD6mp.mjs → scene-renderer-NOgMV9KH.mjs} +2 -2
  37. package/lib/{scene-renderer-DGSgD6mp.mjs.map → scene-renderer-NOgMV9KH.mjs.map} +1 -1
  38. package/lib/{script-loader-ChoIO9yO.mjs → script-loader-i9PxCq7s.mjs} +2 -2
  39. package/lib/{script-loader-ChoIO9yO.mjs.map → script-loader-i9PxCq7s.mjs.map} +1 -1
  40. package/lib/static/roomle-core-hsc/node_modules/roomle-core-hsc/package.json +1 -1
  41. package/lib/static/roomle-core-hsc/node_modules/roomle-core-hsc/wasm_modern/ConfiguratorKernel.wasm +0 -0
  42. package/lib/static/roomle-core-hsc/node_modules/roomle-core-hsc/wasm_modern/RoomleCore.wasm +0 -0
  43. package/lib/static/roomle-core-hsc/node_modules/roomle-core-hsc/wasm_modern/RoomleToolsCore.wasm +0 -0
  44. package/lib/{stats-helper-C74q5Bje.mjs → stats-helper-BKeEnvFU.mjs} +2 -2
  45. package/lib/{stats-helper-C74q5Bje.mjs.map → stats-helper-BKeEnvFU.mjs.map} +1 -1
  46. package/lib/{threejs-utils-DHTRY4yW.mjs → threejs-utils-CX2ILaES.mjs} +66 -62
  47. package/lib/threejs-utils-CX2ILaES.mjs.map +1 -0
  48. package/lib/{tools-core-CVyQSfI6.mjs → tools-core-DqGfLhDO.mjs} +3 -3
  49. package/lib/{tools-core-CVyQSfI6.mjs.map → tools-core-DqGfLhDO.mjs.map} +1 -1
  50. package/package.json +2 -2
  51. package/lib/configurator-CKf-giUj.mjs +0 -2
  52. package/lib/glb-viewer-BOTT1GcI.mjs +0 -2
  53. package/lib/homag-intelligence-BpYU-Dit.mjs.map +0 -1
  54. package/lib/planner-C8gpY4ZL.mjs +0 -2
  55. package/lib/roomle-sdk-AuHoyXQw.mjs.map +0 -1
  56. package/lib/roomle-webgpu-renderer-C26OAfkn.mjs.map +0 -1
  57. package/lib/threejs-utils-DHTRY4yW.mjs.map +0 -1
@@ -219,6 +219,19 @@ export declare interface AssetType_2 {
219
219
 
220
220
  export declare type AssetUrl = string;
221
221
 
222
+ export declare class AsyncGuard<T> {
223
+ info: any;
224
+ private _promise;
225
+ private _resolve;
226
+ private _reject;
227
+ constructor(info?: any);
228
+ private _init;
229
+ resolve(value?: any): void;
230
+ reject(e: Error): void;
231
+ wait(): Promise<T>;
232
+ reset(): void;
233
+ }
234
+
222
235
  export declare interface Attic extends PlanElement_2 {
223
236
  new (): Attic;
224
237
  getFrom(): Node_3;
@@ -1712,7 +1725,6 @@ export declare class ConfiguratorSceneManager extends SceneManager implements Co
1712
1725
  private _uiIntersectionHelper;
1713
1726
  private _sceneEventHandler;
1714
1727
  private _isComponentDimensionsVisible;
1715
- private _sceneSetupReady;
1716
1728
  constructor(creator: string, offset: CanvasOffset, mode: Enumify<typeof CAMERA_TYPE>);
1717
1729
  /**
1718
1730
  * Single point for deciding whether to push HTML label positions to the UI.
@@ -2516,6 +2528,12 @@ export declare const CORE_OBJECT_TYPE_CATEGORY: {
2516
2528
  readonly EXTERNAL_CONSTRUCTION: 5;
2517
2529
  };
2518
2530
 
2531
+ export declare const CORE_OBSTACLE_TYPE: {
2532
+ readonly GLOBAL: 0;
2533
+ readonly OBJECT_WITH_ID: 1;
2534
+ readonly CONSTRUCTION_WITH_ID: 2;
2535
+ };
2536
+
2519
2537
  export declare const CORE_OPENING_DIRECTION: {
2520
2538
  readonly LEFT_CLOCKWISE: 0;
2521
2539
  readonly LEFT_COUNTERCLOCKWISE: 1;
@@ -3561,8 +3579,10 @@ export declare interface ExternalObjectAPI {
3561
3579
  * the compacted master data per library (root modules and the customer-facing attributes),
3562
3580
  * the room information of all rooms (contours in 3D, pos: [x, level, -y], with a derived
3563
3581
  * walls array per room), the articles that can be used (compact catalog with dimensions,
3564
- * docking vectors and sub-modules), and all groups currently loaded in the plan (as
3565
- * resubmittable article picks with footprints and free docking vectors).
3582
+ * docking vectors and sub-modules), all groups currently loaded in the plan (as
3583
+ * resubmittable article picks with footprints and free docking vectors), and what stands in the
3584
+ * room (the doors, windows and other plan objects as floor outlines with their height range,
3585
+ * and the HI groups as the outlines of their root modules).
3566
3586
  * The result is designed to be passed to an AI agent as it is, without further preparation,
3567
3587
  * with all geometry in one coordinate system: 3D, right-handed, Y up.
3568
3588
  * @param include The sections to include. All sections are returned when omitted or empty.
@@ -3816,6 +3836,25 @@ export declare interface ExternalObjectValidContainerModules {
3816
3836
  parentModuleId: string;
3817
3837
  }
3818
3838
 
3839
+ export declare type ExternalPlanObstacleKind = 'group' | 'door' | 'window' | 'object';
3840
+
3841
+ export declare interface ExternalPlanObstacles {
3842
+ points: Array<{
3843
+ x: number;
3844
+ y: number;
3845
+ }>;
3846
+ obstacles: ExternalPlanObstacleSegment[];
3847
+ kinds: Record<number, ExternalPlanObstacleKind>;
3848
+ }
3849
+
3850
+ export declare interface ExternalPlanObstacleSegment {
3851
+ associatedObjectIds: number[];
3852
+ p0: number;
3853
+ p1: number;
3854
+ bottom: number;
3855
+ top: number;
3856
+ }
3857
+
3819
3858
  export declare class ExternalReference {
3820
3859
  getJsObject(): any;
3821
3860
  setJsObject(jsObject: any): void;
@@ -3879,6 +3918,7 @@ export declare interface FeatureFlags {
3879
3918
  /* Excluded from this release type: advancedHighlighting */
3880
3919
  /* Excluded from this release type: fence */
3881
3920
  /* Excluded from this release type: awaitConfigurationSavesBeforeRequestPlan */
3921
+ /* Excluded from this release type: disableRenderStandby */
3882
3922
  }
3883
3923
 
3884
3924
  export declare class FeatureFlagsImplementation implements FeatureFlags {
@@ -3894,6 +3934,7 @@ export declare class FeatureFlagsImplementation implements FeatureFlags {
3894
3934
  advancedHighlighting: boolean;
3895
3935
  fence: boolean;
3896
3936
  awaitConfigurationSavesBeforeRequestPlan: boolean;
3937
+ disableRenderStandby: boolean;
3897
3938
  }
3898
3939
 
3899
3940
  export declare interface FetchOptions {
@@ -4578,6 +4619,9 @@ export declare const HI_GROUP_OPERATION: {
4578
4619
  readonly MERGE_ARTICLE_INTO_GROUP: "merge-article-into-group";
4579
4620
  readonly EXCHANGE_ROOT_MODULE: "exchange-root-module";
4580
4621
  readonly MERGE_GROUPS: "merge-groups";
4622
+ readonly INSERT_ARTICLE_INTO_GROUP: "insert-article-into-group";
4623
+ readonly REMOVE_ARTICLE_FROM_GROUP: "remove-article-from-group";
4624
+ readonly SWAP_ROOT_MODULES: "swap-root-modules";
4581
4625
  };
4582
4626
 
4583
4627
  export declare const HI_LOAD_OBJECT_REASON: {
@@ -4596,6 +4640,7 @@ export declare const HI_LOAD_OBJECT_REASON: {
4596
4640
  readonly MERGE_WITH_ON_ACTION: "merge_with_on_action";
4597
4641
  readonly PLAN_CHANGED: "plan_changed";
4598
4642
  readonly POSITION_CHANGED: "position_changed";
4643
+ readonly REARRANGE: "rearrange";
4599
4644
  readonly SPLIT: "split";
4600
4645
  readonly SWAP_MODULE: "swap_module";
4601
4646
  readonly SWAP_GROUP: "swap_group";
@@ -4766,15 +4811,30 @@ export declare interface HiGroupOperationPayloads {
4766
4811
  groupId: string;
4767
4812
  dockTo: HiDockTarget;
4768
4813
  };
4769
- 'exchange-root-module': {
4814
+ /** `attributes` are overrides of the new root module, e.g. another width. */
4815
+ 'exchange-root-module': HiArticlePick & {
4770
4816
  groupId: string;
4771
4817
  rootModuleId: string;
4772
- articleId: string;
4773
4818
  };
4774
4819
  'merge-groups': {
4775
4820
  targetGroupId: string;
4776
4821
  groupIds: string[];
4777
4822
  };
4823
+ /** `between` names two root modules docked side by side, in either order. */
4824
+ 'insert-article-into-group': HiArticlePick & {
4825
+ groupId: string;
4826
+ between: [string, string];
4827
+ };
4828
+ /** Removes a root module and closes the gap; `delete-root-module` leaves it. */
4829
+ 'remove-article-from-group': {
4830
+ groupId: string;
4831
+ rootModuleId: string;
4832
+ };
4833
+ /** Two root modules of the group change places, neighbours or not. */
4834
+ 'swap-root-modules': {
4835
+ groupId: string;
4836
+ rootModuleIds: [string, string];
4837
+ };
4778
4838
  }
4779
4839
 
4780
4840
  export declare interface HiGroupOperationResult {
@@ -4782,6 +4842,8 @@ export declare interface HiGroupOperationResult {
4782
4842
  groups: HiPlanGroup[];
4783
4843
  removedGroupIds: string[];
4784
4844
  changedModuleIds?: string[];
4845
+ corrections?: string[];
4846
+ gapClosed?: boolean;
4785
4847
  }
4786
4848
 
4787
4849
  export declare type HiLoadObjectReason = (typeof HI_LOAD_OBJECT_REASON)[keyof typeof HI_LOAD_OBJECT_REASON];
@@ -4884,6 +4946,7 @@ export declare interface HiPlanContext {
4884
4946
  rooms?: HiPlanRoomInformation;
4885
4947
  articles?: HiPlanArticle[];
4886
4948
  groups?: HiPlanGroup[];
4949
+ obstacles?: HiPlanObstacles;
4887
4950
  }
4888
4951
 
4889
4952
  export declare interface HiPlanContextData {
@@ -4893,7 +4956,7 @@ export declare interface HiPlanContextData {
4893
4956
  }>;
4894
4957
  }
4895
4958
 
4896
- export declare type HiPlanContextSection = 'masterData' | 'rooms' | 'articles' | 'groups';
4959
+ export declare type HiPlanContextSection = 'masterData' | 'rooms' | 'articles' | 'groups' | 'obstacles';
4897
4960
 
4898
4961
  export declare interface HiPlanContour {
4899
4962
  level: number;
@@ -4931,6 +4994,11 @@ export declare interface HiPlanGroup {
4931
4994
  roots: HiPlanRoot[];
4932
4995
  }
4933
4996
 
4997
+ export declare interface HiPlanGroupObstacles {
4998
+ id: string;
4999
+ roots: HiPlanRootOutline[];
5000
+ }
5001
+
4934
5002
  export declare interface HiPlanGroupPosition {
4935
5003
  pos?: number[];
4936
5004
  rotationY?: number;
@@ -4951,6 +5019,18 @@ export declare interface HiPlanMasterDataModule {
4951
5019
  attributes: string[];
4952
5020
  }
4953
5021
 
5022
+ export declare interface HiPlanObstacle {
5023
+ kind: Exclude<ExternalPlanObstacleKind, 'group'>;
5024
+ outline: HiPlanPosition3[];
5025
+ bottomMm: number;
5026
+ topMm: number;
5027
+ }
5028
+
5029
+ export declare interface HiPlanObstacles {
5030
+ objects: HiPlanObstacle[];
5031
+ groups: HiPlanGroupObstacles[];
5032
+ }
5033
+
4954
5034
  /**
4955
5035
  * The plan context is the data an AI agent needs to understand and author a
4956
5036
  * planning session. `getPlanContext` (glue logic) assembles it and every
@@ -4992,6 +5072,13 @@ export declare interface HiPlanRootAttribute {
4992
5072
  value?: number | string | boolean;
4993
5073
  }
4994
5074
 
5075
+ export declare interface HiPlanRootOutline {
5076
+ id: string;
5077
+ outline: HiPlanPosition3[];
5078
+ bottomMm: number;
5079
+ topMm: number;
5080
+ }
5081
+
4995
5082
  export declare interface HiPlanWall {
4996
5083
  index: number;
4997
5084
  side: HiPlanWallSide;
@@ -6742,6 +6829,29 @@ export declare interface ObjectTypeCategory {
6742
6829
 
6743
6830
  export declare type ObjectWallDimension = DimensionDefinition<Vector3_2, Vector3_2>;
6744
6831
 
6832
+ export declare interface Obstacle2d {
6833
+ associatedObjectIds: EmsArray<number>;
6834
+ bottom: number;
6835
+ length: number;
6836
+ normalizedDirection: KernelVector2f;
6837
+ p0: number;
6838
+ p1: number;
6839
+ top: number;
6840
+ type: ObstacleType;
6841
+ }
6842
+
6843
+ export declare class Obstacle2dArray extends EmsArray<Obstacle2d> {
6844
+ }
6845
+
6846
+ export declare interface ObstacleMap2d {
6847
+ obstacles: Obstacle2dArray;
6848
+ points: Vector2Array;
6849
+ }
6850
+
6851
+ export declare interface ObstacleType {
6852
+ value: Enumify<typeof CORE_OBSTACLE_TYPE>;
6853
+ }
6854
+
6745
6855
  export declare interface OffsetCamera {
6746
6856
  offset: CanvasOffset;
6747
6857
  resetOffset(): void;
@@ -7368,6 +7478,7 @@ export declare interface PlanModelViewHelper_2 {
7368
7478
  requestMesh3d(element: PlanElement_3): void;
7369
7479
  getExternalObjectGroups(plan: Plan_3): KernelObjectConfigurationArray;
7370
7480
  getExternalRoomInformation(plan: Plan_3, mode: PlanRoomGeometryMode_2): RoomInformation;
7481
+ getObstacleMap(plan: Plan_3): ObstacleMap2d;
7371
7482
  getGroupedObjects(anObject: PlanObject): KernelPlanObject[];
7372
7483
  calculateLightSourceDistribution(plan: Plan_3, lightSourceConfiguration: LightSourceConfiguration): RoomLightSourceDistributionArray;
7373
7484
  getObjectSnapInformation(anObject: PlanObject, debugHelpLines: boolean): ObjectSnapInformation;
@@ -9789,6 +9900,7 @@ export declare class RoomDesignerApi implements RoomDesignerRequests {
9789
9900
  mergeGroups(groupIds: string[]): Promise<void>;
9790
9901
  getPosDataOfAllGroups(): Promise<PosGroup[]>;
9791
9902
  getRoomInformation(mode?: PlanRoomGeometryMode): Promise<ExternalRoomInformation>;
9903
+ getPlanObstacles(): Promise<ExternalPlanObstacles>;
9792
9904
  saveExternalObjectSnapshot(): Promise<ExternalObjectSnapshotSaveResult | null>;
9793
9905
  saveCurrentPlanSnapshot(): Promise<RapiPlanSnapshotGetData>;
9794
9906
  renderPosDataImage(posDataJson: object): Promise<void>;
@@ -9807,6 +9919,7 @@ export declare interface RoomDesignerRequests {
9807
9919
  mergeGroups(groupIds: string[]): Promise<void>;
9808
9920
  getPosDataOfAllGroups(): Promise<PosGroup[]>;
9809
9921
  getRoomInformation(mode?: PlanRoomGeometryMode): Promise<ExternalRoomInformation>;
9922
+ getPlanObstacles(): Promise<ExternalPlanObstacles>;
9810
9923
  saveExternalObjectSnapshot(): Promise<ExternalObjectSnapshotSaveResult | null>;
9811
9924
  }
9812
9925
 
@@ -10856,8 +10969,9 @@ export declare class RoomlePlanner<P extends readonly PluginName[] = readonly []
10856
10969
  private _globalInitData;
10857
10970
  private _globalCallback;
10858
10971
  private _unitFormatter;
10859
- private _planInteractionManager;
10860
10972
  private _elevationPlan2dGenerator;
10973
+ private _skyStateTracker;
10974
+ private _planInteractionManager;
10861
10975
  private _sceneManager;
10862
10976
  private _plan;
10863
10977
  private _preloadPlanId;
@@ -11292,6 +11406,8 @@ export declare class RoomlePlanner<P extends readonly PluginName[] = readonly []
11292
11406
  getExternalObjectPlanContext(include?: HiPlanContextSection[]): Promise<HiPlanContext>;
11293
11407
  externalObjectGroupOperation<C extends HiGroupOperation>(command: C, payload: HiGroupOperationPayloads[C]): Promise<HiGroupOperationResult>;
11294
11408
  getExternalRoomInformation(mode?: PlanRoomGeometryMode): Promise<ExternalRoomInformation>;
11409
+ _getExternalPlanObstacles(): Promise<ExternalPlanObstacles>;
11410
+ private _planObstacleKind;
11295
11411
  /**
11296
11412
  * Highlights a product in the planner.
11297
11413
  * @param planElementId The ID of the plan element to highlight.
@@ -11911,6 +12027,7 @@ export declare abstract class SceneManager implements Context, LifeCycleCallback
11911
12027
  protected _stopRendering: boolean;
11912
12028
  protected _roomleRenderer: GenericRoomleRenderer | null;
11913
12029
  private _roomleRendererReady;
12030
+ protected _sceneSetupReady: AsyncGuard<void>;
11914
12031
  private _isDebugGUIInitialized;
11915
12032
  private _forceRender;
11916
12033
  private _lastChange;
@@ -12141,6 +12258,7 @@ export declare class SkyStateTracker extends EventDispatcher<SkyFeatureEventMap>
12141
12258
  private _isCurrentlyActive;
12142
12259
  private _initData;
12143
12260
  constructor(creator: string);
12261
+ get isSkyEnabled(): boolean;
12144
12262
  get isCurrentlyActive(): boolean;
12145
12263
  notifyEnteredPlanner(): void;
12146
12264
  notifyEnteredConfigurator(): void;
@@ -12729,6 +12847,9 @@ export declare interface VariantsList {
12729
12847
  parts: KernelPart[];
12730
12848
  }
12731
12849
 
12850
+ export declare class Vector2Array extends EmsArray<KernelVector2f> {
12851
+ }
12852
+
12732
12853
  export declare class Vector2fArray extends EmsArray<KernelVector2f> {
12733
12854
  }
12734
12855
 
@@ -1,16 +1,16 @@
1
- import { a as e, i as t, n, r, t as i } from "./packages-Dq64FLqO.mjs";
1
+ import { a as e, i as t, n, r, t as i } from "./packages-Cl6mO8eL.mjs";
2
2
  import { i as a, t as o } from "./kernel-BWfRHWkW.mjs";
3
- import { Et as s, St as c } from "./threejs-utils-DHTRY4yW.mjs";
3
+ import { Et as s, St as c } from "./threejs-utils-CX2ILaES.mjs";
4
4
  import { Ti as l, m as u, nt as d } from "./three.core-BTUCraWz.mjs";
5
5
  import { i as f } from "./decorate-CjaqqbUP.mjs";
6
6
  import { D as ee, H as p, g as m } from "./common-utils-CNGLvAo_.mjs";
7
- import { A as te, F as ne, G as re, H as ie, J as ae, K as oe, M as se, N as ce, P as le, S as h, V as ue, Y as de, a as fe, b as pe, ct as g, dt as me, ft as he, ht as ge, i as _e, j as ve, k as ye, l as _, lt as v, m as y, o as b, ot as x, q as S, r as C, s as w, st as T, t as E, u as D, ut as O, x as k, y as A, z as j } from "./roomle-sdk-AuHoyXQw.mjs";
7
+ import { A as te, F as ne, G as re, H as ie, J as ae, K as oe, M as se, N as ce, P as le, S as h, V as ue, Y as de, a as fe, b as pe, ct as g, dt as me, ft as he, ht as ge, i as _e, j as ve, k as ye, l as _, lt as v, m as y, o as b, ot as x, q as S, r as C, s as w, st as T, t as E, u as D, ut as O, x as k, y as A, z as j } from "./roomle-sdk-CyuyR7se.mjs";
8
8
  import { n as M } from "./roomle-renderer-nCUrLU_S.mjs";
9
- import { n as N } from "./script-loader-ChoIO9yO.mjs";
10
- import { t as P } from "./configurator-DrF49jhK.mjs";
11
- import { t as be } from "./planner-BflojXJm.mjs";
12
- import { n as xe, t as Se } from "./glb-viewer-DfTibwy-.mjs";
13
- import { t as Ce } from "./api-B4TrOz4F.mjs";
9
+ import { n as N } from "./script-loader-i9PxCq7s.mjs";
10
+ import { t as P } from "./configurator-B8BvHTky.mjs";
11
+ import { t as be } from "./planner-BvSAoyAE.mjs";
12
+ import { n as xe, t as Se } from "./glb-viewer-DamedzN_.mjs";
13
+ import { t as Ce } from "./api-DgmvQKJM.mjs";
14
14
  import { t as we } from "./roomle-headless-setup-DbO_rLjK.mjs";
15
15
  import { createRequire as Te } from "module";
16
16
  //#region packages/headless-core/src/headless-tween-stub.ts
@@ -370,7 +370,7 @@ var Le = (e) => {
370
370
  }
371
371
  async _createRoomleRenderer(e) {
372
372
  if (!e.isWebGPURenderer) return super._createRoomleRenderer(e);
373
- let { RoomleWebGPURenderer: t } = await import("./roomle-webgpu-renderer-C26OAfkn.mjs");
373
+ let { RoomleWebGPURenderer: t } = await import("./roomle-webgpu-renderer-__fKL0NL.mjs");
374
374
  return new t(this._creator_, e, !0, void 0, !1);
375
375
  }
376
376
  static hasExplicitCameraPlacement(e) {
@@ -1 +1 @@
1
- {"version":3,"file":"roomle-renderer-nCUrLU_S.mjs","names":[],"sources":["../../packages/common-core/src/utils/shims.ts","../../packages/common-core/src/utils/fps-counter.ts","../../packages/common-core/src/roomle-renderer.ts"],"sourcesContent":["import type { ROOMLE_COLORS } from './common-utils';\nimport type {\n HexColorNumber,\n HexColorString,\n RapiId,\n RapiServerUrlType,\n} from '../../../typings/rapi-types';\nimport type { CAMERA_TYPE } from '../cameracontrol/camera-type';\nimport type { Enumify } from '#/common/src/utils/types';\nimport type { ROOMLE_HIGHLIGHTNG } from './common-utils';\nimport type { DefaultEnvironmentSceneType } from '../webgl/renderer/environment-scene';\nimport type {\n CustomShadingParameters,\n SceneShadingType,\n} from '../webgl/renderer/shading-settings';\nimport type { Color } from 'three';\nimport type { HomagIntelligenceInitData } from '../../../homag-intelligence/src/hi-api-types';\n\nexport const enum WINDOW_EVENT {\n RESIZE = 'resize',\n KEY_DOWN = 'keydown',\n KEY_UP = 'keyup',\n VISIBILITY_CHANGE = 'visibilitychange',\n}\n\nexport const DRAW_PREVIEW_MODES = {\n DEFAULT: 'default',\n VECTOR: 'vector',\n} as const;\n\nexport const WEBGPU_TONE_MAPPINGS = {\n NONE: 'none',\n LINEAR: 'linear',\n REINHARD: 'reinhard',\n CINEON: 'cineon',\n ACES_FILMIC: 'acesFilmic',\n AGX: 'agx',\n NEUTRAL: 'neutral',\n} as const;\n\nexport type WebGpuToneMapping = Enumify<typeof WEBGPU_TONE_MAPPINGS>;\n\n/**\n * Init data parameters which are not context specific\n */\nexport interface GlobalInitDataDefinition {\n /**\n * @description locale to use for the\n * embedding instance\n */\n locale?: string;\n\n /**\n * @internal\n * @deprecated\n * @description Can be used for content testing\n */\n overrideTenant?: number;\n\n /**\n * @description Set country to use for the Roomle price service. If not used the customer IP address will be used to determine the location. usage: overrideCountry=de\n */\n overrideCountry?: string | null;\n\n /**\n * @internal\n * @description Set which RAPI (Roomle API) backend should be used options: live, test\n */\n overrideRapi?: RapiServerUrlType;\n\n /**\n * @description The id which should be used for this embedding instance. When this id is set all InitData parameter can be set and changed in Rubens Admin. This is the way we recommend to set init data params. Ask your Roomle contact for your configuratorId.\n */\n configuratorId?: string;\n\n /**\n * @description Set which RAPI (Roomle API) backend should be used usage: customApiUrl=https://www.roomle.com/api/v3\n */\n customApiUrl?: string;\n\n /**\n * @internal\n * @description Can be set to true if started as an end-to-end test. This will disable post-processing\n */\n e2e?: boolean;\n\n /**\n * @internal\n * @description If set to true, the Roomle Renderer is used for perspective and top images this should help the E2E tests of Joe to migrate from comparing Roomle Renderer images to Three.js Renderer images\n */\n e2eRoomleRendererForImages?: boolean;\n\n /**\n * @internal\n * @description When loading a plan, the external objects from the plan XML are discarded\n */\n discardExternalObjectsWhenLoadingPlan?: boolean;\n\n /**\n * @description If set to true, the plan will be locked and no changes can be made to walls, floors or construction elements.\n * @default false\n */\n lockPlan?: boolean;\n\n /**\n * @description If set to true, the plan is in read-only mode. Hides all editing UI and prevents interaction with plan elements.\n * Automatically sets edit=false and lockPlan=true and saveToIdb=false\n * @default false\n */\n readonly?: boolean;\n}\n\nexport interface WebGpuTopLightConfigDefinition {\n /**\n * @description Intensity (brightness) of the WebGPU top light.\n * @default 1\n */\n intensity?: number;\n\n /**\n * @description Intensity of the shadow cast by the top light.\n * 0 means no shadow, 1 means a fully opaque shadow.\n * @default 1\n */\n shadowIntensity?: number;\n\n /**\n * @description Softness (blur radius) of the top light's shadow edges.\n * Higher values produce softer shadows.\n * @default 1.1\n */\n shadowRadius?: number;\n}\n\nexport interface WebGpuGroundReflectionConfigDefinition {\n /**\n * @description Enables or disables the ground reflection entirely.\n * When disabled the floor still receives shadows but does not render a reflection,\n * which also avoids the extra reflection render pass.\n * @default true\n */\n enabled?: boolean;\n\n /**\n * @description Strength of the ground reflection.\n * 0 means no reflection, 1 means a full mirror-like reflection.\n * @default 0.1\n */\n intensity?: number;\n\n /**\n * @description Depth at which the reflection starts to fade out.\n * @default 0.05\n */\n startFadeout?: number;\n\n /**\n * @description Depth at which the reflection is fully faded out.\n * @default 0.15\n */\n endFadeout?: number;\n\n /**\n * @description How much the resolution of the scene is scaled by for the reflection resolution\n * If transmissive objects are not in use, this can be set to a lower value like 0.5 to improve performance.\n * @default 1\n */\n reflectionScale?: number;\n}\n\nexport interface WebGpuFogConfigDefinition {\n /**\n * @description If true, a fog is added to the scene in webGPU mode.\n * This is mainly so you cant see the outer edge of the\n * floor (which makes it blends smoothly into the background).\n * This fog exists in a cylindrical shape around the origin and the\n * farBlend and nearBlend parameters indirectly control the radius\n * at which the fog starts and ends.\n * @default true\n */\n enabled?: boolean;\n\n /**\n * @description Radial distance from the start of the fog to the end of the fog.\n * This creates a smooth transition from full fog to no fog.\n * Larger values produce a softer, more gradual fog transition.\n * @default 7\n */\n nearBlend?: number;\n\n /**\n * @description Distance from the far end of the camera view/floor boundaries\n * at which the fully opaque fog should start to appear.\n * Larger values move the fully opaque(/end of the) fog\n * closer to the center of the scene.\n * @default 10\n */\n farBlend?: number;\n}\n\nexport interface WebGpuSkyConfigDefinition {\n /**\n * @description If true, adds a physically based (Hosek-Wilkie) sky and a matching\n * sun providing light to the scene.\n * @default false\n */\n enabled?: boolean;\n\n /**\n * @description Value determining the amount of aerosol particles in the sky. This\n * very much impacts the sky's color and clearness.\n * From the original paper: T = 2 yields a very clear, Arctic-like sky,\n * T = 3 a clear sky in a temperate climate,\n * T = 6 a sky on a warm, moist day,\n * T = 10 a slightly hazy sky\n * Valid range: `[1,10]`\n * @default 2.5\n */\n turbidity?: number;\n\n /**\n * @description Represents how much light the ground bounces back into the atmosphere,\n * which brightens the sky near the horizon if this value is high.\n * Valid range: `[0,1]`\n * @default 0.9\n */\n albedo?: number;\n\n /**\n * @description Horizontal orientation of the sun in radians.\n * Changing this value rotates the sun clockwise around\n * the scene without changing its height.\n * Valid range: `[-pi, pi]`\n * @default 0\n */\n azimuthAngle?: number;\n\n /**\n * @description Height of the sun measured as the angle\n * from straight up (the zenith), in radians. Smaller values raise the sun toward\n * noon; larger values lower it toward the horizon.\n * Valid range: `[0,pi/2≈1.57]`.\n * @default 1\n */\n polarAngle?: number;\n\n /**\n * @description Intensity of the sun that lights the scene and casts shadows.\n * This does not influence how the sun disc looks in the sky.\n * @default 10\n */\n sunLightIntensity?: number;\n\n /**\n * @description Radius of the visible sun disc in the sky.\n * @default 0.03\n */\n sunRadius?: number;\n\n /**\n * @description Blurryness of the edge of the visible sun disc in the sky.\n * @default 0.002\n */\n sunSoftness?: number;\n\n /**\n * @description Exposure multiplier applied during the sky-specific tone mapping.\n * Higher values make the sky brighter.\n * @default 0.5\n */\n tonemapExposure?: number;\n\n /**\n * @description The HDR brightness value which the sky-specific tone mapping considers as white.\n * Lower values clip bright areas (like the sun) to white sooner, increasing contrast.\n * Higher values preserve more detail in the brightest regions.\n * @default 14\n */\n tonemapWhite?: number;\n\n /**\n * @description Fraction of the sky covered by clouds.\n * At `0` no clouds are rendered. at `1` the sky is fully covered by clouds.\n * @default 0.25\n */\n cloudCoverage?: number;\n\n /**\n * @description Opacity of the clouds when they are blended over the sky. At `0` clouds\n * are invisible even if coverage is high; at `1` they fully replace the sky color\n * beneath them.\n * @default 0.3\n */\n cloudDensity?: number;\n\n /**\n * @description Height of the virtual cloud plane. A value of `0` places the plane\n * very high (clouds appear small and distant); `1` pulls it down towards the horizon\n * so clouds appear lower and larger.\n * @default 0.7\n */\n cloudElevation?: number;\n\n /**\n * @description Intensity of the environment map lighting while the sky is\n * enabled. Because the sky already contributes its own image-based lighting,\n * the environment map is dimmed to this value to keep the overall scene brightness balanced.\n * @default 0.5\n */\n overrideEnvironmentMapIntensity?: number;\n}\n\nexport interface WebGpuSSGIConfigDefinition {\n /**\n * @description Radius of the denoising filter applied to the indirect lighting.\n * Higher values produce a stronger denoising effect, which can help reduce noise\n * in the indirect lighting but may also blur fine details.\n * @default 20\n */\n giDenoiseRadius?: number;\n\n /**\n * @description Radius of the denoising filter applied to the ambient occlusion (AO) pass.\n * Higher values produce a stronger denoising effect, which can help reduce noise\n * in the AO but may also blur fine details.\n * @default 10\n */\n aoDenoiseRadius?: number;\n}\n\nexport interface WebGpuConfigDefinition {\n /**\n * @description If true, the initial webgpu quality level is autodetected based on\n * a benchmark of the graphics hardware. If false, the default quality level is used.\n * @default true\n */\n autoDetectQualityLevel?: boolean;\n\n /**\n * @description This can be used to configure the lower bound of webgpu auto quality\n * meaning the fps bound which, when hit, will set the quality setting lower\n * To disable: set to 0\n * @default 24\n */\n autoQualityMinFps?: number;\n\n /**\n * @description This can be used to configure the upper bound of webgpu auto quality\n * meaning the fps bound which, when hit, will set the quality setting higher\n * This should be sufficiently larger than the minFps to not cause the quality to go up and down all the time\n * To disable: set to something very high\n * @default 59\n */\n autoQualityMaxFps?: number;\n\n /**\n * @description Visual configuration for the WebGPU top light and its shadow.\n */\n topLight?: WebGpuTopLightConfigDefinition;\n\n /**\n * @description Visual configuration for the WebGPU ground reflection.\n */\n groundReflection?: WebGpuGroundReflectionConfigDefinition;\n\n /**\n * @description Visual configuration for the WebGPU fog.\n */\n fog?: WebGpuFogConfigDefinition;\n\n /**\n * @description Visual configuration for the WebGPU sky and sun.\n */\n sky?: WebGpuSkyConfigDefinition;\n\n /**\n * @description Visual configuration for the WebGPU screen space global illumination (SSGI) effect.\n */\n ssgi?: WebGpuSSGIConfigDefinition;\n\n /**\n * @description Tone mapping operator applied by the WebGPU renderer.\n * @default 'none'\n */\n toneMapping?: WebGpuToneMapping;\n\n /**\n * @description Exposure (intensity) of the tone mapping applied by the\n * WebGPU renderer. Higher values produce a brighter image.\n * @default 1\n */\n toneMappingExposure?: number;\n}\n\nexport interface FeatureFlags {\n pulsePreview?: boolean;\n reDock?: boolean;\n\n /**\n * @description Sets whether the snapping behavior of objects in the planner is initially enabled.\n */\n enableSnapping?: boolean;\n\n /**\n * @internal\n * @description If true, the advanced docking behavior is enabled (for test purposes only)\n */\n advancedDocking?: boolean;\n\n /**\n * @internal\n * @description If true, when inserting new objects in the planner, we will try to merge them into existing groups if possible.\n * This is for test purposes only and should not be enabled in production yet, as it can lead to unexpected behavior.\n */\n mergeOnInsert?: boolean;\n\n /**\n * @internal\n * @description If “vector”, the vector preview is activated when drawing walls (for test purposes only).\n * By default, the walls are immediately drawn with their actual thickness,\n * but this leads to problems when displaying the dimensions of the walls,\n * as it is not possible to guess which side of the wall of the room currently being entered is the inside of the wall.\n */\n drawPreviewMode?: Enumify<typeof DRAW_PREVIEW_MODES>;\n /**\n * @internal\n * @description TO BE REMOVED ONCE RML-13218 IS RESOLVED.\n * Forces new thumbnails to be generated on configuration save\n */\n forceSaveThumbnails?: boolean;\n\n /**\n * @internal\n * @description Enables dynamically placed interior lights in the room planner.\n */\n interiorLights?: boolean;\n\n /**\n * @internal\n * @deprecated Use the top-level `webGpu` init data property instead.\n * @description If true, the scene will be rendered with WebGPU instead of WebGL\n */\n webGpu?: boolean;\n\n /**\n * @internal\n * @description If true, the advanced highlighting behavior is enabled (for test purposes only)\n */\n advancedHighlighting?: boolean;\n\n /**\n * @internal\n * @description If true, enables the POC for planning fences (e.g. garden fences) in the room planner.\n */\n fence?: boolean;\n\n /**\n * @internal\n * @description If true, `onRequestPlan` waits until every pending configuration\n * save in the plan has been persisted to the Roomle backend before firing.\n * See RML-17394\n */\n awaitConfigurationSavesBeforeRequestPlan?: boolean;\n}\n\nexport type RoomleColors = keyof typeof ROOMLE_COLORS;\n\nexport type ColorsIn3dScene = Record<\n RoomleColors,\n HexColorString | HexColorNumber\n>;\n\nexport type ThreeJsColorsIn3dScene = Record<keyof typeof ROOMLE_COLORS, Color>;\n\n/**\n * Init data parameter which can be used in configurator AND planner\n */\nexport interface CommonInitData {\n /**\n * @description If set to true the configurator will make sure every device has great user experience with fluid frame rate.\n * If set to false the configurator will always show the highest quality possible.\n * That could lead to stutter and other problems on low-end devices. We advise you to only turn off \"autoQuality\" if you really know what you are doing.\n * usage: autoQuality=false\n * @groups scene-settings\n */\n autoQuality?: boolean;\n\n /**\n * @description Can be used to personalize colors used in the 3D scene\n * @groups scene-settings\n */\n colors?: ColorsIn3dScene;\n\n /**\n * @description The item id or configuration id of the item which should be loaded.\n * Examples:\n * Configuration id: usm:frame:2449773A7F54278EBB61A67A10EF6A10E8BB6F38BE775B028AC050B438414507\n * Item id: usm:frame\n */\n id?: RapiId;\n\n /**\n * @internal\n * @deprecated\n * @description Use prices which are hardcoded in the configuration script.\n * Only used for trade show demos.\n */\n useRoomlePrice?: boolean;\n\n /**\n * @description Set how many positions after the decimal point should be shown.\n * For example:\n * 8' 1.68\" -> precisionCm=2 -> 8' 1.68\"\n * 8' 1.68\" -> precisionCm=1 -> 8' 1.7\"\n * 8' 1.68\" -> precisionCm=0 -> 8' 2\"\n */\n precisionInch?: number;\n\n /**\n * @description Set how many positions after the decimal point should be shown.\n * For example:\n * 123,45 -> precisionCm=2 -> 123,45\n * 123,45 -> precisionCm=1 -> 123,5\n * 123,45 -> precisionCm=0 -> 124\n */\n precisionCm?: number;\n\n /**\n * @description Defines which unit should be used for measurements/dimensions\n * Options: 'cm', 'mm', 'inchfeet'\n */\n unit?: string;\n\n /**\n * @description How the current unit should be formatted\n * Options:\n * - 'none': No unit string added, for example '200'\n * - 'long': Long unit string, for example '200 meters'\n * - 'short': Short unit string, for example '200 m'\n */\n unitStringType?: string;\n\n /**\n * @description When mesh selection is enabled, the meshes of the object are used directly for highlighting.\n * Setting it to false could be useful for square/rectangular (shelf) items.\n */\n meshSelection?: boolean;\n\n /**\n * @description if set to true it shows a little overlay with performance stats\n */\n stats?: boolean;\n\n /**\n * @description This flag enables:\n * - Scripter debug logs (e.g. which parameter is not assigned to a parameter group)\n * - Free camera movement (no restrictions, camera stays after reload, panning using Shift key)\n */\n debug?: boolean;\n\n /**\n * @description This flag enables:\n * - External object docking vector debug geometry\n */\n debugGeometry?: boolean;\n\n /**\n * @description If true this flag shows component bounding boxes\n */\n debugBoundingBox?: boolean;\n\n /**\n * @description This flag enables:\n * - Help line geometry in the planner\n * @internal\n */\n debugLines?: boolean;\n\n /**\n * @description If set to true, prices are calculated using the Roomle price service.\n * For more information ask your Roomle contact.\n */\n usePriceService?: boolean;\n\n /**\n * @description Url to an exr or hdr env map\n * @groups scene-settings\n */\n envMapUrl?: string;\n\n /**\n * @description Set the intensity of the environment map\n * @groups scene-settings\n */\n envMapIntensity?: number;\n\n /**\n * @description Set the rotation of the environment map in radians, between 0 and 2 * PI, rotates counter-clockwise\n * @groups scene-settings\n */\n envMapRotation?: number;\n\n /**\n * @description Set the maximum number of light sources extracted from the environment map\n * @groups scene-settings\n */\n maxLightSources?: number;\n\n /**\n * @description Use old light setting instead of env maps. Ignored when using the WebGPU renderer\n * @groups scene-settings\n */\n legacyLight?: boolean;\n\n /**\n * @description Generate environment map from a scene instead of env maps\n * use all_around for an surrounding light\n * use front for a mainly frontal light\n * @groups scene-settings\n */\n sceneLight?: DefaultEnvironmentSceneType;\n\n /**\n * @description General shading properties for the overall appearance\n * default: for planner and a configurator with colorful, metallic or wooden materials\n * bright: for a configurator with white and bright materials\n * @groups scene-settings\n */\n shading?: SceneShadingType;\n\n /**\n * @description Customized shading properties for the overall appearance\n * @groups scene-settings\n */\n customShading?: CustomShadingParameters;\n\n /**\n * @description Activates the linear AO filter mode to reduce AO anti-aliasing artifacts\n * @groups scene-settings\n */\n linearAoFilter?: boolean;\n\n /**\n * @description Customized shading properties for the overall appearance in MOC\n * @groups scene-settings\n */\n customShadingMoc?: CustomShadingParameters;\n\n /**\n * @description restrictionLevel defines visibility of parameters and possible children\n */\n restrictionLevel?: number;\n\n /**\n * @description Settings for Homag Intelligence\n * @internal\n */\n hi?: HomagIntelligenceInitData;\n\n /**\n * @description disable injection of default styles for measurements and component dimension labels\n * to enable easier customization of these styles (via the assigned classes)\n */\n disableDefaultLabelStyles?: boolean;\n}\n\nexport interface ConfiguratorInitData {\n /**\n * @description Sets the behavior of the highlighting of a hovered component.\n * usage: highlighting=smart\n */\n highlighting?: Enumify<typeof ROOMLE_HIGHLIGHTNG>;\n\n /**\n * @description Set the floor material which is used when loading the configurator\n * For different options see {@link @roomle/web-sdk/configurator-core/src/environment/dynamic-environment-setting-loader#EnvironmentSetting}\n */\n initialFloorMaterial?: string;\n\n /**\n * @internal\n * @description Load a light setting using an URL.\n * Check lights in {@link @roomle/web-sdk/configurator-core/src/scene-settings-loader#SceneSettings} for an example.\n * value is a dynamic light setting url\n */\n dls?: string;\n\n /**\n * @description Load a predefined light setting, eg: ls=sofa\n * @groups scene-settings\n */\n ls?: string;\n\n /**\n * @description Set the distance to which the user can zoom (in centimeters).\n * default: object size divided by 10 or 10 cm\n * usage: zoomDistance=3\n * @groups scene-settings\n */\n zoomDistance?: number;\n\n /**\n * @description When set this param restricts the camera rotation to the given angle (e.g. 45 degree), this overrides minHorizontalCameraAngle and maxHorizontalCameraAngle\n * default: not set -> no camera restriction\n * usage: cameraRestriction=45\n * @groups scene-settings\n */\n cameraRestriction?: number;\n\n /**\n * @description Sets the default/initial vertical camera angle (pitch)\n * default: 10\n * usage: verticalCameraAngle=45\n * @groups scene-settings\n */\n verticalCameraAngle?: number;\n\n /**\n * @description When set this param restricts the down/vertical camera rotation to the given angle (e.g. 45 degree)\n * default: not set -> no camera angle restriction\n * usage: minVerticalCameraAngle=45\n * @groups scene-settings\n */\n minVerticalCameraAngle?: number;\n\n /**\n * @description When set this param restricts the up/vertical camera rotation to the given angle (e.g. 45 degree)\n * default: not set -> no camera angle restriction\n * usage: maxVerticalCameraAngle=45\n * @groups scene-settings\n */\n maxVerticalCameraAngle?: number;\n\n /**\n * @description Sets the default/initial horizontal camera angle (yaw)\n * default: -30\n * usage: horizontalCameraAngle=45\n * @groups scene-settings\n */\n horizontalCameraAngle?: number;\n\n /**\n * @description When set this param restricts the left/horizontal camera rotation to the given angle (e.g. 45 degree)\n * default: not set -> no camera angle restriction\n * usage: minHorizontalCameraAngle=45\n * @groups scene-settings\n */\n minHorizontalCameraAngle?: number;\n\n /**\n * @description When set this param restricts the right/horizontal camera rotation to the given angle (e.g. 45 degree)\n * default: not set -> no camera angle restriction\n * usage: maxHorizontalCameraAngle=45\n * @groups scene-settings\n */\n maxHorizontalCameraAngle?: number;\n\n /**\n * @description If set to false the camera will just jump to a new position\n * default: true\n * usage: animateCamera=false\n * @groups scene-settings\n */\n animateCamera?: boolean;\n\n /**\n * @internal\n * @description Easter Egg\n * */\n bananaForScale?: boolean;\n\n /**\n * @description If set to true, components which are between the camera and the selected component/preview will be rendered transparent\n * usage: transparentHighlighting=true\n * @groups scene-settings\n */\n transparentHighlighting?: boolean;\n\n /**\n * @description If set to true, the background is transparent and allows elements behind the configurator to be visible through the scene.\n * Not compatible with the WebGPU sky feature\n * usage: transparentBackground=true\n * @groups scene-settings\n */\n transparentBackground?: boolean;\n\n /**\n * @description If set to true it will try to apply all current global parameters to the loaded object\n */\n applyCurrentGlobalParameters?: boolean;\n\n /**\n * @description If set to true, component dimension labels stay visible even when the distance-based proximity check would normally hide them.\n * @default false\n */\n disableMeasurementCollisionDetection?: boolean;\n\n /**\n * @description Adds the given spacing (in centimeters) to the loaded object. This is then used to calculate the initial camera distance\n * default: 0\n * usage:\n * cameraSpacing=100, zoom out further by increasing camera spacing by 100 centimeters\n * cameraSpacing=-30, zoom in further by decreasing camera spacing by 30 centimeters\n * @groups scene-settings\n */\n cameraSpacing?: number;\n\n /**\n * @internal\n * @description If set to true, screen space reflections are enabled\n */\n ssr?: boolean;\n\n /**\n * @internal\n * @description features that can be enabled/disabled\n */\n featureFlags?: FeatureFlags;\n\n /**\n * @internal\n * @description If true, the scene will be rendered with WebGPU instead of WebGL\n * @default false\n * usage: webGpu=true\n */\n webGpu?: boolean;\n\n /**\n * @internal\n * @description Configuration for the WebGPU renderer (e.g. auto quality fps bounds).\n */\n webGpuConfig?: WebGpuConfigDefinition;\n\n /**\n * @description if true, the meshes of the component will be used, in addition to the bounding box, for raycasting (selecting)\n * Warning: this will decrease performance when hovering over components with complex meshes\n * @default false\n * usage: meshRaycasting=true\n */\n meshRaycasting?: boolean;\n}\n\nexport interface PlannerInitData {\n /**\n * @description Sets the default floor material when creating a new plan or drawing.\n * Can be a number (RGB color) or a string (material ID).\n */\n defaultFloorMaterial?: number | string;\n\n /**\n * @description Select with which camera mode to start initially.\n * usage: mode=2D\n * options: 2D, 3D, FP\n */\n mode?: Enumify<typeof CAMERA_TYPE>;\n\n /**\n * @internal\n * @description If set to true the plan can be edited.\n */\n edit?: boolean;\n\n /**\n * @description If set to true it will treat the planner as a multi object configurator (moc).\n * This means:\n * - do not merge geometries\n * - set configurator environment & lights in planner\n * - reduce initial spacing of camera (higher zoom)\n */\n moc?: boolean;\n\n /**\n * @description If set to true we will not hide other items while configuring in the planner\n */\n configureInRoom?: boolean;\n\n /**\n * @description If set to true docking of configurable objects in the planner is enabled.\n * The default value is true.\n */\n dockInRoom?: boolean;\n\n /**\n * @description If set to true the 3D planner camera zooms in as close to objects as the configurator does,\n * instead of stopping at the bounds of the plan. Objects which would be cut by the camera near plane are\n * hidden while they are cut.\n * @default false\n * usage: configuratorZoom=false\n */\n configuratorZoom?: boolean;\n}\n\nexport interface InitDataDefinition\n extends CommonInitData,\n ConfiguratorInitData,\n PlannerInitData {}\n","const FPS_LIST_SIZE = 10;\nconst FPS_MEASUREMENT_INTERVAL_MS = 20;\n\nexport default class FpsCounter {\n private _index: number = 0;\n private _fpsList: number[];\n private _prevTime: number = 0;\n private _frames: number = 0;\n private _fps: number = -1;\n\n constructor() {\n this._fpsList = Array(FPS_LIST_SIZE).fill(0);\n this._prevTime = (performance || Date).now();\n this.reset();\n }\n\n public update() {\n this._frames++;\n const time = (performance || Date).now();\n\n if (time >= this._prevTime + FPS_MEASUREMENT_INTERVAL_MS) {\n this._fpsList[this._index % FPS_LIST_SIZE] =\n (this._frames * 1000) / (time - this._prevTime);\n\n if (this._index >= FPS_LIST_SIZE) {\n this._fps =\n this._fpsList.reduce((pv, cv) => pv + cv) / this._fpsList.length;\n }\n\n this._prevTime = time;\n this._frames = 0;\n this._index++;\n }\n }\n\n public start() {\n this._prevTime = (performance || Date).now();\n this._frames = 0;\n }\n\n public reset() {\n this._fps = -1;\n this._fpsList = Array(FPS_LIST_SIZE).fill(0);\n this._index = 0;\n }\n\n public getFps() {\n return this._fps;\n }\n}\n","import type { Camera, Object3D, Scene, Vector2, WebGLRenderer } from 'three';\nimport { Box3 } from 'three';\nimport type { Enumify } from '#/common/src/utils/types';\nimport type { CAMERA_TYPE } from './cameracontrol/camera-type';\nimport type { WebGPURenderer } from 'three/webgpu';\nimport type { SceneShadingType } from './webgl/renderer/shading-settings';\nimport type { OutlineCustomParameters } from './webgl/renderer/scene-renderer';\n\nexport type GenericRoomleRenderer = RoomleRenderer<\n WebGLRenderer | WebGPURenderer\n>;\n\nexport enum PlannerRenderMode {\n Mode3D,\n Mode2D,\n}\n\nexport abstract class RoomleRenderer<\n RendererType extends WebGLRenderer | WebGPURenderer,\n> {\n public _creator_: string;\n public renderer: RendererType;\n protected isConfiguratorMode: boolean = true;\n protected isCameraMoving: boolean = false;\n protected cameraType: Enumify<typeof CAMERA_TYPE>;\n protected shadowNeedsUpdate: boolean = false;\n protected boundingBox: Box3 = new Box3();\n protected boundingBoxNeedsUpdate: boolean = false;\n\n protected constructor(creator: string, renderer: RendererType) {\n this._creator_ = creator;\n this.renderer = renderer;\n }\n\n public get isConfiguring(): boolean {\n return this.isConfiguratorMode;\n }\n\n public dispose(): void {\n this.renderer.dispose();\n }\n\n public setSize(width: number, height: number): void {\n this.renderer.setSize(width, height);\n }\n\n public getSize(target: Vector2): Vector2 {\n return this.renderer.getSize(target);\n }\n\n public setCameraType(cameraType: Enumify<typeof CAMERA_TYPE>) {\n this.cameraType = cameraType;\n }\n\n public movingCameraStarts(): void {\n this.isCameraMoving = true;\n }\n\n public movingCameraStops(): void {\n this.isCameraMoving = false;\n }\n\n public forceShadowUpdates(_updateBakedGroundShadow: boolean): void {\n this.shadowNeedsUpdate = true;\n }\n\n public clear() {\n this.renderer.clear();\n }\n\n public updateBounds(geometryBounds: Box3) {\n this.boundingBox.copy(geometryBounds);\n this.boundingBoxNeedsUpdate = true;\n }\n\n public switchToConfigurator(): void {\n this.isConfiguratorMode = true;\n }\n\n public switchToPlanner(_renderMode: PlannerRenderMode) {\n this.isConfiguratorMode = false;\n }\n\n public abstract setShadingType(shadingType: SceneShadingType): void;\n\n public abstract setCustomOutlineParameters(\n outlineCustomParameters: OutlineCustomParameters,\n ): void;\n\n public abstract render(scene: Scene, camera: Camera): void;\n\n public abstract showGUI(updateCallback: () => void): void;\n\n public abstract clearCache(): void;\n\n public abstract highlightObjects(selectedMeshes: Object3D[]): void;\n\n public abstract setGroundShadow(enabled: boolean, scene: Scene): void;\n\n public abstract enableUiInteractionMode(): void;\n\n public abstract disableUiInteractionMode(): void;\n}\n"],"mappings":";;AAkBA,IAAkB,IAAX,yBAAA,GAAA;QACL,EAAA,SAAA,UACA,EAAA,WAAA,WACA,EAAA,SAAA,SACA,EAAA,oBAAA;KACD,EAEY,IAAqB;CAChC,SAAS;CACT,QAAQ;CACT,EAEY,IAAuB;CAClC,MAAM;CACN,QAAQ;CACR,UAAU;CACV,QAAQ;CACR,aAAa;CACb,KAAK;CACL,SAAS;CACV,ECtCK,IAAgB,IAChB,IAA8B,IAEf,IAArB,MAAgC;CAO9B,cAAc;AAGZ,gBATuB,oBAEG,kBACF,eACH,IAGrB,KAAK,WAAW,MAAM,EAAc,CAAC,KAAK,EAAE,EAC5C,KAAK,aAAa,eAAe,MAAM,KAAK,EAC5C,KAAK,OAAO;;CAGd,SAAgB;AACd,OAAK;EACL,IAAM,KAAQ,eAAe,MAAM,KAAK;AAExC,EAAI,KAAQ,KAAK,YAAY,MAC3B,KAAK,SAAS,KAAK,SAAS,KACzB,KAAK,UAAU,OAAS,IAAO,KAAK,YAEnC,KAAK,UAAU,MACjB,KAAK,OACH,KAAK,SAAS,QAAQ,GAAI,MAAO,IAAK,EAAG,GAAG,KAAK,SAAS,SAG9D,KAAK,YAAY,GACjB,KAAK,UAAU,GACf,KAAK;;CAIT,QAAe;AAEb,EADA,KAAK,aAAa,eAAe,MAAM,KAAK,EAC5C,KAAK,UAAU;;CAGjB,QAAe;AAGb,EAFA,KAAK,OAAO,IACZ,KAAK,WAAW,MAAM,EAAc,CAAC,KAAK,EAAE,EAC5C,KAAK,SAAS;;CAGhB,SAAgB;AACd,SAAO,KAAK;;GCnCJ,IAAL,yBAAA,GAAA;QACL,EAAA,EAAA,SAAA,KAAA,UACA,EAAA,EAAA,SAAA,KAAA;KACD,EAEqB,IAAtB,MAEE;CAUA,YAAsB,GAAiB,GAAwB;AAE7D,4BATsC,0BACJ,6BAEG,uBACT,IAAI,GAAM,gCACI,IAG1C,KAAK,YAAY,GACjB,KAAK,WAAW;;CAGlB,IAAW,gBAAyB;AAClC,SAAO,KAAK;;CAGd,UAAuB;AACrB,OAAK,SAAS,SAAS;;CAGzB,QAAe,GAAe,GAAsB;AAClD,OAAK,SAAS,QAAQ,GAAO,EAAO;;CAGtC,QAAe,GAA0B;AACvC,SAAO,KAAK,SAAS,QAAQ,EAAO;;CAGtC,cAAqB,GAAyC;AAC5D,OAAK,aAAa;;CAGpB,qBAAkC;AAChC,OAAK,iBAAiB;;CAGxB,oBAAiC;AAC/B,OAAK,iBAAiB;;CAGxB,mBAA0B,GAAyC;AACjE,OAAK,oBAAoB;;CAG3B,QAAe;AACb,OAAK,SAAS,OAAO;;CAGvB,aAAoB,GAAsB;AAExC,EADA,KAAK,YAAY,KAAK,EAAe,EACrC,KAAK,yBAAyB;;CAGhC,uBAAoC;AAClC,OAAK,qBAAqB;;CAG5B,gBAAuB,GAAgC;AACrD,OAAK,qBAAqB"}
1
+ {"version":3,"file":"roomle-renderer-nCUrLU_S.mjs","names":[],"sources":["../../packages/common-core/src/utils/shims.ts","../../packages/common-core/src/utils/fps-counter.ts","../../packages/common-core/src/roomle-renderer.ts"],"sourcesContent":["import type { ROOMLE_COLORS } from './common-utils';\nimport type {\n HexColorNumber,\n HexColorString,\n RapiId,\n RapiServerUrlType,\n} from '../../../typings/rapi-types';\nimport type { CAMERA_TYPE } from '../cameracontrol/camera-type';\nimport type { Enumify } from '#/common/src/utils/types';\nimport type { ROOMLE_HIGHLIGHTNG } from './common-utils';\nimport type { DefaultEnvironmentSceneType } from '../webgl/renderer/environment-scene';\nimport type {\n CustomShadingParameters,\n SceneShadingType,\n} from '../webgl/renderer/shading-settings';\nimport type { Color } from 'three';\nimport type { HomagIntelligenceInitData } from '../../../homag-intelligence/src/hi-api-types';\n\nexport const enum WINDOW_EVENT {\n RESIZE = 'resize',\n KEY_DOWN = 'keydown',\n KEY_UP = 'keyup',\n VISIBILITY_CHANGE = 'visibilitychange',\n}\n\nexport const DRAW_PREVIEW_MODES = {\n DEFAULT: 'default',\n VECTOR: 'vector',\n} as const;\n\nexport const WEBGPU_TONE_MAPPINGS = {\n NONE: 'none',\n LINEAR: 'linear',\n REINHARD: 'reinhard',\n CINEON: 'cineon',\n ACES_FILMIC: 'acesFilmic',\n AGX: 'agx',\n NEUTRAL: 'neutral',\n} as const;\n\nexport type WebGpuToneMapping = Enumify<typeof WEBGPU_TONE_MAPPINGS>;\n\n/**\n * Init data parameters which are not context specific\n */\nexport interface GlobalInitDataDefinition {\n /**\n * @description locale to use for the\n * embedding instance\n */\n locale?: string;\n\n /**\n * @internal\n * @deprecated\n * @description Can be used for content testing\n */\n overrideTenant?: number;\n\n /**\n * @description Set country to use for the Roomle price service. If not used the customer IP address will be used to determine the location. usage: overrideCountry=de\n */\n overrideCountry?: string | null;\n\n /**\n * @internal\n * @description Set which RAPI (Roomle API) backend should be used options: live, test\n */\n overrideRapi?: RapiServerUrlType;\n\n /**\n * @description The id which should be used for this embedding instance. When this id is set all InitData parameter can be set and changed in Rubens Admin. This is the way we recommend to set init data params. Ask your Roomle contact for your configuratorId.\n */\n configuratorId?: string;\n\n /**\n * @description Set which RAPI (Roomle API) backend should be used usage: customApiUrl=https://www.roomle.com/api/v3\n */\n customApiUrl?: string;\n\n /**\n * @internal\n * @description Can be set to true if started as an end-to-end test. This will disable post-processing\n */\n e2e?: boolean;\n\n /**\n * @internal\n * @description If set to true, the Roomle Renderer is used for perspective and top images this should help the E2E tests of Joe to migrate from comparing Roomle Renderer images to Three.js Renderer images\n */\n e2eRoomleRendererForImages?: boolean;\n\n /**\n * @internal\n * @description When loading a plan, the external objects from the plan XML are discarded\n */\n discardExternalObjectsWhenLoadingPlan?: boolean;\n\n /**\n * @description If set to true, the plan will be locked and no changes can be made to walls, floors or construction elements.\n * @default false\n */\n lockPlan?: boolean;\n\n /**\n * @description If set to true, the plan is in read-only mode. Hides all editing UI and prevents interaction with plan elements.\n * Automatically sets edit=false and lockPlan=true and saveToIdb=false\n * @default false\n */\n readonly?: boolean;\n}\n\nexport interface WebGpuTopLightConfigDefinition {\n /**\n * @description Intensity (brightness) of the WebGPU top light.\n * @default 1\n */\n intensity?: number;\n\n /**\n * @description Intensity of the shadow cast by the top light.\n * 0 means no shadow, 1 means a fully opaque shadow.\n * @default 1\n */\n shadowIntensity?: number;\n\n /**\n * @description Softness (blur radius) of the top light's shadow edges.\n * Higher values produce softer shadows.\n * @default 1.1\n */\n shadowRadius?: number;\n}\n\nexport interface WebGpuGroundReflectionConfigDefinition {\n /**\n * @description Enables or disables the ground reflection entirely.\n * When disabled the floor still receives shadows but does not render a reflection,\n * which also avoids the extra reflection render pass.\n * @default true\n */\n enabled?: boolean;\n\n /**\n * @description Strength of the ground reflection.\n * 0 means no reflection, 1 means a full mirror-like reflection.\n * @default 0.1\n */\n intensity?: number;\n\n /**\n * @description Depth at which the reflection starts to fade out.\n * @default 0.05\n */\n startFadeout?: number;\n\n /**\n * @description Depth at which the reflection is fully faded out.\n * @default 0.15\n */\n endFadeout?: number;\n\n /**\n * @description How much the resolution of the scene is scaled by for the reflection resolution\n * If transmissive objects are not in use, this can be set to a lower value like 0.5 to improve performance.\n * @default 1\n */\n reflectionScale?: number;\n}\n\nexport interface WebGpuFogConfigDefinition {\n /**\n * @description If true, a fog is added to the scene in webGPU mode.\n * This is mainly so you cant see the outer edge of the\n * floor (which makes it blends smoothly into the background).\n * This fog exists in a cylindrical shape around the origin and the\n * farBlend and nearBlend parameters indirectly control the radius\n * at which the fog starts and ends.\n * @default true\n */\n enabled?: boolean;\n\n /**\n * @description Radial distance from the start of the fog to the end of the fog.\n * This creates a smooth transition from full fog to no fog.\n * Larger values produce a softer, more gradual fog transition.\n * @default 7\n */\n nearBlend?: number;\n\n /**\n * @description Distance from the far end of the camera view/floor boundaries\n * at which the fully opaque fog should start to appear.\n * Larger values move the fully opaque(/end of the) fog\n * closer to the center of the scene.\n * @default 10\n */\n farBlend?: number;\n}\n\nexport interface WebGpuSkyConfigDefinition {\n /**\n * @description If true, adds a physically based (Hosek-Wilkie) sky and a matching\n * sun providing light to the scene.\n * @default false\n */\n enabled?: boolean;\n\n /**\n * @description Value determining the amount of aerosol particles in the sky. This\n * very much impacts the sky's color and clearness.\n * From the original paper: T = 2 yields a very clear, Arctic-like sky,\n * T = 3 a clear sky in a temperate climate,\n * T = 6 a sky on a warm, moist day,\n * T = 10 a slightly hazy sky\n * Valid range: `[1,10]`\n * @default 2.5\n */\n turbidity?: number;\n\n /**\n * @description Represents how much light the ground bounces back into the atmosphere,\n * which brightens the sky near the horizon if this value is high.\n * Valid range: `[0,1]`\n * @default 0.9\n */\n albedo?: number;\n\n /**\n * @description Horizontal orientation of the sun in radians.\n * Changing this value rotates the sun clockwise around\n * the scene without changing its height.\n * Valid range: `[-pi, pi]`\n * @default 0\n */\n azimuthAngle?: number;\n\n /**\n * @description Height of the sun measured as the angle\n * from straight up (the zenith), in radians. Smaller values raise the sun toward\n * noon; larger values lower it toward the horizon.\n * Valid range: `[0,pi/2≈1.57]`.\n * @default 1\n */\n polarAngle?: number;\n\n /**\n * @description Intensity of the sun that lights the scene and casts shadows.\n * This does not influence how the sun disc looks in the sky.\n * @default 10\n */\n sunLightIntensity?: number;\n\n /**\n * @description Radius of the visible sun disc in the sky.\n * @default 0.03\n */\n sunRadius?: number;\n\n /**\n * @description Blurryness of the edge of the visible sun disc in the sky.\n * @default 0.002\n */\n sunSoftness?: number;\n\n /**\n * @description Exposure multiplier applied during the sky-specific tone mapping.\n * Higher values make the sky brighter.\n * @default 0.5\n */\n tonemapExposure?: number;\n\n /**\n * @description The HDR brightness value which the sky-specific tone mapping considers as white.\n * Lower values clip bright areas (like the sun) to white sooner, increasing contrast.\n * Higher values preserve more detail in the brightest regions.\n * @default 14\n */\n tonemapWhite?: number;\n\n /**\n * @description Fraction of the sky covered by clouds.\n * At `0` no clouds are rendered. at `1` the sky is fully covered by clouds.\n * @default 0.25\n */\n cloudCoverage?: number;\n\n /**\n * @description Opacity of the clouds when they are blended over the sky. At `0` clouds\n * are invisible even if coverage is high; at `1` they fully replace the sky color\n * beneath them.\n * @default 0.3\n */\n cloudDensity?: number;\n\n /**\n * @description Height of the virtual cloud plane. A value of `0` places the plane\n * very high (clouds appear small and distant); `1` pulls it down towards the horizon\n * so clouds appear lower and larger.\n * @default 0.7\n */\n cloudElevation?: number;\n\n /**\n * @description Intensity of the environment map lighting while the sky is\n * enabled. Because the sky already contributes its own image-based lighting,\n * the environment map is dimmed to this value to keep the overall scene brightness balanced.\n * @default 0.5\n */\n overrideEnvironmentMapIntensity?: number;\n}\n\nexport interface WebGpuSSGIConfigDefinition {\n /**\n * @description Radius of the denoising filter applied to the indirect lighting.\n * Higher values produce a stronger denoising effect, which can help reduce noise\n * in the indirect lighting but may also blur fine details.\n * @default 20\n */\n giDenoiseRadius?: number;\n\n /**\n * @description Radius of the denoising filter applied to the ambient occlusion (AO) pass.\n * Higher values produce a stronger denoising effect, which can help reduce noise\n * in the AO but may also blur fine details.\n * @default 10\n */\n aoDenoiseRadius?: number;\n}\n\nexport interface WebGpuConfigDefinition {\n /**\n * @description If true, the initial webgpu quality level is autodetected based on\n * a benchmark of the graphics hardware. If false, the default quality level is used.\n * @default true\n */\n autoDetectQualityLevel?: boolean;\n\n /**\n * @description This can be used to configure the lower bound of webgpu auto quality\n * meaning the fps bound which, when hit, will set the quality setting lower\n * To disable: set to 0\n * @default 24\n */\n autoQualityMinFps?: number;\n\n /**\n * @description This can be used to configure the upper bound of webgpu auto quality\n * meaning the fps bound which, when hit, will set the quality setting higher\n * This should be sufficiently larger than the minFps to not cause the quality to go up and down all the time\n * To disable: set to something very high\n * @default 59\n */\n autoQualityMaxFps?: number;\n\n /**\n * @description Visual configuration for the WebGPU top light and its shadow.\n */\n topLight?: WebGpuTopLightConfigDefinition;\n\n /**\n * @description Visual configuration for the WebGPU ground reflection.\n */\n groundReflection?: WebGpuGroundReflectionConfigDefinition;\n\n /**\n * @description Visual configuration for the WebGPU fog.\n */\n fog?: WebGpuFogConfigDefinition;\n\n /**\n * @description Visual configuration for the WebGPU sky and sun.\n */\n sky?: WebGpuSkyConfigDefinition;\n\n /**\n * @description Visual configuration for the WebGPU screen space global illumination (SSGI) effect.\n */\n ssgi?: WebGpuSSGIConfigDefinition;\n\n /**\n * @description Tone mapping operator applied by the WebGPU renderer.\n * @default 'none'\n */\n toneMapping?: WebGpuToneMapping;\n\n /**\n * @description Exposure (intensity) of the tone mapping applied by the\n * WebGPU renderer. Higher values produce a brighter image.\n * @default 1\n */\n toneMappingExposure?: number;\n}\n\nexport interface FeatureFlags {\n pulsePreview?: boolean;\n reDock?: boolean;\n\n /**\n * @description Sets whether the snapping behavior of objects in the planner is initially enabled.\n */\n enableSnapping?: boolean;\n\n /**\n * @internal\n * @description If true, the advanced docking behavior is enabled (for test purposes only)\n */\n advancedDocking?: boolean;\n\n /**\n * @internal\n * @description If true, when inserting new objects in the planner, we will try to merge them into existing groups if possible.\n * This is for test purposes only and should not be enabled in production yet, as it can lead to unexpected behavior.\n */\n mergeOnInsert?: boolean;\n\n /**\n * @internal\n * @description If “vector”, the vector preview is activated when drawing walls (for test purposes only).\n * By default, the walls are immediately drawn with their actual thickness,\n * but this leads to problems when displaying the dimensions of the walls,\n * as it is not possible to guess which side of the wall of the room currently being entered is the inside of the wall.\n */\n drawPreviewMode?: Enumify<typeof DRAW_PREVIEW_MODES>;\n /**\n * @internal\n * @description TO BE REMOVED ONCE RML-13218 IS RESOLVED.\n * Forces new thumbnails to be generated on configuration save\n */\n forceSaveThumbnails?: boolean;\n\n /**\n * @internal\n * @description Enables dynamically placed interior lights in the room planner.\n */\n interiorLights?: boolean;\n\n /**\n * @internal\n * @deprecated Use the top-level `webGpu` init data property instead.\n * @description If true, the scene will be rendered with WebGPU instead of WebGL\n */\n webGpu?: boolean;\n\n /**\n * @internal\n * @description If true, the advanced highlighting behavior is enabled (for test purposes only)\n */\n advancedHighlighting?: boolean;\n\n /**\n * @internal\n * @description If true, enables the POC for planning fences (e.g. garden fences) in the room planner.\n */\n fence?: boolean;\n\n /**\n * @internal\n * @description If true, `onRequestPlan` waits until every pending configuration\n * save in the plan has been persisted to the Roomle backend before firing.\n * See RML-17394\n */\n awaitConfigurationSavesBeforeRequestPlan?: boolean;\n\n /**\n * @internal\n * @description By default the render loop goes into standby after a few seconds without scene changes.\n * If set to true the render loop keeps running continuously. This increases CPU/GPU usage and battery drain.\n * @default false\n */\n disableRenderStandby?: boolean;\n}\n\nexport type RoomleColors = keyof typeof ROOMLE_COLORS;\n\nexport type ColorsIn3dScene = Record<\n RoomleColors,\n HexColorString | HexColorNumber\n>;\n\nexport type ThreeJsColorsIn3dScene = Record<keyof typeof ROOMLE_COLORS, Color>;\n\n/**\n * Init data parameter which can be used in configurator AND planner\n */\nexport interface CommonInitData {\n /**\n * @description If set to true the configurator will make sure every device has great user experience with fluid frame rate.\n * If set to false the configurator will always show the highest quality possible.\n * That could lead to stutter and other problems on low-end devices. We advise you to only turn off \"autoQuality\" if you really know what you are doing.\n * usage: autoQuality=false\n * @groups scene-settings\n */\n autoQuality?: boolean;\n\n /**\n * @description Can be used to personalize colors used in the 3D scene\n * @groups scene-settings\n */\n colors?: ColorsIn3dScene;\n\n /**\n * @description The item id or configuration id of the item which should be loaded.\n * Examples:\n * Configuration id: usm:frame:2449773A7F54278EBB61A67A10EF6A10E8BB6F38BE775B028AC050B438414507\n * Item id: usm:frame\n */\n id?: RapiId;\n\n /**\n * @internal\n * @deprecated\n * @description Use prices which are hardcoded in the configuration script.\n * Only used for trade show demos.\n */\n useRoomlePrice?: boolean;\n\n /**\n * @description Set how many positions after the decimal point should be shown.\n * For example:\n * 8' 1.68\" -> precisionCm=2 -> 8' 1.68\"\n * 8' 1.68\" -> precisionCm=1 -> 8' 1.7\"\n * 8' 1.68\" -> precisionCm=0 -> 8' 2\"\n */\n precisionInch?: number;\n\n /**\n * @description Set how many positions after the decimal point should be shown.\n * For example:\n * 123,45 -> precisionCm=2 -> 123,45\n * 123,45 -> precisionCm=1 -> 123,5\n * 123,45 -> precisionCm=0 -> 124\n */\n precisionCm?: number;\n\n /**\n * @description Defines which unit should be used for measurements/dimensions\n * Options: 'cm', 'mm', 'inchfeet'\n */\n unit?: string;\n\n /**\n * @description How the current unit should be formatted\n * Options:\n * - 'none': No unit string added, for example '200'\n * - 'long': Long unit string, for example '200 meters'\n * - 'short': Short unit string, for example '200 m'\n */\n unitStringType?: string;\n\n /**\n * @description When mesh selection is enabled, the meshes of the object are used directly for highlighting.\n * Setting it to false could be useful for square/rectangular (shelf) items.\n */\n meshSelection?: boolean;\n\n /**\n * @description if set to true it shows a little overlay with performance stats\n */\n stats?: boolean;\n\n /**\n * @description This flag enables:\n * - Scripter debug logs (e.g. which parameter is not assigned to a parameter group)\n * - Free camera movement (no restrictions, camera stays after reload, panning using Shift key)\n */\n debug?: boolean;\n\n /**\n * @description This flag enables:\n * - External object docking vector debug geometry\n */\n debugGeometry?: boolean;\n\n /**\n * @description If true this flag shows component bounding boxes\n */\n debugBoundingBox?: boolean;\n\n /**\n * @description This flag enables:\n * - Help line geometry in the planner\n * @internal\n */\n debugLines?: boolean;\n\n /**\n * @description If set to true, prices are calculated using the Roomle price service.\n * For more information ask your Roomle contact.\n */\n usePriceService?: boolean;\n\n /**\n * @description Url to an exr or hdr env map\n * @groups scene-settings\n */\n envMapUrl?: string;\n\n /**\n * @description Set the intensity of the environment map\n * @groups scene-settings\n */\n envMapIntensity?: number;\n\n /**\n * @description Set the rotation of the environment map in radians, between 0 and 2 * PI, rotates counter-clockwise\n * @groups scene-settings\n */\n envMapRotation?: number;\n\n /**\n * @description Set the maximum number of light sources extracted from the environment map\n * @groups scene-settings\n */\n maxLightSources?: number;\n\n /**\n * @description Use old light setting instead of env maps. Ignored when using the WebGPU renderer\n * @groups scene-settings\n */\n legacyLight?: boolean;\n\n /**\n * @description Generate environment map from a scene instead of env maps\n * use all_around for an surrounding light\n * use front for a mainly frontal light\n * @groups scene-settings\n */\n sceneLight?: DefaultEnvironmentSceneType;\n\n /**\n * @description General shading properties for the overall appearance\n * default: for planner and a configurator with colorful, metallic or wooden materials\n * bright: for a configurator with white and bright materials\n * @groups scene-settings\n */\n shading?: SceneShadingType;\n\n /**\n * @description Customized shading properties for the overall appearance\n * @groups scene-settings\n */\n customShading?: CustomShadingParameters;\n\n /**\n * @description Activates the linear AO filter mode to reduce AO anti-aliasing artifacts\n * @groups scene-settings\n */\n linearAoFilter?: boolean;\n\n /**\n * @description Customized shading properties for the overall appearance in MOC\n * @groups scene-settings\n */\n customShadingMoc?: CustomShadingParameters;\n\n /**\n * @description restrictionLevel defines visibility of parameters and possible children\n */\n restrictionLevel?: number;\n\n /**\n * @description Settings for Homag Intelligence\n * @internal\n */\n hi?: HomagIntelligenceInitData;\n\n /**\n * @description disable injection of default styles for measurements and component dimension labels\n * to enable easier customization of these styles (via the assigned classes)\n */\n disableDefaultLabelStyles?: boolean;\n}\n\nexport interface ConfiguratorInitData {\n /**\n * @description Sets the behavior of the highlighting of a hovered component.\n * usage: highlighting=smart\n */\n highlighting?: Enumify<typeof ROOMLE_HIGHLIGHTNG>;\n\n /**\n * @description Set the floor material which is used when loading the configurator\n * For different options see {@link @roomle/web-sdk/configurator-core/src/environment/dynamic-environment-setting-loader#EnvironmentSetting}\n */\n initialFloorMaterial?: string;\n\n /**\n * @internal\n * @description Load a light setting using an URL.\n * Check lights in {@link @roomle/web-sdk/configurator-core/src/scene-settings-loader#SceneSettings} for an example.\n * value is a dynamic light setting url\n */\n dls?: string;\n\n /**\n * @description Load a predefined light setting, eg: ls=sofa\n * @groups scene-settings\n */\n ls?: string;\n\n /**\n * @description Set the distance to which the user can zoom (in centimeters).\n * default: object size divided by 10 or 10 cm\n * usage: zoomDistance=3\n * @groups scene-settings\n */\n zoomDistance?: number;\n\n /**\n * @description When set this param restricts the camera rotation to the given angle (e.g. 45 degree), this overrides minHorizontalCameraAngle and maxHorizontalCameraAngle\n * default: not set -> no camera restriction\n * usage: cameraRestriction=45\n * @groups scene-settings\n */\n cameraRestriction?: number;\n\n /**\n * @description Sets the default/initial vertical camera angle (pitch)\n * default: 10\n * usage: verticalCameraAngle=45\n * @groups scene-settings\n */\n verticalCameraAngle?: number;\n\n /**\n * @description When set this param restricts the down/vertical camera rotation to the given angle (e.g. 45 degree)\n * default: not set -> no camera angle restriction\n * usage: minVerticalCameraAngle=45\n * @groups scene-settings\n */\n minVerticalCameraAngle?: number;\n\n /**\n * @description When set this param restricts the up/vertical camera rotation to the given angle (e.g. 45 degree)\n * default: not set -> no camera angle restriction\n * usage: maxVerticalCameraAngle=45\n * @groups scene-settings\n */\n maxVerticalCameraAngle?: number;\n\n /**\n * @description Sets the default/initial horizontal camera angle (yaw)\n * default: -30\n * usage: horizontalCameraAngle=45\n * @groups scene-settings\n */\n horizontalCameraAngle?: number;\n\n /**\n * @description When set this param restricts the left/horizontal camera rotation to the given angle (e.g. 45 degree)\n * default: not set -> no camera angle restriction\n * usage: minHorizontalCameraAngle=45\n * @groups scene-settings\n */\n minHorizontalCameraAngle?: number;\n\n /**\n * @description When set this param restricts the right/horizontal camera rotation to the given angle (e.g. 45 degree)\n * default: not set -> no camera angle restriction\n * usage: maxHorizontalCameraAngle=45\n * @groups scene-settings\n */\n maxHorizontalCameraAngle?: number;\n\n /**\n * @description If set to false the camera will just jump to a new position\n * default: true\n * usage: animateCamera=false\n * @groups scene-settings\n */\n animateCamera?: boolean;\n\n /**\n * @internal\n * @description Easter Egg\n * */\n bananaForScale?: boolean;\n\n /**\n * @description If set to true, components which are between the camera and the selected component/preview will be rendered transparent\n * usage: transparentHighlighting=true\n * @groups scene-settings\n */\n transparentHighlighting?: boolean;\n\n /**\n * @description If set to true, the background is transparent and allows elements behind the configurator to be visible through the scene.\n * Not compatible with the WebGPU sky feature\n * usage: transparentBackground=true\n * @groups scene-settings\n */\n transparentBackground?: boolean;\n\n /**\n * @description If set to true it will try to apply all current global parameters to the loaded object\n */\n applyCurrentGlobalParameters?: boolean;\n\n /**\n * @description If set to true, component dimension labels stay visible even when the distance-based proximity check would normally hide them.\n * @default false\n */\n disableMeasurementCollisionDetection?: boolean;\n\n /**\n * @description Adds the given spacing (in centimeters) to the loaded object. This is then used to calculate the initial camera distance\n * default: 0\n * usage:\n * cameraSpacing=100, zoom out further by increasing camera spacing by 100 centimeters\n * cameraSpacing=-30, zoom in further by decreasing camera spacing by 30 centimeters\n * @groups scene-settings\n */\n cameraSpacing?: number;\n\n /**\n * @internal\n * @description If set to true, screen space reflections are enabled\n */\n ssr?: boolean;\n\n /**\n * @internal\n * @description features that can be enabled/disabled\n */\n featureFlags?: FeatureFlags;\n\n /**\n * @internal\n * @description If true, the scene will be rendered with WebGPU instead of WebGL\n * @default false\n * usage: webGpu=true\n */\n webGpu?: boolean;\n\n /**\n * @internal\n * @description Configuration for the WebGPU renderer (e.g. auto quality fps bounds).\n */\n webGpuConfig?: WebGpuConfigDefinition;\n\n /**\n * @description if true, the meshes of the component will be used, in addition to the bounding box, for raycasting (selecting)\n * Warning: this will decrease performance when hovering over components with complex meshes\n * @default false\n * usage: meshRaycasting=true\n */\n meshRaycasting?: boolean;\n}\n\nexport interface PlannerInitData {\n /**\n * @description Sets the default floor material when creating a new plan or drawing.\n * Can be a number (RGB color) or a string (material ID).\n */\n defaultFloorMaterial?: number | string;\n\n /**\n * @description Select with which camera mode to start initially.\n * usage: mode=2D\n * options: 2D, 3D, FP\n */\n mode?: Enumify<typeof CAMERA_TYPE>;\n\n /**\n * @internal\n * @description If set to true the plan can be edited.\n */\n edit?: boolean;\n\n /**\n * @description If set to true it will treat the planner as a multi object configurator (moc).\n * This means:\n * - do not merge geometries\n * - set configurator environment & lights in planner\n * - reduce initial spacing of camera (higher zoom)\n */\n moc?: boolean;\n\n /**\n * @description If set to true we will not hide other items while configuring in the planner\n */\n configureInRoom?: boolean;\n\n /**\n * @description If set to true docking of configurable objects in the planner is enabled.\n * The default value is true.\n */\n dockInRoom?: boolean;\n\n /**\n * @description If set to true the 3D planner camera zooms in as close to objects as the configurator does,\n * instead of stopping at the bounds of the plan. Objects which would be cut by the camera near plane are\n * hidden while they are cut.\n * @default false\n * usage: configuratorZoom=false\n */\n configuratorZoom?: boolean;\n}\n\nexport interface InitDataDefinition\n extends CommonInitData,\n ConfiguratorInitData,\n PlannerInitData {}\n","const FPS_LIST_SIZE = 10;\nconst FPS_MEASUREMENT_INTERVAL_MS = 20;\n\nexport default class FpsCounter {\n private _index: number = 0;\n private _fpsList: number[];\n private _prevTime: number = 0;\n private _frames: number = 0;\n private _fps: number = -1;\n\n constructor() {\n this._fpsList = Array(FPS_LIST_SIZE).fill(0);\n this._prevTime = (performance || Date).now();\n this.reset();\n }\n\n public update() {\n this._frames++;\n const time = (performance || Date).now();\n\n if (time >= this._prevTime + FPS_MEASUREMENT_INTERVAL_MS) {\n this._fpsList[this._index % FPS_LIST_SIZE] =\n (this._frames * 1000) / (time - this._prevTime);\n\n if (this._index >= FPS_LIST_SIZE) {\n this._fps =\n this._fpsList.reduce((pv, cv) => pv + cv) / this._fpsList.length;\n }\n\n this._prevTime = time;\n this._frames = 0;\n this._index++;\n }\n }\n\n public start() {\n this._prevTime = (performance || Date).now();\n this._frames = 0;\n }\n\n public reset() {\n this._fps = -1;\n this._fpsList = Array(FPS_LIST_SIZE).fill(0);\n this._index = 0;\n }\n\n public getFps() {\n return this._fps;\n }\n}\n","import type { Camera, Object3D, Scene, Vector2, WebGLRenderer } from 'three';\nimport { Box3 } from 'three';\nimport type { Enumify } from '#/common/src/utils/types';\nimport type { CAMERA_TYPE } from './cameracontrol/camera-type';\nimport type { WebGPURenderer } from 'three/webgpu';\nimport type { SceneShadingType } from './webgl/renderer/shading-settings';\nimport type { OutlineCustomParameters } from './webgl/renderer/scene-renderer';\n\nexport type GenericRoomleRenderer = RoomleRenderer<\n WebGLRenderer | WebGPURenderer\n>;\n\nexport enum PlannerRenderMode {\n Mode3D,\n Mode2D,\n}\n\nexport abstract class RoomleRenderer<\n RendererType extends WebGLRenderer | WebGPURenderer,\n> {\n public _creator_: string;\n public renderer: RendererType;\n protected isConfiguratorMode: boolean = true;\n protected isCameraMoving: boolean = false;\n protected cameraType: Enumify<typeof CAMERA_TYPE>;\n protected shadowNeedsUpdate: boolean = false;\n protected boundingBox: Box3 = new Box3();\n protected boundingBoxNeedsUpdate: boolean = false;\n\n protected constructor(creator: string, renderer: RendererType) {\n this._creator_ = creator;\n this.renderer = renderer;\n }\n\n public get isConfiguring(): boolean {\n return this.isConfiguratorMode;\n }\n\n public dispose(): void {\n this.renderer.dispose();\n }\n\n public setSize(width: number, height: number): void {\n this.renderer.setSize(width, height);\n }\n\n public getSize(target: Vector2): Vector2 {\n return this.renderer.getSize(target);\n }\n\n public setCameraType(cameraType: Enumify<typeof CAMERA_TYPE>) {\n this.cameraType = cameraType;\n }\n\n public movingCameraStarts(): void {\n this.isCameraMoving = true;\n }\n\n public movingCameraStops(): void {\n this.isCameraMoving = false;\n }\n\n public forceShadowUpdates(_updateBakedGroundShadow: boolean): void {\n this.shadowNeedsUpdate = true;\n }\n\n public clear() {\n this.renderer.clear();\n }\n\n public updateBounds(geometryBounds: Box3) {\n this.boundingBox.copy(geometryBounds);\n this.boundingBoxNeedsUpdate = true;\n }\n\n public switchToConfigurator(): void {\n this.isConfiguratorMode = true;\n }\n\n public switchToPlanner(_renderMode: PlannerRenderMode) {\n this.isConfiguratorMode = false;\n }\n\n public abstract setShadingType(shadingType: SceneShadingType): void;\n\n public abstract setCustomOutlineParameters(\n outlineCustomParameters: OutlineCustomParameters,\n ): void;\n\n public abstract render(scene: Scene, camera: Camera): void;\n\n public abstract showGUI(updateCallback: () => void): void;\n\n public abstract clearCache(): void;\n\n public abstract highlightObjects(selectedMeshes: Object3D[]): void;\n\n public abstract setGroundShadow(enabled: boolean, scene: Scene): void;\n\n public abstract enableUiInteractionMode(): void;\n\n public abstract disableUiInteractionMode(): void;\n}\n"],"mappings":";;AAkBA,IAAkB,IAAX,yBAAA,GAAA;QACL,EAAA,SAAA,UACA,EAAA,WAAA,WACA,EAAA,SAAA,SACA,EAAA,oBAAA;KACD,EAEY,IAAqB;CAChC,SAAS;CACT,QAAQ;CACT,EAEY,IAAuB;CAClC,MAAM;CACN,QAAQ;CACR,UAAU;CACV,QAAQ;CACR,aAAa;CACb,KAAK;CACL,SAAS;CACV,ECtCK,IAAgB,IAChB,IAA8B,IAEf,IAArB,MAAgC;CAO9B,cAAc;AAGZ,gBATuB,oBAEG,kBACF,eACH,IAGrB,KAAK,WAAW,MAAM,EAAc,CAAC,KAAK,EAAE,EAC5C,KAAK,aAAa,eAAe,MAAM,KAAK,EAC5C,KAAK,OAAO;;CAGd,SAAgB;AACd,OAAK;EACL,IAAM,KAAQ,eAAe,MAAM,KAAK;AAExC,EAAI,KAAQ,KAAK,YAAY,MAC3B,KAAK,SAAS,KAAK,SAAS,KACzB,KAAK,UAAU,OAAS,IAAO,KAAK,YAEnC,KAAK,UAAU,MACjB,KAAK,OACH,KAAK,SAAS,QAAQ,GAAI,MAAO,IAAK,EAAG,GAAG,KAAK,SAAS,SAG9D,KAAK,YAAY,GACjB,KAAK,UAAU,GACf,KAAK;;CAIT,QAAe;AAEb,EADA,KAAK,aAAa,eAAe,MAAM,KAAK,EAC5C,KAAK,UAAU;;CAGjB,QAAe;AAGb,EAFA,KAAK,OAAO,IACZ,KAAK,WAAW,MAAM,EAAc,CAAC,KAAK,EAAE,EAC5C,KAAK,SAAS;;CAGhB,SAAgB;AACd,SAAO,KAAK;;GCnCJ,IAAL,yBAAA,GAAA;QACL,EAAA,EAAA,SAAA,KAAA,UACA,EAAA,EAAA,SAAA,KAAA;KACD,EAEqB,IAAtB,MAEE;CAUA,YAAsB,GAAiB,GAAwB;AAE7D,4BATsC,0BACJ,6BAEG,uBACT,IAAI,GAAM,gCACI,IAG1C,KAAK,YAAY,GACjB,KAAK,WAAW;;CAGlB,IAAW,gBAAyB;AAClC,SAAO,KAAK;;CAGd,UAAuB;AACrB,OAAK,SAAS,SAAS;;CAGzB,QAAe,GAAe,GAAsB;AAClD,OAAK,SAAS,QAAQ,GAAO,EAAO;;CAGtC,QAAe,GAA0B;AACvC,SAAO,KAAK,SAAS,QAAQ,EAAO;;CAGtC,cAAqB,GAAyC;AAC5D,OAAK,aAAa;;CAGpB,qBAAkC;AAChC,OAAK,iBAAiB;;CAGxB,oBAAiC;AAC/B,OAAK,iBAAiB;;CAGxB,mBAA0B,GAAyC;AACjE,OAAK,oBAAoB;;CAG3B,QAAe;AACb,OAAK,SAAS,OAAO;;CAGvB,aAAoB,GAAsB;AAExC,EADA,KAAK,YAAY,KAAK,EAAe,EACrC,KAAK,yBAAyB;;CAGhC,uBAAoC;AAClC,OAAK,qBAAqB;;CAG5B,gBAAuB,GAAgC;AACrD,OAAK,qBAAqB"}