@roomle/web-sdk 5.2.0-alpha.2 → 5.2.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.
Files changed (34) hide show
  1. package/lib/{api-DgmvQKJM.mjs → api-CscVM_rq.mjs} +2 -2
  2. package/lib/{api-DgmvQKJM.mjs.map → api-CscVM_rq.mjs.map} +1 -1
  3. package/lib/asset-loader.worker-CE4O0JU-.mjs.map +1 -1
  4. package/lib/budgeteer.sw-yR2xApHT.mjs.map +1 -1
  5. package/lib/{configurator-B8BvHTky.mjs → configurator-YwPnRLWl.mjs} +3 -3
  6. package/lib/{configurator-B8BvHTky.mjs.map → configurator-YwPnRLWl.mjs.map} +1 -1
  7. package/lib/configurator-vYvoZwvB.mjs +2 -0
  8. package/lib/glb-viewer-BQNztKtl.mjs +2 -0
  9. package/lib/{glb-viewer-DamedzN_.mjs → glb-viewer-Bt2icXD1.mjs} +3 -3
  10. package/lib/{glb-viewer-DamedzN_.mjs.map → glb-viewer-Bt2icXD1.mjs.map} +1 -1
  11. package/lib/{homag-intelligence-Kd23hknu.mjs → homag-intelligence-CD4uruxc.mjs} +3 -3
  12. package/lib/{homag-intelligence-Kd23hknu.mjs.map → homag-intelligence-CD4uruxc.mjs.map} +1 -1
  13. package/lib/{material-viewer-CArm5Sbd.mjs → material-viewer-C0GInjTh.mjs} +3 -3
  14. package/lib/{material-viewer-CArm5Sbd.mjs.map → material-viewer-C0GInjTh.mjs.map} +1 -1
  15. package/lib/{packages-Cl6mO8eL.mjs → packages-Dh9Oa8sN.mjs} +5 -5
  16. package/lib/{packages-Cl6mO8eL.mjs.map → packages-Dh9Oa8sN.mjs.map} +1 -1
  17. package/lib/{planner-BvSAoyAE.mjs → planner-DG6mOKiO.mjs} +3 -3
  18. package/lib/{planner-BvSAoyAE.mjs.map → planner-DG6mOKiO.mjs.map} +1 -1
  19. package/lib/planner-tlobeRpn.mjs +2 -0
  20. package/lib/roomle-headless.d.ts +40 -3
  21. package/lib/roomle-headless.js +7 -7
  22. package/lib/{roomle-sdk-CyuyR7se.mjs → roomle-sdk-C2u_Xayh.mjs} +1686 -1651
  23. package/lib/roomle-sdk-C2u_Xayh.mjs.map +1 -0
  24. package/lib/roomle-sdk.d.ts +40 -3
  25. package/lib/roomle-sdk.js +6 -6
  26. package/lib/{script-loader-i9PxCq7s.mjs → script-loader-DZWHyVXo.mjs} +2 -2
  27. package/lib/{script-loader-i9PxCq7s.mjs.map → script-loader-DZWHyVXo.mjs.map} +1 -1
  28. package/lib/{tools-core-DqGfLhDO.mjs → tools-core-id_2qN_Y.mjs} +3 -3
  29. package/lib/{tools-core-DqGfLhDO.mjs.map → tools-core-id_2qN_Y.mjs.map} +1 -1
  30. package/package.json +2 -2
  31. package/lib/configurator-CaIbtRET.mjs +0 -2
  32. package/lib/glb-viewer-CZvZ1erY.mjs +0 -2
  33. package/lib/planner-CGH5CX5Q.mjs +0 -2
  34. package/lib/roomle-sdk-CyuyR7se.mjs.map +0 -1
@@ -26,6 +26,7 @@ import { PerspectiveCamera } from 'three';
26
26
  import { PointLight } from 'three';
27
27
  import { Scene } from 'three';
28
28
  import { Scene as Scene_2 } from 'three/webgpu';
29
+ import { Sphere } from 'three';
29
30
  import { Texture } from 'three';
30
31
  import { TextureLoader } from 'three';
31
32
  import { Vector2 } from 'three';
@@ -1631,12 +1632,31 @@ export declare interface ConfiguratorKernelContainer {
1631
1632
  export declare class ConfiguratorPlanObjectViewModel extends PlanObjectViewModel {
1632
1633
  private _rootComponentRuntimeId;
1633
1634
  private _rootComponentId;
1635
+ private _componentsCutByCamera;
1636
+ private _localCameraPosition;
1634
1637
  constructor(planObject: PlanObject);
1635
1638
  addRootComponent(component: RoomleComponent): void;
1636
1639
  addChildEntityComponent(component: RoomleComponent): void;
1637
1640
  getConfigurationRuntimeId(): number;
1638
1641
  getRootComponentId(): number;
1639
1642
  getRootComponentRuntimeId(): number;
1643
+ /**
1644
+ * A configuration is one plan object but many components - a whole kitchen run
1645
+ * shares a single bounding box, so hiding the container would clear the scene as
1646
+ * soon as the camera gets close to any of its cabinets. The object bounds are only
1647
+ * the broad phase here, the components actually cut by the near plane are hidden
1648
+ * individually.
1649
+ */
1650
+ hideCutByCamera(cameraSphere: Sphere): boolean;
1651
+ restoreCutByCamera(): boolean;
1652
+ private _setComponentCutByCamera;
1653
+ /**
1654
+ * Only the component's own meshes, its child components stay visible - and
1655
+ * re-applied while cut, so meshes replaced in the meantime stay hidden too.
1656
+ * A component waiting for its geometry hides its meshes behind the loading box
1657
+ * itself, showing them again is `loadingFinished()`'s job, not ours.
1658
+ */
1659
+ private _applyComponentMeshVisibility;
1640
1660
  finishConstruction(): Promise<void>;
1641
1661
  failConstruction(): Promise<void>;
1642
1662
  toJSON(): {
@@ -1644,7 +1664,12 @@ export declare class ConfiguratorPlanObjectViewModel extends PlanObjectViewModel
1644
1664
  rootElementId: number;
1645
1665
  };
1646
1666
  protected _updateBoundingBox(): void;
1647
- private _collectComponentObjects;
1667
+ /**
1668
+ * Walks the component tree with a visitor: this runs per frame for every
1669
+ * configuration the camera is close to, where an array per tree level would be
1670
+ * a temporary allocation per component per frame.
1671
+ */
1672
+ private _forEachComponent;
1648
1673
  }
1649
1674
 
1650
1675
  export declare class ConfiguratorSceneEventHandler extends SceneEventHandler<SceneEventInfo> {
@@ -7204,13 +7229,26 @@ export declare class PlanElementViewModel extends KernelViewModel {
7204
7229
  protected _topView: boolean;
7205
7230
  private _containerVisible;
7206
7231
  private _hiddenByCameraFacing;
7232
+ private _hiddenByCameraCut;
7207
7233
  constructor(planObject: PlanObject);
7208
7234
  getSize(): Vector3_2;
7209
7235
  setHiddenByCameraFacing(hidden: boolean): void;
7210
7236
  setContainerVisibility(isVisible: boolean): void;
7211
7237
  protected isContainerVisible(): boolean;
7212
- protected _applyCameraFacingVisibility(): void;
7238
+ protected _applyVisibility(): void;
7213
7239
  isHiddenByCameraFacing(): boolean;
7240
+ /**
7241
+ * Hide what the camera near plane cuts open, given a sphere around the camera
7242
+ * position with the near distance as radius. A plan element is a single visual
7243
+ * unit, so the whole container is hidden - {@link ConfiguratorPlanObjectViewModel}
7244
+ * refines this to the components which are actually cut.
7245
+ */
7246
+ hideCutByCamera(cameraSphere: Sphere): boolean;
7247
+ /**
7248
+ * Show everything that was hidden by {@link hideCutByCamera} again.
7249
+ */
7250
+ restoreCutByCamera(): boolean;
7251
+ protected _setHiddenByCameraCut(hidden: boolean): boolean;
7214
7252
  update(): void;
7215
7253
  protected _updateBoundingBox(): void;
7216
7254
  getPosition(): Vector3_2;
@@ -8507,7 +8545,6 @@ export declare class PlanViewModel extends ConfiguratorViewModel implements Plan
8507
8545
  private _plannerSceneEventHandler;
8508
8546
  private _cameraHideSphere;
8509
8547
  private readonly _cameraHideViewModelGroups;
8510
- private _objectsHiddenByCamera;
8511
8548
  private _cameraType;
8512
8549
  private _nodeZoom;
8513
8550
  private _latestWallPlanObjectViewModel;
@@ -1,16 +1,16 @@
1
- import { a as e, i as t, n, r, t as i } from "./packages-Cl6mO8eL.mjs";
1
+ import { a as e, i as t, n, r, t as i } from "./packages-Dh9Oa8sN.mjs";
2
2
  import { i as a, t as o } from "./kernel-BWfRHWkW.mjs";
3
3
  import { Et as s, St as c } from "./threejs-utils-CX2ILaES.mjs";
4
4
  import { Ti as l, m as u, nt as d } from "./three.core-BTUCraWz.mjs";
5
5
  import { i as f } from "./decorate-CjaqqbUP.mjs";
6
6
  import { D as ee, H as p, g as m } from "./common-utils-CNGLvAo_.mjs";
7
- import { A as te, F as ne, G as re, H as ie, J as ae, K as oe, M as se, N as ce, P as le, S as h, V as ue, Y as de, a as fe, b as pe, ct as g, dt as me, ft as he, ht as ge, i as _e, j as ve, k as ye, l as _, lt as v, m as y, o as b, ot as x, q as S, r as C, s as w, st as T, t as E, u as D, ut as O, x as k, y as A, z as j } from "./roomle-sdk-CyuyR7se.mjs";
7
+ import { A as te, F as ne, G as re, H as ie, J as ae, K as oe, M as se, N as ce, P as le, S as h, V as ue, Y as de, a as fe, b as pe, ct as g, dt as me, ft as he, ht as ge, i as _e, j as ve, k as ye, l as _, lt as v, m as y, o as b, ot as x, q as S, r as C, s as w, st as T, t as E, u as D, ut as O, x as k, y as A, z as j } from "./roomle-sdk-C2u_Xayh.mjs";
8
8
  import { n as M } from "./roomle-renderer-nCUrLU_S.mjs";
9
- import { n as N } from "./script-loader-i9PxCq7s.mjs";
10
- import { t as P } from "./configurator-B8BvHTky.mjs";
11
- import { t as be } from "./planner-BvSAoyAE.mjs";
12
- import { n as xe, t as Se } from "./glb-viewer-DamedzN_.mjs";
13
- import { t as Ce } from "./api-DgmvQKJM.mjs";
9
+ import { n as N } from "./script-loader-DZWHyVXo.mjs";
10
+ import { t as P } from "./configurator-YwPnRLWl.mjs";
11
+ import { t as be } from "./planner-DG6mOKiO.mjs";
12
+ import { n as xe, t as Se } from "./glb-viewer-Bt2icXD1.mjs";
13
+ import { t as Ce } from "./api-CscVM_rq.mjs";
14
14
  import { t as we } from "./roomle-headless-setup-DbO_rLjK.mjs";
15
15
  import { createRequire as Te } from "module";
16
16
  //#region packages/headless-core/src/headless-tween-stub.ts