@thatopen/components 3.4.1 → 3.4.2
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 +21 -0
- package/dist/index.d.ts +20 -1
- package/dist/index.min.cjs +1 -1
- package/dist/index.min.mjs +1 -1
- package/dist/index.mjs +21 -0
- package/package.json +2 -2
package/dist/index.mjs
CHANGED
|
@@ -7464,6 +7464,20 @@ const _FragmentsManager = class _FragmentsManager extends Component {
|
|
|
7464
7464
|
__publicField(this, "_core");
|
|
7465
7465
|
this.components.add(_FragmentsManager.uuid, this);
|
|
7466
7466
|
}
|
|
7467
|
+
/**
|
|
7468
|
+
* Returns a blob URL for the fragments worker matching the installed
|
|
7469
|
+
* `@thatopen/fragments` version. Delegates to {@link FRAGS.FragmentsModels.getWorker}.
|
|
7470
|
+
* This is the recommended way to obtain the URL passed to {@link FragmentsManager.init}.
|
|
7471
|
+
*
|
|
7472
|
+
* @example
|
|
7473
|
+
* ```ts
|
|
7474
|
+
* const fragments = components.get(OBC.FragmentsManager);
|
|
7475
|
+
* fragments.init(await OBC.FragmentsManager.getWorker());
|
|
7476
|
+
* ```
|
|
7477
|
+
*/
|
|
7478
|
+
static getWorker() {
|
|
7479
|
+
return FragmentsModels.getWorker();
|
|
7480
|
+
}
|
|
7467
7481
|
get initialized() {
|
|
7468
7482
|
return !!this._core;
|
|
7469
7483
|
}
|
|
@@ -7495,6 +7509,13 @@ const _FragmentsManager = class _FragmentsManager extends Component {
|
|
|
7495
7509
|
this.onDisposed.trigger();
|
|
7496
7510
|
this.onDisposed.reset();
|
|
7497
7511
|
}
|
|
7512
|
+
/**
|
|
7513
|
+
* Initializes the fragments core with the given worker URL.
|
|
7514
|
+
* The recommended way to obtain the URL is {@link FragmentsManager.getWorker}:
|
|
7515
|
+
* ```ts
|
|
7516
|
+
* fragments.init(await OBC.FragmentsManager.getWorker());
|
|
7517
|
+
* ```
|
|
7518
|
+
*/
|
|
7498
7519
|
init(workerURL, options) {
|
|
7499
7520
|
this._core = new FragmentsModels(workerURL, options);
|
|
7500
7521
|
this.core.onModelLoaded.add(async () => {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@thatopen/components",
|
|
3
3
|
"description": "Collection of core functionalities to author BIM apps.",
|
|
4
|
-
"version": "3.4.
|
|
4
|
+
"version": "3.4.2",
|
|
5
5
|
"author": "That Open Company",
|
|
6
6
|
"contributors": [
|
|
7
7
|
"Antonio Gonzalez Viegas (https://github.com/agviegas)",
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"access": "public"
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
40
|
-
"@thatopen/fragments": "~3.4.
|
|
40
|
+
"@thatopen/fragments": "~3.4.2",
|
|
41
41
|
"@thatopen/ui": "~3.4.0",
|
|
42
42
|
"@types/convert-units": "2.3.11",
|
|
43
43
|
"@types/three": "0.183.1",
|