-
-
Notifications
You must be signed in to change notification settings - Fork 327
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refactor to CLI+API, typescript, and more #286
base: master
Are you sure you want to change the base?
Conversation
…mpty leaf nodes The code changes introduce two new options to the CLI tool: - `--pruneKeepAttributes`: Determines whether to keep unused vertex attributes, such as UVs without an assigned texture. - `--pruneKeepLeaves`: Determines whether to keep empty leaf nodes. These options provide more control over the pruning process, allowing users to optimize the resulting glTF files based on their specific requirements.
…nto alpha-typescript
…e I think we can import these, so try that before continuing on these
For watchers, I updated the original text, but: Temporary fork published: https://github.com/rosskevin/gltfjsx I hope this is a temporary package and #286 is accepted, but I've got to move on and start using it in a production/published environment. |
…er may want (sync)
Hi @rosskevin! Awesome work here, thank you! I'm in favor of the direction. But I'm only an occasional contributor on this repository, and so I think we'll need @drcmda to sign off on the plan. It is a pretty large PR, so I'll wait to do a deeper review until getting some signal one way or the other. |
Temporary fork published
Temporary fork published: https://github.com/rosskevin/gltfjsx
I hope this is a temporary package and this PR is accepted, but I've got to move on and start using it in a production/published environment.
Goal
Included
tsup
configauto
for automatic releases (NEED a committer to work with me or commit access to complete setup)ts-morph
for AST access or string building, whichever is easiest. API consumer can direct access and modify the AST. Allows for easytsx | jsx
stringification.node-three-gltf
test
s (just the start, but it's a start!)nodenext
, so this is an ESM build with top-level await for node 16+nodes
in the typescript interfaceflatten
optimation exposed that defaults to true (existing behavior) but can be turned off via API or CLI (this can unexpectedly remove named node references)exposeProps
option in generation API, allowing for generating component props that propagate toObject3D
one to many jsx properties e.g.shadows -> [castShadow, receiveShadow]
with optionalmatcher
fn.Motivation
We have three CAD models that have continuous development. We are building online configurators, and we effectively need a way to customize
gltfjsx
to instrument the code with our additions in a continuous integration way.Testing
exposeProps
.TL;DR
I need this, and I spent a lot of time on it. I'll be moving forward with it regardless, but I think it belongs here. I hope to have this PR reconciled and merged so that the entire community can collaborate.
Samples
GLTF r3f
Draco instanceall r3f
Closes/supercedes PRs
This closes the majority of open PRs through fixes or through reuse of external loaders that are maintained:
README.md
& Organizing Imports #189Closes issues
This PR allows-for/solves/obsoletes/no longer present the following issues: