-
Notifications
You must be signed in to change notification settings - Fork 1.1k
/
Copy pathanimation.sampler.schema.json
48 lines (48 loc) · 3.27 KB
/
animation.sampler.schema.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
{
"$schema": "http://json-schema.org/draft-04/schema",
"title": "Animation Sampler",
"type": "object",
"description": "Combines input and output accessors with an interpolation algorithm to define a keyframe graph (but not its target).",
"allOf": [ { "$ref": "glTFProperty.schema.json" } ],
"properties": {
"input": {
"allOf": [ { "$ref": "glTFid.schema.json" } ],
"description": "The index of an accessor containing keyframe input values, e.g., time.",
"gltf_detailedDescription": "The index of an accessor containing keyframe input values, e.g., time. That accessor must have componentType `FLOAT`. The values represent time in seconds with `time[0] >= 0.0`, and strictly increasing values, i.e., `time[n + 1] > time[n]`."
},
"interpolation": {
"description": "Interpolation algorithm.",
"default": "LINEAR",
"gltf_detailedDescription": "Interpolation algorithm.",
"anyOf": [
{
"enum": [ "LINEAR" ],
"description": "The animated values are linearly interpolated between keyframes. When targeting a rotation, spherical linear interpolation (slerp) should be used to interpolate quaternions. The number output of elements must equal the number of input elements."
},
{
"enum": [ "STEP" ],
"description": "The animated values remain constant to the output of the first keyframe, until the next keyframe. The number of output elements must equal the number of input elements."
},
{
"enum": [ "CATMULLROMSPLINE" ],
"description": "The animation's interpolation is computed using a uniform Catmull-Rom spline. The number of output elements must equal two more than the number of input elements. The first and last output elements represent the start and end tangents of the spline. There must be at least four keyframes when using this interpolation."
},
{
"enum": [ "CUBICSPLINE" ],
"description": "The animation's interpolation is computed using a cubic spline with specified tangents. The number of output elements must equal three times the number of input elements. For each input element, the output stores three elements, an in-tangent, a spline vertex, and an out-tangent. There must be at least two keyframes when using this interpolation."
},
{
"type": "string"
}
]
},
"output": {
"allOf": [ { "$ref": "glTFid.schema.json" } ],
"description": "The index of an accessor, containing keyframe output values.",
"gltf_detailedDescription": "The index of an accessor containing keyframe output values. When targeting TRS target, the `accessor.componentType` of the output values must be `FLOAT`. When targeting morph weights, the `accessor.componentType` of the output values must be `FLOAT` or normalized integer where each output element stores values with a count equal to the number of morph targets."
},
"extensions": { },
"extras": { }
},
"required": [ "input", "output" ]
}