Skip to content

create dist script with npm and gltf-transform #43

Open
@kfarr

Description

@kfarr

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions