@yschindel/ara3d-webgl 1.3.14 → 1.3.15
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 +1 -1
- package/dist/ara3d-webgl.mjs +15 -19
- package/dist/ara3d-webgl.mjs.map +1 -1
- package/dist/ara3d-webgl.umd.js +37 -37
- package/dist/ara3d-webgl.umd.js.map +1 -1
- package/dist/types/loader/bimData.d.ts +0 -3
- package/dist/types/loader/bimOpenSchemaLoader.d.ts +6 -16
- package/dist/types/loader/bimResolver.d.ts +1 -2
- package/dist/types/loader/buildGeometryGroup.d.ts +1 -8
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Ara 3D WebGL - BIM Open Schema Viewer
|
|
2
2
|
|
|
3
|
-

|
|
3
|
+
[](https://www.npmjs.com/package/@ara3d/ara3d-webgl)
|
|
4
4
|
|
|
5
5
|
## [Live Demo](https://ara3d.github.io/ara3d-webgl/)
|
|
6
6
|
|
package/dist/ara3d-webgl.mjs
CHANGED
|
@@ -35515,15 +35515,15 @@ const ZT = {
|
|
|
35515
35515
|
LZ4: qT,
|
|
35516
35516
|
LZ4_RAW: XT
|
|
35517
35517
|
};
|
|
35518
|
-
function Kg(r
|
|
35518
|
+
function Kg(r) {
|
|
35519
35519
|
console.time("Building geometry");
|
|
35520
|
-
const
|
|
35521
|
-
let
|
|
35522
|
-
for (const
|
|
35523
|
-
|
|
35524
|
-
for (const
|
|
35525
|
-
|
|
35526
|
-
return
|
|
35520
|
+
const e = new Yn(), t = KT(r), n = jT(t), i = JT(t), s = YT(n);
|
|
35521
|
+
let o = 0;
|
|
35522
|
+
for (const a of i)
|
|
35523
|
+
o += a.geometry.index.count / 3 * a.count, e.add(a);
|
|
35524
|
+
for (const a of s)
|
|
35525
|
+
o += a.geometry.index.count / 3, e.add(a);
|
|
35526
|
+
return e.rotation.x = -Math.PI / 2, console.timeEnd("Building geometry"), e;
|
|
35527
35527
|
}
|
|
35528
35528
|
function YT(r) {
|
|
35529
35529
|
const e = [];
|
|
@@ -35715,14 +35715,13 @@ class i2 {
|
|
|
35715
35715
|
Q(this, "EntityParameters");
|
|
35716
35716
|
Q(this, "SingleParameters");
|
|
35717
35717
|
Q(this, "PointParameters");
|
|
35718
|
-
Q(this, "geometryOptions", { applyZUpToYUpRotation: !0 });
|
|
35719
35718
|
}
|
|
35720
35719
|
rebuildGeometry(e) {
|
|
35721
|
-
return Kg(e
|
|
35720
|
+
return Kg(e);
|
|
35722
35721
|
}
|
|
35723
35722
|
}
|
|
35724
35723
|
class r2 {
|
|
35725
|
-
constructor(e
|
|
35724
|
+
constructor(e) {
|
|
35726
35725
|
Q(this, "Descriptors");
|
|
35727
35726
|
Q(this, "Strings");
|
|
35728
35727
|
Q(this, "Entities");
|
|
@@ -35731,7 +35730,7 @@ class r2 {
|
|
|
35731
35730
|
Q(this, "BimGeometry");
|
|
35732
35731
|
Q(this, "DescriptorCount");
|
|
35733
35732
|
Q(this, "ParameterMap");
|
|
35734
|
-
this.Data = e, this.Entities = e.Entities ?? {}, this.Strings = e.Strings ?? [], this.BimGeometry = e.BimGeometry, this.InstanceCount = this.BimGeometry
|
|
35733
|
+
this.Data = e, this.Entities = e.Entities ?? {}, this.Strings = e.Strings ?? [], this.BimGeometry = e.BimGeometry, this.InstanceCount = this.BimGeometry.InstanceEntityIndex.length, this.EntityCount = this.Entities.Category.length, this.Descriptors = e.Descriptors, this.DescriptorCount = 0, this.ParameterMap = /* @__PURE__ */ new Map(), this.Descriptors && (console.time("Computing parameters"), this.DescriptorCount = this.Descriptors.Name.length, this.ProcessParameters(e.IntegerParameters), this.ProcessParameters(e.SingleParameters), this.ProcessParameters(e.StringParameters), this.ProcessParameters(e.EntityParameters), console.timeEnd("Computing parameters"));
|
|
35735
35734
|
}
|
|
35736
35735
|
GetVal(e, t) {
|
|
35737
35736
|
return t == 3 ? this.Strings[e] : t == 2 ? e >= 0 ? this.GetEntityName(e) : "" : e;
|
|
@@ -35829,8 +35828,6 @@ class s2 {
|
|
|
35829
35828
|
constructor(e) {
|
|
35830
35829
|
Q(this, "Resolver");
|
|
35831
35830
|
this.Data = e, this.Resolver = new r2(e);
|
|
35832
|
-
let t = this.Resolver.FindDescriptor("Rvt:Element:Level");
|
|
35833
|
-
console.log("The level descriptor is ", t), e.EntityParameters.Descriptor;
|
|
35834
35831
|
}
|
|
35835
35832
|
FuncToInstances(e) {
|
|
35836
35833
|
const t = /* @__PURE__ */ new Map();
|
|
@@ -35873,9 +35870,7 @@ class f2 {
|
|
|
35873
35870
|
`Failed to fetch BOS from ${e}: ${n.status} ${n.statusText}`
|
|
35874
35871
|
);
|
|
35875
35872
|
const i = await n.arrayBuffer(), s = await UM.loadAsync(i), o = await o2(s, t);
|
|
35876
|
-
return o.Instances = $T(o.BimGeometry), o.Query = new s2(o), o.Resolver = o.Query.Resolver, o.
|
|
35877
|
-
applyZUpToYUpRotation: t?.applyZUpToYUpRotation ?? !0
|
|
35878
|
-
}, o.ThreeGeometry = Kg(o.Instances, o.geometryOptions), o;
|
|
35873
|
+
return o.Instances = $T(o.BimGeometry), o.Query = new s2(o), o.Resolver = o.Query.Resolver, o.ThreeGeometry = Kg(o.Instances), o;
|
|
35879
35874
|
}
|
|
35880
35875
|
}
|
|
35881
35876
|
async function o2(r, e) {
|
|
@@ -35913,13 +35908,14 @@ async function o2(r, e) {
|
|
|
35913
35908
|
metadata: f,
|
|
35914
35909
|
onChunk(d) {
|
|
35915
35910
|
let m = d.columnData;
|
|
35916
|
-
|
|
35911
|
+
const g = typeof (m?.length ? m[0] : void 0) == "bigint";
|
|
35912
|
+
c && m.constructor.name != c.name && !g && (m = new c(m)), a[d.columnName] = m;
|
|
35917
35913
|
}
|
|
35918
35914
|
});
|
|
35919
35915
|
}
|
|
35920
35916
|
console.time("Reading parquet tables");
|
|
35921
35917
|
const i = new i2(), s = {};
|
|
35922
|
-
return await n("Instances", s, Int32Array), await n("VertexBuffer", s, Int32Array), await n("IndexBuffer", s, Uint32Array), await n("Meshes", s, Int32Array), await n("Materials", s, Uint8Array), await n("Transforms", s, Float32Array), i.BimGeometry = s, await n("Entities", i.Entities = {}, Int32Array),
|
|
35918
|
+
return await n("Instances", s, Int32Array), await n("VertexBuffer", s, Int32Array), await n("IndexBuffer", s, Uint32Array), await n("Meshes", s, Int32Array), await n("Materials", s, Uint8Array), await n("Transforms", s, Float32Array), i.BimGeometry = s, await n("Entities", i.Entities = {}, Int32Array), e && e.loadParameters && (await n("Descriptors", i.Descriptors = {}), await n("IntegerParameters", i.IntegerParameters = {}, Int32Array), await n("SingleParameters", i.SingleParameters = {}, Int32Array), await n("StringParameters", i.StringParameters = {}, Int32Array), await n("EntityParameters", i.EntityParameters = {}, Int32Array), await n("PointParameters", i.PointParameters = {}, Int32Array)), await n("Strings", i), i;
|
|
35923
35919
|
}
|
|
35924
35920
|
export {
|
|
35925
35921
|
f2 as BimOpenSchemaLoader,
|