@playcanvas/supersplat-viewer 1.16.1 → 1.16.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/dist/index.js +1 -1
- package/package.json +1 -1
- package/public/index.js +18 -11
- package/public/index.js.map +1 -1
package/package.json
CHANGED
package/public/index.js
CHANGED
|
@@ -69740,11 +69740,11 @@ const initUI = (global) => {
|
|
|
69740
69740
|
dom.enterFullscreen.classList[value ? 'add' : 'remove']('hidden');
|
|
69741
69741
|
dom.exitFullscreen.classList[value ? 'remove' : 'add']('hidden');
|
|
69742
69742
|
});
|
|
69743
|
-
// HQ mode
|
|
69744
|
-
dom.hqOption.addEventListener('click', () => {
|
|
69743
|
+
// HQ mode (click anywhere in the row, not just the label)
|
|
69744
|
+
dom.hqOption.parentElement.addEventListener('click', () => {
|
|
69745
69745
|
state.hqMode = true;
|
|
69746
69746
|
});
|
|
69747
|
-
dom.lqOption.addEventListener('click', () => {
|
|
69747
|
+
dom.lqOption.parentElement.addEventListener('click', () => {
|
|
69748
69748
|
state.hqMode = false;
|
|
69749
69749
|
});
|
|
69750
69750
|
const updateHQ = () => {
|
|
@@ -69757,10 +69757,10 @@ const initUI = (global) => {
|
|
|
69757
69757
|
});
|
|
69758
69758
|
updateHQ();
|
|
69759
69759
|
// Touch control scheme toggle (only visible on touch devices)
|
|
69760
|
-
dom.
|
|
69760
|
+
dom.joystickSchemeRow.addEventListener('click', () => {
|
|
69761
69761
|
state.touchControlScheme = 'joystick';
|
|
69762
69762
|
});
|
|
69763
|
-
dom.
|
|
69763
|
+
dom.pinchSchemeRow.addEventListener('click', () => {
|
|
69764
69764
|
state.touchControlScheme = 'pinch';
|
|
69765
69765
|
});
|
|
69766
69766
|
const updateTouchControlScheme = () => {
|
|
@@ -71565,6 +71565,13 @@ const stickMove = new Vec3();
|
|
|
71565
71565
|
const stickRotate = new Vec3();
|
|
71566
71566
|
/** Maximum accumulated touch movement (px) to still count as a tap */
|
|
71567
71567
|
const TAP_EPSILON = 15;
|
|
71568
|
+
/**
|
|
71569
|
+
* Displacement-based inputs (mouse, touch, wheel, pinch) return accumulated pixel
|
|
71570
|
+
* offsets that already scale with frame time. This factor converts rate-based speed
|
|
71571
|
+
* constants (tuned for degrees-per-second) to work with per-frame displacements,
|
|
71572
|
+
* making them frame-rate-independent.
|
|
71573
|
+
*/
|
|
71574
|
+
const DISPLACEMENT_SCALE = 1 / 60;
|
|
71568
71575
|
/**
|
|
71569
71576
|
* Converts screen space mouse deltas to world space pan vector.
|
|
71570
71577
|
*
|
|
@@ -71902,13 +71909,13 @@ class InputController {
|
|
|
71902
71909
|
const panMove = screenToWorld(camera, mouse[0], mouse[1], distance);
|
|
71903
71910
|
v.add(panMove.mulScalar(pan));
|
|
71904
71911
|
const wheelMove = new Vec3(0, 0, -wheel[0]);
|
|
71905
|
-
v.add(wheelMove.mulScalar(this.wheelSpeed *
|
|
71912
|
+
v.add(wheelMove.mulScalar(this.wheelSpeed * DISPLACEMENT_SCALE));
|
|
71906
71913
|
// FIXME: need to flip z axis for orbit camera
|
|
71907
71914
|
deltas.move.append([v.x, v.y, orbit ? -v.z : v.z]);
|
|
71908
71915
|
// desktop rotate
|
|
71909
71916
|
v.set(0, 0, 0);
|
|
71910
71917
|
mouseRotate.set(mouse[0], mouse[1], 0);
|
|
71911
|
-
v.add(mouseRotate.mulScalar((1 - pan) * this.orbitSpeed * orbitFactor *
|
|
71918
|
+
v.add(mouseRotate.mulScalar((1 - pan) * this.orbitSpeed * orbitFactor * DISPLACEMENT_SCALE));
|
|
71912
71919
|
deltas.rotate.append([v.x, v.y, v.z]);
|
|
71913
71920
|
// mobile move
|
|
71914
71921
|
v.set(0, 0, 0);
|
|
@@ -71928,7 +71935,7 @@ class InputController {
|
|
|
71928
71935
|
v.add(flyMove.mulScalar(fly * 1.5 * this.moveSpeed * dt));
|
|
71929
71936
|
}
|
|
71930
71937
|
pinchMove.set(0, 0, pinch[0]);
|
|
71931
|
-
v.add(pinchMove.mulScalar(orbit * double * this.pinchSpeed *
|
|
71938
|
+
v.add(pinchMove.mulScalar(orbit * double * this.pinchSpeed * DISPLACEMENT_SCALE));
|
|
71932
71939
|
// Tap-to-jump for mobile FPS mode
|
|
71933
71940
|
if (isFps && this._tapJump) {
|
|
71934
71941
|
v.y = 1;
|
|
@@ -71938,11 +71945,11 @@ class InputController {
|
|
|
71938
71945
|
// mobile rotate
|
|
71939
71946
|
v.set(0, 0, 0);
|
|
71940
71947
|
orbitRotate.set(touch[0], touch[1], 0);
|
|
71941
|
-
v.add(orbitRotate.mulScalar(orbit * (1 - pan) * this.orbitSpeed *
|
|
71948
|
+
v.add(orbitRotate.mulScalar(orbit * (1 - pan) * this.orbitSpeed * DISPLACEMENT_SCALE));
|
|
71942
71949
|
// In fly mode, use single touch for look-around (inverted direction)
|
|
71943
71950
|
// Exclude multi-touch (double) to avoid interference with pinch/strafe gestures
|
|
71944
71951
|
flyRotate.set(touch[0], touch[1], 0);
|
|
71945
|
-
v.add(flyRotate.mulScalar(fly * (1 - double) * this.orbitSpeed * orbitFactor * 1.25 *
|
|
71952
|
+
v.add(flyRotate.mulScalar(fly * (1 - double) * this.orbitSpeed * orbitFactor * 1.25 * DISPLACEMENT_SCALE));
|
|
71946
71953
|
deltas.rotate.append([v.x, v.y, v.z]);
|
|
71947
71954
|
// gamepad move
|
|
71948
71955
|
v.set(0, 0, 0);
|
|
@@ -74503,7 +74510,7 @@ const initXr = (global) => {
|
|
|
74503
74510
|
});
|
|
74504
74511
|
};
|
|
74505
74512
|
|
|
74506
|
-
var version = "1.16.
|
|
74513
|
+
var version = "1.16.2";
|
|
74507
74514
|
|
|
74508
74515
|
const loadGsplat = async (app, config, progressCallback) => {
|
|
74509
74516
|
const { contents, contentUrl, unified, aa } = config;
|