@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.umd.max.js
CHANGED
|
@@ -41064,7 +41064,7 @@ else if (typeof exports === 'object')
|
|
|
41064
41064
|
}
|
|
41065
41065
|
}
|
|
41066
41066
|
|
|
41067
|
-
const version = "1.0.
|
|
41067
|
+
const version = "1.0.19";
|
|
41068
41068
|
|
|
41069
41069
|
class Engine3D {
|
|
41070
41070
|
/**
|
|
@@ -61389,12 +61389,16 @@ fn frag(){
|
|
|
61389
61389
|
}
|
|
61390
61390
|
|
|
61391
61391
|
class BoundingVolume {
|
|
61392
|
+
static s_tmpMatrix = null;
|
|
61392
61393
|
_type;
|
|
61393
61394
|
_data;
|
|
61394
61395
|
_box;
|
|
61395
61396
|
_sphere;
|
|
61396
61397
|
_matrix;
|
|
61397
61398
|
constructor(data) {
|
|
61399
|
+
if (!BoundingVolume.s_tmpMatrix) {
|
|
61400
|
+
BoundingVolume.s_tmpMatrix = new Matrix4();
|
|
61401
|
+
}
|
|
61398
61402
|
this._data = data;
|
|
61399
61403
|
if (data.box) {
|
|
61400
61404
|
this._type = "box";
|
|
@@ -61518,7 +61522,8 @@ fn frag(){
|
|
|
61518
61522
|
}
|
|
61519
61523
|
return target;
|
|
61520
61524
|
} else if (this._box) {
|
|
61521
|
-
const worldMatrix =
|
|
61525
|
+
const worldMatrix = BoundingVolume.s_tmpMatrix;
|
|
61526
|
+
worldMatrix.identity();
|
|
61522
61527
|
if (this._matrix) {
|
|
61523
61528
|
if (parentTransform) {
|
|
61524
61529
|
worldMatrix.multiplyMatrices(parentTransform, this._matrix);
|
|
@@ -62079,11 +62084,13 @@ fn frag(){
|
|
|
62079
62084
|
transform.rawData[13] = -position.y;
|
|
62080
62085
|
transform.rawData[14] = -position.z;
|
|
62081
62086
|
}
|
|
62082
|
-
const worldTransform =
|
|
62087
|
+
const worldTransform = new Matrix4();
|
|
62088
|
+
worldTransform.copyFrom(transform);
|
|
62083
62089
|
if (parentTile && parentTile.cached.worldTransform) {
|
|
62084
62090
|
worldTransform.multiplyMatrices(parentTile.cached.worldTransform, transform);
|
|
62085
62091
|
}
|
|
62086
|
-
const transformInverse =
|
|
62092
|
+
const transformInverse = new Matrix4();
|
|
62093
|
+
transformInverse.copyFrom(worldTransform);
|
|
62087
62094
|
transformInverse.invert();
|
|
62088
62095
|
tileObj.cached.transfrom = transform;
|
|
62089
62096
|
tileObj.cached.worldTransform = worldTransform;
|
|
@@ -62191,16 +62198,14 @@ fn frag(){
|
|
|
62191
62198
|
const adjustmentTransform = this._upRotationMatrix;
|
|
62192
62199
|
switch (extension.toLowerCase()) {
|
|
62193
62200
|
case "b3dm":
|
|
62194
|
-
|
|
62195
|
-
|
|
62196
|
-
{
|
|
62197
|
-
onProgress: (e) => {
|
|
62198
|
-
},
|
|
62199
|
-
onComplete: (e) => {
|
|
62200
|
-
}
|
|
62201
|
+
const loader = new FileLoader();
|
|
62202
|
+
const parser = await loader.load(fullUrl, B3DMParser, {
|
|
62203
|
+
onProgress: (e) => {
|
|
62201
62204
|
},
|
|
62202
|
-
|
|
62203
|
-
|
|
62205
|
+
onComplete: (e) => {
|
|
62206
|
+
}
|
|
62207
|
+
}, adjustmentTransform);
|
|
62208
|
+
scene = parser.data;
|
|
62204
62209
|
break;
|
|
62205
62210
|
case "i3dm":
|
|
62206
62211
|
scene = await Engine3D.res.loadI3DM(
|
|
@@ -62396,7 +62401,8 @@ fn frag(){
|
|
|
62396
62401
|
break;
|
|
62397
62402
|
}
|
|
62398
62403
|
this._upRotationMatrix = adjustmentTransform;
|
|
62399
|
-
const invertMatrix =
|
|
62404
|
+
const invertMatrix = new Matrix4();
|
|
62405
|
+
invertMatrix.copyFrom(adjustmentTransform);
|
|
62400
62406
|
invertMatrix.invert();
|
|
62401
62407
|
this._applyLocalTransform(this.group.transform, invertMatrix);
|
|
62402
62408
|
}
|
|
@@ -6,6 +6,7 @@ import { Frustum } from '../../../../core/bound/Frustum';
|
|
|
6
6
|
import { BoundingVolumeData } from './TileSet';
|
|
7
7
|
export type BoundingVolumeType = 'box' | 'sphere' | 'region';
|
|
8
8
|
export declare class BoundingVolume {
|
|
9
|
+
static s_tmpMatrix: Matrix4;
|
|
9
10
|
private _type;
|
|
10
11
|
private _data;
|
|
11
12
|
private _box?;
|