MCPcopy
hub / github.com/donmccurdy/glTF-Transform / getCount

Method getCount

packages/core/src/properties/accessor.ts:307–310  ·  view source on GitHub ↗

* Number of elements in the accessor. An array of length 30, containing 10 `VEC3` elements, * will have a count of 10.

()

Source from the content-addressed store, hash-verified

305 * will have a count of 10.
306 */
307 public getCount(): number {
308 const array = this.get('array');
309 return array ? array.length / this.getElementSize() : 0;
310 }
311
312 /** Type of element stored in the accessor. `VEC2`, `VEC3`, etc. */
313 public getType(): GLTF.AccessorType {

Callers 15

getMinMethod · 0.95
getMaxMethod · 0.95
getMeshBoundsFunction · 0.45
interleaveAccessorsMethod · 0.45
concatSparseAccessorsMethod · 0.45
createAccessorDefMethod · 0.45
instance.test.tsFile · 0.45
reorder.test.tsFile · 0.45
simplify.test.tsFile · 0.45
splitPrimFunction · 0.45
weld.test.tsFile · 0.45
elementPairsFunction · 0.45

Calls 2

getElementSizeMethod · 0.95
getMethod · 0.80

Tested by 5

splitPrimFunction · 0.36
elementPairsFunction · 0.36
scaleAccessorFunction · 0.36
getTexCoordBoundsFunction · 0.36
getTexCoordAreaFunction · 0.36