UNPKG

@pixi/utils

Version:

Collection of utilities used by PixiJS

15 lines (14 loc) 483 B
function getBufferType(array) { if (array.BYTES_PER_ELEMENT === 4) return array instanceof Float32Array ? "Float32Array" : array instanceof Uint32Array ? "Uint32Array" : "Int32Array"; if (array.BYTES_PER_ELEMENT === 2) { if (array instanceof Uint16Array) return "Uint16Array"; } else if (array.BYTES_PER_ELEMENT === 1 && array instanceof Uint8Array) return "Uint8Array"; return null; } export { getBufferType }; //# sourceMappingURL=getBufferType.mjs.map