Skip to content

Commit

Permalink
Renamed offsetsElementType to offsetsComponentType and other wording …
Browse files Browse the repository at this point in the history
…tweaks
  • Loading branch information
lilleyse committed Oct 8, 2020
1 parent 4b9f938 commit 09247af
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@
"EXT_feature_metadata": {
"textures": [
{
"name": "NVDI",
"name": "NDVI",
"index": 1,
"texCoord": 1
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,25 +20,26 @@
"enum": [
"SCALAR", "ARRAY", "VARIABLE_SIZE_ARRAY", "STRING", "BINARY"
],
"description": "The type of each element of the property array. This value may be a `SCALAR` (boolean, integer, or float types), or it may be an array type. If `SCALAR`, `ARRAY`, or `VARIABLE_SIZE_ARRAY` is used, then `componentType` must also be specified. `ARRAY` is a fixed-length array, and requires a `componentsPerElement` property. `VARIABLE_SIZE_ARRAY` and `STRING` also require a corresponding `offsetsBufferView` to indicate where each string starts in the buffer. `STRING` is similar to a `VARIABLE_SIZE_ARRAY` of `UINT8`, except that the contents will be a UTF-8 encoded string. `BINARY` is an alias for a `VARIABLE_SIZE_ARRAY` of `UINT8`. This adds semantic meaning that the element is used as a binary blob, rather than an array of numbers"
"description": "The type of each element of the property array. This value may be a `SCALAR` (boolean, integer, or float types), or it may be an array type. If `SCALAR`, `ARRAY`, or `VARIABLE_SIZE_ARRAY` is used, then `componentType` must also be specified. `ARRAY` is a fixed-length array, and requires a `componentsPerElement` property. `VARIABLE_SIZE_ARRAY`, `STRING`, and `BINARY` also require a corresponding `offsetsBufferView` to indicate where each element starts in the buffer. `STRING` is similar to a `VARIABLE_SIZE_ARRAY` of `UINT8`, except that the contents will be a UTF-8 encoded string. `BINARY` is an alias for a `VARIABLE_SIZE_ARRAY` of `UINT8`. This adds semantic meaning that the element is used as a binary blob, rather than an array of numbers",
"default": "SCALAR"
},
"componentType": {
"enum": [
"BOOLEAN",
"INT8", "UINT8", "INT16", "UINT16", "INT32", "UINT32", "INT64", "UINT64",
"FLOAT16", "FLOAT32", "FLOAT64"
],
"description": "When `elementType` is `ARRAY` or `VARIABLE_SIZE_ARRAY`, this indicates the type of each component of the array. This property is not used for the other element types (even `BINARY` and `STRING`)."
"description": "When `elementType` is `ARRAY` or `VARIABLE_SIZE_ARRAY`, this indicates the type of each component of the array. When `elementType` is `SCALAR`, this indicates the type of the scalar. This property is not used for the other element types (even `BINARY` and `STRING`)."
},
"componentsPerElement": {
"type": "integer",
"minimum": 1,
"default": 1,
"description": "The number of values per element for `ARRAY` elements."
"description": "The number of components per element for `ARRAY` elements."
},
"normalized": {
"type": "boolean",
"description": "Specifies whether integer values are normalized. This applies both when `elementType` is an integer `SCALAR` type, or when `elementType` is `ARRAY` or `VARIABLE_SIZE_ARRAY` with an `componentType` that is an integer. For unsigned integer types, values are normalized between [0, 1]. For signed integer types, values are normalized between [-1, 1]. For all other types, this property is ignored.",
"description": "Specifies whether integer values are normalized. This applies both when `elementType` is an integer `SCALAR` type, or when `elementType` is `ARRAY` or `VARIABLE_SIZE_ARRAY` with a `componentType` that is an integer. For unsigned integer types, values are normalized between [0, 1]. For signed integer types, values are normalized between [-1, 1]. For all other types, this property is ignored.",
"default": false
},
"max": {
Expand All @@ -62,12 +63,5 @@
},
"dependencies": {
"componentsPerElement": ["componentType"]
},
"required": ["elementType"],
"definitions": {
"scalar": {
"type": "string",
"description": "Atomic values that can be used as either an `elementType` (for simple properties) or `componentType` (as part of an `ARRAY`)"
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,17 @@
},
"bufferView": {
"allOf": [ { "$ref": "glTFid.schema.json" } ],
"description": "The index of the `bufferView` containing property array data. The bufferView must be aligned to a multiple of 8 bytes. For a GLB file, this is measured relative to the beginning of the file. For a glTF + BIN file, this is relative to the beginning of the BIN file. To accomplish this, padd each bufferView to 8-bit alignment using 0 (NUL) characters."
"description": "The index of the `bufferView` containing property array data. The bufferView must be aligned to a multiple of 8 bytes. For a GLB file, this is measured relative to the beginning of the file. For a glTF + BIN file, this is relative to the beginning of the BIN file."
},
"offsetsElementType": {
"offsetsComponentType": {
"type": "string",
"default": "UINT32",
"enum": ["UINT8", "UINT16", "UINT32", "UINT64"],
"description": "The size of each offset in the offsetsBufferView."
"description": "The size of each offset in the `offsetsBufferView`."
},
"offsetsBufferView": {
"allOf": [ { "$ref": "glTFid.schema.json" } ],
"description": "The index of the `bufferView` containing offsets to elements. Required for `VARIABLE_LENGTH_ARRAY`, `BINARY` or `STRING` element types. The offsets buffer contains `elementCount + 1` unsigned integers. The size of these offsets is determined by `offsetsElementType`. The offsets represent the start position of each element in the buffer, with the last offset representing the position after the last element. The byte length of strings, binary blobs, or element arrays is computed using the difference between the current offset and the subsequent offset."
"description": "The index of the `bufferView` containing offsets to elements. Required for `VARIABLE_LENGTH_ARRAY` element type. Required for `BINARY` or `STRING` element types when `elementByteLength` is not specified. The offsets buffer contains `elementCount + 1` unsigned integers. The size of these offsets is determined by `offsetsComponentType`. The offsets represent the start position of each element in the buffer, with the last offset representing the position after the last element. The byte length of strings and binary blobs and the array length of element arrays is computed using the difference between the current offset and the subsequent offset."
},
"extensions": { },
"extras": { }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
},
"featureClass": {
"type": "string",
"minLength" : 1,
"description": "The ID of the feature class."
},
"featureCount": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"channel": {
"type": "string",
"pattern": "^[rgba]$",
"description": "The channel containing feature IDs. Feature IDs must be whole numbers in the range `[0, elementCount - 1]`, where `elementCount` is the total number of elements in each property array. Texel values must not be normalized. The texture's sampler must use nearest neighbor filtering - i.e. `minFilter` and `magFilter` must be `9728` (`NEAREST`)."
"description": "The channel containing feature IDs. Feature IDs must be whole numbers in the range `[0, elementCount - 1]`, where `elementCount` is the total number of elements in each property array. Texel values must not be normalized. Texture filtering should be disabled when fetching feature IDs."
},
"extensions": { },
"extras": { }
Expand Down

0 comments on commit 09247af

Please sign in to comment.