@aura3d/assets 1.3.2 → 1.4.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/AGENTS.md +46 -0
- package/dist/GLTFLoader.js +1 -0
- package/dist/GLTFLoader.js.map +1 -1
- package/dist/GLTFRenderResources.d.ts.map +1 -1
- package/dist/GLTFRenderResources.js +68 -16
- package/dist/GLTFRenderResources.js.map +1 -1
- package/dist/KTX2BasisTextureTranscoder.js +1 -0
- package/dist/KTX2BasisTextureTranscoder.js.map +1 -1
- package/package.json +4 -4
- package/src/GLTFLoader.ts +1 -0
- package/src/GLTFRenderResources.ts +82 -16
- package/src/KTX2BasisTextureTranscoder.ts +1 -0
package/AGENTS.md
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
# ASSETS PACKAGE KNOWLEDGE BASE
|
|
2
|
+
|
|
3
|
+
**Scope:** `packages/assets/`
|
|
4
|
+
**Generated:** 2026-06-20T14:38:27-0700
|
|
5
|
+
**Score:** 15 - asset runtime and loader boundary.
|
|
6
|
+
|
|
7
|
+
## OVERVIEW
|
|
8
|
+
|
|
9
|
+
This package owns asset loading/runtime support. Public apps still consume
|
|
10
|
+
typed assets through `@aura3d/engine` and generated `aura-assets.ts`; loader
|
|
11
|
+
internals here do not authorize direct loaders in examples.
|
|
12
|
+
|
|
13
|
+
## WHERE TO LOOK
|
|
14
|
+
|
|
15
|
+
| Task | Location | Notes |
|
|
16
|
+
| --- | --- | --- |
|
|
17
|
+
| Package API | `src/index.ts`, `src/browser-index.ts` | Node/browser export split. |
|
|
18
|
+
| Loaders/resources | `src/loaders/`, `src/GLTFLoader.ts`, `src/GLTFRenderResources.ts` | Internal loader implementation. |
|
|
19
|
+
| Asset corpus | `src/asset-corpus/`, `src/advanced-gallery/` | Catalog/gallery support. |
|
|
20
|
+
| Tests | `packages/assets/tests/`, `tests/assets/` | Runtime, GLTF, animation, provenance checks. |
|
|
21
|
+
|
|
22
|
+
## CONVENTIONS
|
|
23
|
+
|
|
24
|
+
- It is valid for this package to implement GLTF loading; it is not valid for
|
|
25
|
+
public examples to instantiate loaders directly.
|
|
26
|
+
- Preserve browser/Node entry separation when adding APIs.
|
|
27
|
+
- Keep asset metadata durable: source page, download URL when available,
|
|
28
|
+
license, author, hash, bounds, clips, skeleton, morph targets, and thumbnail.
|
|
29
|
+
- Temporary local paths are not release provenance unless marked local-only and
|
|
30
|
+
excluded from public claims.
|
|
31
|
+
- When generated typed asset behavior changes, update CLI, manifest tests, and
|
|
32
|
+
docs together.
|
|
33
|
+
|
|
34
|
+
## ANTI-PATTERNS
|
|
35
|
+
|
|
36
|
+
- Do not leak loader classes into safe example snippets.
|
|
37
|
+
- Do not accept raw URL shortcuts to bypass provenance in public workflows.
|
|
38
|
+
- Do not treat downloaded GLB files as enough; the manifest and typed key are
|
|
39
|
+
part of the contract.
|
|
40
|
+
- Do not edit generated public asset blobs as a substitute for rerunning CLI
|
|
41
|
+
add/resolve.
|
|
42
|
+
|
|
43
|
+
## VERIFY
|
|
44
|
+
|
|
45
|
+
Use `pnpm test:packages`, targeted `tests/assets` suites, and any CLI asset
|
|
46
|
+
provenance gate relevant to the changed behavior.
|
package/dist/GLTFLoader.js
CHANGED
|
@@ -2742,6 +2742,7 @@ function serializeGLTFAsset(url, loaderDiagnostics, images, textures, materials,
|
|
|
2742
2742
|
joints: mesh.joints.map((joint) => [...joint]),
|
|
2743
2743
|
weights: mesh.weights.map((weight) => [...weight]),
|
|
2744
2744
|
morphTargets: mesh.morphTargets.map((target) => ({
|
|
2745
|
+
...(target.name ? { name: target.name } : {}),
|
|
2745
2746
|
positions: target.positions.map((position) => [...position]),
|
|
2746
2747
|
normals: target.normals.map((normal) => [...normal]),
|
|
2747
2748
|
tangents: target.tangents.map((tangent) => [...tangent])
|