@roomle/web-sdk 5.1.0-alpha.1 → 5.1.0-alpha.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/{BufferGeometry-Cd2ewNVQ.mjs → BufferGeometry-Bl5whHAB.mjs} +1 -1
- package/lib/{BufferGeometry-Cd2ewNVQ.mjs.map → BufferGeometry-Bl5whHAB.mjs.map} +1 -1
- package/lib/ConfiguratorKernel.js +2 -2
- package/lib/ConfiguratorKernel.wasm +0 -0
- package/lib/{GLTFExporter-n80QLoDf.mjs → GLTFExporter-yQ7mMauu.mjs} +1 -1
- package/lib/{GLTFExporter-n80QLoDf.mjs.map → GLTFExporter-yQ7mMauu.mjs.map} +1 -1
- package/lib/{GaussianBlurNode-Cwy3kx8H.mjs → GaussianBlurNode-DNBEf5-n.mjs} +14 -14
- package/lib/{GaussianBlurNode-Cwy3kx8H.mjs.map → GaussianBlurNode-DNBEf5-n.mjs.map} +1 -1
- package/lib/{PointLightHelper-DlPLsDNy.mjs → PointLightHelper-CuPSBuDU.mjs} +2 -2
- package/lib/{PointLightHelper-DlPLsDNy.mjs.map → PointLightHelper-CuPSBuDU.mjs.map} +1 -1
- package/lib/RoomleCore.wasm +0 -0
- package/lib/RoomleToolsCore.wasm +0 -0
- package/lib/{SpotLightHelper-YWHbVXAF.mjs → SpotLightHelper-m-Rh8vGU.mjs} +2 -2
- package/lib/{SpotLightHelper-YWHbVXAF.mjs.map → SpotLightHelper-m-Rh8vGU.mjs.map} +1 -1
- package/lib/{USDZExporter-Bm-c5e_n.mjs → USDZExporter-MdkuT226.mjs} +1 -1
- package/lib/{USDZExporter-Bm-c5e_n.mjs.map → USDZExporter-MdkuT226.mjs.map} +1 -1
- package/lib/{api-B5wIZIHt.mjs → api-KWh-ESd5.mjs} +2 -2
- package/lib/{api-B5wIZIHt.mjs.map → api-KWh-ESd5.mjs.map} +1 -1
- package/lib/{asset-loader.worker-CE4O0JU-.mjs → asset-loader.worker-CzI1oyTY.mjs} +1 -1
- package/lib/asset-loader.worker-CzI1oyTY.mjs.map +1 -0
- package/lib/{banana-for-scale-D0bw51dn.mjs → banana-for-scale-DpKXNBt_.mjs} +2 -2
- package/lib/{banana-for-scale-D0bw51dn.mjs.map → banana-for-scale-DpKXNBt_.mjs.map} +1 -1
- package/lib/{budgeteer.sw-yR2xApHT.mjs → budgeteer.sw-D80jTmYa.mjs} +1 -1
- package/lib/budgeteer.sw-D80jTmYa.mjs.map +1 -0
- package/lib/{component-dimensioning-VIUcXV7r.mjs → component-dimensioning-luQ3LgrU.mjs} +4 -4
- package/lib/{component-dimensioning-VIUcXV7r.mjs.map → component-dimensioning-luQ3LgrU.mjs.map} +1 -1
- package/lib/{component-raycast-helper-CEAdBcdx.mjs → component-raycast-helper-hj6sm7jw.mjs} +3 -3
- package/lib/{component-raycast-helper-CEAdBcdx.mjs.map → component-raycast-helper-hj6sm7jw.mjs.map} +1 -1
- package/lib/{configurator-CxlLvBCx.mjs → configurator-CQ7KsW0O.mjs} +4 -4
- package/lib/{configurator-CxlLvBCx.mjs.map → configurator-CQ7KsW0O.mjs.map} +1 -1
- package/lib/configurator-ymHt9qjg.mjs +2 -0
- package/lib/{continuous-drawing-helper-Dr1r-5N2.mjs → continuous-drawing-helper-DqHIR_qF.mjs} +1 -1
- package/lib/{continuous-drawing-helper-Dr1r-5N2.mjs.map → continuous-drawing-helper-DqHIR_qF.mjs.map} +1 -1
- package/lib/{dimensioning-helper-ChQDwSjn.mjs → dimensioning-helper-CGPjS2hW.mjs} +2 -2
- package/lib/{dimensioning-helper-ChQDwSjn.mjs.map → dimensioning-helper-CGPjS2hW.mjs.map} +1 -1
- package/lib/dimensioning-helper-VndKlIXS.mjs +2 -0
- package/lib/{glb-viewer-27e6wfY4.mjs → glb-viewer-BWMMzvuG.mjs} +4 -4
- package/lib/{glb-viewer-27e6wfY4.mjs.map → glb-viewer-BWMMzvuG.mjs.map} +1 -1
- package/lib/glb-viewer-D5QHd6Da.mjs +2 -0
- package/lib/{highlight-coordinator-C05kDjj5.mjs → highlight-coordinator-DYjBxYpy.mjs} +2 -2
- package/lib/{highlight-coordinator-C05kDjj5.mjs.map → highlight-coordinator-DYjBxYpy.mjs.map} +1 -1
- package/lib/{homag-intelligence-BRQ1WoQo.mjs → homag-intelligence-lbse0Y0v.mjs} +3 -3
- package/lib/{homag-intelligence-BRQ1WoQo.mjs.map → homag-intelligence-lbse0Y0v.mjs.map} +1 -1
- package/lib/hosek-wilkie-sky-iMar2iw-.mjs +3755 -0
- package/lib/hosek-wilkie-sky-iMar2iw-.mjs.map +1 -0
- package/lib/{imos-ix-poc-export-helper-DhxAAMc9.mjs → imos-ix-poc-export-helper-CyGqK7nu.mjs} +1 -1
- package/lib/{imos-ix-poc-export-helper-DhxAAMc9.mjs.map → imos-ix-poc-export-helper-CyGqK7nu.mjs.map} +1 -1
- package/lib/{layer-DaGoZ5YI.mjs → layer-DRMDGxT7.mjs} +2 -2
- package/lib/layer-DRMDGxT7.mjs.map +1 -0
- package/lib/{material-viewer-Byi5t7-x.mjs → material-viewer-BKTxh5Ui.mjs} +4 -4
- package/lib/{material-viewer-Byi5t7-x.mjs.map → material-viewer-BKTxh5Ui.mjs.map} +1 -1
- package/lib/{packages-3jOdcfbr.mjs → packages-B4K6xrdJ.mjs} +5 -5
- package/lib/{packages-3jOdcfbr.mjs.map → packages-B4K6xrdJ.mjs.map} +1 -1
- package/lib/planner-BM825oIz.mjs +2 -0
- package/lib/{planner-BeINcWRR.mjs → planner-HMMHSMAp.mjs} +3 -3
- package/lib/{planner-BeINcWRR.mjs.map → planner-HMMHSMAp.mjs.map} +1 -1
- package/lib/{plugin-system-DR5maiUo.mjs → plugin-system-CRaC04G5.mjs} +2 -2
- package/lib/{plugin-system-DR5maiUo.mjs.map → plugin-system-CRaC04G5.mjs.map} +1 -1
- package/lib/roomle-headless.d.ts +162 -4
- package/lib/roomle-headless.js +11 -11
- package/lib/roomle-renderer-Ato6RMrd.mjs.map +1 -1
- package/lib/{roomle-sdk-CsSQAqQG.mjs → roomle-sdk-5aB4wxLW.mjs} +3045 -2876
- package/lib/roomle-sdk-5aB4wxLW.mjs.map +1 -0
- package/lib/roomle-sdk.d.ts +162 -4
- package/lib/roomle-sdk.js +8 -8
- package/lib/{roomle-webgpu-renderer-BBE14A8V.mjs → roomle-webgpu-renderer-BfZKcXSz.mjs} +349 -344
- package/lib/{roomle-webgpu-renderer-BBE14A8V.mjs.map → roomle-webgpu-renderer-BfZKcXSz.mjs.map} +1 -1
- package/lib/{scene-renderer-B8SBMSQ7.mjs → scene-renderer-DXvavD4L.mjs} +3 -3
- package/lib/{scene-renderer-B8SBMSQ7.mjs.map → scene-renderer-DXvavD4L.mjs.map} +1 -1
- package/lib/{script-loader-Dx3gOiB3.mjs → script-loader-axxcKvph.mjs} +2 -2
- package/lib/{script-loader-Dx3gOiB3.mjs.map → script-loader-axxcKvph.mjs.map} +1 -1
- package/lib/src-Bbq3Hqzn.mjs +2 -0
- package/lib/src-HhklrVDg.mjs +1950 -0
- package/lib/src-HhklrVDg.mjs.map +1 -0
- 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/configuratorCoreInterface.d.ts +16 -0
- package/lib/static/roomle-core-hsc/node_modules/roomle-core-hsc/src/embind/configuratorCoreInterface.js +5 -1
- package/lib/static/roomle-core-hsc/node_modules/roomle-core-hsc/src/embind/configuratorCoreInterface.js.map +1 -1
- package/lib/static/roomle-core-hsc/node_modules/roomle-core-hsc/src/embind/plannerCoreInterface.d.ts +2 -8
- package/lib/static/roomle-core-hsc/node_modules/roomle-core-hsc/src/embind/plannerCoreInterface.js +1 -5
- 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.js +2 -2
- 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-W654V5ay.mjs → stats-helper-BSmoG68E.mjs} +2 -2
- package/lib/{stats-helper-W654V5ay.mjs.map → stats-helper-BSmoG68E.mjs.map} +1 -1
- package/lib/three.tsl-BTc4fg8T.mjs +2 -0
- package/lib/{three.tsl-B7hcNZE8.mjs → three.tsl-Cf0-sCqB.mjs} +70 -66
- package/lib/{three.tsl-B7hcNZE8.mjs.map → three.tsl-Cf0-sCqB.mjs.map} +1 -1
- package/lib/{threejs-utils-WK7Uu2TS.mjs → threejs-utils-CLdyrCet.mjs} +14 -14
- package/lib/threejs-utils-CLdyrCet.mjs.map +1 -0
- package/lib/{tools-core-CWrR_N9g.mjs → tools-core-DusxT3AY.mjs} +3 -3
- package/lib/{tools-core-CWrR_N9g.mjs.map → tools-core-DusxT3AY.mjs.map} +1 -1
- package/lib/webgpu-BHAP6BLI.mjs +3140 -0
- package/lib/webgpu-BHAP6BLI.mjs.map +1 -0
- package/lib/workers-B_wmKVL0.mjs +6 -0
- package/lib/{workers-B-AqdQMe.mjs.map → workers-B_wmKVL0.mjs.map} +1 -1
- package/package.json +2 -2
- package/lib/asset-loader.worker-CE4O0JU-.mjs.map +0 -1
- package/lib/budgeteer.sw-yR2xApHT.mjs.map +0 -1
- package/lib/configurator-h8QoUnMz.mjs +0 -2
- package/lib/dimensioning-helper-BEGkpZFA.mjs +0 -2
- package/lib/glb-viewer-Dc2Tl8Ef.mjs +0 -2
- package/lib/layer-DaGoZ5YI.mjs.map +0 -1
- package/lib/planner-Ler1UMAp.mjs +0 -2
- package/lib/roomle-sdk-CsSQAqQG.mjs.map +0 -1
- package/lib/three.tsl-BBUCm-uB.mjs +0 -2
- package/lib/threejs-utils-WK7Uu2TS.mjs.map +0 -1
- package/lib/webgpu-DSecxaB8.mjs +0 -5084
- package/lib/webgpu-DSecxaB8.mjs.map +0 -1
- package/lib/workers-B-AqdQMe.mjs +0 -6
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"planner-
|
|
1
|
+
{"version":3,"file":"planner-HMMHSMAp.mjs","names":[],"sources":["../../packages/planner-core/src/input/planner-input-manager.ts","../../packages/planner-core/src/utils/injectables.ts","../../packages/planner-core/src/planner.ts"],"sourcesContent":["import type { INPUT_EVENT_TYPE } from '../../../common-core/src/input/input-manager';\nimport InputManager from '../../../common-core/src/input/input-manager';\n\nexport default class PlannerInputManager extends InputManager {\n protected _canDrag(_type: INPUT_EVENT_TYPE): boolean {\n return true;\n }\n}\n","import ScriptLoader from '../../../common-core/src/script-loader';\nimport {\n DependencyInjectionAssignment,\n DI_TYPE,\n} from '../../../common-core/src/di/container';\nimport Logger from '../../../common-core/src/logger';\nimport { default as PlannerMeshGenerator } from '../webgl/planner-mesh-generator';\nimport { RapiAccess } from '../../../common-core/src/rapi-access';\nimport PlannerInputManager from '../input/planner-input-manager';\nimport PlannerSelectionHandler from './planner-selection-handler';\nimport GlobalInitData from '../../../common-core/src/utils/global-init-data';\nimport ConfiguratorViewModel from '../../../common-core/src/view-model/configurator-view-model';\n\nexport const INJECTABLES: DependencyInjectionAssignment[] = [\n new DependencyInjectionAssignment('script-loader', ScriptLoader),\n new DependencyInjectionAssignment(\n 'planner-input-manager',\n PlannerInputManager,\n DI_TYPE.CONTEXT,\n ),\n new DependencyInjectionAssignment('logger', Logger),\n new DependencyInjectionAssignment(\n 'planner-mesh-generator',\n PlannerMeshGenerator,\n ),\n new DependencyInjectionAssignment(\n 'configurator-view-model',\n ConfiguratorViewModel,\n DI_TYPE.CONTEXT,\n ),\n new DependencyInjectionAssignment('rapi-access', RapiAccess),\n new DependencyInjectionAssignment('global-init-data', GlobalInitData),\n new DependencyInjectionAssignment(\n 'planner-selection-handler',\n PlannerSelectionHandler,\n ),\n];\n","import './utils/global-definitions';\nimport { Main, BASE_CONTEXT } from '../../common-core/src/main';\nimport { RoomlePlanner } from './roomle-planner';\nimport RoomleDependencyInjection from '../../common-core/src/di/roomle-dependency-injection';\nimport { INJECTABLES } from './utils/injectables';\nimport type PlannerKernelAccess from './services/planner-kernel-access';\nimport type Logger from '../../common-core/src/logger';\nimport { KERNEL_TYPE } from '../../common-core/src/services/common-kernel-access';\nimport type { PluginName } from '../../configurator-core/src/utils/plugin-types';\nimport type InitData from '../../common-core/src/utils/init-data';\nimport { isInIframe } from '../../common-core/src/utils/rapi-utils';\n\nexport class Planner<\n P extends readonly PluginName[] = readonly [],\n> extends Main {\n private _planner: RoomlePlanner<P>;\n private _activePlugins: P;\n\n constructor(creator?: string, activePlugins?: P) {\n super(creator);\n this._activePlugins = (activePlugins || []) as P;\n }\n protected setupGlobals(): void {\n //globals are initialized in bootFinished()\n }\n\n protected setupDependencies(): void {\n RoomleDependencyInjection.setup(INJECTABLES);\n this.lookup<Logger>('logger', this._context);\n // instantiate kernel acccess\n // instantiate pka\n // set pka on kernel access\n const plannerKernelAccess = this.lookup<PlannerKernelAccess>(\n 'planner-kernel-access',\n this._context,\n );\n plannerKernelAccess.init(KERNEL_TYPE.PLANNER);\n }\n\n protected cleanUpGlobals(): void {\n throw new Error('Method not implemented.');\n }\n\n protected cleanUpDependencies(): void {\n throw new Error('Method not implemented.');\n }\n\n protected async bootFinished(): Promise<void> {\n this._planner = new RoomlePlanner<P>(this._context, this._activePlugins);\n\n this._planner.getMain = () => {\n return this;\n };\n\n if (!window.RoomlePlanner) {\n if (this._activePlugins.length === 0) {\n // cast to unknown because we know that the planner is a RoomlePlanner\n window.RoomlePlanner = this._planner as unknown as RoomlePlanner;\n } else {\n window.RoomlePlanner = this._planner as RoomlePlanner<\n readonly PluginName[]\n >;\n }\n }\n\n const initData = this.lookup<InitData>('init-data', this._context);\n\n if (initData?.hi && isInIframe()) {\n await this._planner.setupHomagIntelligence();\n }\n }\n\n public getApi(): RoomlePlanner<P> {\n return this._planner;\n }\n\n protected getContextName(): string {\n return BASE_CONTEXT.PLANNER;\n }\n}\n"],"mappings":";;;AAGA,IAAqB,IAArB,cAAiD,EAAa;CAC5D,SAAmB,GAAkC;AACnD,SAAO;;GCQE,IAA+C;CAC1D,IAAI,EAA8B,iBAAiB,EAAa;CAChE,IAAI,EACF,yBACA,GACA,EAAQ,QACT;CACD,IAAI,EAA8B,UAAU,EAAO;CACnD,IAAI,EACF,0BACA,EACD;CACD,IAAI,EACF,2BACA,GACA,EAAQ,QACT;CACD,IAAI,EAA8B,eAAe,EAAW;CAC5D,IAAI,EAA8B,oBAAoB,EAAe;CACrE,IAAI,EACF,6BACA,EACD;CACF,ECxBY,IAAb,cAEU,EAAK;CAIb,YAAY,GAAkB,GAAmB;AAE/C,EADA,MAAM,EAAQ,EACd,KAAK,iBAAkB,KAAiB,EAAE;;CAE5C,eAA+B;CAI/B,oBAAoC;AAMN,EAL5B,EAA0B,MAAM,EAAY,EAC5C,KAAK,OAAe,UAAU,KAAK,SAAS,EAIhB,KAAK,OAC/B,yBACA,KAAK,SACN,CACmB,KAAK,EAAY,QAAQ;;CAG/C,iBAAiC;AAC/B,QAAU,MAAM,0BAA0B;;CAG5C,sBAAsC;AACpC,QAAU,MAAM,0BAA0B;;CAG5C,MAAgB,eAA8B;AAoB5C,EAnBA,KAAK,WAAW,IAAI,EAAiB,KAAK,UAAU,KAAK,eAAe,EAExE,KAAK,SAAS,gBACL,MAGJ,OAAO,kBACN,KAAK,eAAe,QAEtB,OAAO,gBAAgB,KAAK,WAQf,KAAK,OAAiB,aAAa,KAAK,SAAS,EAEpD,MAAM,GAAY,IAC9B,MAAM,KAAK,SAAS,wBAAwB;;CAIhD,SAAkC;AAChC,SAAO,KAAK;;CAGd,iBAAmC;AACjC,SAAO,EAAa"}
|
|
@@ -20,7 +20,7 @@ var r = class {
|
|
|
20
20
|
async init(e, t, n) {
|
|
21
21
|
this._scene = e, this._uiScene = t, this._cameraPosition = n;
|
|
22
22
|
let { bananaForScale: r } = this._initData;
|
|
23
|
-
r && await import("./banana-for-scale-
|
|
23
|
+
r && await import("./banana-for-scale-DpKXNBt_.mjs").then(({ default: e }) => this._plugins.push(new e(this._creator_))), this._plugins.forEach((e) => e.setScene(this._scene)), this._plugins.forEach((e) => e.setUiScene(this._uiScene)), this._plugins.forEach((e) => e.updateBounds(this._bounds)), this._plugins.forEach((e) => e.moveCameraEnd(this._cameraPosition));
|
|
24
24
|
}
|
|
25
25
|
addPlugin(e) {
|
|
26
26
|
this._plugins.push(e), e.setScene(this._scene), e.setUiScene(this._uiScene), e.updateBounds(this._bounds), e.moveCameraEnd(this._cameraPosition);
|
|
@@ -52,4 +52,4 @@ n([t, e("design:type", Object)], i.prototype, "_initData", void 0);
|
|
|
52
52
|
//#endregion
|
|
53
53
|
export { r as n, i as t };
|
|
54
54
|
|
|
55
|
-
//# sourceMappingURL=plugin-system-
|
|
55
|
+
//# sourceMappingURL=plugin-system-CRaC04G5.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin-system-
|
|
1
|
+
{"version":3,"file":"plugin-system-CRaC04G5.mjs","names":[],"sources":["../../packages/configurator-core/src/webgl/plugin-system.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-unused-vars */\nimport type { Context } from '../../../common-core/src/di/context';\nimport inject from '../../../common-core/src/di/inject';\nimport type InitData from '../../../common-core/src/utils/init-data';\nimport type { Box3, Scene, Vector3 } from 'three';\n\nexport declare interface ScenePluginHooks {\n updateBounds(bounds: Box3): void;\n\n clearScene(scene: Scene, uiScene: Scene): void;\n\n moveCameraEnd(position: Vector3): void;\n\n moveCameraStart(position: Vector3): void;\n\n needsUiScene(): boolean;\n}\n\nexport declare interface ScenePlugin extends ScenePluginHooks, Context {\n setScene(scene: Scene): void;\n\n setUiScene(uiScene: Scene): void;\n}\n\nexport class ScenePluginDefaultImplementation implements ScenePlugin {\n public _creator_: string;\n\n constructor(creator: string) {\n this._creator_ = creator;\n }\n\n public setScene(scene: Scene): void {\n //noop\n }\n\n public setUiScene(uiScene: Scene): void {\n //noop\n }\n\n public updateBounds(bounds: Box3): void {\n //noop\n }\n\n public clearScene(scene: Scene, uiScene: Scene): void {\n //noop\n }\n\n public moveCameraEnd(position: Vector3): void {\n //noop\n }\n\n public moveCameraStart(position: Vector3): void {\n //noop\n }\n\n public needsUiScene(): boolean {\n return false;\n }\n}\n\nexport default class PluginSystem implements Context, ScenePluginHooks {\n public _creator_: string;\n\n @inject\n private _initData: InitData;\n\n private _scene: Scene;\n private _uiScene: Scene;\n private _bounds: Box3;\n private _cameraPosition: Vector3;\n\n private _plugins: ScenePlugin[] = [];\n\n constructor(creator: string) {\n this._creator_ = creator;\n }\n\n public async init(scene: Scene, uiScene: Scene, cameraPosition: Vector3) {\n this._scene = scene;\n this._uiScene = uiScene;\n this._cameraPosition = cameraPosition;\n const { bananaForScale } = this._initData;\n\n if (bananaForScale) {\n await import('./banana-for-scale').then(({ default: BananaForScale }) =>\n this._plugins.push(new BananaForScale(this._creator_)),\n );\n }\n\n this._plugins.forEach((plugin) => plugin.setScene(this._scene));\n this._plugins.forEach((plugin) => plugin.setUiScene(this._uiScene));\n this._plugins.forEach((plugin) => plugin.updateBounds(this._bounds));\n this._plugins.forEach((plugin) =>\n plugin.moveCameraEnd(this._cameraPosition),\n );\n }\n\n public addPlugin(plugin: ScenePlugin) {\n this._plugins.push(plugin);\n plugin.setScene(this._scene);\n plugin.setUiScene(this._uiScene);\n plugin.updateBounds(this._bounds);\n plugin.moveCameraEnd(this._cameraPosition);\n }\n\n public updateBounds(bounds: Box3) {\n this._bounds = bounds;\n this._plugins.forEach((plugin) => plugin.updateBounds(bounds));\n }\n\n public clearScene(scene: Scene, uiScene: Scene): void {\n this._plugins.forEach((plugin) => plugin.clearScene(scene, uiScene));\n }\n\n public getActivePlugins(): ScenePlugin[] {\n return this._plugins;\n }\n\n public getPlugin<T extends ScenePlugin>(type: any): T | null {\n for (let plugin of this._plugins) {\n if (plugin instanceof type) {\n return plugin as T;\n }\n }\n return null;\n }\n\n public moveCameraEnd(position: Vector3): void {\n this._cameraPosition = position;\n this._plugins.forEach((plugin) => plugin.moveCameraEnd(position));\n }\n\n public moveCameraStart(position: Vector3): void {\n this._cameraPosition = position;\n this._plugins.forEach((plugin) => plugin.moveCameraStart(position));\n }\n\n public needsUiScene(): boolean {\n return this._plugins\n .map((plugin) => plugin.needsUiScene())\n .reduce(\n (previousValue, currentValue) => previousValue || currentValue,\n false,\n );\n }\n}\n"],"mappings":";;AAwBA,IAAa,IAAb,MAAqE;CAGnE,YAAY,GAAiB;AAC3B,OAAK,YAAY;;CAGnB,SAAgB,GAAoB;CAIpC,WAAkB,GAAsB;CAIxC,aAAoB,GAAoB;CAIxC,WAAkB,GAAc,GAAsB;CAItD,cAAqB,GAAyB;CAI9C,gBAAuB,GAAyB;CAIhD,eAA+B;AAC7B,SAAO;;GAIU,IAArB,MAAuE;CAarE,YAAY,GAAiB;AAC3B,kBAHgC,EAAE,EAGlC,KAAK,YAAY;;CAGnB,MAAa,KAAK,GAAc,GAAgB,GAAyB;AAGvE,EAFA,KAAK,SAAS,GACd,KAAK,WAAW,GAChB,KAAK,kBAAkB;EACvB,IAAM,EAAE,sBAAmB,KAAK;AAWhC,EATI,KACF,MAAM,OAAO,mCAAsB,MAAM,EAAE,SAAS,QAClD,KAAK,SAAS,KAAK,IAAI,EAAe,KAAK,UAAU,CAAC,CACvD,EAGH,KAAK,SAAS,SAAS,MAAW,EAAO,SAAS,KAAK,OAAO,CAAC,EAC/D,KAAK,SAAS,SAAS,MAAW,EAAO,WAAW,KAAK,SAAS,CAAC,EACnE,KAAK,SAAS,SAAS,MAAW,EAAO,aAAa,KAAK,QAAQ,CAAC,EACpE,KAAK,SAAS,SAAS,MACrB,EAAO,cAAc,KAAK,gBAAgB,CAC3C;;CAGH,UAAiB,GAAqB;AAKpC,EAJA,KAAK,SAAS,KAAK,EAAO,EAC1B,EAAO,SAAS,KAAK,OAAO,EAC5B,EAAO,WAAW,KAAK,SAAS,EAChC,EAAO,aAAa,KAAK,QAAQ,EACjC,EAAO,cAAc,KAAK,gBAAgB;;CAG5C,aAAoB,GAAc;AAEhC,EADA,KAAK,UAAU,GACf,KAAK,SAAS,SAAS,MAAW,EAAO,aAAa,EAAO,CAAC;;CAGhE,WAAkB,GAAc,GAAsB;AACpD,OAAK,SAAS,SAAS,MAAW,EAAO,WAAW,GAAO,EAAQ,CAAC;;CAGtE,mBAAyC;AACvC,SAAO,KAAK;;CAGd,UAAwC,GAAqB;AAC3D,OAAK,IAAI,KAAU,KAAK,SACtB,KAAI,aAAkB,EACpB,QAAO;AAGX,SAAO;;CAGT,cAAqB,GAAyB;AAE5C,EADA,KAAK,kBAAkB,GACvB,KAAK,SAAS,SAAS,MAAW,EAAO,cAAc,EAAS,CAAC;;CAGnE,gBAAuB,GAAyB;AAE9C,EADA,KAAK,kBAAkB,GACvB,KAAK,SAAS,SAAS,MAAW,EAAO,gBAAgB,EAAS,CAAC;;CAGrE,eAA+B;AAC7B,SAAO,KAAK,SACT,KAAK,MAAW,EAAO,cAAc,CAAC,CACtC,QACE,GAAe,MAAiB,KAAiB,GAClD,GACD;;;GAhFJ,GAAA,EAAA,eAAA,OAAA,CAAA,EAAA,EAAA,WAAA,aAAA,KAAA,EAAA"}
|
package/lib/roomle-headless.d.ts
CHANGED
|
@@ -1177,6 +1177,7 @@ export declare interface ConfiguratorInitData {
|
|
|
1177
1177
|
transparentHighlighting?: boolean;
|
|
1178
1178
|
/**
|
|
1179
1179
|
* @description If set to true, the background is transparent and allows elements behind the configurator to be visible through the scene.
|
|
1180
|
+
* Not compatible with the WebGPU sky feature
|
|
1180
1181
|
* usage: transparentBackground=true
|
|
1181
1182
|
* @groups scene-settings
|
|
1182
1183
|
*/
|
|
@@ -5407,7 +5408,7 @@ export declare class MeshGenerator implements Context {
|
|
|
5407
5408
|
_creator_: string;
|
|
5408
5409
|
materialQueue: PromiseQueue<void>;
|
|
5409
5410
|
protected _geometryComponentMaterialCache: Map<string, string>;
|
|
5410
|
-
|
|
5411
|
+
protected _initData: InitData;
|
|
5411
5412
|
protected _rapiAccess: RapiAccess;
|
|
5412
5413
|
private _materialProvider;
|
|
5413
5414
|
protected _dataSyncer: DataSyncer;
|
|
@@ -6443,7 +6444,6 @@ export declare class PlannerSceneManager extends ConfiguratorSceneManager implem
|
|
|
6443
6444
|
* {@link awaitPendingConfigurationSaves}.
|
|
6444
6445
|
*/
|
|
6445
6446
|
private _pendingConfigurationSaves;
|
|
6446
|
-
private _sky;
|
|
6447
6447
|
private _drawingEnabled;
|
|
6448
6448
|
private _configureInRoom;
|
|
6449
6449
|
private _keepWallsAndCeilingVisible;
|
|
@@ -6553,7 +6553,6 @@ export declare class PlannerSceneManager extends ConfiguratorSceneManager implem
|
|
|
6553
6553
|
exportUSDZ(options?: ModelExportOptions): Promise<void>;
|
|
6554
6554
|
importGLB(url: string): void;
|
|
6555
6555
|
clearScene(): void;
|
|
6556
|
-
private _addSky;
|
|
6557
6556
|
toggleConfigureInRoom(): void;
|
|
6558
6557
|
switchTo2D(): void;
|
|
6559
6558
|
switchTo3D(): void;
|
|
@@ -6565,6 +6564,7 @@ export declare class PlannerSceneManager extends ConfiguratorSceneManager implem
|
|
|
6565
6564
|
private _getHighestWallHeight;
|
|
6566
6565
|
private _shouldShowCeiling;
|
|
6567
6566
|
private _setCeiling;
|
|
6567
|
+
private _setCeilingVisibility;
|
|
6568
6568
|
cameraBehaviourChanged(updateDistance?: boolean): void;
|
|
6569
6569
|
private _updatePaperBackground;
|
|
6570
6570
|
sceneChanged(): void;
|
|
@@ -6871,7 +6871,14 @@ export declare interface PlanOverview {
|
|
|
6871
6871
|
bounds: KernelCube;
|
|
6872
6872
|
objects: KernelPlanObjectList;
|
|
6873
6873
|
outsideWalls: PlanElement_2[];
|
|
6874
|
-
rooms:
|
|
6874
|
+
rooms: PlanOverviewRoom[];
|
|
6875
|
+
}
|
|
6876
|
+
|
|
6877
|
+
export declare interface PlanOverviewRoom {
|
|
6878
|
+
runtimeId: RuntimeId;
|
|
6879
|
+
area: number;
|
|
6880
|
+
bounds: KernelCube;
|
|
6881
|
+
objects: KernelPlanObjectList;
|
|
6875
6882
|
}
|
|
6876
6883
|
|
|
6877
6884
|
export declare type PlanRoomGeometryMode = (typeof PLAN_ROOM_GEOMETRY_MODE)[keyof typeof PLAN_ROOM_GEOMETRY_MODE];
|
|
@@ -9510,6 +9517,12 @@ export declare class RoomlePlanner<P extends readonly PluginName[] = readonly []
|
|
|
9510
9517
|
* this includes info about size, rotation, id and parts
|
|
9511
9518
|
*/
|
|
9512
9519
|
getObjects(): Promise<UiPlanObject[]>;
|
|
9520
|
+
/**
|
|
9521
|
+
* returns the objects in the room of the given floor, without its doors and windows
|
|
9522
|
+
* this includes info about size, rotation, id and parts, like getObjects
|
|
9523
|
+
* @param floorId runtime id of the floor, e.g. the id of the selected floor
|
|
9524
|
+
*/
|
|
9525
|
+
getObjectsInRoom(floorId: RuntimeId): Promise<UiPlanObject[]>;
|
|
9513
9526
|
awaitPendingConfigurationSaves(): Promise<void>;
|
|
9514
9527
|
/**
|
|
9515
9528
|
* get all info available for the current plan, including objects, rooms and walls
|
|
@@ -10176,10 +10189,13 @@ export declare class RoomleWebGPURenderer extends RoomleRenderer<WebGPURenderer>
|
|
|
10176
10189
|
private readonly debugRenderPass;
|
|
10177
10190
|
private _domHelper;
|
|
10178
10191
|
private _webGpuGroundShadowReflection;
|
|
10192
|
+
private _webGpuSkyContainer;
|
|
10193
|
+
private _skyStateTracker;
|
|
10179
10194
|
private _initData;
|
|
10180
10195
|
constructor(creator: string, renderer: WebGPURenderer, enableSSGI: boolean, outlineColors?: OutlineColors, enableTraa?: boolean);
|
|
10181
10196
|
private enableDefaultRenderPasses;
|
|
10182
10197
|
addGroundShadowLightAndFloor(scene: Scene_2): Promise<void>;
|
|
10198
|
+
addSky(scene: Scene_2): Promise<void>;
|
|
10183
10199
|
private addRenderPass;
|
|
10184
10200
|
clearCache(): void;
|
|
10185
10201
|
disableUiInteractionMode(): void;
|
|
@@ -10339,6 +10355,7 @@ export declare abstract class SceneManager implements Context, LifeCycleCallback
|
|
|
10339
10355
|
protected _imageRenderer: ImageRenderer;
|
|
10340
10356
|
protected _cameraBehaviourState: CameraBehaviourState;
|
|
10341
10357
|
protected _cacheHolder: CacheHolder;
|
|
10358
|
+
protected _skyStateTracker: SkyStateTracker;
|
|
10342
10359
|
private _cameraControl3D;
|
|
10343
10360
|
private _cameraControl2D;
|
|
10344
10361
|
private _cameraControlFirstPerson;
|
|
@@ -10565,6 +10582,26 @@ export declare class SinglePromiseFactory implements Context {
|
|
|
10565
10582
|
export declare class SizeTArray extends EmsArray<number> {
|
|
10566
10583
|
}
|
|
10567
10584
|
|
|
10585
|
+
export declare const SKY_EVENT: {
|
|
10586
|
+
readonly ENTERED_PLANNER: "sky:entered-planner";
|
|
10587
|
+
readonly ENTERED_CONFIGURATOR: "sky:entered-configurator";
|
|
10588
|
+
};
|
|
10589
|
+
|
|
10590
|
+
export declare type SkyEvent = ValuesFromObject<typeof SKY_EVENT>;
|
|
10591
|
+
|
|
10592
|
+
export declare type SkyFeatureEventMap = Record<SkyEvent, void>;
|
|
10593
|
+
|
|
10594
|
+
export declare class SkyStateTracker extends EventDispatcher<SkyFeatureEventMap> implements Context {
|
|
10595
|
+
_creator_: string;
|
|
10596
|
+
private readonly _isSkyEnabled;
|
|
10597
|
+
private _isCurrentlyActive;
|
|
10598
|
+
private _initData;
|
|
10599
|
+
constructor(creator: string);
|
|
10600
|
+
get isCurrentlyActive(): boolean;
|
|
10601
|
+
notifyEnteredPlanner(): void;
|
|
10602
|
+
notifyEnteredConfigurator(): void;
|
|
10603
|
+
}
|
|
10604
|
+
|
|
10568
10605
|
export declare const enum SnapMode {
|
|
10569
10606
|
OFF = 0,
|
|
10570
10607
|
ON_COLLISION = 1,
|
|
@@ -11304,6 +11341,7 @@ export declare class WebGpuConfig implements WebGpuConfigDefinition {
|
|
|
11304
11341
|
topLight: WebGpuTopLightConfig;
|
|
11305
11342
|
groundReflection: WebGpuGroundReflectionConfig;
|
|
11306
11343
|
fog: WebGpuFogConfig;
|
|
11344
|
+
sky: WebGpuSkyConfig;
|
|
11307
11345
|
ssgi: WebGpuSSGIConfig;
|
|
11308
11346
|
toneMapping: WebGpuToneMapping;
|
|
11309
11347
|
toneMappingExposure: number;
|
|
@@ -11343,6 +11381,10 @@ export declare interface WebGpuConfigDefinition {
|
|
|
11343
11381
|
* @description Visual configuration for the WebGPU fog.
|
|
11344
11382
|
*/
|
|
11345
11383
|
fog?: WebGpuFogConfigDefinition;
|
|
11384
|
+
/**
|
|
11385
|
+
* @description Visual configuration for the WebGPU sky and sun.
|
|
11386
|
+
*/
|
|
11387
|
+
sky?: WebGpuSkyConfigDefinition;
|
|
11346
11388
|
/**
|
|
11347
11389
|
* @description Visual configuration for the WebGPU screen space global illumination (SSGI) effect.
|
|
11348
11390
|
*/
|
|
@@ -11427,6 +11469,122 @@ export declare interface WebGpuGroundReflectionConfigDefinition {
|
|
|
11427
11469
|
endFadeout?: number;
|
|
11428
11470
|
}
|
|
11429
11471
|
|
|
11472
|
+
export declare class WebGpuSkyConfig implements WebGpuSkyConfigDefinition {
|
|
11473
|
+
enabled: boolean;
|
|
11474
|
+
turbidity: number;
|
|
11475
|
+
albedo: number;
|
|
11476
|
+
azimuthAngle: number;
|
|
11477
|
+
polarAngle: number;
|
|
11478
|
+
sunLightIntensity: number;
|
|
11479
|
+
sunRadius: number;
|
|
11480
|
+
sunSoftness: number;
|
|
11481
|
+
tonemapExposure: number;
|
|
11482
|
+
tonemapWhite: number;
|
|
11483
|
+
cloudCoverage: number;
|
|
11484
|
+
cloudDensity: number;
|
|
11485
|
+
cloudElevation: number;
|
|
11486
|
+
overrideEnvironmentMapIntensity: number;
|
|
11487
|
+
}
|
|
11488
|
+
|
|
11489
|
+
export declare interface WebGpuSkyConfigDefinition {
|
|
11490
|
+
/**
|
|
11491
|
+
* @description If true, adds a physically based (Hosek-Wilkie) sky and a matching
|
|
11492
|
+
* sun providing light to the scene.
|
|
11493
|
+
* @default false
|
|
11494
|
+
*/
|
|
11495
|
+
enabled?: boolean;
|
|
11496
|
+
/**
|
|
11497
|
+
* @description Value determining the amount of aerosol particles in the sky. This
|
|
11498
|
+
* very much impacts the sky's color and clearness.
|
|
11499
|
+
* From the original paper: T = 2 yields a very clear, Arctic-like sky,
|
|
11500
|
+
* T = 3 a clear sky in a temperate climate,
|
|
11501
|
+
* T = 6 a sky on a warm, moist day,
|
|
11502
|
+
* T = 10 a slightly hazy sky
|
|
11503
|
+
* Valid range: `[1,10]`
|
|
11504
|
+
* @default 2.5
|
|
11505
|
+
*/
|
|
11506
|
+
turbidity?: number;
|
|
11507
|
+
/**
|
|
11508
|
+
* @description Represents how much light the ground bounces back into the atmosphere,
|
|
11509
|
+
* which brightens the sky near the horizon if this value is high.
|
|
11510
|
+
* Valid range: `[0,1]`
|
|
11511
|
+
* @default 0.9
|
|
11512
|
+
*/
|
|
11513
|
+
albedo?: number;
|
|
11514
|
+
/**
|
|
11515
|
+
* @description Horizontal orientation of the sun in radians.
|
|
11516
|
+
* Changing this value rotates the sun clockwise around
|
|
11517
|
+
* the scene without changing its height.
|
|
11518
|
+
* Valid range: `[-pi, pi]`
|
|
11519
|
+
* @default 0
|
|
11520
|
+
*/
|
|
11521
|
+
azimuthAngle?: number;
|
|
11522
|
+
/**
|
|
11523
|
+
* @description Height of the sun measured as the angle
|
|
11524
|
+
* from straight up (the zenith), in radians. Smaller values raise the sun toward
|
|
11525
|
+
* noon; larger values lower it toward the horizon.
|
|
11526
|
+
* Valid range: `[0,pi/2≈1.57]`.
|
|
11527
|
+
* @default 1
|
|
11528
|
+
*/
|
|
11529
|
+
polarAngle?: number;
|
|
11530
|
+
/**
|
|
11531
|
+
* @description Intensity of the sun that lights the scene and casts shadows.
|
|
11532
|
+
* This does not influence how the sun disc looks in the sky.
|
|
11533
|
+
* @default 10
|
|
11534
|
+
*/
|
|
11535
|
+
sunLightIntensity?: number;
|
|
11536
|
+
/**
|
|
11537
|
+
* @description Radius of the visible sun disc in the sky.
|
|
11538
|
+
* @default 0.03
|
|
11539
|
+
*/
|
|
11540
|
+
sunRadius?: number;
|
|
11541
|
+
/**
|
|
11542
|
+
* @description Blurryness of the edge of the visible sun disc in the sky.
|
|
11543
|
+
* @default 0.002
|
|
11544
|
+
*/
|
|
11545
|
+
sunSoftness?: number;
|
|
11546
|
+
/**
|
|
11547
|
+
* @description Exposure multiplier applied during the sky-specific tone mapping.
|
|
11548
|
+
* Higher values make the sky brighter.
|
|
11549
|
+
* @default 0.5
|
|
11550
|
+
*/
|
|
11551
|
+
tonemapExposure?: number;
|
|
11552
|
+
/**
|
|
11553
|
+
* @description The HDR brightness value which the sky-specific tone mapping considers as white.
|
|
11554
|
+
* Lower values clip bright areas (like the sun) to white sooner, increasing contrast.
|
|
11555
|
+
* Higher values preserve more detail in the brightest regions.
|
|
11556
|
+
* @default 14
|
|
11557
|
+
*/
|
|
11558
|
+
tonemapWhite?: number;
|
|
11559
|
+
/**
|
|
11560
|
+
* @description Fraction of the sky covered by clouds.
|
|
11561
|
+
* At `0` no clouds are rendered. at `1` the sky is fully covered by clouds.
|
|
11562
|
+
* @default 0.25
|
|
11563
|
+
*/
|
|
11564
|
+
cloudCoverage?: number;
|
|
11565
|
+
/**
|
|
11566
|
+
* @description Opacity of the clouds when they are blended over the sky. At `0` clouds
|
|
11567
|
+
* are invisible even if coverage is high; at `1` they fully replace the sky color
|
|
11568
|
+
* beneath them.
|
|
11569
|
+
* @default 0.3
|
|
11570
|
+
*/
|
|
11571
|
+
cloudDensity?: number;
|
|
11572
|
+
/**
|
|
11573
|
+
* @description Height of the virtual cloud plane. A value of `0` places the plane
|
|
11574
|
+
* very high (clouds appear small and distant); `1` pulls it down towards the horizon
|
|
11575
|
+
* so clouds appear lower and larger.
|
|
11576
|
+
* @default 0.7
|
|
11577
|
+
*/
|
|
11578
|
+
cloudElevation?: number;
|
|
11579
|
+
/**
|
|
11580
|
+
* @description Intensity of the environment map lighting while the sky is
|
|
11581
|
+
* enabled. Because the sky already contributes its own image-based lighting,
|
|
11582
|
+
* the environment map is dimmed to this value to keep the overall scene brightness balanced.
|
|
11583
|
+
* @default 0.5
|
|
11584
|
+
*/
|
|
11585
|
+
overrideEnvironmentMapIntensity?: number;
|
|
11586
|
+
}
|
|
11587
|
+
|
|
11430
11588
|
export declare class WebGpuSSGIConfig implements WebGpuSSGIConfigDefinition {
|
|
11431
11589
|
giDenoiseRadius: number;
|
|
11432
11590
|
aoDenoiseRadius: number;
|
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-B4K6xrdJ.mjs";
|
|
2
2
|
import { i as a, t as o } from "./kernel-BWfRHWkW.mjs";
|
|
3
|
-
import {
|
|
3
|
+
import { ht as s, yt as c } from "./threejs-utils-CLdyrCet.mjs";
|
|
4
4
|
import { Si as l, m as u, nt as d } from "./three.core-0KaTx8dm.mjs";
|
|
5
5
|
import { i as f } from "./decorate-Bl-JF_YY.mjs";
|
|
6
6
|
import { V as p } from "./common-utils-DbL4tku0.mjs";
|
|
7
|
-
import { A as m, F as h, G as ee, J as te, K as ne, M as re, N as ie, P as ae, S as oe, V as se, W as ce, a as g, at as le, b as ue, ct as de, dt as fe, i as pe, j as me, k as he, l as ge, lt as _e, m as ve, mt as ye, o as _, ot as v, q as y, r as b, s as x, st as S, t as C, u as w, ut as T, x as E, y as D, z as O } from "./roomle-sdk-
|
|
7
|
+
import { A as m, F as h, G as ee, J as te, K as ne, M as re, N as ie, P as ae, S as oe, V as se, W as ce, a as g, at as le, b as ue, ct as de, dt as fe, i as pe, j as me, k as he, l as ge, lt as _e, m as ve, mt as ye, o as _, ot as v, q as y, r as b, s as x, st as S, t as C, u as w, ut as T, x as E, y as D, z as O } from "./roomle-sdk-5aB4wxLW.mjs";
|
|
8
8
|
import { n as k } from "./roomle-renderer-Ato6RMrd.mjs";
|
|
9
|
-
import { n as A } from "./script-loader-
|
|
10
|
-
import { t as j } from "./configurator-
|
|
11
|
-
import { t as M } from "./planner-
|
|
12
|
-
import { n as N, t as P } from "./glb-viewer-
|
|
13
|
-
import { t as be } from "./api-
|
|
9
|
+
import { n as A } from "./script-loader-axxcKvph.mjs";
|
|
10
|
+
import { t as j } from "./configurator-CQ7KsW0O.mjs";
|
|
11
|
+
import { t as M } from "./planner-HMMHSMAp.mjs";
|
|
12
|
+
import { n as N, t as P } from "./glb-viewer-BWMMzvuG.mjs";
|
|
13
|
+
import { t as be } from "./api-KWh-ESd5.mjs";
|
|
14
14
|
import { t as xe } from "./roomle-headless-setup-ps3I0vOP.mjs";
|
|
15
15
|
import { createRequire as Se } from "module";
|
|
16
16
|
//#region packages/headless-core/src/headless-tween-stub.ts
|
|
@@ -353,7 +353,7 @@ var Pe = (e) => {
|
|
|
353
353
|
async _getPathTracer(e) {
|
|
354
354
|
if (this._pathTracer && this._renderer === e) return this._pathTracer;
|
|
355
355
|
this._pathTracer?.dispose();
|
|
356
|
-
let { WebGPUPathTracer: t } = await import("./webgpu-
|
|
356
|
+
let { WebGPUPathTracer: t } = await import("./webgpu-BHAP6BLI.mjs"), n = new t(e);
|
|
357
357
|
return n.useMegakernel(!0), n.dynamicLowRes = !1, n.renderDelay = 0, n.fadeDuration = 0, n.minSamples = 1, this._pathTracer = n, this._renderer = e, n;
|
|
358
358
|
}
|
|
359
359
|
}, Le = class e extends ve {
|
|
@@ -370,7 +370,7 @@ var Pe = (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-BfZKcXSz.mjs");
|
|
374
374
|
return new t(this._creator_, e, !0, void 0, !1);
|
|
375
375
|
}
|
|
376
376
|
static hasExplicitCameraPlacement(e) {
|
|
@@ -730,6 +730,6 @@ var Pe = (e) => {
|
|
|
730
730
|
$()?.setModelExportOngoing(e);
|
|
731
731
|
}, qe = () => $()?.isModelExportOngoing() ?? !1;
|
|
732
732
|
//#endregion
|
|
733
|
-
export { o as CONFIGURATION_TYPE,
|
|
733
|
+
export { o as CONFIGURATION_TYPE, s as CORE_EDGE_TYPE, c as CORE_OBJECT_CATEGORY, a as CORE_PERMISSION_TO_DELETE, j as Configurator, me as FloorPlanElementViewModel, P as GlbViewer, O as HI_CONTEXT_ACTION, Ge as HeadlessRoomleSdk, oe as MeasurementLinePlanElementViewModel, D as PLAN_ELEMENT_CHANGE_TYPES, h as PlanElementViewModel, ae as PlanObjectViewModel, M as Planner, de as RapiAccess, _e as RapiInvalidIdError, T as RapiOfflineError, be as RoomDesignerApi, he as RoomleConfigurator, N as RoomleGLBViewer, ye as RoomleLightSource, w as RoomlePlanner, C as RoomleSdk, ie as StaticPlanObjectViewModel, re as WallPlanElementViewModel, ce as createExtObj, te as createExtObjId, fe as getCatalogIdFromConfigurationHash, xe as getHeadlessWebGpuMaxTextureDimension, ee as isExtObjId, ne as isExternalObject, ue as isFirefox, i as isIdAComponent, n as isIdAConfigurationString, r as isIdAPlan, t as isIdAnItem, qe as isModelExportOngoing, e as isPlanSnapshotId, E as isSafari, y as removeExtObjIdPrefix, Ke as setModelExportOngoing, je as setPathTracerExternalDenoiser, Fe as setPathTracerPreviewHook, Pe as setPathTracerProgressHook };
|
|
734
734
|
|
|
735
735
|
//# sourceMappingURL=roomle-headless.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"roomle-renderer-Ato6RMrd.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\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 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 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 * @description If true, the advanced dimensioning is enabled (for test purposes only)\n */\n advancedDimensioning?: 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 * 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-Ato6RMrd.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\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 * @description If true, the advanced dimensioning is enabled (for test purposes only)\n */\n advancedDimensioning?: 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"}
|