@voluma/vlam 0.2.4 → 0.3.0

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.
Files changed (90) hide show
  1. package/README.md +3 -2
  2. package/dist/budget-governor.d.ts +4 -4
  3. package/dist/camera-budget-governor.d.ts +11 -11
  4. package/dist/chunk-cache-budget.d.ts +5 -5
  5. package/dist/chunk-fetch-scheduler.d.ts +4 -4
  6. package/dist/chunk-loader-DlNwggfG.js +1859 -0
  7. package/dist/chunk-loader-DlNwggfG.js.map +1 -0
  8. package/dist/chunk-loader.d.ts +2 -2
  9. package/dist/compute-sorter.d.ts +1 -1
  10. package/dist/effects.d.ts +11 -10
  11. package/dist/effects.js.map +1 -1
  12. package/dist/formats/ksplat/index.d.ts +1 -1
  13. package/dist/formats/lcc/collision-mesh.d.ts +2 -2
  14. package/dist/formats/lcc.js +17 -16
  15. package/dist/formats/lcc.js.map +1 -1
  16. package/dist/formats/ply/index.d.ts +1 -1
  17. package/dist/formats/ply/parse-splat-ply.d.ts +2 -2
  18. package/dist/formats/ply.js +1 -1
  19. package/dist/formats/ply.js.map +1 -1
  20. package/dist/formats/rad/index.d.ts +1 -1
  21. package/dist/formats/rad/parse-rad.d.ts +1 -1
  22. package/dist/formats/rad/rad.d.ts +2 -2
  23. package/dist/formats/rad.js +3 -3
  24. package/dist/formats/rad.js.map +1 -1
  25. package/dist/formats/sog/index.d.ts +1 -1
  26. package/dist/formats/sog/parse-sog.d.ts +4 -4
  27. package/dist/formats/sog.js.map +1 -1
  28. package/dist/formats/splat/index.d.ts +1 -1
  29. package/dist/formats/spz/index.d.ts +1 -1
  30. package/dist/index.d.ts +16 -25
  31. package/dist/index.js +253 -9047
  32. package/dist/index.js.map +1 -1
  33. package/dist/{load-scene.d.ts → load-splat-data.d.ts} +15 -13
  34. package/dist/loaders.d.ts +15 -0
  35. package/dist/loaders.js +26 -0
  36. package/dist/loaders.js.map +1 -0
  37. package/dist/loading-wLo8vRbA.js.map +1 -1
  38. package/dist/loading.d.ts +8 -8
  39. package/dist/{splat-mesh-types-CTN_duw2.js → lod-scheduler-B0a_uBlv.js} +133 -140
  40. package/dist/lod-scheduler-B0a_uBlv.js.map +1 -0
  41. package/dist/lod-scheduler.d.ts +1 -1
  42. package/dist/lod-source.d.ts +5 -5
  43. package/dist/{splat-scene.d.ts → merged-splat-mesh.d.ts} +14 -15
  44. package/dist/orientation.d.ts +7 -7
  45. package/dist/{ply-header-BwgExCn-.js → ply-header-B9WllbPg.js} +3 -3
  46. package/dist/{ply-header-BwgExCn-.js.map → ply-header-B9WllbPg.js.map} +1 -1
  47. package/dist/radix-sorter-R0FCSqKu.js +178 -0
  48. package/dist/radix-sorter-R0FCSqKu.js.map +1 -0
  49. package/dist/relighting-CSQF3UcL.js +969 -0
  50. package/dist/relighting-CSQF3UcL.js.map +1 -0
  51. package/dist/relighting.d.ts +1 -1
  52. package/dist/selection.d.ts +13 -0
  53. package/dist/selection.js +137 -0
  54. package/dist/selection.js.map +1 -0
  55. package/dist/source-transform.d.ts +4 -4
  56. package/dist/{splat-budget-DXew_86c.js → splat-budget-DuVZspPQ.js} +7 -7
  57. package/dist/{splat-budget-DXew_86c.js.map → splat-budget-DuVZspPQ.js.map} +1 -1
  58. package/dist/splat-budget.d.ts +1 -1
  59. package/dist/splat-data-BZM5dhhx.js.map +1 -1
  60. package/dist/splat-data.d.ts +4 -4
  61. package/dist/splat-mesh-aQdcWA6v.js +1942 -0
  62. package/dist/splat-mesh-aQdcWA6v.js.map +1 -0
  63. package/dist/splat-mesh-material.d.ts +2 -2
  64. package/dist/splat-mesh-types-BZIko-_9.js +18 -0
  65. package/dist/splat-mesh-types-BZIko-_9.js.map +1 -0
  66. package/dist/splat-mesh-types.d.ts +14 -8
  67. package/dist/splat-mesh.d.ts +4 -4
  68. package/dist/splat-modifier.d.ts +5 -5
  69. package/dist/splat-partition.d.ts +1 -1
  70. package/dist/static-lod-entry.d.ts +12 -0
  71. package/dist/static-lod-splat-mesh.d.ts +2 -2
  72. package/dist/{static-lod-worker-D2fyqQZO.js → static-lod-worker-DktKnJkR.js} +46 -46
  73. package/dist/{static-lod-worker-D2fyqQZO.js.map → static-lod-worker-DktKnJkR.js.map} +1 -1
  74. package/dist/static-lod.js +148 -0
  75. package/dist/static-lod.js.map +1 -0
  76. package/dist/streamed-splat-mesh.d.ts +21 -27
  77. package/dist/streaming.d.ts +23 -0
  78. package/dist/streaming.js +2877 -0
  79. package/dist/streaming.js.map +1 -0
  80. package/dist/{unified-splat-renderer.d.ts → unified-splat-mesh.d.ts} +10 -10
  81. package/dist/unified-work-buffer.d.ts +66 -0
  82. package/dist/unified.d.ts +11 -0
  83. package/dist/unified.js +738 -0
  84. package/dist/unified.js.map +1 -0
  85. package/dist/webgpu-limits-Y3CI_6_6.js +43 -0
  86. package/dist/webgpu-limits-Y3CI_6_6.js.map +1 -0
  87. package/dist/webgpu-limits.d.ts +0 -59
  88. package/dist/work-buffer-gather.d.ts +1 -1
  89. package/package.json +24 -4
  90. package/dist/splat-mesh-types-CTN_duw2.js.map +0 -1
@@ -4,10 +4,11 @@ var A = (e, t, n) => gt(e, typeof t != "symbol" ? t + "" : t, n);
4
4
  import { w as wt } from "../splat-data-BZM5dhhx.js";
5
5
  import { a as mt, r as pt } from "../sh-pack-D5wAe5gg.js";
6
6
  import * as E from "three/webgpu";
7
- import { M as Ct, L as yt } from "../splat-mesh-types-CTN_duw2.js";
7
+ import { L as Ct } from "../lod-scheduler-B0a_uBlv.js";
8
8
  import { t as ct, a as W } from "../loading-wLo8vRbA.js";
9
+ import { M as yt } from "../splat-mesh-types-BZIko-_9.js";
9
10
  import { w as z } from "../logging-BfPdd7NJ.js";
10
- import { p as xt, a as vt, b as bt, c as k, d as j } from "../ply-header-BwgExCn-.js";
11
+ import { c as xt, a as vt, b as bt, p as k, d as j } from "../ply-header-B9WllbPg.js";
11
12
  const F = 32, O = 64, K = 1 << 24;
12
13
  function Lt(e) {
13
14
  return e === 1 ? 3 : e === 2 ? 8 : 15;
@@ -144,7 +145,7 @@ function Ft(e) {
144
145
  return n[t] = Math.sqrt(Math.max(0, 1 - s)), [n[3], n[0], n[1], n[2]];
145
146
  }
146
147
  const Tt = 1 / (511 * Math.SQRT2);
147
- async function re(e, t, n, o) {
148
+ async function le(e, t, n, o) {
148
149
  var v;
149
150
  const s = t.stride;
150
151
  if (s !== F && s !== F + O)
@@ -239,11 +240,11 @@ function P(e, t) {
239
240
  function H() {
240
241
  return new E.Matrix4().set(-1, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 1);
241
242
  }
242
- function le(e) {
243
+ function ce(e) {
243
244
  e.matrix.copy(H()), e.matrix.decompose(e.position, e.quaternion, e.scale), e.matrixWorldNeedsUpdate = !0;
244
245
  }
245
246
  const Bt = 128e3;
246
- async function ce(e, t, n) {
247
+ async function ae(e, t, n) {
247
248
  const o = Et(e), s = (g) => {
248
249
  const x = t.resolve(g);
249
250
  if (x === null) throw new Error(`LCC dataset is missing "${g}".`);
@@ -253,7 +254,7 @@ async function ce(e, t, n) {
253
254
  o
254
255
  );
255
256
  Pt(c, o);
256
- const a = o.fileType === "Quality" ? Ct : 0, r = n.shBands ?? a, u = Math.min(r, a), f = u === 0 ? void 0 : u, h = f === void 0 ? null : s("shcoef.bin"), d = [], m = [], p = (g, x) => (d.push(g), m.push(x), d.length - 1), $ = [], b = /* @__PURE__ */ new Set();
257
+ const a = o.fileType === "Quality" ? yt : 0, r = n.shBands ?? a, u = Math.min(r, a), f = u === 0 ? void 0 : u, h = f === void 0 ? null : s("shcoef.bin"), d = [], m = [], p = (g, x) => (d.push(g), m.push(x), d.length - 1), $ = [], b = /* @__PURE__ */ new Set();
257
258
  let w = 0;
258
259
  const C = o.totalLevel;
259
260
  for (let g = 0; g < c.length; g++) {
@@ -346,7 +347,7 @@ async function ce(e, t, n) {
346
347
  // Classic LCC cells are broad XY tiles. Keep their priority independent of
347
348
  // frustum crossings so an orbit does not demote a sharp tile as it leaves
348
349
  // one edge, then rebuild it when the same tile re-enters the other edge.
349
- source: new yt(y, {
350
+ source: new Ct(y, {
350
351
  ...n,
351
352
  // Classic LCC cells are broad XY tiles. Keep their priority independent of
352
353
  // frustum crossings so an orbit does not demote a sharp tile as it leaves
@@ -451,7 +452,7 @@ async function _t(e, t, n) {
451
452
  return o.arrayBuffer();
452
453
  }
453
454
  const Dt = 3, zt = 0.1, tt = 0.1, Ot = 500;
454
- function ae(e, t, n, o = 0) {
455
+ function ue(e, t, n, o = 0) {
455
456
  var $, b;
456
457
  const s = e, i = s.root.splatFiles.map((w) => {
457
458
  const C = t.resolve(w);
@@ -889,7 +890,7 @@ function Wt(e, t, n, o, s) {
889
890
  )
890
891
  );
891
892
  }
892
- async function ue(e, t = {}) {
893
+ async function he(e, t = {}) {
893
894
  var s;
894
895
  const n = await Promise.allSettled(
895
896
  e.meshes.map((i) => jt(i, t))
@@ -927,7 +928,7 @@ function Kt(e) {
927
928
  return e.toLowerCase().includes(".lci");
928
929
  }
929
930
  }
930
- function he(e, t) {
931
+ function fe(e, t) {
931
932
  Zt(e);
932
933
  const { positions: n, indices: o, vertexCount: s, triangleCount: i } = e, l = new Uint8Array(s);
933
934
  for (let r = 0; r < s; r++)
@@ -982,16 +983,16 @@ function lt(e, t, n, o) {
982
983
  return { vertexCount: l, triangleCount: o, positions: a, indices: i };
983
984
  }
984
985
  export {
985
- le as applyLcc2ToThreeTransform,
986
- ae as buildLcc2Scene,
987
- ce as buildLccScene,
986
+ ce as applyLcc2ToThreeTransform,
987
+ ue as buildLcc2Scene,
988
+ ae as buildLccScene,
988
989
  H as createLcc2ToThreeMatrix,
989
- ue as loadCollisionMeshTiles,
990
+ he as loadCollisionMeshTiles,
990
991
  Qt as parseCollisionLci,
991
- re as parseLccChunk,
992
+ le as parseLccChunk,
992
993
  Mt as parseLccIndex,
993
994
  Et as parseLccManifest,
994
995
  Vt as parseMeshPly,
995
- he as partitionTriangleMesh
996
+ fe as partitionTriangleMesh
996
997
  };
997
998
  //# sourceMappingURL=lcc.js.map