Skip to content
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

Post align fixes #65

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions docs/helpers.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,12 +81,6 @@ replacement.

{schema_object:helpers/slottable-object}

<h3 id="slottable-property">Slotabble Property</h3>

{schema_string:helpers/slottable-property/description}

{schema_object:helpers/slottable-property}

<lottie-playground example="slots.json">
<form>
<input title="Scale X" type="range" min="0" value="100" max="200"/>
Expand Down
46 changes: 7 additions & 39 deletions docs/properties.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
# Propeties

## Animated Property
<h2 id="property">Animated Property</h2>

Properties in Lottie can be animated.

Their structure depends on whether it's animated or not:

{schema_object:properties/property}
<tr><td>`k`</td>
<td>`any` or `array` of {link:properties/base-keyframe:Keyframes}</td>
<td>Value or Keyframes</td>
<td>When it's not animated, `k` will contain the value directly. When animated, `k` will be an array of keyframes.</td>
</tr>

|Attribute|Type|Description|
|---------|----|-----------|
|`a`|[0-1 `int`](#booleans)|Whether the property is animated. Note some old animations might not have this|
|`k`||Value or keyframes, this changes based on the value of `a`|

If `a` is `0`, then `k` just has the value of the property.

Expand Down Expand Up @@ -96,12 +98,6 @@ you can see a representation of its easing function.
Animatable {link:values/vector}.

{schema_object:properties/vector-property}
<tr><td>`a`</td><td>{link:values/int-boolean}</td><td>Animated</td><td>Whether the property is animated</td></tr>
<tr><td>`k`</td>
<td>{link:values/vector} or `array`</td>
<td>Value or Keyframes</td>
<td>When it's not animated, `k` will contain the value directly. When animated, `k` will be an array of keyframes.</td>
</tr>

<h4 id="vector-keyframe">Vector Keyframe</h4>

Expand All @@ -118,26 +114,12 @@ Note that when animated it uses {link:properties/vector-keyframe:Vector Keyframe
so instead of scalars keyframes have arrays with a single values.

{schema_object:properties/scalar-property}
<tr><td>`a`</td><td>{link:values/int-boolean}</td><td>Animated</td><td>Whether the property is animated</td></tr>
<tr><td>`k`</td>
<td>`number` or `array`</td>
<td>Value or Keyframes</td>
<td>When it's not animated, `k` will contain the value directly. When animated, `k` will be an array of keyframes.</td>
</tr>


<h3 id="position-property">Position</h3>

Animatable 2D {link:values/vector} with optional spatial tangents.

{schema_object:properties/position-property}
<tr><td>`a`</td><td>{link:values/int-boolean}</td><td>Animated</td><td>Whether the property is animated</td></tr>
<tr><td>`k`</td>
<td>{link:values/vector} or `array`</td>
<td>Value or Keyframes</td>
<td>When it's not animated, `k` will contain the value directly. When animated, `k` will be an array of keyframes.</td>
</tr>


<h4 id="position-keyframe">Position Keyframe</h4>

Expand All @@ -158,13 +140,6 @@ Animatable 2D {link:values/vector} with optional spatial tangents.
Animatable {link:values/bezier}.

{schema_object:properties/bezier-property}
<tr><td>`a`</td><td>{link:values/int-boolean}</td><td>Animated</td><td>Whether the property is animated</td></tr>
<tr><td>`k`</td>
<td>{link:values/bezier} or `array`</td>
<td>Value or Keyframes</td>
<td>When it's not animated, `k` will contain the value directly. When animated, `k` will be an array of keyframes.</td>
</tr>


<h4 id="bezier-keyframe">Bezier Shape Keyframe</h4>

Expand All @@ -177,13 +152,6 @@ Animatable {link:values/bezier}.
Animatable {link:values/color}.

{schema_object:properties/color-property}
<tr><td>`a`</td><td>{link:values/int-boolean}</td><td>Animated</td><td>Whether the property is animated</td></tr>
<tr><td>`k`</td>
<td>{link:values/color} or `array`</td>
<td>Value or Keyframes</td>
<td>When it's not animated, `k` will contain the value directly. When animated, `k` will be an array of keyframes.</td>
</tr>


<h4 id="color-keyframe">Color Keyframe</h4>

Expand Down
2 changes: 1 addition & 1 deletion docs/static/examples/effects-blur.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"id": "blep",
"h": 512,
"w": 512,
"p": "/lottie-docs/examples/blep.png",
"p": "/lottie-docs/static/examples/blep.png",
"u": "",
"e": 1
}
Expand Down
2 changes: 1 addition & 1 deletion docs/static/examples/effects-bulge.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"id": "image_0",
"h": 512,
"w": 512,
"p": "/lottie-docs/examples/blep.png",
"p": "/lottie-docs/static/examples/blep.png",
"u": "",
"e": 1
}
Expand Down
2 changes: 1 addition & 1 deletion docs/static/examples/effects-fill.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"id": "blep",
"h": 512,
"w": 512,
"p": "/lottie-docs/examples/blep.png",
"p": "/lottie-docs/static/examples/blep.png",
"u": "",
"e": 1
}
Expand Down
2 changes: 1 addition & 1 deletion docs/static/examples/effects-matte3-image.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"id": "blep",
"h": 512,
"w": 512,
"p": "/lottie-docs/examples/blep.png",
"p": "/lottie-docs/static/examples/blep.png",
"u": "",
"e": 1
},
Expand Down
2 changes: 1 addition & 1 deletion docs/static/examples/effects-prolevels.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"id": "blep",
"h": 512,
"w": 512,
"p": "/lottie-docs/examples/blep.png",
"p": "/lottie-docs/static/examples/blep.png",
"u": "",
"e": 1
}
Expand Down
2 changes: 1 addition & 1 deletion docs/static/examples/effects-shadow.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"id": "blep",
"h": 512,
"w": 512,
"p": "/lottie-docs/examples/blep.png",
"p": "/lottie-docs/static/examples/blep.png",
"u": "",
"e": 1
}
Expand Down
2 changes: 1 addition & 1 deletion docs/static/examples/effects-stroke.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"id": "blep",
"h": 512,
"w": 512,
"p": "/lottie-docs/examples/blep.png",
"p": "/lottie-docs/static/examples/blep.png",
"u": "",
"e": 1
}
Expand Down
2 changes: 1 addition & 1 deletion docs/static/examples/effects-tint.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"id": "blep",
"h": 512,
"w": 512,
"p": "/lottie-docs/examples/blep.png",
"p": "/lottie-docs/static/examples/blep.png",
"u": "",
"e": 1
}
Expand Down
2 changes: 1 addition & 1 deletion docs/static/examples/effects-tritone.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"id": "blep",
"h": 512,
"w": 512,
"p": "/lottie-docs/examples/blep.png",
"p": "/lottie-docs/static/examples/blep.png",
"u": "",
"e": 1
}
Expand Down
2 changes: 1 addition & 1 deletion docs/static/examples/effects-wave.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"id": "image_0",
"h": 512,
"w": 512,
"p": "/lottie-docs/examples/blep.png",
"p": "/lottie-docs/static/examples/blep.png",
"u": "",
"e": 1
}
Expand Down
2 changes: 1 addition & 1 deletion docs/static/examples/image.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"id": "blep",
"h": 512,
"w": 512,
"p": "/lottie-docs/examples/blep.png",
"p": "/lottie-docs/static/examples/blep.png",
"u": "",
"e": 0
}
Expand Down
2 changes: 1 addition & 1 deletion docs/static/examples/image_animated.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"id": "blep",
"h": 512,
"w": 512,
"p": "/lottie-docs/examples/blep.png",
"p": "/lottie-docs/static/examples/blep.png",
"u": "",
"e": 1
},
Expand Down
6 changes: 6 additions & 0 deletions schema/assets/image.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,12 @@
"title": "Height",
"description": "Height of the image",
"type": "number"
},
"t": {
"title": "Type",
"description": "Marks as part of an image sequence if present",
"type": "string",
"const": "seq"
}
},
"if": {
Expand Down
12 changes: 12 additions & 0 deletions schema/constants/mask-mode.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,18 @@
"title": "Intersect",
"const": "i",
"description": "Mask coverage is intersected (Source-In blending)."
},
{
"title": "Lighten",
"const": "l"
},
{
"title": "Darken",
"const": "d"
},
{
"title": "Difference",
"const": "f"
}
]
}
17 changes: 0 additions & 17 deletions schema/helpers/slottable-property.json

This file was deleted.

5 changes: 5 additions & 0 deletions schema/properties/bezier-property.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@
"type": "object",
"title": "Bezier Property",
"description": "An animatable property that holds a Bezier shape",
"allOf": [
{
"$ref": "#/$defs/properties/property"
}
],
"oneOf": [
{
"$comment": "Not animated",
Expand Down
2 changes: 1 addition & 1 deletion schema/properties/color-property.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"description": "An animatable property that holds a Color",
"allOf": [
{
"$ref": "#/$defs/helpers/slottable-property"
"$ref": "#/$defs/properties/property"
}
],
"oneOf": [
Expand Down
5 changes: 5 additions & 0 deletions schema/properties/gradient-stops.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@
"type": "object",
"title": "Gradient stops",
"description": "Animatable vector representing the gradient stops",
"allOf": [
{
"$ref": "#/$defs/properties/property"
}
],
"oneOf": [
{
"$comment": "Not animated",
Expand Down
11 changes: 10 additions & 1 deletion schema/properties/position-property.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,16 @@
"description": "An animatable property to represent a position in space",
"allOf": [
{
"$ref": "#/$defs/helpers/slottable-property"
"$ref": "#/$defs/properties/property"
},
{
"properties": {
"l": {
"title": "Length",
"description": "Number of components in the value arrays.\nIf present values will be truncated or expanded to match this length when accessed from expressions.",
"type": "integer"
}
}
}
],
"oneOf": [
Expand Down
31 changes: 31 additions & 0 deletions schema/properties/property.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{
"type": "object",
"title": "Property",
"properties": {
"ix": {
"title": "Property Index",
"type": "integer"
},
"x": {
"title": "Expression",
"type": "string"
},
"sid": {
"title": "Slot ID",
"description": "One of the ID in the file's slots",
"type": "string"
},
"a": {
"title": "Animated",
"description": "Whether the property is animated",
"$ref": "#/$defs/values/int-boolean",
"default": 0
}
},
"if": {
"required": ["sid"]
},
"else": {
"required": ["a", "k"]
}
}
2 changes: 1 addition & 1 deletion schema/properties/scalar-property.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"description": "An animatable property that holds a float",
"allOf": [
{
"$ref": "#/$defs/helpers/slottable-property"
"$ref": "#/$defs/properties/property"
}
],
"oneOf": [
Expand Down
6 changes: 1 addition & 5 deletions schema/properties/vector-property.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,10 @@
"description": "An animatable property that holds an array of numbers",
"allOf": [
{
"$ref": "#/$defs/helpers/slottable-property"
"$ref": "#/$defs/properties/property"
},
{
"properties": {
"ix": {
"title": "Property Index",
"type": "integer"
},
"l": {
"title": "Length",
"description": "Number of components in the value arrays.\nIf present values will be truncated or expanded to match this length when accessed from expressions.",
Expand Down