glsl-modules
Advanced tools
@@ -34,4 +34,4 @@ "use strict"; | ||
| const [signature, returnType, name, argsString] = match.groups; | ||
| // Special case layout(location = 0), which may be incorrectly captured | ||
| if (name === "layout") | ||
| // Special cases layout(location = 0) else if (), which may be incorrectly captured | ||
| if (name === "layout" || name === "if") | ||
| continue; | ||
@@ -38,0 +38,0 @@ const definition = this.code.slice(startIndex, endIndex); |
@@ -85,3 +85,4 @@ "use strict"; | ||
| for (let j = 0, n = hasAlpha ? 4 : 3; j < n; j++) { | ||
| components.push(data[4 * i + j] / 255); | ||
| const component = (data[4 * i + j] / 255).toFixed(4); | ||
| components.push(component); | ||
| } | ||
@@ -88,0 +89,0 @@ const colorVector = `vec${hasAlpha ? 4 : 3}(${components.join(", ")})`; |
+2
-2
| { | ||
| "name": "glsl-modules", | ||
| "version": "0.4.0", | ||
| "version": "0.5.0", | ||
| "exports": { | ||
@@ -39,3 +39,3 @@ ".": { | ||
| "type": "git", | ||
| "url": "https://github.com/mathiasisaksen/glsl-modules.git" | ||
| "url": "git+https://github.com/mathiasisaksen/glsl-modules.git" | ||
| }, | ||
@@ -42,0 +42,0 @@ "bugs": "https://github.com/mathiasisaksen/glsl-modules/issues", |
100598
0.09%1969
0.05%