Skip to content

Standardize asset input loading - #21

Merged
alexchuber merged 8 commits into
mainfrom
loader-input-handling
Sep 19, 2026
Merged

alexchuber merged 8 commits into
mainfrom
loader-input-handling

Conversation

@alexchuber

@alexchuber alexchuber commented Sep 19, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Use standard Babylon loaders for STL, OBJ, and FBX; keep glTF/GLB on glTF Transform PlatformIO.
  • Support Node filesystem paths, file URLs, and HTTP(S) inputs and sidecars through lazy XMLHttpRequest setup, preserving host-provided implementations.
  • Remove custom OBJ/MTL rewriting, texture rebinding, image conversion, and MIME repair.
  • Isolate the xhr2 relative-redirect workaround and load the Node transport only in Node, keeping it out of browser startup bundles.

Intentional behavior changes

Dependencies now follow Babylon's own behavior: OBJ textures use the OBJ directory, redirects do not rebase sidecar paths, and there is no automatic TGA/BMP/GIF conversion or extensionless-image MIME repair. The CLI remains glTF/GLB-only.

Dedicated top-level data-URI source fixtures were removed without adding runtime rejection. Embedded glTF buffer and image data is unchanged.

Review

Synced with main at 52bfbb7 before eight Terra/high self-review passes. Fixed the confirmed browser-bundle finding. A proposed generic filename rewrite was not adopted.

alexchuber and others added 8 commits September 17, 2026 18:10
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@alexchuber
alexchuber merged commit 388a6f7 into main Sep 19, 2026
2 checks passed
alexchuber added a commit to alexchuber/Node-Assets that referenced this pull request Sep 21, 2026
* refactor: standardize asset input loading

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* fix: handle redirects and reduce loader memory

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* perf: defer Node transport loading

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* docs: remove loader gap guide

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* docs: trim input location guidance

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* docs: focus input guidance on sources

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* docs: remove redundant input link

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant