-
-
Notifications
You must be signed in to change notification settings - Fork 326
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
Open
rosskevin
wants to merge
175
commits into
pmndrs:master
Choose a base branch
from
rosskevin:ts-refactor-api-cli
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+10,204
−8,556
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…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
…iables from props
…or hoseVisible -> <mesh visible={hoseVisible}
…once, reused, and disposed once.
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. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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+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
.npm link
ed locally and used this new code to create a model that loads identically to the code onmaster
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: