@ifc-lite/viewer 1.25.1 → 1.25.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/.turbo/turbo-build.log +79 -84
- package/CHANGELOG.md +23 -0
- package/dist/assets/{basketViewActivator-Dkn92C04.js → basketViewActivator-CTgyKI3U.js} +6 -6
- package/dist/assets/{bcf-DP2AK1-_.js → bcf-7jQby1qi.js} +1 -1
- package/dist/assets/{deflate-BYqYwhkl.js → deflate-Cfp9t1Df.js} +1 -1
- package/dist/assets/exporters-DfSvJPi4.js +4660 -0
- package/dist/assets/geometry.worker-Cyn5BybV.js +1 -0
- package/dist/assets/{geotiff-By06vdeL.js → geotiff-xZoE8BkO.js} +10 -10
- package/dist/assets/{ids-DDkkb4mo.js → ids-Cu73hD0Y.js} +21 -21
- package/dist/assets/ifc-lite_bg-ksLBP5cA.wasm +0 -0
- package/dist/assets/{index-CqBdDOAZ.js → index-WSbA5iy6.js} +34803 -34679
- package/dist/assets/{jpeg-B4IBTphL.js → jpeg-DhwFEbqb.js} +1 -1
- package/dist/assets/{lerc-DQ3jI0Ke.js → lerc-Dz6BXOVb.js} +1 -1
- package/dist/assets/{lzw-CtdH775t.js → lzw-C9z0fG2o.js} +1 -1
- package/dist/assets/{native-bridge-DA8wxaN_.js → native-bridge-RvDmzO-2.js} +1 -1
- package/dist/assets/{packbits-DG3zn49C.js → packbits-jfwifz7C.js} +1 -1
- package/dist/assets/parser.worker-C594dWxH.js +182 -0
- package/dist/assets/raw-R2QfzPAR.js +1 -0
- package/dist/assets/{sandbox-D1pQT-5R.js → sandbox-DDSZ7rek.js} +2450 -2260
- package/dist/assets/{server-client-D9xO_8yX.js → server-client-Ctk8_Bof.js} +1 -1
- package/dist/assets/{webimage-_-qCDjkn.js → webimage-XFHVyVtC.js} +1 -1
- package/dist/assets/{zstd-DlfgC8gA.js → zstd-3q5qcl5V.js} +1 -1
- package/dist/index.html +6 -6
- package/package.json +22 -21
- package/src/App.tsx +4 -0
- package/src/components/viewer/CommandPalette.tsx +5 -1
- package/src/components/viewer/MainToolbar.tsx +41 -19
- package/src/components/viewer/Viewport.tsx +48 -3
- package/src/components/viewer/hierarchy/ifc-icons.ts +60 -0
- package/src/components/viewer/useGeometryStreaming.ts +113 -18
- package/src/hooks/ingest/resolveDataStoreOrAbort.test.ts +61 -0
- package/src/hooks/ingest/resolveDataStoreOrAbort.ts +28 -0
- package/src/hooks/ingest/viewerModelIngest.ts +55 -11
- package/src/hooks/useIfcCache.ts +44 -18
- package/src/hooks/useIfcLoader.ts +1 -23
- package/src/hooks/useSymbolicAnnotations.ts +170 -35
- package/src/store/constants.ts +19 -3
- package/src/store/index.ts +1 -0
- package/src/store/slices/visibilitySlice.ts +2 -1
- package/src/store/types.ts +9 -0
- package/src/utils/serverDataModel.test.ts +51 -1
- package/src/utils/serverDataModel.ts +2 -26
- package/vite.config.ts +0 -5
- package/dist/assets/exporters-CZe0D8N-.js +0 -5957
- package/dist/assets/geometry-controller.worker-pD49_fH6.js +0 -7
- package/dist/assets/geometry.worker-D4c-06r5.js +0 -1
- package/dist/assets/ifc-lite-DxGqDbjO.js +0 -7
- package/dist/assets/ifc-lite_bg-BNeu7R_V.wasm +0 -0
- package/dist/assets/ifc-lite_bg-DuxUZomW.wasm +0 -0
- package/dist/assets/parser.worker-BZZcO7DB.js +0 -182
- package/dist/assets/raw-DY7Y_acr.js +0 -1
- package/dist/assets/wasm-bridge-DMX8Acuf.js +0 -1
- package/dist/assets/workerHelpers-Crstj4Oa.js +0 -36
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{B as o}from"./geotiff-By06vdeL.js";import"./sandbox-D1pQT-5R.js";import"./lens-PYsLu_MA.js";import"./__vite-browser-external-B1O5LaIO.js";class c extends o{decodeBlock(e){return e}}export{c as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{e as m,f}from"./exporters-CZe0D8N-.js";import"./sandbox-D1pQT-5R.js";import"./lens-PYsLu_MA.js";class z{bridge;initialized=!1;constructor(){this.bridge=new m}async init(){this.initialized||(await this.bridge.init(),this.initialized=!0)}isInitialized(){return this.initialized}toIfcContent(e){return typeof e=="string"?e:new TextDecoder().decode(e)}async processGeometry(e){this.initialized||await this.init(),performance.now();const i=new f(this.bridge.getApi(),this.toIfcContent(e)),r=i.collectMeshes(),s=i.getBuildingRotation();performance.now();let o=0,n=0;for(const a of r)o+=a.positions.length/3,n+=a.indices.length/3;return{meshes:r,totalVertices:o,totalTriangles:n,coordinateInfo:{originShift:{x:0,y:0,z:0},originalBounds:{min:{x:0,y:0,z:0},max:{x:0,y:0,z:0}},shiftedBounds:{min:{x:0,y:0,z:0},max:{x:0,y:0,z:0}},hasLargeCoordinates:!1,buildingRotation:s}}}async processGeometryStreaming(e,i){this.initialized||await this.init();const r=performance.now(),s=new f(this.bridge.getApi(),this.toIfcContent(e));let o=0,n=0,c=0;try{for await(const t of s.collectMeshesStreaming(50)){if(t&&typeof t=="object"&&"type"in t&&t.type==="colorUpdate")continue;const l=t;o+=l.length;for(const g of l)n+=g.positions.length/3,c+=g.indices.length/3;i.onBatch?.({meshes:l,progress:{processed:o,total:o,currentType:"processing"}})}}catch(t){throw i.onError?.(t instanceof Error?t:new Error(String(t))),t}const d=performance.now()-r,h={totalMeshes:o,totalVertices:n,totalTriangles:c,parseTimeMs:d*.3,geometryTimeMs:d*.7};return i.onComplete?.(h),h}getApi(){return this.bridge.getApi()}}export{z as WasmBridge};
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
let a;
|
|
2
|
-
let __tla = (async ()=>{
|
|
3
|
-
function o(r, t) {
|
|
4
|
-
return new Promise((e)=>{
|
|
5
|
-
r.addEventListener("message", function s({ data: n }) {
|
|
6
|
-
n?.type === t && (r.removeEventListener("message", s), e(n));
|
|
7
|
-
});
|
|
8
|
-
});
|
|
9
|
-
}
|
|
10
|
-
o(self, "wasm_bindgen_worker_init").then(async ({ init: r, receiver: t })=>{
|
|
11
|
-
const e = await import("./ifc-lite-DxGqDbjO.js");
|
|
12
|
-
await e.default(r), postMessage({
|
|
13
|
-
type: "wasm_bindgen_worker_ready"
|
|
14
|
-
}), e.wbg_rayon_start_worker(t);
|
|
15
|
-
});
|
|
16
|
-
a = async function(r, t, e) {
|
|
17
|
-
if (e.numThreads() === 0) throw new Error("num_threads must be > 0.");
|
|
18
|
-
const s = {
|
|
19
|
-
type: "wasm_bindgen_worker_init",
|
|
20
|
-
init: {
|
|
21
|
-
module_or_path: r,
|
|
22
|
-
memory: t
|
|
23
|
-
},
|
|
24
|
-
receiver: e.receiver()
|
|
25
|
-
};
|
|
26
|
-
await Promise.all(Array.from({
|
|
27
|
-
length: e.numThreads()
|
|
28
|
-
}, async ()=>{
|
|
29
|
-
const n = new Worker(self.location.href, {
|
|
30
|
-
type: "module"
|
|
31
|
-
});
|
|
32
|
-
return n.postMessage(s), await o(n, "wasm_bindgen_worker_ready"), n;
|
|
33
|
-
})), e.build();
|
|
34
|
-
};
|
|
35
|
-
})();
|
|
36
|
-
export { a as s, __tla };
|