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

Asset handling improvements #340

Open
mikolalysenko opened this issue Sep 11, 2016 · 5 comments
Open

Asset handling improvements #340

mikolalysenko opened this issue Sep 11, 2016 · 5 comments

Comments

@mikolalysenko
Copy link
Collaborator

We should improve the workflow for getting data into regl. There are already a bunch of importers on npm but it is all very scattered. We should try to pull the best of this work together and create a comprehensive guide for translating assets from various formats into some form which is compatible with regl.

@vorg
Copy link
Contributor

vorg commented Oct 14, 2016

Is there specific data or format you have in mind? I'm trying to focus my efforts recently on glTF for scenes and geometry.

@marklundin
Copy link

@mikolalysenko do you have any references on good importers. It would be good to collate and cherry pick features.

@marklundin
Copy link

marklundin commented Nov 5, 2016

Thinking off the top of my head here...

Keeping things functional, it would be great to separate concerns (loading/parsing) and build up a collection of decoders that could be used with things like the fetch api.

fetch('asset.zip')
 .then(resp => Deflate(resp))
 .then(data => DecodeOBJ(data))

This composable approach is not restricted to fetch, it also opens up things like async programming, streams and service workers where decoding can happen off the main thread, although it doesn't prevent them from using alternative loading/importing mechanisms (XHR/inline assets). Also, it makes the loading/decoding transparent to the developer by not abstracting it behind a class. It would also allow contributors to continue adding decoders for new formats as needs arise.

@cvan
Copy link

cvan commented Dec 13, 2016

I found @substack's vglobe regl tutorial very helpful. Along those lines, I think added built-in support for loading glTF (or ideally to regl-project/resl in regl-project/resl#8 would be great). I added this comment with some helpful links: regl-project/resl#8 (comment)

For glTF-specific discussions, I'd recommend keeping the discussion in regl-project/resl#8, but I thought I'd point to my comment there.

Let me know if anyone can point folks in the right direction to add proper glTF support; I can probably consult with some folks and get some folks here on the Mozilla VR team to add support. Other glTF enthusiasts who are experimenting in this space are @xirvr, @emadurandal, @GrimoireGL, @takahirox, etc. If anyone's interested to add glTF to regl, feel free to hit me up on Twitter (@cvanw), and let's chat! 😄

@munrocket
Copy link

GLTF loader in REGL https://github.com/gamedev-js/regltf

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants