gltf-viewer icon indicating copy to clipboard operation
gltf-viewer copied to clipboard

WASM/WebGL build target support

Open masonblier opened this issue 4 years ago • 4 comments

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

  • Mouse rotation/panning jumps sporadically on initial click

masonblier avatar Nov 19 '19 15:11 masonblier

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

bwasty avatar Nov 23 '19 11:11 bwasty

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

bwasty avatar Dec 20 '19 12:12 bwasty

@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.

masonblier avatar Dec 21 '19 00:12 masonblier

ping

pannous avatar May 17 '22 14:05 pannous