@thatopen/components 3.2.5 → 3.2.7
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.cjs +26 -19
- package/dist/index.d.ts +11 -7
- package/dist/index.min.cjs +2 -2
- package/dist/index.min.mjs +2 -2
- package/dist/index.mjs +26 -19
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -3559,8 +3559,8 @@ const _IfcLoader = class _IfcLoader extends Component {
|
|
|
3559
3559
|
* Loads an IFC file and processes it for 3D visualization.
|
|
3560
3560
|
*
|
|
3561
3561
|
* @param data - The Uint8Array containing the IFC file data.
|
|
3562
|
-
* @param coordinate -
|
|
3563
|
-
* @param name -
|
|
3562
|
+
* @param coordinate - Boolean indicating whether to coordinate the loaded IFC data. Default is true.
|
|
3563
|
+
* @param name - Name for the fragments model.
|
|
3564
3564
|
* @param config - Optional extra data for loading the IFC.
|
|
3565
3565
|
*
|
|
3566
3566
|
* @returns A Promise that resolves to the FragmentsModel containing the loaded and processed IFC data.
|
|
@@ -11988,6 +11988,14 @@ class OrthoPerspectiveCamera extends SimpleCamera {
|
|
|
11988
11988
|
this.disableUserInput();
|
|
11989
11989
|
}
|
|
11990
11990
|
}
|
|
11991
|
+
/**
|
|
11992
|
+
* Adds a custom {@link NavigationMode} to the camera that can be used using the {@link OrthoPerspectiveCamera.set} method.
|
|
11993
|
+
*
|
|
11994
|
+
* @param mode - The custom {@link NavigationMode} to add.
|
|
11995
|
+
*/
|
|
11996
|
+
addCustomNavigationMode(mode) {
|
|
11997
|
+
this._navigationModes.set(mode.id, mode);
|
|
11998
|
+
}
|
|
11991
11999
|
disableUserInput() {
|
|
11992
12000
|
this._userInputButtons.left = this.controls.mouseButtons.left;
|
|
11993
12001
|
this._userInputButtons.right = this.controls.mouseButtons.right;
|
|
@@ -17643,6 +17651,7 @@ const _Clipper = class _Clipper extends Component {
|
|
|
17643
17651
|
plane.world.renderer.setPlane(false, plane.three);
|
|
17644
17652
|
plane.dispose();
|
|
17645
17653
|
this.updateMaterialsAndPlanes();
|
|
17654
|
+
this.onAfterDelete.trigger(plane);
|
|
17646
17655
|
});
|
|
17647
17656
|
}
|
|
17648
17657
|
/** {@link Disposable.dispose} */
|
|
@@ -20821,7 +20830,7 @@ class IDSSpecification {
|
|
|
20821
20830
|
return xml;
|
|
20822
20831
|
}
|
|
20823
20832
|
}
|
|
20824
|
-
const getParameterValue = (property
|
|
20833
|
+
const getParameterValue = (property) => {
|
|
20825
20834
|
if (!property)
|
|
20826
20835
|
return void 0;
|
|
20827
20836
|
const result = {};
|
|
@@ -20839,7 +20848,13 @@ const getParameterValue = (property, parseNumericString = true) => {
|
|
|
20839
20848
|
if ("enumeration" in restriction) {
|
|
20840
20849
|
result.type = "enumeration";
|
|
20841
20850
|
const enumeration = restriction.enumeration.map(
|
|
20842
|
-
({ value }) =>
|
|
20851
|
+
({ value }) => {
|
|
20852
|
+
if (restriction.base.includes("string"))
|
|
20853
|
+
return String(value);
|
|
20854
|
+
if (restriction.base.includes("integer") || restriction.base.includes("double"))
|
|
20855
|
+
return Number(value);
|
|
20856
|
+
return value;
|
|
20857
|
+
}
|
|
20843
20858
|
);
|
|
20844
20859
|
result.parameter = enumeration;
|
|
20845
20860
|
}
|
|
@@ -20933,19 +20948,19 @@ const createMaterialFacets = (components, elements) => {
|
|
|
20933
20948
|
}
|
|
20934
20949
|
return facets;
|
|
20935
20950
|
};
|
|
20936
|
-
const createPropertyFacets = (components, elements
|
|
20951
|
+
const createPropertyFacets = (components, elements) => {
|
|
20937
20952
|
const facets = [];
|
|
20938
20953
|
for (const element of elements) {
|
|
20939
20954
|
const psetParameter = element.propertySet;
|
|
20940
20955
|
const baseNameParameter = element.baseName;
|
|
20941
|
-
const pset = getParameterValue(psetParameter
|
|
20942
|
-
const baseName = getParameterValue(baseNameParameter
|
|
20956
|
+
const pset = getParameterValue(psetParameter);
|
|
20957
|
+
const baseName = getParameterValue(baseNameParameter);
|
|
20943
20958
|
if (!(baseName && pset))
|
|
20944
20959
|
continue;
|
|
20945
20960
|
const facet = new IDSProperty(components, pset, baseName);
|
|
20946
20961
|
if (element.cardinality)
|
|
20947
20962
|
facet.cardinality = element.cardinality;
|
|
20948
|
-
const value = getParameterValue(element.value
|
|
20963
|
+
const value = getParameterValue(element.value);
|
|
20949
20964
|
facet.value = value;
|
|
20950
20965
|
facet.dataType = element.dataType;
|
|
20951
20966
|
facet.uri = element.uri;
|
|
@@ -21056,7 +21071,7 @@ const _IDSSpecifications = class _IDSSpecifications extends Component {
|
|
|
21056
21071
|
*
|
|
21057
21072
|
* @returns An array of IDSSpecification instances created from the parsed data.
|
|
21058
21073
|
*/
|
|
21059
|
-
load(data
|
|
21074
|
+
load(data) {
|
|
21060
21075
|
const result = [];
|
|
21061
21076
|
const ids = _IDSSpecifications.xmlParser.parse(data).ids;
|
|
21062
21077
|
const { specifications, info } = ids;
|
|
@@ -21096,11 +21111,7 @@ const _IDSSpecifications = class _IDSSpecifications extends Component {
|
|
|
21096
21111
|
applicabilities.push(...facets2);
|
|
21097
21112
|
}
|
|
21098
21113
|
if (facetName === "property") {
|
|
21099
|
-
const facets2 = createPropertyFacets(
|
|
21100
|
-
this.components,
|
|
21101
|
-
elements,
|
|
21102
|
-
config.parseNumericString
|
|
21103
|
-
);
|
|
21114
|
+
const facets2 = createPropertyFacets(this.components, elements);
|
|
21104
21115
|
applicabilities.push(...facets2);
|
|
21105
21116
|
}
|
|
21106
21117
|
if (facetName === "partOf") {
|
|
@@ -21138,11 +21149,7 @@ const _IDSSpecifications = class _IDSSpecifications extends Component {
|
|
|
21138
21149
|
reqs.push(...facets2);
|
|
21139
21150
|
}
|
|
21140
21151
|
if (facetName === "property") {
|
|
21141
|
-
const facets2 = createPropertyFacets(
|
|
21142
|
-
this.components,
|
|
21143
|
-
elements,
|
|
21144
|
-
config.parseNumericString
|
|
21145
|
-
);
|
|
21152
|
+
const facets2 = createPropertyFacets(this.components, elements);
|
|
21146
21153
|
reqs.push(...facets2);
|
|
21147
21154
|
}
|
|
21148
21155
|
if (facetName === "partOf") {
|
package/dist/index.d.ts
CHANGED
|
@@ -2186,9 +2186,7 @@ export declare class IDSSpecifications extends Component {
|
|
|
2186
2186
|
*
|
|
2187
2187
|
* @returns An array of IDSSpecification instances created from the parsed data.
|
|
2188
2188
|
*/
|
|
2189
|
-
load(data: string
|
|
2190
|
-
parseNumericString: boolean;
|
|
2191
|
-
}): IDSSpecification[];
|
|
2189
|
+
load(data: string): IDSSpecification[];
|
|
2192
2190
|
/**
|
|
2193
2191
|
* Exports the IDSSpecifications data into an XML string.
|
|
2194
2192
|
*
|
|
@@ -2289,8 +2287,8 @@ export declare class IfcLoader extends Component implements Disposable_2 {
|
|
|
2289
2287
|
* Loads an IFC file and processes it for 3D visualization.
|
|
2290
2288
|
*
|
|
2291
2289
|
* @param data - The Uint8Array containing the IFC file data.
|
|
2292
|
-
* @param coordinate -
|
|
2293
|
-
* @param name -
|
|
2290
|
+
* @param coordinate - Boolean indicating whether to coordinate the loaded IFC data. Default is true.
|
|
2291
|
+
* @param name - Name for the fragments model.
|
|
2294
2292
|
* @param config - Optional extra data for loading the IFC.
|
|
2295
2293
|
*
|
|
2296
2294
|
* @returns A Promise that resolves to the FragmentsModel containing the loaded and processed IFC data.
|
|
@@ -2650,7 +2648,7 @@ export declare class OrthoPerspectiveCamera extends SimpleCamera {
|
|
|
2650
2648
|
readonly threePersp: THREE.PerspectiveCamera;
|
|
2651
2649
|
protected readonly _userInputButtons: any;
|
|
2652
2650
|
protected readonly _frustumSize = 50;
|
|
2653
|
-
protected readonly _navigationModes: Map<
|
|
2651
|
+
protected readonly _navigationModes: Map<string, NavigationMode>;
|
|
2654
2652
|
protected _mode: NavigationMode | null;
|
|
2655
2653
|
private previousSize;
|
|
2656
2654
|
/**
|
|
@@ -2670,7 +2668,7 @@ export declare class OrthoPerspectiveCamera extends SimpleCamera {
|
|
|
2670
2668
|
*
|
|
2671
2669
|
* @param mode - The {@link NavigationMode} to set.
|
|
2672
2670
|
*/
|
|
2673
|
-
set(mode:
|
|
2671
|
+
set(mode: string): void;
|
|
2674
2672
|
/**
|
|
2675
2673
|
* Make the camera view fit all the specified meshes.
|
|
2676
2674
|
*
|
|
@@ -2685,6 +2683,12 @@ export declare class OrthoPerspectiveCamera extends SimpleCamera {
|
|
|
2685
2683
|
* @param active - whether to enable or disable user inputs.
|
|
2686
2684
|
*/
|
|
2687
2685
|
setUserInput(active: boolean): void;
|
|
2686
|
+
/**
|
|
2687
|
+
* Adds a custom {@link NavigationMode} to the camera that can be used using the {@link OrthoPerspectiveCamera.set} method.
|
|
2688
|
+
*
|
|
2689
|
+
* @param mode - The custom {@link NavigationMode} to add.
|
|
2690
|
+
*/
|
|
2691
|
+
addCustomNavigationMode(mode: NavigationMode): void;
|
|
2688
2692
|
private disableUserInput;
|
|
2689
2693
|
private enableUserInput;
|
|
2690
2694
|
private newOrthoCamera;
|