| 40596 | exports.default = LayerAttribute; |
| 40597 | |
| 40598 | function glArrayFromType(glType) { |
| 40599 | var _ref3 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, |
| 40600 | _ref3$clamped = _ref3.clamped, |
| 40601 | clamped = _ref3$clamped === void 0 ? true : _ref3$clamped; // Sorted in some order of likelihood to reduce amount of comparisons |
| 40602 | |
| 40603 | |
| 40604 | switch (glType) { |
| 40605 | case _constants.default.FLOAT: |
| 40606 | return Float32Array; |
| 40607 | |
| 40608 | case _constants.default.UNSIGNED_SHORT: |
| 40609 | case _constants.default.UNSIGNED_SHORT_5_6_5: |
| 40610 | case _constants.default.UNSIGNED_SHORT_4_4_4_4: |
| 40611 | case _constants.default.UNSIGNED_SHORT_5_5_5_1: |
| 40612 | return Uint16Array; |
| 40613 | |
| 40614 | case _constants.default.UNSIGNED_INT: |
| 40615 | return Uint32Array; |
| 40616 | |
| 40617 | case _constants.default.UNSIGNED_BYTE: |
| 40618 | return clamped ? Uint8ClampedArray : Uint8Array; |
| 40619 | |
| 40620 | case _constants.default.BYTE: |
| 40621 | return Int8Array; |
| 40622 | |
| 40623 | case _constants.default.SHORT: |
| 40624 | return Int16Array; |
| 40625 | |
| 40626 | case _constants.default.INT: |
| 40627 | return Int32Array; |
| 40628 | |
| 40629 | default: |
| 40630 | throw new Error('Failed to deduce type from array'); |
| 40631 | } |
| 40632 | } |
| 40633 | /* eslint-enable complexity */ |
| 40634 | },{"../utils/assert":"R2tg","luma.gl/constants":"zLGf","luma.gl":"iiNl","../utils/log":"mqAj"}],"WdYA":[function(require,module,exports) { |
| 40635 | "use strict"; |