-
Notifications
You must be signed in to change notification settings - Fork 0
5. Data Types
This section lists all String keywords supported for the easing attribute in motion blocks. These names and their behaviors are based on the widely recognized easing functions available in the Svelte svelte/easing module.
-
String: UTF-8 text, enclosed in double quotes (
`"`). Standard HCL escape sequences (e.g.,`\n`,`\t`,`\"`,`\\`,`\uXXXX`) apply. -
Number: Can be an Integer (e.g.,
`42`,`-100`) or a floating-point number (e.g.,`3.14`,`-0.5e-10`). -
Boolean: The literal values
trueorfalse(must be lowercase). -
Array: An ordered, comma-separated sequence of values enclosed in square brackets (
[]). Elements can be of any valid ESL data type, and arrays can be nested if the attribute definition allows. A trailing comma is permitted.- Example:
[10, 20, 30] - Example:
["fade", "slide", [0.1, 0.2]](if an attribute supported such mixed/nested types)
- Example:
-
KaraokeSegment: A specific Array structure:
["segmentTextString", offsetMillisecondsNumber]. This is used exclusively within thetextattribute of acueblock when defining karaoke-style text.- Example:
["Hello", 0]
- Example:
Note
While HCL itself supports more complex data structures like objects/maps directly as attribute values, ESL primarily uses blocks for structure and limits attribute values to the types listed above for simplicity and clarity in this version of the specification.
This section lists all String keywords supported for the easing attribute in motion blocks.
| Keyword | Description |
|---|---|
`linear` |
No easing, constant speed. |
`quad-in` |
Quadratic easing in (starts slow, accelerates). |
`quad-out` |
Quadratic easing out (starts fast, decelerates). |
`quad-in-out` |
Quadratic easing in and out. |
`cubic-in` |
Cubic easing in. |
`cubic-out` |
Cubic easing out. |
`cubic-in-out` |
Cubic easing in and out. |
`quart-in` |
Quartic easing in. |
`quart-out` |
Quartic easing out. |
`quart-in-out` |
Quartic easing in and out. |
`quint-in` |
Quintic easing in. |
`quint-out` |
Quintic easing out. |
`quint-in-out` |
Quintic easing in and out. |
`sine-in` |
Sinusoidal easing in. |
`sine-out` |
Sinusoidal easing out. |
`sine-in-out` |
Sinusoidal easing in and out. |
`expo-in` |
Exponential easing in. |
`expo-out` |
Exponential easing out. |
`expo-in-out` |
Exponential easing in and out. |
`circ-in` |
Circular easing in. |
`circ-out` |
Circular easing out. |
`circ-in-out` |
Circular easing in and out. |
`back-in` |
"Back" easing in (overshoots then settles). |
`back-out` |
"Back" easing out. |
`back-in-out` |
"Back" easing in and out. |
`elastic-in` |
"Elastic" easing in (bounces like elastic). |
`elastic-out` |
"Elastic" easing out. |
`elastic-in-out` |
"Elastic" easing in and out. |
`bounce-in` |
"Bounce" easing in. |
`bounce-out` |
"Bounce" easing out. |
`bounce-in-out` |
"Bounce" easing in and out. |
Note
It is highly recommended to refer to visual examples of these easing functions (e.g., from easings.net or the Svelte documentation) to understand their effect. Implementers should map these names to the corresponding Svelte easing equations or equivalent standard easing algorithms.
Tip
As new easing functions may be added to the Svelte svelte/easing library or become widely adopted, implementers of ESL parsers and renderers are encouraged to consider adding support for them in future updates to maintain a rich set of animation options. Such additions should be proposed for inclusion in future versions of this ESL specification.