@thatopen/components 3.3.1 → 3.3.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/README.md +81 -81
- package/dist/index.cjs +1194 -2990
- package/dist/index.d.ts +48 -5
- package/dist/index.min.cjs +2 -9
- package/dist/index.min.mjs +2 -8
- package/dist/index.mjs +1113 -2909
- package/package.json +60 -59
package/dist/index.d.ts
CHANGED
|
@@ -843,9 +843,9 @@ export declare class Clipper extends Component implements Createable, Disposable
|
|
|
843
843
|
/** {@link Configurable.onSetup} */
|
|
844
844
|
readonly onSetup: Event_2<unknown>;
|
|
845
845
|
/** Event that fires when the user starts dragging a clipping plane. */
|
|
846
|
-
readonly onBeforeDrag: Event_2<
|
|
846
|
+
readonly onBeforeDrag: Event_2<SimplePlane>;
|
|
847
847
|
/** Event that fires when the user stops dragging a clipping plane. */
|
|
848
|
-
readonly onAfterDrag: Event_2<
|
|
848
|
+
readonly onAfterDrag: Event_2<SimplePlane>;
|
|
849
849
|
/**
|
|
850
850
|
* Event that fires when the user starts creating a clipping plane.
|
|
851
851
|
*/
|
|
@@ -889,6 +889,12 @@ export declare class Clipper extends Component implements Createable, Disposable
|
|
|
889
889
|
* has to be `true` for this to apply.
|
|
890
890
|
*/
|
|
891
891
|
toleranceOrthogonalY: number;
|
|
892
|
+
/**
|
|
893
|
+
* Whether clipping planes should automatically scale based on
|
|
894
|
+
* camera distance. When true, the plane surface stays proportional
|
|
895
|
+
* to the arrow gizmo as you zoom in/out. Default is true.
|
|
896
|
+
*/
|
|
897
|
+
autoScalePlanes: boolean;
|
|
892
898
|
/**
|
|
893
899
|
* The type of clipping plane to be created.
|
|
894
900
|
* Default is {@link SimplePlane}.
|
|
@@ -962,8 +968,6 @@ export declare class Clipper extends Component implements Createable, Disposable
|
|
|
962
968
|
private normalizePlaneDirectionY;
|
|
963
969
|
private newPlane;
|
|
964
970
|
private updateMaterialsAndPlanes;
|
|
965
|
-
private _onStartDragging;
|
|
966
|
-
private _onEndDragging;
|
|
967
971
|
}
|
|
968
972
|
|
|
969
973
|
/**
|
|
@@ -1905,7 +1909,9 @@ export declare class FragmentsManager extends Component implements Disposable_2
|
|
|
1905
1909
|
constructor(components: Components);
|
|
1906
1910
|
/** {@link Disposable.dispose} */
|
|
1907
1911
|
dispose(): void;
|
|
1908
|
-
init(workerURL: string
|
|
1912
|
+
init(workerURL: string, options?: {
|
|
1913
|
+
classicWorker?: boolean;
|
|
1914
|
+
}): void;
|
|
1909
1915
|
raycast(data: {
|
|
1910
1916
|
camera: THREE.PerspectiveCamera | THREE.OrthographicCamera;
|
|
1911
1917
|
mouse: THREE.Vector2;
|
|
@@ -2452,6 +2458,26 @@ export declare class IfcLoader extends Component implements Disposable_2 {
|
|
|
2452
2458
|
/**
|
|
2453
2459
|
* Loads an IFC file and processes it for 3D visualization.
|
|
2454
2460
|
*
|
|
2461
|
+
* By default, the loader imports a minimal set of attributes and relations
|
|
2462
|
+
* needed for typical visualization workflows.
|
|
2463
|
+
*
|
|
2464
|
+
* **Default attributes**
|
|
2465
|
+
* - Base entities: Project, Site, Building, BuildingStorey
|
|
2466
|
+
* - Materials: IFC material definitions and layers
|
|
2467
|
+
* - Properties: Property Sets, quantities (area, volume, length, etc.)
|
|
2468
|
+
*
|
|
2469
|
+
* **Default relations**
|
|
2470
|
+
* - DefinesByProperties (IsDefinedBy / DefinesOccurrence)
|
|
2471
|
+
* - AssociatesMaterial (HasAssociations / AssociatedTo)
|
|
2472
|
+
* - Aggregates (IsDecomposedBy / Decomposes)
|
|
2473
|
+
* - ContainedInSpatialStructure (ContainsElements / ContainedInStructure)
|
|
2474
|
+
*
|
|
2475
|
+
* If you need *all* attributes or relations to be loaded, you can enable them
|
|
2476
|
+
* via the `instanceCallback`.
|
|
2477
|
+
*
|
|
2478
|
+
* The callback provides direct access to the underlying `IfcImporter`,
|
|
2479
|
+
* allowing advanced configuration before processing begins.
|
|
2480
|
+
*
|
|
2455
2481
|
* @param data - The Uint8Array containing the IFC file data.
|
|
2456
2482
|
* @param coordinate - Boolean indicating whether to coordinate the loaded IFC data. Default is true.
|
|
2457
2483
|
* @param name - Name for the fragments model.
|
|
@@ -2460,6 +2486,17 @@ export declare class IfcLoader extends Component implements Disposable_2 {
|
|
|
2460
2486
|
* @returns A Promise that resolves to the FragmentsModel containing the loaded and processed IFC data.
|
|
2461
2487
|
*
|
|
2462
2488
|
* @example
|
|
2489
|
+
* // Load all attributes and relations using the instanceCallback
|
|
2490
|
+
* ```ts
|
|
2491
|
+
* const model = await ifcLoader.load(ifcData, true, "modelName", {
|
|
2492
|
+
* instanceCallback: (importer) => {
|
|
2493
|
+
* importer.addAllAttributes();
|
|
2494
|
+
* importer.addAllRelations();
|
|
2495
|
+
* },
|
|
2496
|
+
* });
|
|
2497
|
+
* ```
|
|
2498
|
+
* @example
|
|
2499
|
+
* // Default loading (built-in attributes and relations only)
|
|
2463
2500
|
* ```typescript
|
|
2464
2501
|
* const ifcLoader = components.get(IfcLoader);
|
|
2465
2502
|
* const model = await ifcLoader.load(ifcData);
|
|
@@ -3214,6 +3251,7 @@ export declare class SimpleCamera extends BaseCamera implements Updateable, Disp
|
|
|
3214
3251
|
* This camera is used for rendering the scene.
|
|
3215
3252
|
*/
|
|
3216
3253
|
three: THREE.PerspectiveCamera | THREE.OrthographicCamera;
|
|
3254
|
+
protected _resizeObserver: ResizeObserver | null;
|
|
3217
3255
|
private _allControls;
|
|
3218
3256
|
/**
|
|
3219
3257
|
* The object that controls the camera. An instance of
|
|
@@ -3420,6 +3458,10 @@ export declare class SimplePlane implements Disposable_2, Hideable {
|
|
|
3420
3458
|
private readonly _planeMesh;
|
|
3421
3459
|
private readonly _controls;
|
|
3422
3460
|
private readonly _hiddenMaterial;
|
|
3461
|
+
private _sizeMultiplier;
|
|
3462
|
+
private _autoScale;
|
|
3463
|
+
get autoScale(): boolean;
|
|
3464
|
+
set autoScale(value: boolean);
|
|
3423
3465
|
/**
|
|
3424
3466
|
* Getter for the enabled state of the clipping plane.
|
|
3425
3467
|
* @returns {boolean} The current enabled state.
|
|
@@ -3476,6 +3518,7 @@ export declare class SimplePlane implements Disposable_2, Hideable {
|
|
|
3476
3518
|
setFromNormalAndCoplanarPoint(normal: THREE.Vector3, point: THREE.Vector3): void;
|
|
3477
3519
|
/** {@link Updateable.update} */
|
|
3478
3520
|
update: () => void;
|
|
3521
|
+
private updateScale;
|
|
3479
3522
|
/** {@link Disposable.dispose} */
|
|
3480
3523
|
dispose(): void;
|
|
3481
3524
|
private reset;
|