-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Allow for different demo snippets to be selected #528
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
Allow for different demo snippets to be selected #528
Conversation
You can check this issue, it contains mandelbrot.py: |
count = 0 | ||
until = 10 | ||
|
||
print(f"These are the first {until} numbers in the Fibonacci sequence:") |
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.
Sweet! f-strings!
It takes a while to run, for me about 20 seconds, and the page is frozen during that time. It's a good example, though. |
I think it could be improved by a requestAnimationFrame call, but that would be for another PR to add that as a builtin. |
Codecov Report
@@ Coverage Diff @@
## master #528 +/- ##
=======================================
Coverage 48.41% 48.41%
=======================================
Files 69 69
Lines 14375 14375
Branches 3591 3591
=======================================
Hits 6960 6960
Misses 5554 5554
Partials 1861 1861 Continue to review full report at Codecov.
|
The selection works, but I'm looking for ideas for what other snippets could be put there. Everything's stored in
wasm/demo/snippets/*.py
; a separate demo snippet would mean a new.py
file in that directory.