Rich-Harris / svelte-cubed

Svelte ❤️ Three
svelte-cubed.vercel.app
MIT License
1.19k stars 76 forks source link

Create GLTF component #25

Open snagy opened 2 years ago

snagy commented 2 years ago

I'm guessing (from the glb in the repo) this is already in progress, but here's a first cut at a glTF component. It supports gltf or GLB files.

It supports draco and KTX2 (basis) compression, but those have to be referenced at runtime and the loaders are in the static folder. There is probably a better way to do this.

Animations are not supported yet.

vercel[bot] commented 2 years ago

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/svelte/svelte-cubed/FeiUotdviXKAr4ZyBybXMEqgkNng
✅ Preview: Failed

[Deployment for 008f4d0 failed]

DefinitelyMaybe commented 2 years ago

Would like to have a further look into this but haven't been able to check in on the inspection from the bot. let us know if there's anything you'd like some help on

edit: Also a GLTF component sounds good to me 👍

snagy commented 2 years ago

I get a 404 page when I try to check the Vercel error. I'll look into it more later tonight.

snagy commented 2 years ago

Can anyone see the Vercel deployment error? i'm still getting a 404 when I try to see the details. @Rich-Harris any ideas?

Myrmod commented 2 years ago

For the time being I created a pull request with an example on how to load a gltf or glb file using SC.Primitive in #41.