forked from KhronosGroup/glTF
-
Notifications
You must be signed in to change notification settings - Fork 0
/
mesh.primitive.schema.json
39 lines (39 loc) · 2.07 KB
/
mesh.primitive.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
{
"$schema" : "http://json-schema.org/draft-03/schema",
"title" : "primitive",
"type" : "object",
"description" : "Geometry to be rendered with the given material.",
"extends" : { "$ref" : "glTFProperty.schema.json" },
"properties" : {
"attributes" : {
"type" : "object",
"description" : "A dictionary object of strings, where each string is the ID of the accessor containing an attribute.",
"properties" : {
},
"additionalProperties" : {
"$ref" : "mesh.primitive.attribute.schema.json"
},
"default" : {}
},
"indices" : {
"extends" : { "$ref" : "glTFid.schema.json" },
"description" : "The ID of the accessor that contains the indices.",
"gltf_detailedDescription" : "The ID of the accessor that contains the indices. When this is not defined, the primitives should be rendered without indices using `drawArrays()`. When defined, the accessor must contain indices: the bufferView referenced by the accessor must have a target equal to 34963 (ELEMENT_ARRAY_BUFFER); a byteStride that is tightly packed, i.e., 0 or the byte size of componentType in bytes; componentType must be 5121 (UNSIGNED_BYTE) or 5123 (UNSIGNED_SHORT); and type must be \"SCALAR\"."
},
"material" : {
"extends" : { "$ref" : "glTFid.schema.json" },
"description" : "The ID of the material to apply to this primitive when rendering.",
"required" : true
},
"mode" : {
"type" : "integer",
"description" : "The type of primitives to render.",
"enum" : [0, 1, 2, 3, 4, 5, 6],
"gltf_enumNames" : ["POINTS", "LINES", "LINE_LOOP", "LINE_STRIP", "TRIANGLES", "TRIANGLE_STRIP", "TRIANGLE_FAN"],
"default" : 4,
"gltf_detailedDescription" : "The type of primitives to render. All valid values correspond to WebGL enums."
}
},
"additionalProperties" : false,
"gltf_webgl" : "`drawElements()` and `drawArrays()`"
}