Skip to content

Commit

Permalink
[node-border] Cleans code
Browse files Browse the repository at this point in the history
  • Loading branch information
jacomyal committed Mar 26, 2024
1 parent 318864b commit 8d4bd70
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
3 changes: 0 additions & 3 deletions packages/node-border/src/factory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,6 @@ export default function getNodeBorderProgram<
...borders.flatMap(({ color }, i) => ("value" in color ? [`u_borderColor_${i + 1}`] : [])),
];

console.log(getVertexShader(options));
console.log(getFragmentShader(options));

return class NodeBorderProgram<
N extends Attributes = Attributes,
E extends Attributes = Attributes,
Expand Down
2 changes: 1 addition & 1 deletion packages/node-border/src/shader-vert.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ ${borders
.flatMap(({ size }, i) => (!("fill" in size) ? [`borderSize_${i + 1}`] : []))
.join(" + ")}) ) / ${fillCounts};
${borders.flatMap(({ size }, i) => ("fill" in size ? [` float borderSize_${i + 1} = fillBorderSize;`] : [])).join("\n")}
// Finally, normalize all border sizes, to start from the full size and to end with the smallest:
float v_borderSize_0 = v_radius;
${borders.map((_, i) => ` v_borderSize_${i + 1} = v_borderSize_${i} - borderSize_${i + 1};`).join("\n")}
Expand Down

0 comments on commit 8d4bd70

Please sign in to comment.