bwasty / gltf-viewer

glTF 2.0 Viewer written in Rust
The Unlicense
188 stars 31 forks source link

WASM/WebGL build target support #61

Closed masonblier closed 2 years ago

masonblier commented 5 years ago

Hello bwasty et al,

I've done some work to implement a wasm build target for this project, so this gltf viewer can be used in a web browser.

Screen Shot 2019-11-19 at 7 06 36 AM

The diverged code is in the platform/gl or platform/webgl directories. Originally I thought to make a new project, but there were fewer changes required than I thought. I am using this repository for a personal web-based gltf file explorer tool, and may also attempt to implement skinning/animations for my own education.

Please let me know any issues or features you think necessary to accompany this PR.

Thank you for this project and allowing all to learn from and modify the source code.

Building

Build the wasm web target with this command. You may need to follow setup instructions from the wasm-pack website.

wasm-pack build --target web -- --no-default-features --features use_wasm_bindgen

Known Issues

bwasty commented 4 years ago

Awesome! I hope I'll find time to have a proper look at the code in the next few days.

bwasty commented 4 years ago

Sorry I still haven't looked at it - I hope I'll find the time/motivation over the christmas vacation.

masonblier commented 4 years ago

@bwasty No problem, I haven't been able to take a second revision at this yet either, I know there are still some bugs and better testing/interfaces needed.

pannous commented 2 years ago

ping