@thatopen/components 3.4.6 → 3.4.8

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/dist/index.d.ts CHANGED
@@ -390,6 +390,15 @@ export declare abstract class BaseRenderer extends BaseWorldItem implements Upda
390
390
  * The list of [clipping planes](https://threejs.org/docs/#api/en/renderers/WebGLRenderer.clippingPlanes) used by this instance of the renderer.
391
391
  */
392
392
  clippingPlanes: THREE.Plane[];
393
+ /**
394
+ * The default `isLocal` value used by {@link setPlane} when the caller
395
+ * doesn't pass one. When `true`, planes added without an explicit
396
+ * `isLocal` stay out of the global `three.clippingPlanes` list and are
397
+ * clipped per-material instead. The {@link Clipper} sets this to mirror
398
+ * its own `localClippingPlanes` flag, so consumers like `Views` that add
399
+ * their own planes automatically inherit the active clipping mode.
400
+ */
401
+ localClippingPlanes: boolean;
393
402
  /**
394
403
  * Updates the clipping planes and triggers the `onClippingPlanesUpdated` event.
395
404
  *
@@ -1437,8 +1446,15 @@ export declare class Clipper extends Component implements Createable, Disposable
1437
1446
  * Default `false` to preserve existing behavior. Set this once
1438
1447
  * before creating planes; toggling at runtime won't reclassify
1439
1448
  * planes already on the renderer.
1449
+ *
1450
+ * Setting this also mirrors the value onto every world's
1451
+ * `renderer.localClippingPlanes`, so planes added by other
1452
+ * components (e.g. the {@link Views} cut planes) default to the
1453
+ * same mode without each call site having to pass `isLocal`.
1440
1454
  */
1441
- localClippingPlanes: boolean;
1455
+ private _localClippingPlanes;
1456
+ get localClippingPlanes(): boolean;
1457
+ set localClippingPlanes(value: boolean);
1442
1458
  /**
1443
1459
  * The type of clipping plane to be created.
1444
1460
  * Default is {@link SimplePlane}.
@@ -2995,6 +3011,19 @@ export declare class FastModelPicker implements Disposable_2 {
2995
3011
  * restored after.
2996
3012
  */
2997
3013
  private _hiddenLods;
3014
+ /**
3015
+ * The meshes each model owns, i.e. excluding those belonging to a
3016
+ * model nested inside it. A delta model's object is parented under
3017
+ * its parent model's object (see the fragments EditHelper), while
3018
+ * both are listed as separate models, so subtree membership alone
3019
+ * does not determine ownership.
3020
+ *
3021
+ * Populated in {@link applyIdMaterial}, consumed by
3022
+ * {@link renderPickPass} to isolate one model per render without
3023
+ * relying on root visibility. A nested model can't be isolated by
3024
+ * its root, since hiding the parent's root culls the child too.
3025
+ */
3026
+ private _ownMeshes;
2998
3027
  constructor(components: Components, world: World);
2999
3028
  /**
3000
3029
  * Returns the model id under the given screen position, or `null` if
@@ -3112,6 +3141,18 @@ export declare class FastModelPicker implements Disposable_2 {
3112
3141
  * disambiguate models.
3113
3142
  */
3114
3143
  private applyIdMaterial;
3144
+ /**
3145
+ * The object roots of every loaded model.
3146
+ */
3147
+ private getModelRoots;
3148
+ /**
3149
+ * Like `Object3D.traverse`, but prunes the subtree of any nested model
3150
+ * root, so each mesh is visited exactly once, by the model that owns
3151
+ * it. A delta model's object hangs under its parent model's object
3152
+ * while being a model in its own right; a plain `traverse` from the
3153
+ * parent would walk into it.
3154
+ */
3155
+ private traverseOwn;
3115
3156
  /**
3116
3157
  * Renders the world scene to the id target one model at a time,
3117
3158
  * flipping the `modelByte` uniform between renders. The depth buffer
@@ -3695,6 +3736,8 @@ export declare interface IDSLengthParameter {
3695
3736
 
3696
3737
  export declare class IDSMaterial extends IDSFacet {
3697
3738
  private _ifcMaterialEntities;
3739
+ private _materialParentAttributes;
3740
+ private _materialRelations;
3698
3741
  facetType: "Material";
3699
3742
  value?: IDSFacetParameter;
3700
3743
  uri?: string;
@@ -5595,6 +5638,7 @@ export declare class SimpleWorld<T extends BaseScene = BaseScene, U extends Base
5595
5638
  */
5596
5639
  enabled: boolean;
5597
5640
  private _dynamicAnchor;
5641
+ private _anchorRequestId;
5598
5642
  set dynamicAnchor(value: boolean);
5599
5643
  get dynamicAnchor(): boolean;
5600
5644
  /**
@@ -5609,6 +5653,19 @@ export declare class SimpleWorld<T extends BaseScene = BaseScene, U extends Base
5609
5653
  private _camera?;
5610
5654
  private _renderer;
5611
5655
  private onPointerDown;
5656
+ /**
5657
+ * The pointer position in normalized device coordinates, derived from the
5658
+ * event rather than the raycaster's mouse: that one only tracks pointermove
5659
+ * and touchstart, so on a bare pointerdown it would still report the center of
5660
+ * the viewport.
5661
+ */
5662
+ private getPointerPosition;
5663
+ /**
5664
+ * The point where the pointer ray crosses the plane that contains the current
5665
+ * orbit target and faces the camera. Used as the anchor when the pointer
5666
+ * doesn't land on any geometry.
5667
+ */
5668
+ private getPlaneAnchor;
5612
5669
  private _defaultCamera?;
5613
5670
  get defaultCamera(): U;
5614
5671
  set defaultCamera(value: U);
@@ -5730,6 +5787,12 @@ export declare enum SnapClass {
5730
5787
  FACE = 2
5731
5788
  }
5732
5789
 
5790
+ /** Typed arrays used to store snap geometry payloads. */
5791
+ export declare type SnapFloatArray = Float32Array | Float64Array;
5792
+
5793
+ /** Numeric typed-array precision used by SnapResolver geometry caches. */
5794
+ export declare type SnapPrecision = "half" | "full";
5795
+
5733
5796
  /**
5734
5797
  * Main-thread snap resolver: takes a world-space pick point + the
5735
5798
  * picked item, returns the closest face / line / point of that item
@@ -5762,7 +5825,20 @@ export declare class SnapResolver implements Disposable_2 {
5762
5825
  * that revisit thousands of distinct items in a single session.
5763
5826
  */
5764
5827
  maxCacheSize: number;
5828
+ /**
5829
+ * Numeric precision for cached face/edge/vertex buffers.
5830
+ *
5831
+ * `"half"` uses Float32Array for lower memory footprint.
5832
+ * `"full"` uses Float64Array for higher numeric precision.
5833
+ * Use `"full"` for workflows that require higher geometric fidelity.
5834
+ *
5835
+ * Changing this value clears the snap cache so subsequent requests
5836
+ * are rebuilt with the new precision.
5837
+ */
5838
+ get precision(): SnapPrecision;
5839
+ set precision(value: SnapPrecision);
5765
5840
  private readonly components;
5841
+ private _precision;
5766
5842
  private readonly cache;
5767
5843
  constructor(components: Components);
5768
5844
  /** {@link Disposable.dispose} */
@@ -5812,6 +5888,13 @@ export declare class SnapResolver implements Disposable_2 {
5812
5888
  private snapToPoint;
5813
5889
  private snapToLine;
5814
5890
  private snapToFace;
5891
+ private signedDistance;
5892
+ private projectOntoPlane;
5893
+ /**
5894
+ * Even-odd point-in-polygon test, run on the polygon projected onto its
5895
+ * dominant plane. `point` is assumed to already lie on the face's plane.
5896
+ */
5897
+ private containsPoint;
5815
5898
  }
5816
5899
 
5817
5900
  /**
@@ -5852,7 +5935,7 @@ export declare type SnapResult = {
5852
5935
  snappingClass: SnapClass;
5853
5936
  /** Polygon vertices of the snapped face (FACE only). Flat array of
5854
5937
  * `[x, y, z, x, y, z, ...]`. */
5855
- facePoints?: Float32Array;
5938
+ facePoints?: SnapFloatArray;
5856
5939
  /** Triangulation indices into `facePoints` (FACE only). For convex
5857
5940
  * polygons we emit a fan; for concave the consumer can re-tessellate. */
5858
5941
  faceIndices?: Uint32Array;