/
bufferView.schema.json
57 lines (57 loc) · 2.02 KB
/
bufferView.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
49
50
51
52
53
54
55
56
57
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "bufferView.schema.json",
"title": "Buffer View",
"type": "object",
"description": "A view into a buffer generally representing a subset of the buffer.",
"allOf": [ { "$ref": "glTFChildOfRootProperty.schema.json" } ],
"properties": {
"buffer": {
"allOf": [ { "$ref": "glTFid.schema.json" } ],
"description": "The index of the buffer."
},
"byteOffset": {
"type": "integer",
"description": "The offset into the buffer in bytes.",
"minimum": 0,
"default": 0
},
"byteLength": {
"type": "integer",
"description": "The length of the bufferView in bytes.",
"minimum": 1
},
"byteStride": {
"type": "integer",
"description": "The stride, in bytes.",
"minimum": 4,
"maximum": 252,
"multipleOf": 4,
"gltf_detailedDescription": "The stride, in bytes, between vertex attributes. When this is not defined, data is tightly packed. When two or more accessors use the same buffer view, this field **MUST** be defined.",
"gltf_webgl": "`vertexAttribPointer()` stride parameter"
},
"target": {
"description": "The hint representing the intended GPU buffer type to use with this buffer view.",
"gltf_webgl": "`bindBuffer()`",
"anyOf": [
{
"const": 34962,
"description": "ARRAY_BUFFER",
"type": "integer"
},
{
"const": 34963,
"description": "ELEMENT_ARRAY_BUFFER",
"type": "integer"
},
{
"type": "integer"
}
]
},
"name": { },
"extensions": { },
"extras": { }
},
"required": [ "buffer", "byteLength" ]
}