Skip to content

Commit

Permalink
Ensure all schema objects are in the docs
Browse files Browse the repository at this point in the history
  • Loading branch information
mbasaglia committed Oct 27, 2021
1 parent 3e662d2 commit a330dc2
Show file tree
Hide file tree
Showing 34 changed files with 307 additions and 182 deletions.
11 changes: 10 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ MKDOCS ?= PYTHONPATH="$(SOURCE_DIR)/extensions" mkdocs
SOURCE_DIR = $(dir $(abspath $(lastword $(MAKEFILE_LIST))))
OUTPUT_DIR ?= $(CURDIR)/site

.PHONY: all install_dependencies docs docs_serve lottie.schema.json validate
.PHONY: all install_dependencies docs docs_serve lottie.schema.json validate validate_links


all: docs
Expand All @@ -21,6 +21,11 @@ $(SOURCE_DIR)/docs/schema/lottie.schema.json: $(SOURCE_DIR)/tools/schema-merge.p
docs:$(SOURCE_DIR)/docs/schema/lottie.schema.json
$(MKDOCS) build -f $(SOURCE_DIR)/mkdocs.yml -d $(OUTPUT_DIR)

$(OUTPUT_DIR)/index.html:$(wildcard $(SOURCE_DIR)/docs/**/*)
$(OUTPUT_DIR)/index.html:$(SOURCE_DIR)/docs/schema/lottie.schema.json
$(OUTPUT_DIR)/index.html:$(SOURCE_DIR)/extensions/md_extensions.py
$(OUTPUT_DIR)/index.html:docs

docs_serve:$(SOURCE_DIR)/docs/schema/lottie.schema.json
$(MKDOCS) serve -f $(SOURCE_DIR)/mkdocs.yml

Expand All @@ -29,3 +34,7 @@ install_dependencies:

validate: $(SOURCE_DIR)/docs/schema/lottie.schema.json
$(SOURCE_DIR)/tools/schema-validate.py


validate_links:$(OUTPUT_DIR)/index.html
$(SOURCE_DIR)/tools/schema-validate.py --html $(OUTPUT_DIR)
4 changes: 4 additions & 0 deletions docs/animation.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,7 @@ program used to create the file and other useful information:

{schema_object:animation/metadata}

## Motion Blur

{schema_object:animation/motion-blur}

6 changes: 6 additions & 0 deletions docs/concepts.md
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,12 @@ In tangent y :slider:assets[0].layers[1].shapes[0].ks.k.i[2][1]!-1,assets[0].lay
Hold:select:layers[0].ks.p.k[0].h,layers[0].ks.p.k[1].h:No=0:Yes=1
:json:layers[0].ks.p

### Animated Position

Position properties have additional attributes in their keyframes to represent bezier tangents in the path followed by the animation

{schema-object:animated-properties/position-keyframe}

## Transform

This represents a layer or shape transform.
Expand Down
12 changes: 9 additions & 3 deletions docs/constants.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,11 @@ Opacity:slider:layers[0].ks.o.k:0:50:100
{schema_enum:line-cap}


## {schema_attribute:title:constants/line-cap}
## {schema_attribute:title:constants/line-join}

{schema_attribute:description:constants/line-cap}
{schema_attribute:description:constants/line-join}

{schema_enum:line-cap}
{schema_enum:line-join}


## {schema_attribute:title:constants/mask-mode}
Expand Down Expand Up @@ -126,3 +126,9 @@ Matte Mode:enum:layers[2].tt:matte-mode:1
{schema_attribute:description:constants/trim-multiple-shapes}

{schema_enum:trim-multiple-shapes}

## {schema_attribute:title:constants/text-caps}

{schema_attribute:description:constants/text-caps}

{schema_enum:text-caps}
42 changes: 21 additions & 21 deletions docs/effects.md
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ SKIP:#/$defs/effects/effect

{schema_effect:effects/matte3-effect}

### Guassian Blur Effect
### Gaussian Blur Effect

{schema_object:effects/gaussian-blur-effect}
SKIP:#/$defs/effects/effect
Expand Down Expand Up @@ -208,7 +208,7 @@ Blur:slider:layers[0].ef[0].ef[4].v.k:0:7:512
:json:layers[0].ef[0]


### Radial Wipe
### Radial Wipe Effect

{schema_object:effects/radial-wipe-effect}
SKIP:#/$defs/effects/effect
Expand All @@ -218,7 +218,7 @@ SKIP:#/$defs/effects/effect

## Effect Values

{schema_object:effects/effect-value}
{schema_object:effect-values/effect-value}
EXPAND:#/$defs/helpers/visual-object


Expand All @@ -237,45 +237,45 @@ EXPAND:#/$defs/helpers/visual-object

### No Value

{schema_object:effects/effect-no-value}
SKIP:#/$defs/effects/effect-value
{schema_object:effect-values/no-value}
SKIP:#/$defs/effect-values/effect-value

### Slider

{schema_object:effects/effect-value-slider}
SKIP:#/$defs/effects/effect-value
{schema_object:effect-values/slider}
SKIP:#/$defs/effect-values/effect-value

### Angle

{schema_object:effects/effect-value-angle}
SKIP:#/$defs/effects/effect-value
{schema_object:effect-values/angle}
SKIP:#/$defs/effect-values/effect-value

### Color

{schema_object:effects/effect-value-color}
SKIP:#/$defs/effects/effect-value
{schema_object:effect-values/color}
SKIP:#/$defs/effect-values/effect-value

### Point

{schema_object:effects/effect-value-point}
SKIP:#/$defs/effects/effect-value
{schema_object:effect-values/point}
SKIP:#/$defs/effect-values/effect-value

### Checkbox

{schema_object:effects/effect-value-checkbox}
SKIP:#/$defs/effects/effect-value
{schema_object:effect-values/checkbox}
SKIP:#/$defs/effect-values/effect-value

### Ignored

{schema_object:effects/effect-value-ignored}
SKIP:#/$defs/effects/effect-value
{schema_object:effect-values/ignored}
SKIP:#/$defs/effect-values/effect-value

### Drop Down

{schema_object:effects/effect-value-drop-down}
SKIP:#/$defs/effects/effect-value
{schema_object:effect-values/drop-down}
SKIP:#/$defs/effect-values/effect-value

### Layer

{schema_object:effects/effect-value-layer}
SKIP:#/$defs/effects/effect-value
{schema_object:effect-values/layer}
SKIP:#/$defs/effect-values/effect-value
4 changes: 2 additions & 2 deletions docs/layers.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ There are several layer types, which is specified by the `ty` attribute:

|`ty`| Layer Type | Description |
|----|----------------------------------|-----------------------------------------------------------------------------------------------|
|`0` |[Precomposition](#precomp-layer) |Renders a [Precomposition](assets.md#precomposition) |
|`0` |[Precomposition](#precomposition-layer)|Renders a [Precomposition](assets.md#precomposition) |
|`1` |[Solid Color](#solid-color-layer) |Static rectangle filling the canvas with a single color |
|`2` |[Image](#image-layer) |Renders an [Image](assets.md#image) |
|`3` |[Null (Empty)](#null-layer) |No contents, only used for [parenting](#parenting) |
Expand Down Expand Up @@ -115,7 +115,7 @@ The only special property for this layer is **shapes**, an [array](concepts.md#l

{schema_object:layers/shape-layer}

## PreComp Layer
## Precomposition Layer

This layer renders a [precomposition](assets.md#precomposition).

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"description": "",
"allOf": [
{
"$ref": "#/$defs/effects/effect-value"
"$ref": "#/$defs/effect-values/effect-value"
},
{
"type": "object",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"description": "",
"allOf": [
{
"$ref": "#/$defs/effects/effect-value"
"$ref": "#/$defs/effect-values/effect-value"
},
{
"type": "object",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"description": "",
"allOf": [
{
"$ref": "#/$defs/effects/effect-value"
"$ref": "#/$defs/effect-values/effect-value"
},
{
"type": "object",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"description": "",
"allOf": [
{
"$ref": "#/$defs/effects/effect-value"
"$ref": "#/$defs/effect-values/effect-value"
},
{
"type": "object",
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"description": "",
"allOf": [
{
"$ref": "#/$defs/effects/effect-value"
"$ref": "#/$defs/effect-values/effect-value"
},
{
"type": "object",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"description": "",
"allOf": [
{
"$ref": "#/$defs/effects/effect-value"
"$ref": "#/$defs/effect-values/effect-value"
},
{
"type": "object",
Expand Down
6 changes: 6 additions & 0 deletions docs/schema/effect-values/no-value.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"title": "Effect No Value",
"description": ""
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"description": "",
"allOf": [
{
"$ref": "#/$defs/effects/effect-value"
"$ref": "#/$defs/effect-values/effect-value"
},
{
"type": "object",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"description": "",
"allOf": [
{
"$ref": "#/$defs/effects/effect-value"
"$ref": "#/$defs/effect-values/effect-value"
},
{
"type": "object",
Expand Down
22 changes: 11 additions & 11 deletions docs/schema/effects/change-to-color-effect.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,47 +21,47 @@
"prefixItems": [
{
"title": "from_color",
"$ref": "#/$defs/effects/effect-value-color"
"$ref": "#/$defs/effect-values/color"
},
{
"title": "to_color",
"$ref": "#/$defs/effects/effect-value-color"
"$ref": "#/$defs/effect-values/color"
},
{
"title": "change",
"$ref": "#/$defs/effects/effect-value-drop-down"
"$ref": "#/$defs/effect-values/drop-down"
},
{
"title": "change_by",
"$ref": "#/$defs/effects/effect-value-drop-down"
"$ref": "#/$defs/effect-values/drop-down"
},
{
"title": "tolerance",
"$ref": "#/$defs/effects/effect-value-ignored"
"$ref": "#/$defs/effect-values/ignored"
},
{
"title": "hue",
"$ref": "#/$defs/effects/effect-value-slider"
"$ref": "#/$defs/effect-values/slider"
},
{
"title": "lightness",
"$ref": "#/$defs/effects/effect-value-slider"
"$ref": "#/$defs/effect-values/slider"
},
{
"title": "saturation",
"$ref": "#/$defs/effects/effect-value-slider"
"$ref": "#/$defs/effect-values/slider"
},
{
"title": "saturation_",
"$ref": "#/$defs/effects/effect-value-ignored"
"$ref": "#/$defs/effect-values/ignored"
},
{
"title": "softness",
"$ref": "#/$defs/effects/effect-value-slider"
"$ref": "#/$defs/effect-values/slider"
},
{
"title": "view_correction",
"$ref": "#/$defs/effects/effect-value-drop-down"
"$ref": "#/$defs/effect-values/drop-down"
}
]
}
Expand Down
10 changes: 5 additions & 5 deletions docs/schema/effects/drop-shadow-effect.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,24 +21,24 @@
"prefixItems": [
{
"title": "color",
"$ref": "#/$defs/effects/effect-value-color"
"$ref": "#/$defs/effect-values/color"
},
{
"title": "opacity",
"description": "Opacity between 0 and 255",
"$ref": "#/$defs/effects/effect-value-slider"
"$ref": "#/$defs/effect-values/slider"
},
{
"title": "angle",
"$ref": "#/$defs/effects/effect-value-angle"
"$ref": "#/$defs/effect-values/angle"
},
{
"title": "distance",
"$ref": "#/$defs/effects/effect-value-slider"
"$ref": "#/$defs/effect-values/slider"
},
{
"title": "blur",
"$ref": "#/$defs/effects/effect-value-slider"
"$ref": "#/$defs/effect-values/slider"
}
]
}
Expand Down
24 changes: 0 additions & 24 deletions docs/schema/effects/effect-no-value.json

This file was deleted.

Loading

0 comments on commit a330dc2

Please sign in to comment.