weixin_39585070
2020-12-02 13:12 阅读 0

wasm?

It seems like wgpu is running in the browser as per: https://github.com/gfx-rs/wgpu-rs/pull/193 , does nannou allow you to run its sketches/apps in the browser yet?

该提问来源于开源项目:nannou-org/nannou

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 复制链接分享

12条回答 默认 最新

  • weixin_39834406 weixin_39834406 2020-12-02 13:12

    It should be very close now, I don't think there should be any more major blockers! Just a matter of someone taking the time to have a crack at it. There will likely be a few small unforeseen tweaks or changes that we or our dependencies need to make to be totally compatible, but no deal-breakers that I can think of now that wgpu is running in the browser.

    Also discussed in #475

    点赞 评论 复制链接分享
  • weixin_39585070 weixin_39585070 2020-12-02 13:12

    That's promising to hear, so who do we need to poke to get this happening?

    点赞 评论 复制链接分享
  • weixin_39668282 weixin_39668282 2020-12-02 13:12

    I think the conrod suite 0.71 is required. They closed https://github.com/PistonDevelopers/conrod/issues/1381 recently, so if we asked them kindly, they might release version 0.71.

    点赞 评论 复制链接分享
  • weixin_39585070 weixin_39585070 2020-12-02 13:12

    I'm relatively new to rust/nannou, but let me know if there's something I can help with in this regard. I'm in the process of getting into some creative projects and would like to be able to present some interactive WASM projects with nannou on my portfolio website.

    点赞 评论 复制链接分享
  • weixin_39668282 weixin_39668282 2020-12-02 13:12

    I am working on a microtonal modular synthesizer/sequencer/audio workstation which I hope to be able to deploy as a web app soon. Since, as of now, Nannou isn't wasm-compatible the graphical interface of the synthesizer isn't running on the web yet. I managed, however, to get the audio model running which can be explored here: http://woyten.github.io/microwave/?arg=steps&arg=1:22:2. The given URL will create a synthesizer instance tuned to 22 notes per octave as an example.

    There are a lot of things that can be done to support https://github.com/woyten/tune many of which I did not create an issue for. If there is some interest in contributing to the lib or the synth I will create more issues as an orientation.

    点赞 评论 复制链接分享
  • weixin_39585070 weixin_39585070 2020-12-02 13:12

    very cool project. I would be interested in helping a bit here and there if you clarified some issues. Any future goals for this project? Product? Copyleft?

    点赞 评论 复制链接分享
  • weixin_39585070 weixin_39585070 2020-12-02 13:12

    is there something I can do to help wasm move forwards? If you could point me at some achievable issues I'd love to help out.

    点赞 评论 复制链接分享
  • weixin_39834406 weixin_39834406 2020-12-02 13:12

    Here are some thoughts on how I would go about getting this working.

    I'd start by trying to get a simple-as-possible wgpu-rs example that has already been demonstrated to work well in the browser locally, to verify that it's at least possible on my setup. Keep in mind that the current nannou master uses wgpu 0.5, so it might be worth testing the wgpu example with 0.5 too. Alternatively, if it seems like wgpu 0.6 is needed, #655 looks to be most of the way there (haven't had a chance to do a full review just yet).

    Once working, I would try to make a copy of the example, and add nannou as a dependency. Doing this should include nannou in the build process for the WASM target, and any remaining issues should be raised by the compiler as an error. There shouldn't be any major blockers, but this will help to guide towards what remains that needs addressing.

    The wgpu-users channel on Matrix is also full of very helpful folks - I highly recommend hanging out there while hacking on this :) They've been a great help in landing wgpu in nannou in general.

    I hope some of this helps a little bit!

    点赞 评论 复制链接分享
  • weixin_39668282 weixin_39668282 2020-12-02 13:12

    I ceated some new issues that I think might be good for "beginners".

    In order to not misuse this issue we could continue the discussion here! :smiley:

    点赞 评论 复制链接分享
  • weixin_39585070 weixin_39585070 2020-12-02 13:12

    will look into this

    点赞 评论 复制链接分享
  • weixin_39585070 weixin_39585070 2020-12-02 13:12

    so it seems like this issue is rather deep

    Trying to get the wgpu examples running is proving challenging.

    Here are the examples: https://wgpu.rs/examples/?example=hello-triangle

    I've only attempted to get it working with Firefox Nightly, setting the various flags as required here: https://github.com/gpuweb/gpuweb/wiki/Implementation-Status#firefox

    But it seems to only want to crash.

    Here are similar bug reports of this issue with Firefox:

    https://bugzilla.mozilla.org/buglist.cgi?product=Core&component=Graphics%3A%20WebGPU

    This is where this is at currently.

    点赞 评论 复制链接分享
  • weixin_39834406 weixin_39834406 2020-12-02 13:12

    Thanks for digging into this ! Ahh I thought WebGPU in browsers might have progressed a bit further by now, but I guess it's still early days. Perhaps we can at least prepare using firefox nightly best we can in the meantime.

    点赞 评论 复制链接分享

相关推荐