Skip to content

Commit f5a864b

Browse files
Fix ESLint issues in GeometryBuilder.js
1 parent 4bcbbcd commit f5a864b

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

src/webgl/GeometryBuilder.js

+15
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,21 @@ class GeometryBuilder {
6666
);
6767
}
6868
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+
});
6984
this.geometry.edges.push(
7085
...input.edges.map(edge => edge.map(idx => idx + startIdx))
7186
);

0 commit comments

Comments
 (0)