@playcanvas/supersplat-viewer 1.10.1 → 1.10.3

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@playcanvas/supersplat-viewer",
3
- "version": "1.10.1",
3
+ "version": "1.10.3",
4
4
  "author": "PlayCanvas <support@playcanvas.com>",
5
5
  "homepage": "https://github.com/playcanvas/supersplat-viewer#readme",
6
6
  "description": "Viewer for https://superspl.at",
package/public/index.js CHANGED
@@ -102102,7 +102102,11 @@ class Viewer {
102102
102102
  updateHorizontalFov();
102103
102103
  // handle HQ mode changes
102104
102104
  const updateHqMode = () => {
102105
- graphicsDevice.maxPixelRatio = state.hqMode ? window.devicePixelRatio : 1;
102105
+ // limit the backbuffer to 4k on desktop and HD on mobile
102106
+ // we use the shorter dimension so ultra-wide (or high) monitors still work correctly.
102107
+ const maxRatio = (platform.mobile ? 1080 : 2160) / Math.min(screen.width, screen.height);
102108
+ // half pixel resolution with hq mode disabled
102109
+ graphicsDevice.maxPixelRatio = (state.hqMode ? 1.0 : 0.5) * Math.min(maxRatio, window.devicePixelRatio);
102106
102110
  app.renderNextFrame = true;
102107
102111
  };
102108
102112
  events.on('hqMode:changed', updateHqMode);
@@ -102227,16 +102231,29 @@ class Viewer {
102227
102231
  else {
102228
102232
  const { gsplat } = app.scene;
102229
102233
  // quality ranges
102230
- const quality = {
102231
- low: {
102232
- range: [2, 8],
102233
- splatBudget: 1
102234
+ const ranges = {
102235
+ mobile: {
102236
+ low: {
102237
+ range: [2, 8],
102238
+ splatBudget: 1
102239
+ },
102240
+ high: {
102241
+ range: [1, 8],
102242
+ splatBudget: 2
102243
+ }
102234
102244
  },
102235
- high: {
102236
- range: [0, 8],
102237
- splatBudget: 4
102245
+ desktop: {
102246
+ low: {
102247
+ range: [1, 8],
102248
+ splatBudget: 3
102249
+ },
102250
+ high: {
102251
+ range: [0, 8],
102252
+ splatBudget: 6
102253
+ }
102238
102254
  }
102239
102255
  };
102256
+ const quality = platform.mobile ? ranges.mobile : ranges.desktop;
102240
102257
  // start in low quality mode so we can get user interacting asap
102241
102258
  gsplat.lodRangeMin = quality.low.range[0];
102242
102259
  gsplat.lodRangeMax = quality.low.range[1];
@@ -102895,7 +102912,7 @@ const initXr = (global) => {
102895
102912
  });
102896
102913
  };
102897
102914
 
102898
- var version = "1.10.1";
102915
+ var version = "1.10.3";
102899
102916
 
102900
102917
  const loadGsplat = async (app, config, progressCallback) => {
102901
102918
  const { contents, contentUrl, unified, aa } = config;
@@ -102959,7 +102976,7 @@ const main = (app, camera, settingsJson, config) => {
102959
102976
  const events = new EventHandler();
102960
102977
  const state = observe(events, {
102961
102978
  readyToRender: false,
102962
- hqMode: !platform.mobile,
102979
+ hqMode: true,
102963
102980
  progress: 0,
102964
102981
  inputMode: 'desktop',
102965
102982
  cameraMode: 'orbit',