(vertexArray, attribute, accessor, header)
| 66589 | return table; |
| 66590 | } |
| 66591 | function getDebugTableRow(vertexArray, attribute, accessor, header) { |
| 66592 | var _ref4; |
| 66593 | var gl = vertexArray.gl; |
| 66594 | if (!attribute) { |
| 66595 | var _ref2; |
| 66596 | return _ref2 = {}, (0, _definePropertyDefault.default)(_ref2, header, "null"), (0, _definePropertyDefault.default)(_ref2, "Format ", "N/A"), _ref2; |
| 66597 | } |
| 66598 | var type = "NOT PROVIDED"; |
| 66599 | var size = "N/A"; |
| 66600 | var verts = "N/A"; |
| 66601 | var bytes = "N/A"; |
| 66602 | var isInteger; |
| 66603 | var marker; |
| 66604 | var value; |
| 66605 | if (accessor) { |
| 66606 | type = accessor.type; |
| 66607 | size = accessor.size; |
| 66608 | type = String(type).replace("Array", ""); |
| 66609 | isInteger = type.indexOf("nt") !== -1; |
| 66610 | } |
| 66611 | if (attribute instanceof (0, _bufferDefault.default)) { |
| 66612 | var _ref3; |
| 66613 | var buffer = attribute; |
| 66614 | var _buffer$getDebugData = buffer.getDebugData(), data = _buffer$getDebugData.data, modified = _buffer$getDebugData.modified; |
| 66615 | marker = modified ? "*" : ""; |
| 66616 | value = data; |
| 66617 | bytes = buffer.byteLength; |
| 66618 | verts = bytes / data.BYTES_PER_ELEMENT / size; |
| 66619 | var format; |
| 66620 | if (accessor) { |
| 66621 | var instanced = accessor.divisor > 0; |
| 66622 | format = "".concat(instanced ? "I " : "P ", " ").concat(verts, " (x").concat(size, "=").concat(bytes, " bytes ").concat((0, _webglUtils.getKey)(gl, type), ")"); |
| 66623 | } else { |
| 66624 | isInteger = true; |
| 66625 | format = "".concat(bytes, " bytes"); |
| 66626 | } |
| 66627 | return _ref3 = {}, (0, _definePropertyDefault.default)(_ref3, header, "".concat(marker).concat((0, _utils.formatValue)(value, { |
| 66628 | size: size, |
| 66629 | isInteger: isInteger |
| 66630 | }))), (0, _definePropertyDefault.default)(_ref3, "Format ", format), _ref3; |
| 66631 | } |
| 66632 | value = attribute; |
| 66633 | size = attribute.length; |
| 66634 | type = String(attribute.constructor.name).replace("Array", ""); |
| 66635 | isInteger = type.indexOf("nt") !== -1; |
| 66636 | return _ref4 = {}, (0, _definePropertyDefault.default)(_ref4, header, "".concat((0, _utils.formatValue)(value, { |
| 66637 | size: size, |
| 66638 | isInteger: isInteger |
| 66639 | }), " (constant)")), (0, _definePropertyDefault.default)(_ref4, "Format ", "".concat(size, "x").concat(type, " (constant)")), _ref4; |
| 66640 | } |
| 66641 | function getGLSLDeclaration(name, accessor) { |
| 66642 | var type = accessor.type, size = accessor.size; |
| 66643 | var typeAndName = (0, _attributeUtils.getCompositeGLType)(type, size); |
no test coverage detected