()
| 27977 | |
| 27978 | // Creates object suitable as input for console.table |
| 27979 | function getDebugTableForVertexArray() { |
| 27980 | var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}, |
| 27981 | vertexArray = _ref.vertexArray, |
| 27982 | _ref$header = _ref.header, |
| 27983 | header = _ref$header === void 0 ? 'Attributes' : _ref$header; |
| 27984 | |
| 27985 | if (!vertexArray.configuration) { |
| 27986 | return {}; |
| 27987 | } |
| 27988 | |
| 27989 | var table = {}; // {[header]: {}}; |
| 27990 | // Add index (elements) if available |
| 27991 | |
| 27992 | if (vertexArray.elements) { |
| 27993 | // const elements = Object.assign({size: 1}, vertexArray.elements); |
| 27994 | table.ELEMENT_ARRAY_BUFFER = getDebugTableRow(vertexArray, vertexArray.elements, null, header); |
| 27995 | } // Add used attributes |
| 27996 | |
| 27997 | |
| 27998 | var attributes = vertexArray.values; |
| 27999 | |
| 28000 | for (var attributeLocation in attributes) { |
| 28001 | var info = vertexArray._getAttributeInfo(attributeLocation); |
| 28002 | |
| 28003 | if (info) { |
| 28004 | var rowHeader = "".concat(attributeLocation, ": ").concat(info.name); |
| 28005 | var accessor = vertexArray.accessors[info.location]; |
| 28006 | |
| 28007 | if (accessor) { |
| 28008 | rowHeader = "".concat(attributeLocation, ": ").concat(getGLSLDeclaration(info.name, accessor)); |
| 28009 | } |
| 28010 | |
| 28011 | table[rowHeader] = getDebugTableRow(vertexArray, attributes[attributeLocation], accessor, header); |
| 28012 | } |
| 28013 | } |
| 28014 | |
| 28015 | return table; |
| 28016 | } |
| 28017 | /* eslint-disable max-statements */ |
| 28018 | |
| 28019 |
nothing calls this directly
no test coverage detected