浏览代码

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

Docs: Add BatchTable docs
Garrett Johnson 4 年之前
父节点
当前提交
aa695859f9
共有 1 个文件被更改,包括 23 次插入0 次删除
  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.
 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
 # LICENSE
 
 
 The software is available under the [Apache V2.0 license](../LICENSE.txt).
 The software is available under the [Apache V2.0 license](../LICENSE.txt).