@playcanvas/splat-transform 0.4.1 → 0.4.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.mjs CHANGED
@@ -1881,7 +1881,7 @@ class Quat {
1881
1881
  }
1882
1882
  }
1883
1883
 
1884
- var version = "0.4.0";
1884
+ var version = "0.4.2";
1885
1885
 
1886
1886
  class Column {
1887
1887
  name;
@@ -2574,12 +2574,9 @@ const readKsplat = async (fileHandle) => {
2574
2574
  columns[13].data[splatIndex] = rot3;
2575
2575
  // Store spherical harmonics
2576
2576
  for (let i = 0; i < harmonicsComponentCount; i++) {
2577
- // const channel = Math.floor(i / (harmonicsComponentCount / 3));
2578
- // const coeff = i % (harmonicsComponentCount / 3);
2579
- // const channel = i % 3;
2580
- // const coeff = Math.floor(i / 3);
2581
2577
  let channel;
2582
2578
  let coeff;
2579
+ // band 0 is packed together, then band 1, then band 2.
2583
2580
  if (i < 9) {
2584
2581
  channel = Math.floor(i / 3);
2585
2582
  coeff = i % 3;
@@ -2589,8 +2586,9 @@ const readKsplat = async (fileHandle) => {
2589
2586
  coeff = (i - 9) % 5 + 3;
2590
2587
  }
2591
2588
  else {
2592
- channel = Math.floor((i - 24) / 6);
2593
- coeff = (i - 24) % 6 + 9;
2589
+ // don't think 3 bands are supported, but here just in case
2590
+ channel = Math.floor((i - 24) / 7);
2591
+ coeff = (i - 24) % 7 + 8;
2594
2592
  }
2595
2593
  const col = channel * (harmonicsComponentCount / 3) + coeff;
2596
2594
  columns[14 + col].data[splatIndex] = decodeHarmonics(splatByteOffset, i);
@@ -3707,7 +3705,7 @@ ACTIONS (can be repeated, in any order)
3707
3705
  -n, --filterNaN Remove any Gaussian containing NaN/Inf
3708
3706
  -c, --filterByValue name,cmp,value Keep splats where <name> <cmp> <value>
3709
3707
  cmp ∈ {lt,lte,gt,gte,eq,neq}
3710
- -h, --filterBands {0|1|2|3} Strip spherical-harmonic bands > N
3708
+ -b, --filterBands {0|1|2|3} Strip spherical-harmonic bands > N
3711
3709
 
3712
3710
  GLOBAL OPTIONS
3713
3711
  -w, --overwrite Overwrite output file if it already exists