We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4bcbbcd commit f5a864bCopy full SHA for f5a864b
src/webgl/GeometryBuilder.js
@@ -66,6 +66,21 @@ class GeometryBuilder {
66
);
67
}
68
if (this.renderer._doStroke) {
69
+ input.edges.forEach(edge => {
70
+ edge.forEach(idx => {
71
+ // Ensure each edge (stroke) vertex gets the 'len' property from the corresponding fill vertex
72
+ const len = (input.vertices[idx] && input.vertices[idx].len)
73
+ ? input.vertices[idx].len
74
+ : 1.0;
75
+
76
+ // Default to 1.0 if 'len' is missing
77
+ // Here, we're adding 'len' to the vertexColors array or you could add it to a separate array if needed
78
+ if (!this.geometry.vertexLengths) {
79
+ this.geometry.vertexLengths = []; // Create if it doesn't exist
80
+ }
81
+ this.geometry.vertexLengths.push(len);
82
+ });
83
84
this.geometry.edges.push(
85
...input.edges.map(edge => edge.map(idx => idx + startIdx))
86
0 commit comments