ldr 0.8.0 → 0.10.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.
package/dist/cli.js CHANGED
@@ -1,18 +1,18 @@
1
1
  #!/usr/bin/env node
2
2
 
3
- // ../../../../../../../tmp/ldr-build-eZnTdy/src/cli.ts
3
+ // ../../../../../../../tmp/ldr-build-sEUhaY/src/cli.ts
4
4
  import fs4 from "node:fs";
5
5
  import zlib from "node:zlib";
6
6
 
7
- // ../../../../../../../tmp/ldr-build-eZnTdy/src/node/build-pack.ts
7
+ // ../../../../../../../tmp/ldr-build-sEUhaY/src/node/build-pack.ts
8
8
  import fs3 from "node:fs";
9
9
  import path3 from "node:path";
10
10
 
11
- // ../../../../../../../tmp/ldr-build-eZnTdy/src/node/resolver.ts
11
+ // ../../../../../../../tmp/ldr-build-sEUhaY/src/node/resolver.ts
12
12
  import fs from "node:fs";
13
13
  import path from "node:path";
14
14
 
15
- // ../../../../../../../tmp/ldr-build-eZnTdy/src/spec.ts
15
+ // ../../../../../../../tmp/ldr-build-sEUhaY/src/spec.ts
16
16
  var norm = (s) => s.trim().toLowerCase().replace(/\\/g, "/").replace(/\/+/g, "/");
17
17
  function parseColor(tok) {
18
18
  if (/^0x/i.test(tok))
@@ -705,7 +705,7 @@ function fileStepViews(f) {
705
705
  return out;
706
706
  }
707
707
 
708
- // ../../../../../../../tmp/ldr-build-eZnTdy/src/model.ts
708
+ // ../../../../../../../tmp/ldr-build-sEUhaY/src/model.ts
709
709
  var CALLOUT_END = 999999;
710
710
  var stepKey = (steps) => steps.map((x) => String(x).padStart(6, "0")).join(".") + "~";
711
711
  function flatten(doc, opts = {}) {
@@ -864,7 +864,7 @@ function parseLDConfig(text) {
864
864
  return out;
865
865
  }
866
866
 
867
- // ../../../../../../../tmp/ldr-build-eZnTdy/src/node/resolver.ts
867
+ // ../../../../../../../tmp/ldr-build-sEUhaY/src/node/resolver.ts
868
868
  var TOP_STUD_RE = /^(stud|studa|stud2|stud2a|stud6|stud6a|stud10|stud15|stud2s|stud2s2|stud-logo\d*|stud2-logo\d*)\.dat$/i;
869
869
  var UNDER_STUD_RE = /^(stud3|stud3a|stud4.*|stud12|stud16.*|stud18a)\.dat$/i;
870
870
  var norm2 = (ref) => ref.trim().replace(/\\/g, "/").toLowerCase();
@@ -1134,11 +1134,11 @@ function collectDeps(lib, refs) {
1134
1134
  return out;
1135
1135
  }
1136
1136
 
1137
- // ../../../../../../../tmp/ldr-build-eZnTdy/src/node/compile.ts
1137
+ // ../../../../../../../tmp/ldr-build-sEUhaY/src/node/compile.ts
1138
1138
  import fs2 from "node:fs";
1139
1139
  import path2 from "node:path";
1140
1140
 
1141
- // ../../../../../../../tmp/ldr-build-eZnTdy/src/node/lod.ts
1141
+ // ../../../../../../../tmp/ldr-build-sEUhaY/src/node/lod.ts
1142
1142
  import { MeshoptSimplifier, MeshoptEncoder } from "meshoptimizer";
1143
1143
  await Promise.all([MeshoptSimplifier.ready, MeshoptEncoder.ready]);
1144
1144
  function reorderMesh(P, N, C, I) {
@@ -1330,7 +1330,7 @@ function lodChain(P, C, I) {
1330
1330
  return out;
1331
1331
  }
1332
1332
 
1333
- // ../../../../../../../tmp/ldr-build-eZnTdy/src/node/compile.ts
1333
+ // ../../../../../../../tmp/ldr-build-sEUhaY/src/node/compile.ts
1334
1334
  function loadColors(root) {
1335
1335
  const map = new Map;
1336
1336
  for (const l of fs2.readFileSync(path2.join(root, "LDConfig.ldr"), "latin1").split(/\r?\n/)) {
@@ -1913,7 +1913,7 @@ function encodePack(parts, studKinds, weld, extra, options = {}) {
1913
1913
  return Buffer.concat([head, ...chunks.map((c) => new Uint8Array(c.buffer, c.byteOffset, c.byteLength))]);
1914
1914
  }
1915
1915
 
1916
- // ../../../../../../../tmp/ldr-build-eZnTdy/src/node/build-pack.ts
1916
+ // ../../../../../../../tmp/ldr-build-sEUhaY/src/node/build-pack.ts
1917
1917
  function buildPack(o) {
1918
1918
  const lib = new Library(o.ldrawRoot);
1919
1919
  const refs = new Map;
@@ -1976,7 +1976,7 @@ function buildPack(o) {
1976
1976
  return { data: encodePack(parts, kinds, comp.opts.weld, extra, { texture, lod: o.lod !== false, reorder: !!o.reorder }), parts: parts.size, studKinds: kinds.size, missing: [...missing], ...warnings.length ? { warnings } : {} };
1977
1977
  }
1978
1978
 
1979
- // ../../../../../../../tmp/ldr-build-eZnTdy/src/cli.ts
1979
+ // ../../../../../../../tmp/ldr-build-sEUhaY/src/cli.ts
1980
1980
  var HELP = `ldr pack — build a parts pack for the ldr three.js renderer
1981
1981
 
1982
1982
  Usage: