-
Notifications
You must be signed in to change notification settings - Fork 1.1k
/
Copy pathanimation.sampler.schema.json
44 lines (44 loc) · 2.49 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": "https://json-schema.org/draft/2020-12/schema",
"$id": "animation.sampler.schema.json",
"title": "Animation Sampler",
"type": "object",
"description": "An animation sampler combines timestamps with a sequence of output values and defines an interpolation algorithm.",
"allOf": [ { "$ref": "glTFProperty.schema.json" } ],
"properties": {
"input": {
"allOf": [ { "$ref": "glTFid.schema.json" } ],
"description": "The index of an accessor containing keyframe timestamps.",
"gltf_detailedDescription": "The index of an accessor containing keyframe timestamps. The accessor **MUST** be of scalar type with floating-point components. 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": [
{
"const": "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 of output elements **MUST** equal the number of input elements."
},
{
"const": "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."
},
{
"const": "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."
},
"extensions": { },
"extras": { }
},
"required": [ "input", "output" ]
}