@rings-webgpu/core 1.0.17 → 1.0.19
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/rings.es.js +127 -127
- package/dist/rings.es.js.map +2 -2
- package/dist/rings.es.max.js +20 -14
- package/dist/rings.umd.js +127 -127
- package/dist/rings.umd.js.map +2 -2
- package/dist/rings.umd.max.js +20 -14
- package/dist/types/loader/parser/tileRenderer/core/BoundingVolume.d.ts +1 -0
- package/package.json +1 -1
package/dist/rings.es.max.js
CHANGED
|
@@ -41057,7 +41057,7 @@ class PostProcessingComponent extends ComponentBase {
|
|
|
41057
41057
|
}
|
|
41058
41058
|
}
|
|
41059
41059
|
|
|
41060
|
-
const version = "1.0.
|
|
41060
|
+
const version = "1.0.19";
|
|
41061
41061
|
|
|
41062
41062
|
class Engine3D {
|
|
41063
41063
|
/**
|
|
@@ -61382,12 +61382,16 @@ function toggleTiles(tile, renderer) {
|
|
|
61382
61382
|
}
|
|
61383
61383
|
|
|
61384
61384
|
class BoundingVolume {
|
|
61385
|
+
static s_tmpMatrix = null;
|
|
61385
61386
|
_type;
|
|
61386
61387
|
_data;
|
|
61387
61388
|
_box;
|
|
61388
61389
|
_sphere;
|
|
61389
61390
|
_matrix;
|
|
61390
61391
|
constructor(data) {
|
|
61392
|
+
if (!BoundingVolume.s_tmpMatrix) {
|
|
61393
|
+
BoundingVolume.s_tmpMatrix = new Matrix4();
|
|
61394
|
+
}
|
|
61391
61395
|
this._data = data;
|
|
61392
61396
|
if (data.box) {
|
|
61393
61397
|
this._type = "box";
|
|
@@ -61511,7 +61515,8 @@ class BoundingVolume {
|
|
|
61511
61515
|
}
|
|
61512
61516
|
return target;
|
|
61513
61517
|
} else if (this._box) {
|
|
61514
|
-
const worldMatrix =
|
|
61518
|
+
const worldMatrix = BoundingVolume.s_tmpMatrix;
|
|
61519
|
+
worldMatrix.identity();
|
|
61515
61520
|
if (this._matrix) {
|
|
61516
61521
|
if (parentTransform) {
|
|
61517
61522
|
worldMatrix.multiplyMatrices(parentTransform, this._matrix);
|
|
@@ -62072,11 +62077,13 @@ class TilesRenderer {
|
|
|
62072
62077
|
transform.rawData[13] = -position.y;
|
|
62073
62078
|
transform.rawData[14] = -position.z;
|
|
62074
62079
|
}
|
|
62075
|
-
const worldTransform =
|
|
62080
|
+
const worldTransform = new Matrix4();
|
|
62081
|
+
worldTransform.copyFrom(transform);
|
|
62076
62082
|
if (parentTile && parentTile.cached.worldTransform) {
|
|
62077
62083
|
worldTransform.multiplyMatrices(parentTile.cached.worldTransform, transform);
|
|
62078
62084
|
}
|
|
62079
|
-
const transformInverse =
|
|
62085
|
+
const transformInverse = new Matrix4();
|
|
62086
|
+
transformInverse.copyFrom(worldTransform);
|
|
62080
62087
|
transformInverse.invert();
|
|
62081
62088
|
tileObj.cached.transfrom = transform;
|
|
62082
62089
|
tileObj.cached.worldTransform = worldTransform;
|
|
@@ -62184,16 +62191,14 @@ class TilesRenderer {
|
|
|
62184
62191
|
const adjustmentTransform = this._upRotationMatrix;
|
|
62185
62192
|
switch (extension.toLowerCase()) {
|
|
62186
62193
|
case "b3dm":
|
|
62187
|
-
|
|
62188
|
-
|
|
62189
|
-
{
|
|
62190
|
-
onProgress: (e) => {
|
|
62191
|
-
},
|
|
62192
|
-
onComplete: (e) => {
|
|
62193
|
-
}
|
|
62194
|
+
const loader = new FileLoader();
|
|
62195
|
+
const parser = await loader.load(fullUrl, B3DMParser, {
|
|
62196
|
+
onProgress: (e) => {
|
|
62194
62197
|
},
|
|
62195
|
-
|
|
62196
|
-
|
|
62198
|
+
onComplete: (e) => {
|
|
62199
|
+
}
|
|
62200
|
+
}, adjustmentTransform);
|
|
62201
|
+
scene = parser.data;
|
|
62197
62202
|
break;
|
|
62198
62203
|
case "i3dm":
|
|
62199
62204
|
scene = await Engine3D.res.loadI3DM(
|
|
@@ -62389,7 +62394,8 @@ class TilesRenderer {
|
|
|
62389
62394
|
break;
|
|
62390
62395
|
}
|
|
62391
62396
|
this._upRotationMatrix = adjustmentTransform;
|
|
62392
|
-
const invertMatrix =
|
|
62397
|
+
const invertMatrix = new Matrix4();
|
|
62398
|
+
invertMatrix.copyFrom(adjustmentTransform);
|
|
62393
62399
|
invertMatrix.invert();
|
|
62394
62400
|
this._applyLocalTransform(this.group.transform, invertMatrix);
|
|
62395
62401
|
}
|