@playcanvas/supersplat-viewer 1.18.5 → 1.18.6
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.js +1 -1
- package/package.json +1 -1
- package/public/index.js +8 -40
- package/public/index.js.map +1 -1
package/package.json
CHANGED
package/public/index.js
CHANGED
|
@@ -73841,7 +73841,7 @@ class WalkController {
|
|
|
73841
73841
|
/**
|
|
73842
73842
|
* Field of view in degrees for walk mode.
|
|
73843
73843
|
*/
|
|
73844
|
-
fov =
|
|
73844
|
+
fov = 90;
|
|
73845
73845
|
/**
|
|
73846
73846
|
* Total capsule height in meters (default: human proportion)
|
|
73847
73847
|
*/
|
|
@@ -76610,20 +76610,6 @@ class VoxelCollider {
|
|
|
76610
76610
|
const leafData = view.slice(metadata.nodeCount, metadata.nodeCount + metadata.leafDataCount);
|
|
76611
76611
|
return new VoxelCollider(metadata, nodes, leafData);
|
|
76612
76612
|
}
|
|
76613
|
-
/**
|
|
76614
|
-
* Query whether a world-space point lies inside a solid voxel.
|
|
76615
|
-
*
|
|
76616
|
-
* @param x - World X coordinate.
|
|
76617
|
-
* @param y - World Y coordinate.
|
|
76618
|
-
* @param z - World Z coordinate.
|
|
76619
|
-
* @returns True if the point is inside a solid voxel.
|
|
76620
|
-
*/
|
|
76621
|
-
queryPoint(x, y, z) {
|
|
76622
|
-
const ix = Math.floor((x - this.gridMinX) / this.voxelResolution);
|
|
76623
|
-
const iy = Math.floor((y - this.gridMinY) / this.voxelResolution);
|
|
76624
|
-
const iz = Math.floor((z - this.gridMinZ) / this.voxelResolution);
|
|
76625
|
-
return this.isVoxelSolid(ix, iy, iz);
|
|
76626
|
-
}
|
|
76627
76613
|
/**
|
|
76628
76614
|
* Compute a stable surface normal at a world-space position using flatness-probability
|
|
76629
76615
|
* sampling. Tests 9 candidate directions: 3 axis-aligned and 6 diagonal (45-degree in
|
|
@@ -77181,7 +77167,7 @@ class VoxelCollider {
|
|
|
77181
77167
|
const distNegZ = cz - vMinZ;
|
|
77182
77168
|
const distPosZ = vMaxZ - cz;
|
|
77183
77169
|
const escapeX = distNegX < distPosX ? -(distNegX + radius) : (distPosX + radius);
|
|
77184
|
-
const escapeY = distNegY
|
|
77170
|
+
const escapeY = distNegY < distPosY ? -(distNegY + radius) : (distPosY + radius);
|
|
77185
77171
|
const escapeZ = distNegZ < distPosZ ? -(distNegZ + radius) : (distPosZ + radius);
|
|
77186
77172
|
const absX = Math.abs(escapeX);
|
|
77187
77173
|
const absY = Math.abs(escapeY);
|
|
@@ -77189,14 +77175,14 @@ class VoxelCollider {
|
|
|
77189
77175
|
px = 0;
|
|
77190
77176
|
py = 0;
|
|
77191
77177
|
pz = 0;
|
|
77192
|
-
if (
|
|
77193
|
-
py = escapeY;
|
|
77194
|
-
penetration = absY;
|
|
77195
|
-
}
|
|
77196
|
-
else if (absX <= absZ) {
|
|
77178
|
+
if (absX <= absY && absX <= absZ) {
|
|
77197
77179
|
px = escapeX;
|
|
77198
77180
|
penetration = absX;
|
|
77199
77181
|
}
|
|
77182
|
+
else if (absY <= absZ) {
|
|
77183
|
+
py = escapeY;
|
|
77184
|
+
penetration = absY;
|
|
77185
|
+
}
|
|
77200
77186
|
else {
|
|
77201
77187
|
pz = escapeZ;
|
|
77202
77188
|
penetration = absZ;
|
|
@@ -77212,24 +77198,6 @@ class VoxelCollider {
|
|
|
77212
77198
|
}
|
|
77213
77199
|
}
|
|
77214
77200
|
}
|
|
77215
|
-
// Column-based Y fallback: the per-voxel sphere test loses Y information
|
|
77216
|
-
// when the capsule segment passes through a voxel (segY lands inside the
|
|
77217
|
-
// AABB, zeroing dy). Recover it by finding the topmost solid voxel in the
|
|
77218
|
-
// capsule-center column and computing a direct capsule-bottom push.
|
|
77219
|
-
if (found && Math.abs(bestPushY) <= PENETRATION_EPSILON) {
|
|
77220
|
-
const icx = Math.floor((cx - gridMinX) / voxelResolution);
|
|
77221
|
-
const icz = Math.floor((cz - gridMinZ) / voxelResolution);
|
|
77222
|
-
const capsuleBottom = segTopY + radius;
|
|
77223
|
-
for (let iy = iyMin; iy <= iyMax; iy++) {
|
|
77224
|
-
if (this.isVoxelSolid(icx, iy, icz)) {
|
|
77225
|
-
const surfaceY = gridMinY + iy * voxelResolution;
|
|
77226
|
-
if (capsuleBottom > surfaceY + PENETRATION_EPSILON) {
|
|
77227
|
-
bestPushY = surfaceY - capsuleBottom;
|
|
77228
|
-
}
|
|
77229
|
-
break;
|
|
77230
|
-
}
|
|
77231
|
-
}
|
|
77232
|
-
}
|
|
77233
77201
|
if (found) {
|
|
77234
77202
|
this._push.x = bestPushX;
|
|
77235
77203
|
this._push.y = bestPushY;
|
|
@@ -78225,7 +78193,7 @@ const initXr = (global) => {
|
|
|
78225
78193
|
});
|
|
78226
78194
|
};
|
|
78227
78195
|
|
|
78228
|
-
var version = "1.18.
|
|
78196
|
+
var version = "1.18.6";
|
|
78229
78197
|
|
|
78230
78198
|
const loadGsplat = async (app, config, progressCallback) => {
|
|
78231
78199
|
const { contents, contentUrl, unified, aa } = config;
|