Skip to content

wasm: Add on animate syntax#81

Merged
juliaogris merged 3 commits intomasterfrom
on-animate
Feb 18, 2023
Merged

wasm: Add on animate syntax#81
juliaogris merged 3 commits intomasterfrom
on-animate

Conversation

@juliaogris
Copy link
Member

@juliaogris juliaogris commented Feb 17, 2023

Add on animate elapsedms:num based on JS' window.requestAnimationFrame.
The parameter passed is the number of elapsed Milliseconds since the
animation started.

Rework yielding and make Sleep part of the runtime to fix flickering of
the animation.

https://evy-lang--81-9qbk365r.web.app/#animate

Aside: the initial sleep / dot animation is now flicker free too

https://evy-lang--81-9qbk365r.web.app/#dot

Rename newStringEvent to newKeyEvent as the stringEvent is only used in
one place and can be more specific. This makes it more consistent with
the onInput and the upcoming onAnimate.
@github-actions
Copy link

github-actions bot commented Feb 17, 2023

firebase-deployment: https://evy-lang--81-9qbk365r.web.app (5f17740)

Add `on animate elapsedms:num` based on JS'
window.requestAnimationFrame. The parameter passed is the number of
elapsed Milliseconds since the animation started.
Fix flicker for animations via updated yielding. The yielder yields
about every 100ms to check if the cancel button has been pressed
(in case of an accidental endless loop).
Add a Reset method to the Sleeping yielder so that that the counter be
reset on all external sleeps and before executing a an eventHandler.
Additionally use the yielding sleep for the reading in JS, so make
read a Method on the yielder.
Copy link
Member

@camh- camh- left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🍏 LGTM

@juliaogris juliaogris merged commit f4dad13 into master Feb 18, 2023
@juliaogris juliaogris deleted the on-animate branch February 18, 2023 07:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants