Each array can be 1 of 4 things. A native JavaScript array, a TypedArray, a number, a FullArraySpec
If it's a native array then, if the name of the array is indices the data will be converted
to a Uint32Array, otherwise a Float32Array. Use a TypedArray or a FullArraySpec to choose a different type.
The FullArraySpectype is only used if it's not already a TypedArray
If it's a native array or a TypedArray or if numComponents in a FullArraySpec is not
specified it will be guessed. If the name contains 'coord', 'texture' or 'uv' then numComponents will be 2.
If the name contains 'color' or 'colour' then numComponents will be 4. Otherwise it's 3.
For attribute formats, guesses are made based on type and number of components. The guess is
based on this table where (d) is the default for that type if normalize is not specified
Named Arrays
A set of named arrays are passed to various functions like createBufferLayoutsFromArrays and createBuffersAndAttributesFromArrays
Each array can be 1 of 4 things. A native JavaScript array, a TypedArray, a number, a FullArraySpec
If it's a native array then, if the name of the array is
indices
the data will be converted to aUint32Array
, otherwise aFloat32Array
. Use a TypedArray or a FullArraySpec to choose a different type. The FullArraySpectype
is only used if it's not already a TypedArrayIf it's a native array or a TypedArray or if
numComponents
in a FullArraySpec is not specified it will be guessed. If the name contains 'coord', 'texture' or 'uv' then numComponents will be 2. If the name contains 'color' or 'colour' then numComponents will be 4. Otherwise it's 3.For attribute formats, guesses are made based on type and number of components. The guess is based on this table where (d) is the default for that type if
normalize
is not specified