Explorar o código

Merge pull request #126 from NASA-AMMOS/batchtable-docs

Docs: Add BatchTable docs
Garrett Johnson %!s(int64=4) %!d(string=hai) anos
pai
achega
aa695859f9
Modificáronse 1 ficheiros con 23 adicións e 0 borrados
  1. 23 0
      README.md

+ 23 - 0
README.md

@@ -516,6 +516,29 @@ priorityCallback = null : ( item ) => Number
 
 Function to derive the job priority of the given item. Higher priority values get processed first.
 
+## BatchTable
+
+### .getKeys
+
+```js
+getKeys() : Array<String>
+```
+
+Returns the keys of all the data in the batch table.
+
+### getData
+```js
+getData(
+	key : String,
+	defaultComponentType = null : String|null,
+	defaultType = null : String|null,
+) : Array|TypedArray
+```
+
+Returns the data associated with the `key` passed into the function. If the component and type are specified in the batch table contents then those values are used otherwise the values in `defaultComponentType` and `defaultType` are used.
+
+`defaultComponentType` can be set to `BYTE`, `UNSIGNED_BYTE`, `SHORT`, `UNSIGNED_SHORT`, `INT`, `UNSIGNED_INT`, `FLOAT`, or `DOUBLE`. `defaultType` can be set to `SCALAR`, `VEC2`, `VEC3`, or `VEC4`.
+
 # LICENSE
 
 The software is available under the [Apache V2.0 license](../LICENSE.txt).