@roomle/web-sdk 5.1.0 → 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.
- package/lib/ConfiguratorKernel.wasm +0 -0
- package/lib/RoomleCore.wasm +0 -0
- package/lib/RoomleToolsCore.wasm +0 -0
- package/lib/{api-Woc5NOM1.mjs → api-DgmvQKJM.mjs} +5 -2
- package/lib/{api-Woc5NOM1.mjs.map → api-DgmvQKJM.mjs.map} +1 -1
- package/lib/asset-loader.worker-CE4O0JU-.mjs.map +1 -1
- package/lib/budgeteer.sw-yR2xApHT.mjs.map +1 -1
- package/lib/budgeteer.sw.js +1 -1
- package/lib/common-utils-CNGLvAo_.mjs.map +1 -1
- package/lib/{component-raycast-helper-CaY2UMli.mjs → component-raycast-helper-BKwofixp.mjs} +2 -2
- package/lib/{component-raycast-helper-CaY2UMli.mjs.map → component-raycast-helper-BKwofixp.mjs.map} +1 -1
- package/lib/{configurator-i-Zl5omd.mjs → configurator-B8BvHTky.mjs} +4 -4
- package/lib/{configurator-i-Zl5omd.mjs.map → configurator-B8BvHTky.mjs.map} +1 -1
- package/lib/configurator-CaIbtRET.mjs +2 -0
- package/lib/glb-viewer-CZvZ1erY.mjs +2 -0
- package/lib/{glb-viewer-C1-vP2Vq.mjs → glb-viewer-DamedzN_.mjs} +4 -4
- package/lib/{glb-viewer-C1-vP2Vq.mjs.map → glb-viewer-DamedzN_.mjs.map} +1 -1
- package/lib/{highlight-coordinator-DKMaPGPo.mjs → highlight-coordinator-DiTRPUXt.mjs} +3 -3
- package/lib/{highlight-coordinator-DKMaPGPo.mjs.map → highlight-coordinator-DiTRPUXt.mjs.map} +1 -1
- package/lib/{homag-intelligence-Dr0m9LxO.mjs → homag-intelligence-Kd23hknu.mjs} +7 -4
- package/lib/homag-intelligence-Kd23hknu.mjs.map +1 -0
- package/lib/{material-viewer-CHzje_V0.mjs → material-viewer-CArm5Sbd.mjs} +4 -4
- package/lib/{material-viewer-CHzje_V0.mjs.map → material-viewer-CArm5Sbd.mjs.map} +1 -1
- package/lib/{packages-DbOsSpKq.mjs → packages-Cl6mO8eL.mjs} +5 -5
- package/lib/{packages-DbOsSpKq.mjs.map → packages-Cl6mO8eL.mjs.map} +1 -1
- package/lib/{planner-BOrph7M7.mjs → planner-BvSAoyAE.mjs} +3 -3
- package/lib/{planner-BOrph7M7.mjs.map → planner-BvSAoyAE.mjs.map} +1 -1
- package/lib/planner-CGH5CX5Q.mjs +2 -0
- package/lib/roomle-headless.d.ts +167 -20
- package/lib/roomle-headless.js +9 -9
- package/lib/roomle-renderer-nCUrLU_S.mjs.map +1 -1
- package/lib/{roomle-sdk-CN9TqA78.mjs → roomle-sdk-CyuyR7se.mjs} +3486 -3145
- package/lib/roomle-sdk-CyuyR7se.mjs.map +1 -0
- package/lib/roomle-sdk.d.ts +167 -20
- package/lib/roomle-sdk.js +7 -7
- package/lib/{roomle-webgpu-renderer-C26OAfkn.mjs → roomle-webgpu-renderer-__fKL0NL.mjs} +7 -7
- package/lib/roomle-webgpu-renderer-__fKL0NL.mjs.map +1 -0
- package/lib/{scene-renderer-DGSgD6mp.mjs → scene-renderer-NOgMV9KH.mjs} +2 -2
- package/lib/{scene-renderer-DGSgD6mp.mjs.map → scene-renderer-NOgMV9KH.mjs.map} +1 -1
- package/lib/{script-loader-CL3F8sIY.mjs → script-loader-i9PxCq7s.mjs} +2 -2
- package/lib/{script-loader-CL3F8sIY.mjs.map → script-loader-i9PxCq7s.mjs.map} +1 -1
- package/lib/static/packages/workers/generated/budgeteer.sw.js +1 -1
- package/lib/static/roomle-core-hsc/node_modules/roomle-core-hsc/package.json +1 -1
- package/lib/static/roomle-core-hsc/node_modules/roomle-core-hsc/src/embind/plannerCoreInterface.d.ts +23 -4
- package/lib/static/roomle-core-hsc/node_modules/roomle-core-hsc/src/embind/plannerCoreInterface.js.map +1 -1
- package/lib/static/roomle-core-hsc/node_modules/roomle-core-hsc/wasm_modern/ConfiguratorKernel.wasm +0 -0
- package/lib/static/roomle-core-hsc/node_modules/roomle-core-hsc/wasm_modern/RoomleCore.wasm +0 -0
- package/lib/static/roomle-core-hsc/node_modules/roomle-core-hsc/wasm_modern/RoomleToolsCore.wasm +0 -0
- package/lib/{stats-helper-C74q5Bje.mjs → stats-helper-BKeEnvFU.mjs} +2 -2
- package/lib/{stats-helper-C74q5Bje.mjs.map → stats-helper-BKeEnvFU.mjs.map} +1 -1
- package/lib/{threejs-utils-DHTRY4yW.mjs → threejs-utils-CX2ILaES.mjs} +66 -62
- package/lib/threejs-utils-CX2ILaES.mjs.map +1 -0
- package/lib/{tools-core-D3kc3jRW.mjs → tools-core-DqGfLhDO.mjs} +3 -3
- package/lib/{tools-core-D3kc3jRW.mjs.map → tools-core-DqGfLhDO.mjs.map} +1 -1
- package/package.json +2 -2
- package/lib/configurator-Bo_pnqDi.mjs +0 -2
- package/lib/glb-viewer-CaNU0FLF.mjs +0 -2
- package/lib/homag-intelligence-Dr0m9LxO.mjs.map +0 -1
- package/lib/planner-DXeyIHUx.mjs +0 -2
- package/lib/roomle-sdk-CN9TqA78.mjs.map +0 -1
- package/lib/roomle-webgpu-renderer-C26OAfkn.mjs.map +0 -1
- package/lib/threejs-utils-DHTRY4yW.mjs.map +0 -1
package/lib/roomle-headless.d.ts
CHANGED
|
@@ -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),
|
|
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 {
|
|
@@ -3915,6 +3956,8 @@ export declare interface FetchOptions {
|
|
|
3915
3956
|
|
|
3916
3957
|
export declare type FinalizeMode = 'immediate' | 'on-signal';
|
|
3917
3958
|
|
|
3959
|
+
export declare type FloatArray = EmscriptenArray<number>;
|
|
3960
|
+
|
|
3918
3961
|
export declare abstract class Floor extends PlanElement {
|
|
3919
3962
|
area: number;
|
|
3920
3963
|
material: FloorMaterial;
|
|
@@ -4186,7 +4229,7 @@ export declare interface GlobalInitDataDefinition {
|
|
|
4186
4229
|
*/
|
|
4187
4230
|
configuratorId?: string;
|
|
4188
4231
|
/**
|
|
4189
|
-
* @description Set which RAPI (Roomle API) backend should be used usage: customApiUrl=https://www.roomle.com/api/
|
|
4232
|
+
* @description Set which RAPI (Roomle API) backend should be used usage: customApiUrl=https://www.roomle.com/api/v3
|
|
4190
4233
|
*/
|
|
4191
4234
|
customApiUrl?: string;
|
|
4192
4235
|
/* Excluded from this release type: e2e */
|
|
@@ -4268,7 +4311,7 @@ export declare interface HandWrittenPlanInteractionHandler {
|
|
|
4268
4311
|
moveObjectsBy(planObjects: KernelObjectPtrList, distance: KernelVector3): void;
|
|
4269
4312
|
rotateObjectTo(planObject: KernelObject, angleInRad: number): void;
|
|
4270
4313
|
setObjectRotation(planObject: KernelObject, angleInRad: number): void;
|
|
4271
|
-
addPlanObjects(list: KernelObjectPtrList, findFreeSpaceInPlan: boolean): PlanObject[];
|
|
4314
|
+
addPlanObjects(list: KernelObjectPtrList, findFreeSpaceInPlan: boolean, cameraPosition?: KernelVector3, lineOfSight?: KernelVector3): PlanObject[];
|
|
4272
4315
|
addPlanObjectFromItem(object: KernelObject, position: KernelVector3, type: number, findFreeSpaceInPlan: boolean): PlanObject;
|
|
4273
4316
|
addOrUpdateExternalPlanObjects(serializedConfiguration: string | string[], position: KernelVector3, rotationInRad: number, updateConfiguration: ExternalObjectLoadConfiguration_2, mergedGroupIds: string | string[]): PlanObject[];
|
|
4274
4317
|
createPreviewGeometryForAddOn(objectId: string, objectConfiguration: string, articleId: string, groupDefinitions: string, validContainerModules: ExternalValidContainerModule_2[]): void;
|
|
@@ -4576,6 +4619,9 @@ export declare const HI_GROUP_OPERATION: {
|
|
|
4576
4619
|
readonly MERGE_ARTICLE_INTO_GROUP: "merge-article-into-group";
|
|
4577
4620
|
readonly EXCHANGE_ROOT_MODULE: "exchange-root-module";
|
|
4578
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";
|
|
4579
4625
|
};
|
|
4580
4626
|
|
|
4581
4627
|
export declare const HI_LOAD_OBJECT_REASON: {
|
|
@@ -4594,6 +4640,7 @@ export declare const HI_LOAD_OBJECT_REASON: {
|
|
|
4594
4640
|
readonly MERGE_WITH_ON_ACTION: "merge_with_on_action";
|
|
4595
4641
|
readonly PLAN_CHANGED: "plan_changed";
|
|
4596
4642
|
readonly POSITION_CHANGED: "position_changed";
|
|
4643
|
+
readonly REARRANGE: "rearrange";
|
|
4597
4644
|
readonly SPLIT: "split";
|
|
4598
4645
|
readonly SWAP_MODULE: "swap_module";
|
|
4599
4646
|
readonly SWAP_GROUP: "swap_group";
|
|
@@ -4764,15 +4811,30 @@ export declare interface HiGroupOperationPayloads {
|
|
|
4764
4811
|
groupId: string;
|
|
4765
4812
|
dockTo: HiDockTarget;
|
|
4766
4813
|
};
|
|
4767
|
-
|
|
4814
|
+
/** `attributes` are overrides of the new root module, e.g. another width. */
|
|
4815
|
+
'exchange-root-module': HiArticlePick & {
|
|
4768
4816
|
groupId: string;
|
|
4769
4817
|
rootModuleId: string;
|
|
4770
|
-
articleId: string;
|
|
4771
4818
|
};
|
|
4772
4819
|
'merge-groups': {
|
|
4773
4820
|
targetGroupId: string;
|
|
4774
4821
|
groupIds: string[];
|
|
4775
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
|
+
};
|
|
4776
4838
|
}
|
|
4777
4839
|
|
|
4778
4840
|
export declare interface HiGroupOperationResult {
|
|
@@ -4780,6 +4842,8 @@ export declare interface HiGroupOperationResult {
|
|
|
4780
4842
|
groups: HiPlanGroup[];
|
|
4781
4843
|
removedGroupIds: string[];
|
|
4782
4844
|
changedModuleIds?: string[];
|
|
4845
|
+
corrections?: string[];
|
|
4846
|
+
gapClosed?: boolean;
|
|
4783
4847
|
}
|
|
4784
4848
|
|
|
4785
4849
|
export declare type HiLoadObjectReason = (typeof HI_LOAD_OBJECT_REASON)[keyof typeof HI_LOAD_OBJECT_REASON];
|
|
@@ -4882,6 +4946,7 @@ export declare interface HiPlanContext {
|
|
|
4882
4946
|
rooms?: HiPlanRoomInformation;
|
|
4883
4947
|
articles?: HiPlanArticle[];
|
|
4884
4948
|
groups?: HiPlanGroup[];
|
|
4949
|
+
obstacles?: HiPlanObstacles;
|
|
4885
4950
|
}
|
|
4886
4951
|
|
|
4887
4952
|
export declare interface HiPlanContextData {
|
|
@@ -4891,7 +4956,7 @@ export declare interface HiPlanContextData {
|
|
|
4891
4956
|
}>;
|
|
4892
4957
|
}
|
|
4893
4958
|
|
|
4894
|
-
export declare type HiPlanContextSection = 'masterData' | 'rooms' | 'articles' | 'groups';
|
|
4959
|
+
export declare type HiPlanContextSection = 'masterData' | 'rooms' | 'articles' | 'groups' | 'obstacles';
|
|
4895
4960
|
|
|
4896
4961
|
export declare interface HiPlanContour {
|
|
4897
4962
|
level: number;
|
|
@@ -4929,6 +4994,11 @@ export declare interface HiPlanGroup {
|
|
|
4929
4994
|
roots: HiPlanRoot[];
|
|
4930
4995
|
}
|
|
4931
4996
|
|
|
4997
|
+
export declare interface HiPlanGroupObstacles {
|
|
4998
|
+
id: string;
|
|
4999
|
+
roots: HiPlanRootOutline[];
|
|
5000
|
+
}
|
|
5001
|
+
|
|
4932
5002
|
export declare interface HiPlanGroupPosition {
|
|
4933
5003
|
pos?: number[];
|
|
4934
5004
|
rotationY?: number;
|
|
@@ -4949,6 +5019,18 @@ export declare interface HiPlanMasterDataModule {
|
|
|
4949
5019
|
attributes: string[];
|
|
4950
5020
|
}
|
|
4951
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
|
+
|
|
4952
5034
|
/**
|
|
4953
5035
|
* The plan context is the data an AI agent needs to understand and author a
|
|
4954
5036
|
* planning session. `getPlanContext` (glue logic) assembles it and every
|
|
@@ -4990,6 +5072,13 @@ export declare interface HiPlanRootAttribute {
|
|
|
4990
5072
|
value?: number | string | boolean;
|
|
4991
5073
|
}
|
|
4992
5074
|
|
|
5075
|
+
export declare interface HiPlanRootOutline {
|
|
5076
|
+
id: string;
|
|
5077
|
+
outline: HiPlanPosition3[];
|
|
5078
|
+
bottomMm: number;
|
|
5079
|
+
topMm: number;
|
|
5080
|
+
}
|
|
5081
|
+
|
|
4993
5082
|
export declare interface HiPlanWall {
|
|
4994
5083
|
index: number;
|
|
4995
5084
|
side: HiPlanWallSide;
|
|
@@ -6740,6 +6829,29 @@ export declare interface ObjectTypeCategory {
|
|
|
6740
6829
|
|
|
6741
6830
|
export declare type ObjectWallDimension = DimensionDefinition<Vector3_2, Vector3_2>;
|
|
6742
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
|
+
|
|
6743
6855
|
export declare interface OffsetCamera {
|
|
6744
6856
|
offset: CanvasOffset;
|
|
6745
6857
|
resetOffset(): void;
|
|
@@ -7213,6 +7325,9 @@ export declare interface PlanInteractionHandler_2 {
|
|
|
7213
7325
|
setNodeType(node: Node_3, nodeType: NodeType_2): void;
|
|
7214
7326
|
setWallThickness(wall: Wall_2, thickness: number): void;
|
|
7215
7327
|
setWallHeight(wall: Wall_2, height: number): void;
|
|
7328
|
+
setWallArc(wall: Wall_2, sweepAngleInRad: number): void;
|
|
7329
|
+
setWallArcThroughPoint(wall: Wall_2, point: Vector3): void;
|
|
7330
|
+
setWallCurve(wall: Wall_2, interiorControlPoints: WallCurveControlPoint[], degree: number, knots: number[]): void;
|
|
7216
7331
|
setWallColor(wall: Wall_2, color: number): void;
|
|
7217
7332
|
setWallLeftMaterial(wall: Wall_2, material: WallMaterial_2): void;
|
|
7218
7333
|
setWallRightMaterial(wall: Wall_2, material: WallMaterial_2): void;
|
|
@@ -7239,9 +7354,9 @@ export declare interface PlanInteractionHandler_2 {
|
|
|
7239
7354
|
addAttic(wall: Wall_2, kneeHeight: number, width: number, side: WallSide_2 | null | undefined): Attic;
|
|
7240
7355
|
addNode(position: Vector3): Node_3;
|
|
7241
7356
|
addText(text: string, position: Vector3): PlanText_2;
|
|
7242
|
-
addPlanObject(itemId: string, type: string, size: Vector3, position: Vector3, rotationInRad: number, findFreeSpaceInPlan: boolean): PlanObject_2;
|
|
7243
|
-
addPlanObjects(catalogItems: CatalogItemPtrList_2, findFreeSpaceInPlan: boolean): PlanObject_2[];
|
|
7244
|
-
addPlanObjectFromItem(item: CatalogItem_2, position: Vector3, rotationInRad: number, findFreeSpaceInPlan: boolean): PlanObject_2;
|
|
7357
|
+
addPlanObject(itemId: string, type: string, size: Vector3, position: Vector3, rotationInRad: number, findFreeSpaceInPlan: boolean, cameraPosition?: Vector3, lineOfSight?: Vector3): PlanObject_2;
|
|
7358
|
+
addPlanObjects(catalogItems: CatalogItemPtrList_2, findFreeSpaceInPlan: boolean, cameraPosition?: Vector3, lineOfSight?: Vector3): PlanObject_2[];
|
|
7359
|
+
addPlanObjectFromItem(item: CatalogItem_2, position: Vector3, rotationInRad: number, findFreeSpaceInPlan: boolean, cameraPosition?: Vector3, lineOfSight?: Vector3): PlanObject_2;
|
|
7245
7360
|
addOrUpdateExternalPlanObjects(groups: string | string[], position: Vector3, rotationInRad: number, updateConfiguration: ExternalObjectLoadConfiguration, mergedGroupIds: string | string[]): PlanObject_2[];
|
|
7246
7361
|
createPreviewGeometryForAddOn(objectId: string, objectConfiguration: string, articleId: string, groupDefinitions: string, validContainerModules: ExternalValidContainerModule[]): void;
|
|
7247
7362
|
catalogItemLoaded(catalogItem: CatalogItem_2): void;
|
|
@@ -7363,6 +7478,7 @@ export declare interface PlanModelViewHelper_2 {
|
|
|
7363
7478
|
requestMesh3d(element: PlanElement_3): void;
|
|
7364
7479
|
getExternalObjectGroups(plan: Plan_3): KernelObjectConfigurationArray;
|
|
7365
7480
|
getExternalRoomInformation(plan: Plan_3, mode: PlanRoomGeometryMode_2): RoomInformation;
|
|
7481
|
+
getObstacleMap(plan: Plan_3): ObstacleMap2d;
|
|
7366
7482
|
getGroupedObjects(anObject: PlanObject): KernelPlanObject[];
|
|
7367
7483
|
calculateLightSourceDistribution(plan: Plan_3, lightSourceConfiguration: LightSourceConfiguration): RoomLightSourceDistributionArray;
|
|
7368
7484
|
getObjectSnapInformation(anObject: PlanObject, debugHelpLines: boolean): ObjectSnapInformation;
|
|
@@ -7527,7 +7643,11 @@ export declare class PlannerKernelAccess extends ConfiguratorKernelAccess {
|
|
|
7527
7643
|
protected _validateExternalComponentParameters(componentId: number, parameters: KernelParameter[]): Promise<KernelParameter[]>;
|
|
7528
7644
|
protected _validateExternalPlanObjectParameters(objectId: number, parameters: KernelParameter[]): Promise<KernelParameter[]>;
|
|
7529
7645
|
catalogItemLoaded(catalogItem: RapiItem): void;
|
|
7530
|
-
|
|
7646
|
+
/**
|
|
7647
|
+
* @param camera in 3D and first-person view, doors, windows and wall-mounted
|
|
7648
|
+
* objects are placed on the wall this camera looks at
|
|
7649
|
+
*/
|
|
7650
|
+
insertItems(itemList: Array<RapiItem | RapiConfiguration>, newUndoRedoStep?: boolean, camera?: Camera): Promise<RuntimeId[]>;
|
|
7531
7651
|
private _performInsertItems;
|
|
7532
7652
|
duplicateItems(planObjects: PlanObject[]): PlanObject[];
|
|
7533
7653
|
mergeItems(planObjects: PlanObject[]): void;
|
|
@@ -9049,6 +9169,7 @@ export declare class RapiAccess implements Context {
|
|
|
9049
9169
|
getMeshesOfCatalog(catalogId: RapiId): Promise<RapiMesh[]>;
|
|
9050
9170
|
getTexturesOf(rapiJson: RapiJson): Promise<RapiTexture[]>;
|
|
9051
9171
|
getItemsOf(rapiJson: RapiJson): Promise<RapiItem[]>;
|
|
9172
|
+
getTagsOf(rapiJson: RapiJson): Promise<RapiTag[]>;
|
|
9052
9173
|
getMaterialsOf(rapiJson: RapiJson): Promise<RapiMaterial[]>;
|
|
9053
9174
|
getComponentsOf(rapiJson: RapiJson): Promise<RapiComponent[]>;
|
|
9054
9175
|
getAdditionalContentsOfItems(rapiItems: RapiItem[]): Promise<RapiAdditionalContent[]>;
|
|
@@ -9097,6 +9218,7 @@ export declare class RapiAccess implements Context {
|
|
|
9097
9218
|
private _get;
|
|
9098
9219
|
private _fetchJson;
|
|
9099
9220
|
private _fetch;
|
|
9221
|
+
private _logDeprecatedEndpoint;
|
|
9100
9222
|
private _createHeaders;
|
|
9101
9223
|
private _handleJson;
|
|
9102
9224
|
private _prepareEmbeddedData;
|
|
@@ -9291,15 +9413,15 @@ export declare interface RapiItem extends RapiElement {
|
|
|
9291
9413
|
width: number;
|
|
9292
9414
|
height: number;
|
|
9293
9415
|
depth: number;
|
|
9294
|
-
basecolor: number;
|
|
9295
|
-
displayedWidth: number;
|
|
9296
|
-
displayedHeight: number;
|
|
9297
|
-
displayedDepth: number;
|
|
9298
9416
|
perspectiveImageHD: AssetUrl;
|
|
9299
9417
|
topImage: AssetUrl;
|
|
9300
|
-
|
|
9301
|
-
|
|
9302
|
-
|
|
9418
|
+
basecolor?: number;
|
|
9419
|
+
displayedWidth?: number;
|
|
9420
|
+
displayedHeight?: number;
|
|
9421
|
+
displayedDepth?: number;
|
|
9422
|
+
threeDimensionalAssetWeb?: AssetUrl;
|
|
9423
|
+
threeDimensionalAssetIOS?: AssetUrl;
|
|
9424
|
+
threeDimensionalAsset?: AssetUrl;
|
|
9303
9425
|
flipable: boolean;
|
|
9304
9426
|
scaleable: boolean;
|
|
9305
9427
|
meta: string;
|
|
@@ -9778,6 +9900,7 @@ export declare class RoomDesignerApi implements RoomDesignerRequests {
|
|
|
9778
9900
|
mergeGroups(groupIds: string[]): Promise<void>;
|
|
9779
9901
|
getPosDataOfAllGroups(): Promise<PosGroup[]>;
|
|
9780
9902
|
getRoomInformation(mode?: PlanRoomGeometryMode): Promise<ExternalRoomInformation>;
|
|
9903
|
+
getPlanObstacles(): Promise<ExternalPlanObstacles>;
|
|
9781
9904
|
saveExternalObjectSnapshot(): Promise<ExternalObjectSnapshotSaveResult | null>;
|
|
9782
9905
|
saveCurrentPlanSnapshot(): Promise<RapiPlanSnapshotGetData>;
|
|
9783
9906
|
renderPosDataImage(posDataJson: object): Promise<void>;
|
|
@@ -9796,6 +9919,7 @@ export declare interface RoomDesignerRequests {
|
|
|
9796
9919
|
mergeGroups(groupIds: string[]): Promise<void>;
|
|
9797
9920
|
getPosDataOfAllGroups(): Promise<PosGroup[]>;
|
|
9798
9921
|
getRoomInformation(mode?: PlanRoomGeometryMode): Promise<ExternalRoomInformation>;
|
|
9922
|
+
getPlanObstacles(): Promise<ExternalPlanObstacles>;
|
|
9799
9923
|
saveExternalObjectSnapshot(): Promise<ExternalObjectSnapshotSaveResult | null>;
|
|
9800
9924
|
}
|
|
9801
9925
|
|
|
@@ -10845,8 +10969,9 @@ export declare class RoomlePlanner<P extends readonly PluginName[] = readonly []
|
|
|
10845
10969
|
private _globalInitData;
|
|
10846
10970
|
private _globalCallback;
|
|
10847
10971
|
private _unitFormatter;
|
|
10848
|
-
private _planInteractionManager;
|
|
10849
10972
|
private _elevationPlan2dGenerator;
|
|
10973
|
+
private _skyStateTracker;
|
|
10974
|
+
private _planInteractionManager;
|
|
10850
10975
|
private _sceneManager;
|
|
10851
10976
|
private _plan;
|
|
10852
10977
|
private _preloadPlanId;
|
|
@@ -11281,6 +11406,8 @@ export declare class RoomlePlanner<P extends readonly PluginName[] = readonly []
|
|
|
11281
11406
|
getExternalObjectPlanContext(include?: HiPlanContextSection[]): Promise<HiPlanContext>;
|
|
11282
11407
|
externalObjectGroupOperation<C extends HiGroupOperation>(command: C, payload: HiGroupOperationPayloads[C]): Promise<HiGroupOperationResult>;
|
|
11283
11408
|
getExternalRoomInformation(mode?: PlanRoomGeometryMode): Promise<ExternalRoomInformation>;
|
|
11409
|
+
_getExternalPlanObstacles(): Promise<ExternalPlanObstacles>;
|
|
11410
|
+
private _planObstacleKind;
|
|
11284
11411
|
/**
|
|
11285
11412
|
* Highlights a product in the planner.
|
|
11286
11413
|
* @param planElementId The ID of the plan element to highlight.
|
|
@@ -11900,6 +12027,7 @@ export declare abstract class SceneManager implements Context, LifeCycleCallback
|
|
|
11900
12027
|
protected _stopRendering: boolean;
|
|
11901
12028
|
protected _roomleRenderer: GenericRoomleRenderer | null;
|
|
11902
12029
|
private _roomleRendererReady;
|
|
12030
|
+
protected _sceneSetupReady: AsyncGuard<void>;
|
|
11903
12031
|
private _isDebugGUIInitialized;
|
|
11904
12032
|
private _forceRender;
|
|
11905
12033
|
private _lastChange;
|
|
@@ -12130,6 +12258,7 @@ export declare class SkyStateTracker extends EventDispatcher<SkyFeatureEventMap>
|
|
|
12130
12258
|
private _isCurrentlyActive;
|
|
12131
12259
|
private _initData;
|
|
12132
12260
|
constructor(creator: string);
|
|
12261
|
+
get isSkyEnabled(): boolean;
|
|
12133
12262
|
get isCurrentlyActive(): boolean;
|
|
12134
12263
|
notifyEnteredPlanner(): void;
|
|
12135
12264
|
notifyEnteredConfigurator(): void;
|
|
@@ -12718,6 +12847,9 @@ export declare interface VariantsList {
|
|
|
12718
12847
|
parts: KernelPart[];
|
|
12719
12848
|
}
|
|
12720
12849
|
|
|
12850
|
+
export declare class Vector2Array extends EmsArray<KernelVector2f> {
|
|
12851
|
+
}
|
|
12852
|
+
|
|
12721
12853
|
export declare class Vector2fArray extends EmsArray<KernelVector2f> {
|
|
12722
12854
|
}
|
|
12723
12855
|
|
|
@@ -12766,6 +12898,14 @@ export declare interface Wall_2 extends PlanElement_2 {
|
|
|
12766
12898
|
getCornerToLeft(): Vector3;
|
|
12767
12899
|
getCornerToRight(): Vector3;
|
|
12768
12900
|
getAngle(): number;
|
|
12901
|
+
getArcSweepAngle(): number;
|
|
12902
|
+
getCurveControlPoints(): PointArray_2;
|
|
12903
|
+
getCurveWeights(): FloatArray;
|
|
12904
|
+
getCurveDegree(): number;
|
|
12905
|
+
getAxisPolyline(): PointArray_2;
|
|
12906
|
+
getLeftFacePolyline(): PointArray_2;
|
|
12907
|
+
getRightFacePolyline(): PointArray_2;
|
|
12908
|
+
getTangentAngleAt(point: Vector3): number;
|
|
12769
12909
|
getLength(side: WallSide_2): number;
|
|
12770
12910
|
getSlopingLength(): number;
|
|
12771
12911
|
getPreferredSide(): WallSide_2;
|
|
@@ -12774,6 +12914,7 @@ export declare interface Wall_2 extends PlanElement_2 {
|
|
|
12774
12914
|
getCenter(): Vector3;
|
|
12775
12915
|
getHeightAt(aPoint: Vector3): number;
|
|
12776
12916
|
getPointWithHeight(aHeight: number): Vector3;
|
|
12917
|
+
readonly isCurved: boolean;
|
|
12777
12918
|
readonly meshThickness: number;
|
|
12778
12919
|
readonly isVectorWall: boolean;
|
|
12779
12920
|
readonly thickness: number;
|
|
@@ -12799,6 +12940,12 @@ export declare class WallAtticPlanElementViewModel extends PlanElementViewModel
|
|
|
12799
12940
|
update(): void;
|
|
12800
12941
|
}
|
|
12801
12942
|
|
|
12943
|
+
export declare interface WallCurveControlPoint {
|
|
12944
|
+
u: number;
|
|
12945
|
+
v: number;
|
|
12946
|
+
w: number;
|
|
12947
|
+
}
|
|
12948
|
+
|
|
12802
12949
|
export declare interface WallDefinition {
|
|
12803
12950
|
from: Position3;
|
|
12804
12951
|
to: Position3;
|
package/lib/roomle-headless.js
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { a as e, i as t, n, r, t as i } from "./packages-
|
|
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-
|
|
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-
|
|
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-
|
|
10
|
-
import { t as P } from "./configurator-
|
|
11
|
-
import { t as be } from "./planner-
|
|
12
|
-
import { n as xe, t as Se } from "./glb-viewer-
|
|
13
|
-
import { t as Ce } from "./api-
|
|
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-
|
|
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/v2\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"}
|