10BC0 [web-animations-2] Specify Animation progress API by DavMila · Pull Request #9937 · w3c/csswg-drafts · GitHub
[go: up one dir, main page]

Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
8000 Loading
Diff view
Diff view
Prev Previous commit
[web-animations-2] Specify Animation progress API
-Clamp progress to [0,1].
-Zero duration depends on nonegativity of currentTime.
  • Loading branch information
DavMila committed Feb 21, 2024
commit d89d8b8c7ca7082f228b795fc8cef195126ec3df
11 changes: 9 additions & 2 deletions web-animations-2/Overview.bs
Original file line number Diff line number Diff line change
Expand Up @@ -981,16 +981,23 @@ Add the following sentence:

: If <em>any</em> of the following are true:
* |animation| does not have an [=animation/associated effect=], or
* |animation|'s [=associated effect end=] is zero, or
* |animation|'s [=animation/current time=] is an [=unresolved=] time value,
::
|animation|'s [=animation/progress=] is null.
: If |animation|'s [=associated effect end=] is zero,
::
: If |animation|'s [=animation/current time=] is negative,
:: |animation|'s [=animation/progress=] is zero.

: Otherwise,
:: |animation|'s [=animation/progress=] is one.
: If |animation|'s [=associated effect end=] is infinite,
::
|animation|'s [=animation/progress=] is zero.
Copy link
Contributor

Choose a reason for hiding this comment

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

Can the author tell if we're active (after the start time) or inactive (before the start time)?

: Otherwise,
::
<blockquote>
<code><a for="animation">progress</a> = [=animation/current time=] / |animation|'s [=associated effect end=]
<code><a for="animation">progress</a> = min(max([=animation/current time=] / |animation|'s [=associated effect end=], 0), 1)
</code>
</blockquote>

Expand Down
0