forked from KhronosGroup/glTF
-
Notifications
You must be signed in to change notification settings - Fork 0
/
animation.sampler.schema.json
44 lines (44 loc) · 2.88 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
{
"$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": [ "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 translation or scale paths, the `accessor.componentType` of the output values must be `FLOAT`. When targeting rotation or morph weights, the `accessor.componentType` of the output values must be `FLOAT` or normalized integer. For weights, each output element stores `SCALAR` values with a count equal to the number of morph targets."
},
"extensions": { },
"extras": { }
},
"required": [ "input", "output" ]
}