-
Notifications
You must be signed in to change notification settings - Fork 940
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
Re-introduce Web examples #3637
Conversation
examples/window.rs
Outdated
custom_cursors[1].clone(), | ||
event_loop.create_custom_cursor(CustomCursor::from_url( | ||
format!( | ||
"https://picsum.photos/128?random={}", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we use url to github for that? Like we have cursors laying around in the repo already in png formats, so they should be fine.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well the point is to always have it be a different picture, so you can see what happens when its not loading immediately.
bded977
to
f011577
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm also tending towards removing our
run-wasm
dependency.
CC @rukai
I just went ahead and did that, we can consider re-introducing it if we decide we want it after all. |
For the web example drawing events to the dom: that was valuable for testing the examples on mobile devices which do not have a console accessible in their browsers. For run-wasm, if there's an alternative way you want users to run wasm examples then by all means swap to that. But currently there is no documented way to run wasm examples so I'm quite confused. |
Good point!
My original comment:
Agreed, this is stupid. I think this was just my first thought: if I'm gonna start adding documentation, where is the documentation for the other targets?
I'm aware of the advantages Though I'm happy to re-add them upon popular request. Apologies for not originally stating my full reasons in the OP. |
All good. Edit: or probably just a readme specific to the examples directory |
Would stick with keeping it in the README, pending input from the other maintainers. Happy to look at a PR! |
I think I'd prefer it in |
I think it definitely needs something visible from the repo, when you clone the repo you don't automatically run |
I'd also be fine with a |
This adds back the custom cursor stuff to the examples.
The only other example I didn't port was the scale factor one, which I didn't feel make a whole lot sense after #2859.
The
web
example only showed events inside the window, which we don't need anymore if we print them properly in the console, which I've done now.As part of showing thing properly in the console, I've switched to using
tracing
instead ofprintln!
in the relevant examples.I didn't find any mention of how to run examples on any target, e.g. Android or iOS.
So I feel we either have to add docs for all of these targets or none. Ergo I'm also tending towards removing our
run-wasm
dependency.WDYT?
Fixes #3473.