@forgeax/engine-gltf 0.1.27 → 0.1.28

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/package.json CHANGED
@@ -1,14 +1,11 @@
1
1
  {
2
2
  "name": "@forgeax/engine-gltf",
3
- "version": "0.1.27",
3
+ "version": "0.1.28",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "license": "Apache-2.0",
7
7
  "sideEffects": false,
8
- "description": "Runtime glTF 2.0 importer (Tier-B subset: scenes + nodes + meshes (POSITION + INDICES) + UnlitMaterial.baseColor + Camera.perspective). Pure-function pipeline parseGlb / parseGltf / toAssetPack consumed by build-time CLI (forgeax-engine-remote-gltf import) writing <source>.meta.json (external-asset-package; assetType=gltf) for runtime loadByGuid<SceneAsset>.",
9
- "bin": {
10
- "forgeax-engine-remote-gltf": "./dist/cli-gltf.mjs"
11
- },
8
+ "description": "Runtime glTF 2.0 importer and build-time producer. Pure-function parseGlb / parseGltf / toAssetPack is invoked by the unified ForgeaX asset command and writes <source>.meta.json for runtime loadByGuid<SceneAsset>.",
12
9
  "exports": {
13
10
  ".": {
14
11
  "types": "./dist/index.d.ts",
@@ -38,21 +35,21 @@
38
35
  "LICENSE"
39
36
  ],
40
37
  "dependencies": {
41
- "@forgeax/engine-animation": "0.1.27",
42
- "@forgeax/engine-geometry": "0.1.27",
43
- "@forgeax/engine-import": "0.1.27",
44
- "@forgeax/engine-math": "0.1.27",
45
- "@forgeax/engine-pack": "0.1.27",
46
- "@forgeax/engine-scene": "0.1.27",
47
- "@forgeax/engine-types": "0.1.27",
38
+ "@forgeax/engine-animation": "0.1.28",
39
+ "@forgeax/engine-geometry": "0.1.28",
40
+ "@forgeax/engine-import": "0.1.28",
41
+ "@forgeax/engine-math": "0.1.28",
42
+ "@forgeax/engine-pack": "0.1.28",
43
+ "@forgeax/engine-scene": "0.1.28",
44
+ "@forgeax/engine-types": "0.1.28",
48
45
  "@webgpu/types": "^0.1.71",
49
46
  "meshoptimizer": "^0.20.0"
50
47
  },
51
48
  "devDependencies": {
52
- "@forgeax/engine-assets-runtime": "0.1.27",
53
- "@forgeax/engine-picking": "0.1.27",
54
- "@forgeax/engine-render": "0.1.27",
55
- "@forgeax/engine-runtime": "0.1.27",
49
+ "@forgeax/engine-assets-runtime": "0.1.28",
50
+ "@forgeax/engine-picking": "0.1.28",
51
+ "@forgeax/engine-render": "0.1.28",
52
+ "@forgeax/engine-runtime": "0.1.28",
56
53
  "@types/node": "^20.14.0"
57
54
  },
58
55
  "forgeax": {
@@ -1,6 +1,6 @@
1
1
  // packages/gltf/src/__tests__/cli-gltf.integration.test.ts
2
2
  //
3
- // Integration test: run `forgeax-engine-remote-gltf import` against real
3
+ // Integration test: run `forgeax asset import import` against real
4
4
  // glTF files and verify the written .meta.json sidecar contains texture
5
5
  // sub-assets (feat-20260608 M6 w29 AC-18).
6
6
  //
@@ -189,7 +189,7 @@ function unwrapReimport(result: ReturnType<typeof reimportReuseMeta>) {
189
189
  await rm(tempDir, { recursive: true, force: true });
190
190
  });
191
191
 
192
- describe('cli-gltf (forgeax-engine-remote-gltf plugin bin)', () => {
192
+ describe('cli-gltf (forgeax asset import plugin bin)', () => {
193
193
  describe('subcommand routing (a)', () => {
194
194
  it('prints help on --help and exits 0', async () => {
195
195
  const io = makeIO();
package/src/cli-gltf.ts CHANGED
@@ -1,18 +1,16 @@
1
1
  #!/usr/bin/env node
2
- // @forgeax/engine-gltf/src/cli-gltf — `forgeax-engine-remote-gltf` plugin
3
- // bin (feat-20260516-console-dependency-inversion plan-strategy section
4
- // 2.9). Discovered by the base bin via the kubectl 4th-path
5
- // `forgeax-engine-remote-` prefix scanner.
2
+ // @forgeax/engine-gltf/src/cli-gltf — internal producer used by DevKit's
3
+ // unified `forgeax asset import` command. It is deliberately not a package bin.
6
4
  //
7
5
  // Single subcommand `import` for v1 (UX break vs the prior
8
- // `forgeax-engine-remote-asset import`):
6
+ // `forgeax asset import`):
9
7
  //
10
- // write mode `forgeax-engine-remote-gltf import <gltf-or-glb>`
8
+ // write mode `forgeax asset import <gltf-or-glb> --root <project>`
11
9
  // Parses the source via parseGlb / parseGltf and writes the
12
10
  // sibling `<source>.meta.json` sidecar (sorted-keys, LF line
13
11
  // ending — byte-stable so a clean reimport produces no diff).
14
12
  //
15
- // --check `forgeax-engine-remote-gltf import --check <dir>`
13
+ // --check `forgeax asset import <dir> --dry-run --root <project>`
16
14
  // Dry-run: traverse <dir> reusing SCANNER_BLACKLIST from
17
15
  // @forgeax/engine-pack/scanner and surface the first orphan
18
16
  // .gltf / .glb whose `<source>.meta.json` is absent as
@@ -55,14 +53,14 @@ function emitError(ctx: AssetCtx, err: ErrShape): number {
55
53
 
56
54
  function helpBody(): string {
57
55
  return [
58
- 'forgeax-engine-remote-gltf — glTF / GLB sidecar importer (produces texture/mesh/material/scene sub-assets)',
56
+ 'forgeax asset import — glTF / GLB sidecar importer (internal producer)',
59
57
  '',
60
58
  'Usage:',
61
- ' forgeax-engine-remote-gltf import <path.gltf|path.glb>',
62
- ' forgeax-engine-remote-gltf import --check <dir>',
59
+ ' forgeax asset import <path.gltf|path.glb> --root <project>',
60
+ ' forgeax asset import <dir> --dry-run --root <project>',
63
61
  '',
64
- 'Produces a sibling <source>.meta.json sidecar with sub-asset entries',
65
- 'for every glTF asset category: texture, mesh, material, scene.',
62
+ 'produces texture, mesh, material, and scene sub-asset entries in a sibling',
63
+ '<source>.meta.json sidecar.',
66
64
  '',
67
65
  ].join('\n');
68
66
  }
@@ -77,7 +75,7 @@ export async function runCliGltf(rest: string[], ctx: AssetCtx): Promise<number>
77
75
  return emitError(ctx, {
78
76
  code: 'unknown-subcommand',
79
77
  expected: "subcommand 'import'",
80
- hint: "run 'forgeax-engine-remote-gltf --help' for usage",
78
+ hint: "run 'forgeax help asset import' for usage",
81
79
  detail: { subcommand: sub },
82
80
  });
83
81
  }
@@ -100,8 +98,8 @@ async function runImport(rest: string[], ctx: AssetCtx): Promise<number> {
100
98
  const message = e instanceof Error ? e.message : String(e);
101
99
  return emitError(ctx, {
102
100
  code: 'cli-parse-error',
103
- expected: 'forgeax-engine-remote-gltf import [--check] <path>',
104
- hint: "run 'forgeax-engine-remote-gltf --help' for usage",
101
+ expected: 'forgeax asset import [--dry-run] <path> --root <project>',
102
+ hint: "run 'forgeax help asset import' for usage",
105
103
  detail: { message },
106
104
  });
107
105
  }
@@ -110,8 +108,8 @@ async function runImport(rest: string[], ctx: AssetCtx): Promise<number> {
110
108
  return emitError(ctx, {
111
109
  code: 'cli-parse-error',
112
110
  expected: check
113
- ? 'forgeax-engine-remote-gltf import --check <dir>'
114
- : 'forgeax-engine-remote-gltf import <path.gltf|path.glb>',
111
+ ? 'forgeax asset import <dir> --dry-run --root <project>'
112
+ : 'forgeax asset import <path.gltf|path.glb> --root <project>',
115
113
  hint: 'pass a positional <gltf-or-glb> argument; with --check pass a directory',
116
114
  });
117
115
  }
@@ -192,7 +190,7 @@ async function runCheck(target: string, ctx: AssetCtx): Promise<number> {
192
190
  const message = e instanceof Error ? e.message : String(e);
193
191
  return emitError(ctx, {
194
192
  code: 'cli-parse-error',
195
- expected: 'forgeax-engine-remote-gltf import --check <dir>',
193
+ expected: 'forgeax asset import <dir> --dry-run --root <project>',
196
194
  hint: 'pass a directory that exists and is readable',
197
195
  detail: { path: target, message },
198
196
  });
package/src/errors.ts CHANGED
@@ -267,7 +267,7 @@ const gltfErrorPolicy = {
267
267
  'gltf-malformed-header': {
268
268
  expected:
269
269
  'GLB 12-byte header (magic 0x46546C67 + version=2 + length) plus mandatory JSON chunk',
270
- hint: 'verify .glb is not truncated; rerun: forgeax-engine-remote-gltf import <path>',
270
+ hint: 'verify .glb is not truncated; rerun: forgeax asset import <path> --root <project> --json',
271
271
  },
272
272
  'gltf-version-unsupported': {
273
273
  expected: 'asset.version === "2.0"',
@@ -305,7 +305,7 @@ const gltfErrorPolicy = {
305
305
  },
306
306
  'gltf-meta-missing': {
307
307
  expected: "sidecar <source>.meta.json (importer: 'gltf') present in same directory",
308
- hint: 'run: forgeax-engine-remote-gltf import <path>',
308
+ hint: 'run: forgeax asset import <path> --root <project> --json',
309
309
  },
310
310
  'gltf-instancing-count-mismatch': {
311
311
  expected: 'all instance attribute accessors share the same count',
@@ -334,7 +334,7 @@ const gltfErrorPolicy = {
334
334
  'gltf-image-extract-failed': {
335
335
  expected:
336
336
  'image bytes extractable from bufferView / data-URI / external URI without corruption',
337
- hint: 'verify the bufferView byte range / data: URI base64 / external URI sibling file is intact next to the .gltf source; rerun: forgeax-engine-remote-gltf import <path>',
337
+ hint: 'verify the bufferView byte range / data: URI base64 / external URI sibling file is intact next to the .gltf source; rerun: forgeax asset import <path> --root <project> --json',
338
338
  },
339
339
  'gltf-skin-attr-asymmetric': {
340
340
  expected: