ugly-game 0.15.57 → 0.15.58

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.
@@ -1,5 +1,6 @@
1
- /** Lossless transport of final GPU streams. No quantization, normal conversion or
2
- * vertex/index remapping is performed by the decoder. */
1
+ /** Cooked GPU streams with lossless byte transport by default. Optional precision
2
+ * reduction happens at cook time; the decoder decompresses into final float buffers
3
+ * without topology, color, normal or layout rebuilding. */
3
4
  import { MeshoptEncoder, MeshoptDecoder } from 'meshoptimizer';
4
5
  export async function encodeGpuGeometry(raw, precisionBits = 0) {
5
6
  if (precisionBits &&
@@ -22,7 +23,7 @@ export async function encodeGpuGeometry(raw, precisionBits = 0) {
22
23
  const bytes = raw.subarray(offset, offset + count * stride);
23
24
  const indexStream = streamIndex++ === 4;
24
25
  const filtered = precisionBits && !indexStream && count
25
- ? MeshoptEncoder.encodeFilterExp(new Float32Array(bytes.buffer, bytes.byteOffset, bytes.byteLength / 4), count, stride, precisionBits, 'Separate')
26
+ ? MeshoptEncoder.encodeFilterExp(new Float32Array(bytes.buffer, bytes.byteOffset, bytes.byteLength / 4), count, stride, precisionBits, 'SharedComponent')
26
27
  : bytes;
27
28
  streams.push(count
28
29
  ? indexStream
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ugly-game",
3
- "version": "0.15.57",
3
+ "version": "0.15.58",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {