MCPcopy Index your code
hub / github.com/processing/p5.js / _getShaderAttributes

Method _getShaderAttributes

src/webgpu/p5.RendererWebGPU.js:2253–2259  ·  view source on GitHub ↗
(shader)

Source from the content-addressed store, hash-verified

2251 }
2252
2253 _getShaderAttributes(shader) {
2254 const mainMatch = /fn main\(.+:\s*([^\s\)]+)/.exec(shader._vertSrc);
2255 if (!mainMatch) throw new Error("Can't find `fn main` in vertex shader source");
2256 const inputType = mainMatch[1];
2257
2258 return this._parseStruct(shader.vertSrc(), inputType);
2259 }
2260
2261 getUniformMetadata(shader) {
2262 // Parse all uniform struct bindings in group 0.

Callers

nothing calls this directly

Calls 2

_parseStructMethod · 0.95
vertSrcMethod · 0.80

Tested by

no test coverage detected