Skip to content
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

create dist script with npm and gltf-transform #43

Open
kfarr opened this issue Feb 28, 2023 · 1 comment
Open

create dist script with npm and gltf-transform #43

kfarr opened this issue Feb 28, 2023 · 1 comment

Comments

@kfarr
Copy link
Collaborator

kfarr commented Feb 28, 2023

today we create draco compressed glb files using a few different methods, depending on who is converting them. this is done in a separate repo and requires manual commits.

instead, it would be time saving for 3d modelers to only edit files on this source repo and then run a script such as npm run dist that runs a command line tool to convert gltf files into the desired lower quality compression. It could be done with this tool for example: https://gltf-transform.donmccurdy.com/cli.html . Commits to source repo should trigger a github ci action to run the dist script which builds to a dist branch. The assets subdomain (https://assets.3dstreet.app/) should instead resolve to this automatically building branch.

pros/cons:

  • there could be a "failing" build, how to handle? are there tests?
  • to maintain the dual directory structures, it might be necessary to have a mapping between source directory and dist directory?
  • alternatively, the directory structure doesn't have a lot of inherent utility, so we could just use the same paths as source and copy them as-is into dist and update paths in 3dstreet core assets.js
@kfarr
Copy link
Collaborator Author

kfarr commented Feb 28, 2023

cc @mwbeene would love to get your feedback on the above

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

No branches or pull requests

1 participant