From 941f99d15eab42b7154f082cb61d458e49fc9669 Mon Sep 17 00:00:00 2001 From: fantasai Date: Wed, 14 Jun 2023 01:48:13 -0400 Subject: [PATCH 1/6] =?UTF-8?q?[web-animations-1][editorial]=20Define=20?= =?UTF-8?q?=E2=80=9CWeb=20Animations=20model=E2=80=9D=20and=20=E2=80=9CWeb?= =?UTF-8?q?=20Animations=20API=E2=80=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Plus some nearby editorial fixes to the intro etc. --- web-animations-1/Overview.bs | 59 +++++++++++++++++++----------------- 1 file changed, 32 insertions(+), 27 deletions(-) diff --git a/web-animations-1/Overview.bs b/web-animations-1/Overview.bs index 1ce21d49333..4fab83c73f8 100644 --- a/web-animations-1/Overview.bs +++ b/web-animations-1/Overview.bs @@ -85,9 +85,9 @@ Former Editor: Alex Danilo 31960, Google, adanilo@google.com Former Editor: Tab Atkins 42199, Google, jackalmage@gmail.com Abstract: This specification defines a model for synchronization and timing of changes to the presentation of a Web page. - This specification also also defines an application programming interface + It also defines an application programming interface (API) for interacting with this model - and it is expected that further specifications will define + and it is expected that other specifications will define declarative means for exposing these features. !Participate: Fix the text through GitHub @@ -222,34 +222,38 @@ Introduction {#introduction} This section is non-normative This specification defines a model + (the Web Animations model) for supporting animation and synchronization on the Web platform. It is intended that other specifications will build on this model and expose its features through declarative means. + In addition, this specification also defines a programming interface to the model + (the Web Animations API, + defined in [[#programming-interface]]) that may be implemented by user agents that provide support for scripting. Use cases {#use-cases} --------- - The Web Animations model is intended to provide the features necessary + The [=Web Animations model=] is intended to provide the features necessary for expressing CSS Transitions [[CSS-TRANSITIONS-1]], CSS Animations [[CSS-ANIMATIONS-1]], and SVG [[SVG11]]. - As such, the use cases of Web Animations model is the union of use cases - for those three specifications. + As such, the use cases of the [=Web Animations model=] are + the union of use cases for those three specifications. - The use cases for the programming interface include the following: + The use cases for the [=Web Animations API=] include the following: : Inspecting running animations :: Often Web applications need to wait for certain animated effects to complete before updating some state. - The programming interface in this specification allows such applications + The [=Web Animations API=] allows such applications to wait for all currently running animation to complete, regardless of whether they are defined by CSS Transitions, CSS Animations, SVG animations, - or created directly using the programming interface. + or created directly using the [=Web Animations API=].
@@ -296,7 +300,7 @@ Use cases {#use-cases}
       in terms of how they are represented in the CSS cascade
       and the performance optimizations that are possible,
       such as performing the animation on a separate thread.
-      Using the Web Animations programming interface,
+      Using the [=Web Animations API=],
       it is possible to create animations from script
       that have the same behavior and performance characteristics
       as declarative animations.
@@ -312,7 +316,7 @@ Use cases {#use-cases}
   ::
       In a complex application, it can be difficult
       to determine how an element arrived in its present state.
-      The Web Animations programming interface can be used
+      The [=Web Animations API=] can be used
       to inspect running animations to answer questions such as,
       “Why is the opacity of this element changing?”
 
@@ -391,43 +395,44 @@ Relationship to other specifications {#relationship-to-other-specifications}
   they are described in different terms.
   This specification proposes an abstract animation model
   that encompasses the common features of all three specifications.
-  This model is backwards-compatible
+  This [=Web Animations model=] is backwards-compatible
   with the current behavior of these specifications
   such that they can be defined in terms of this model without any observable change.
 
   The animation features in SVG 1.1 are defined
   in terms of SMIL Animation [[SMIL-ANIMATION]].
   It is intended that by defining SVG's animation features
-  in terms of the Web Animations model,
+  in terms of the [=Web Animations model=],
   the dependency between SVG and SMIL Animation can be removed.
 
   As with [=animation frame callbacks=]
   (commonly referred to as "requestAnimationFrame") [[HTML]],
-  the programming interface component of this specification
+  the [=Web Animations API=]
   allows animations to be created from script.
-  The animations created using the interface defined in this specification, however,
+  The animations created using the [=Web Animations API=], however,
   once created, are executed entirely by the user agent,
   meaning they share the same performance characteristics
-  as animations defined by markup.
+  as animations defined declaratively.
   Using this interface it is possible to create animations
   from script in a simpler and more performant manner.
 
-  The time values used within the programming interface
+  The time values used within the [=Web Animations API=]
   correspond with those used in [=animation frame callbacks=] [[HTML]]
   and their execution order is defined
   such that the two interfaces can be used simultaneously without conflict.
 
-  The programming interface component of this specification
+  The [=Web Animations API=] component of this specification
   makes some additions to interfaces defined in HTML [[!HTML]].
 
 Overview of this specification {#overview-of-this-specification}
 ------------------------------
 
-  This specification begins by defining an abstract model for animation.
-  This is followed by a programming interface
+  This specification begins by defining an abstract model for animation,
+  the [=Web Animations model=].
+  This is followed by a programming interface, [=Web Animations API=],
   defined in terms of the abstract model.
-  The programming interface is defined in terms of the abstract model
-  and is only relevant to user agents that provide scripting support.
+  The programming interface is only relevant
+  to user agents that provide scripting support.
 
Specification conventions {#spec-conventions} @@ -448,7 +453,7 @@ Specification conventions {#spec-conventions} should be understood to refer to updating the property directly without invoking any related procedure. - Further documentation conventions that are not specific to this specification + Further conventions not specific to this specification are described in [[#w3c-conventions]]. Web Animations model overview {#web-animations-model-overview} @@ -457,7 +462,7 @@ Web Animations model overview {#web-animations-model-overview}
This section is non-normative - At a glance, the Web Animations model consists + At a glance, the [=Web Animations model=] consists of two largely independent pieces: a timing model and an animation model. The roles of these pieces are as follows: @@ -6890,7 +6895,7 @@ Model liveness {#model-liveness} Unless otherwise stated, invoking the methods or constructors, or getting or setting the members - of interfaces defined in the programming interface section of this specification + of interfaces defined in the [=Web Animations API=] does not produce a [=style change event=]. Note: Other specifications that extend this specification @@ -6909,11 +6914,11 @@ Model liveness {#model-liveness} and normative requirements elsewhere in this specification, the following invariants can be observed: - : Changes made to the Web Animations model take effect immediately + : Changes made to the [=Web Animations model=] take effect immediately :: For example, if the {{KeyframeEffect}} associated with an {{Animation}} is seeked (see [[#setting-the-current-time-of-an-animation]]) - via the programming interface, + via the [=Web Animations API=], the value returned when querying the animation's startTime will reflect updated state of the model immediately. @@ -7117,7 +7122,7 @@ Conformance criteria {#conformance-criteria} A conforming scripted Web Animations user agent is a user agent that implements - the API + the [=Web Animations API=] defined in [[#programming-interface]]. Acknowledgements {#acknowledgements} From b7de5ddb48895e9073c2909d97bdec7a19a01dce Mon Sep 17 00:00:00 2001 From: fantasai Date: Wed, 14 Jun 2023 01:48:59 -0400 Subject: [PATCH 2/6] [web-animations-1][editorial] Proper dfns for the timing model and animation model. Also better cross-linking. --- web-animations-1/Overview.bs | 93 +++++++++++++++++++----------------- 1 file changed, 48 insertions(+), 45 deletions(-) diff --git a/web-animations-1/Overview.bs b/web-animations-1/Overview.bs index 4fab83c73f8..ddc77cc10a7 100644 --- a/web-animations-1/Overview.bs +++ b/web-animations-1/Overview.bs @@ -459,39 +459,41 @@ Specification conventions {#spec-conventions} Web Animations model overview {#web-animations-model-overview} ============================= -
-This section is non-normative - At a glance, the [=Web Animations model=] consists of two largely independent pieces: - a timing model and an animation model. + a [=timing model=] and an [=animation model=]. The roles of these pieces are as follows: - : Timing model + : timing model :: Takes a moment in time and converts it to a proportional distance within a single iteration of an animation, - called the iteration progress. - The iteration index is also recorded + called the [=iteration progress=]. + The current [=iteration index=] is also recorded since some animations vary each time they repeat. + The [=Web Animations timing model=] is defined in [[#timing-model]]. - : Animation model + : animation model. :: - Takes the iteration progress and iteration index values - produced by the timing model - and converts them into a series of values - to apply to the target properties. + Takes the [=iteration progress=] and [=iteration index=] values + produced by the [=timing model=] + and converts them into a series of corresponding values + to apply to the [=target properties=]. + The [=Web Animations animation model=] is defined in [[#animation-model]]. + +
+This section is non-normative Graphically, this flow can be represented as follows:
Overview of the operation of the Web Animations model.
- Overview of the operation of the Web Animations model.
- The current time is input to the timing model - which produces an iteration progress value and an iteration index.
- These parameters are used as input to the animation model - which produces the property values to apply. + Overview of the operation of the [=Web Animations model=].
+ The current time is input to the [=timing model=] + which produces an [=iteration progress=] value and an [=iteration index=].
+ These parameters are used as input to the [=animation model=] + which produces the [=target property=] values to apply.
@@ -502,14 +504,14 @@ Web Animations model overview {#web-animations-model-overview} * takes 2 seconds every time, and * changes the width of a rectangle from 50 pixels to 100 pixels. - The first three points apply to the timing model: + The first three points describe the [=timing model=]: at a time of 6 seconds, it calculates that the animation should be half-way through its second iteration and produces the result 0.5. The animation model then uses that information to calculate a width. - This specification begins with the timing model - and then proceeds to the animation model. + This specification begins with the [[#timing-model|timing model]] + and then proceeds to the [[#animation-model|animation model]].