-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Basic pages for all the schema objects
- Loading branch information
Showing
9 changed files
with
276 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
# Helpers | ||
|
||
## Int Boolean | ||
|
||
{schema_string:helpers/int-boolean/description} | ||
|
||
{schema_object:helpers/int-boolean} | ||
|
||
|
||
## {schema_string:helpers/transform/title} | ||
|
||
{schema_string:helpers/transform/description} | ||
|
||
{schema_object:helpers/transform} | ||
|
||
|
||
## {schema_string:helpers/visual-object/title} | ||
|
||
{schema_string:helpers/visual-object/description} | ||
|
||
{schema_object:helpers/visual-object} | ||
|
||
|
||
## {schema_string:helpers/color/title} | ||
|
||
{schema_string:helpers/color/description} | ||
|
||
{schema_object:helpers/color} | ||
|
||
|
||
## {schema_string:helpers/marker/title} | ||
|
||
{schema_string:helpers/marker/description} | ||
|
||
{schema_object:helpers/marker} | ||
|
||
|
||
## {schema_string:helpers/bezier/title} | ||
|
||
{schema_string:helpers/bezier/description} | ||
|
||
{schema_object:helpers/bezier} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
# Properties | ||
|
||
## Introduction | ||
|
||
### Base Keyframe | ||
|
||
{schema_string:properties/base-keyframe/description} | ||
|
||
{schema_object:properties/base-keyframe} | ||
|
||
### Easing Handle | ||
|
||
{schema_string:properties/easing-handle/description} | ||
|
||
{schema_object:properties/easing-handle} | ||
|
||
## Property types | ||
|
||
|
||
### {schema_string:properties/multi-dimensional/title} | ||
|
||
{schema_string:properties/multi-dimensional/description} | ||
|
||
{schema_object:properties/multi-dimensional} | ||
|
||
|
||
#### {schema_string:properties/vector-keyframe/title} | ||
|
||
{schema_string:properties/vector-keyframe/description} | ||
|
||
{schema_object:properties/vector-keyframe} | ||
EXPAND:#/$defs/properties/base-keyframe | ||
|
||
|
||
### {schema_string:properties/value/title} | ||
|
||
{schema_string:properties/value/description} | ||
|
||
{schema_object:properties/value} | ||
|
||
|
||
### Position | ||
|
||
{schema_string:properties/position/description} | ||
|
||
{schema_object:properties/position} | ||
|
||
|
||
#### {schema_string:properties/position-keyframe/title} | ||
|
||
{schema_string:properties/position-keyframe/description} | ||
|
||
{schema_object:properties/position-keyframe} | ||
EXPAND:#/$defs/properties/base-keyframe | ||
|
||
|
||
### {schema_string:properties/shape-property/title} | ||
|
||
{schema_string:properties/shape-property/description} | ||
|
||
{schema_object:properties/shape-property} | ||
|
||
|
||
#### {schema_string:properties/shape-keyframe/title} | ||
|
||
{schema_string:properties/shape-keyframe/description} | ||
|
||
{schema_object:properties/shape-keyframe} | ||
EXPAND:#/$defs/properties/base-keyframe | ||
|
||
### {schema_string:properties/color-value/title} | ||
|
||
{schema_string:properties/color-value/description} | ||
|
||
{schema_object:properties/color-value} | ||
|
||
|
||
#### {schema_string:properties/color-keyframe/title} | ||
|
||
{schema_string:properties/color-keyframe/description} | ||
|
||
{schema_object:properties/color-keyframe} | ||
EXPAND:#/$defs/properties/base-keyframe | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,92 @@ | ||
# Shapes | ||
|
||
The shape objects are divided in 4 categories: | ||
|
||
* [Raw Shapes](#raw-shapes) that define the actual curves but have no styling information | ||
* [Grouping](#grouping), used to organize collections of shape elements | ||
* [Styles](#styles), that define the visual appearance of raw shapes | ||
* [Modifiers](#modifiers) alter the curves of the raw shapes | ||
|
||
## {schema_string:shapes/shape-element/title} | ||
|
||
{schema_string:shapes/shape-element/description} | ||
|
||
{schema_object:shapes/shape-element} | ||
|
||
The `ty` property defines the specific element type based on the following values: | ||
|
||
{schema_subtype_table:shapes/all-shapes:ty} | ||
|
||
|
||
## Raw Shapes | ||
|
||
### {schema_string:shapes/shape/title} | ||
|
||
{schema_string:shapes/shape/description} | ||
|
||
{schema_object:shapes/shape} | ||
|
||
|
||
### {schema_string:shapes/ellipse/title} | ||
|
||
{schema_string:shapes/ellipse/description} | ||
|
||
{schema_object:shapes/ellipse} | ||
|
||
|
||
### {schema_string:shapes/path/title} | ||
|
||
{schema_string:shapes/path/description} | ||
|
||
{schema_object:shapes/path} | ||
|
||
|
||
### {schema_string:shapes/rectangle/title} | ||
|
||
{schema_string:shapes/rectangle/description} | ||
|
||
{schema_object:shapes/rectangle} | ||
|
||
## Grouping | ||
|
||
### {schema_string:shapes/group/title} | ||
|
||
{schema_string:shapes/group/description} | ||
|
||
{schema_object:shapes/group} | ||
|
||
### Transform | ||
|
||
{schema_string:shapes/transform/description} | ||
|
||
{schema_object:shapes/transform} | ||
|
||
## Styles | ||
|
||
### {schema_string:shapes/fill/title} | ||
|
||
{schema_string:shapes/fill/description} | ||
|
||
{schema_object:shapes/fill} | ||
|
||
|
||
## Modifiers | ||
|
||
### {schema_string:shapes/modifier/title} | ||
|
||
{schema_string:shapes/modifier/description} | ||
|
||
{schema_object:shapes/modifier} | ||
|
||
### {schema_string:shapes/trim-path/title} | ||
|
||
{schema_string:shapes/trim-path/description} | ||
|
||
{schema_object:shapes/trim-path} | ||
|
||
|
||
### {schema_string:shapes/shape-style/title} | ||
|
||
{schema_string:shapes/shape-style/description} | ||
|
||
{schema_object:shapes/shape-style} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
#!/usr/bin/env python3 | ||
import pathlib | ||
import argparse | ||
from schema_tools.schema import SchemaPath, Schema | ||
|
||
|
||
def print_object(obj: Schema): | ||
path = "/".join(obj.path.chunks[1:]) | ||
print("## {schema_string:%s/title}\n" % path) | ||
print("{schema_string:%s/description}\n" % path) | ||
print("{schema_object:%s}\n\n" % path) | ||
|
||
|
||
root = pathlib.Path(__file__).absolute().parent.parent | ||
|
||
parser = argparse.ArgumentParser() | ||
parser.add_argument( | ||
"--schema", | ||
help="Schema file", | ||
type=pathlib.Path, | ||
default=root / "docs" / "lottie.schema.json" | ||
) | ||
parser.add_argument( | ||
"path", | ||
help="Schema path", | ||
type=SchemaPath, | ||
) | ||
args = parser.parse_args() | ||
|
||
schema = Schema.load(args.schema).get_ref(args.path) | ||
|
||
if "type" in schema: | ||
print_object(schema) | ||
else: | ||
for v in schema: | ||
print_object(v) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters