3dtiles-inspector 0.1.2 → 0.1.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/CHANGELOG.md CHANGED
@@ -6,6 +6,12 @@ The format is based on Keep a Changelog and this project follows Semantic Versio
6
6
 
7
7
  ## [Unreleased]
8
8
 
9
+ ## [0.1.3] - 2026-04-25
10
+
11
+ ### Fixed
12
+
13
+ - Reset the `Geometric Error` slider to the center after `Save` while keeping the newly applied LOD scale active.
14
+
9
15
  ## [0.1.2] - 2026-04-24
10
16
 
11
17
  ### Added
@@ -65824,13 +65824,16 @@ function updateTilesetErrorTarget() {
65824
65824
  if (!tiles) {
65825
65825
  return;
65826
65826
  }
65827
- tiles.errorTarget = DEFAULT_ERROR_TARGET / geometricErrorScale;
65827
+ tiles.errorTarget = DEFAULT_ERROR_TARGET / getEffectiveGeometricErrorScale();
65828
65828
  }
65829
65829
  function updateGeometricErrorScaleDisplay() {
65830
65830
  geometricErrorValueEl.textContent = `x${formatGeometricErrorScale(
65831
65831
  geometricErrorScale
65832
65832
  )}`;
65833
65833
  }
65834
+ function getEffectiveGeometricErrorScale() {
65835
+ return lastSavedGeometricErrorScale * geometricErrorScale;
65836
+ }
65834
65837
  function getGaussianMeshSplatCount(mesh) {
65835
65838
  if (!mesh || typeof mesh !== "object") {
65836
65839
  return 0;
@@ -66470,6 +66473,7 @@ function loadTileset(url) {
66470
66473
  updateRuntimeStats(true);
66471
66474
  resetEditableGroup();
66472
66475
  lastSavedGeometricErrorScale = 1;
66476
+ setGeometricErrorScaleExponent(0);
66473
66477
  savedRootMatrix.identity();
66474
66478
  savedRootMatrixLoadError = null;
66475
66479
  savedRootMatrixPromise = refreshSavedRootMatrix(url).then(
@@ -66548,7 +66552,8 @@ async function saveTransform() {
66548
66552
  setStatus("Saving transform...");
66549
66553
  const currentMatrix = getCurrentMatrix();
66550
66554
  const incrementalMatrix = currentMatrix.clone().multiply(lastSavedMatrix.clone().invert());
66551
- const incrementalGeometricErrorScale = geometricErrorScale / lastSavedGeometricErrorScale;
66555
+ const incrementalGeometricErrorScale = geometricErrorScale;
66556
+ const savedGeometricErrorScale = getEffectiveGeometricErrorScale();
66552
66557
  try {
66553
66558
  const response = await fetch(SAVE_URL, {
66554
66559
  method: "POST",
@@ -66585,13 +66590,14 @@ async function saveTransform() {
66585
66590
  throw savedRootMatrixLoadError;
66586
66591
  }
66587
66592
  }
66588
- lastSavedGeometricErrorScale = geometricErrorScale;
66593
+ lastSavedGeometricErrorScale = savedGeometricErrorScale;
66589
66594
  lastSavedMatrix.copy(currentMatrix);
66595
+ setGeometricErrorScaleExponent(0);
66590
66596
  syncTransformHandleFromTilesTransform();
66591
66597
  syncCoordinateInputsFromTilesTransform();
66592
66598
  setStatus(
66593
66599
  `Saved transform and geometric-error scale x${formatGeometricErrorScale(
66594
- geometricErrorScale
66600
+ savedGeometricErrorScale
66595
66601
  )} to ${ROOT_TILESET_LABEL} and build_summary.json.`
66596
66602
  );
66597
66603
  } catch (err2) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "3dtiles-inspector",
3
- "version": "0.1.2",
3
+ "version": "0.1.3",
4
4
  "description": "Inspect, align, and save local 3D Tiles root transforms in an interactive browser session.",
5
5
  "author": "William Liu <lyz15972107087@gmail.com>",
6
6
  "license": "Apache-2.0",
package/src/viewer/app.js CHANGED
@@ -496,7 +496,8 @@ function updateTilesetErrorTarget() {
496
496
  return;
497
497
  }
498
498
 
499
- tiles.errorTarget = DEFAULT_ERROR_TARGET / geometricErrorScale;
499
+ tiles.errorTarget =
500
+ DEFAULT_ERROR_TARGET / getEffectiveGeometricErrorScale();
500
501
  }
501
502
 
502
503
  function updateGeometricErrorScaleDisplay() {
@@ -505,6 +506,10 @@ function updateGeometricErrorScaleDisplay() {
505
506
  )}`;
506
507
  }
507
508
 
509
+ function getEffectiveGeometricErrorScale() {
510
+ return lastSavedGeometricErrorScale * geometricErrorScale;
511
+ }
512
+
508
513
  function getGaussianMeshSplatCount(mesh) {
509
514
  if (!mesh || typeof mesh !== 'object') {
510
515
  return 0;
@@ -1315,6 +1320,7 @@ function loadTileset(url) {
1315
1320
 
1316
1321
  resetEditableGroup();
1317
1322
  lastSavedGeometricErrorScale = 1;
1323
+ setGeometricErrorScaleExponent(0);
1318
1324
  savedRootMatrix.identity();
1319
1325
  savedRootMatrixLoadError = null;
1320
1326
  savedRootMatrixPromise = refreshSavedRootMatrix(url).then(
@@ -1402,8 +1408,8 @@ async function saveTransform() {
1402
1408
  const incrementalMatrix = currentMatrix
1403
1409
  .clone()
1404
1410
  .multiply(lastSavedMatrix.clone().invert());
1405
- const incrementalGeometricErrorScale =
1406
- geometricErrorScale / lastSavedGeometricErrorScale;
1411
+ const incrementalGeometricErrorScale = geometricErrorScale;
1412
+ const savedGeometricErrorScale = getEffectiveGeometricErrorScale();
1407
1413
 
1408
1414
  try {
1409
1415
  const response = await fetch(SAVE_URL, {
@@ -1441,13 +1447,14 @@ async function saveTransform() {
1441
1447
  throw savedRootMatrixLoadError;
1442
1448
  }
1443
1449
  }
1444
- lastSavedGeometricErrorScale = geometricErrorScale;
1450
+ lastSavedGeometricErrorScale = savedGeometricErrorScale;
1445
1451
  lastSavedMatrix.copy(currentMatrix);
1452
+ setGeometricErrorScaleExponent(0);
1446
1453
  syncTransformHandleFromTilesTransform();
1447
1454
  syncCoordinateInputsFromTilesTransform();
1448
1455
  setStatus(
1449
1456
  `Saved transform and geometric-error scale x${formatGeometricErrorScale(
1450
- geometricErrorScale,
1457
+ savedGeometricErrorScale,
1451
1458
  )} to ${ROOT_TILESET_LABEL} and build_summary.json.`,
1452
1459
  );
1453
1460
  } catch (err) {