Skip to content

Commit 9dfd54f

Browse files
fix change in dev-2.0
1 parent d17c3ee commit 9dfd54f

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

src/webgl/GeometryBuilder.js

+19
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,26 @@ class GeometryBuilder {
9292
...input.faces.map(f => f.map(idx => idx + startIdx))
9393
);
9494
}
95+
<<<<<<< HEAD
9596
if (this.renderer.states.strokeColor) {
97+
=======
98+
if (this.renderer._doStroke) {
99+
input.edges.forEach(edge => {
100+
edge.forEach(idx => {
101+
// Ensure each edge (stroke) vertex gets the 'len' property from the corresponding fill vertex
102+
const len = (input.vertices[idx] && input.vertices[idx].len)
103+
? input.vertices[idx].len
104+
: 1.0;
105+
106+
// Default to 1.0 if 'len' is missing
107+
// Here, we're adding 'len' to the vertexColors array or you could add it to a separate array if needed
108+
if (!this.geometry.vertexLengths) {
109+
this.geometry.vertexLengths = []; // Create if it doesn't exist
110+
}
111+
this.geometry.vertexLengths.push(len);
112+
});
113+
});
114+
>>>>>>> f5a864b61 (Fix ESLint issues in GeometryBuilder.js)
96115
this.geometry.edges.push(
97116
...input.edges.map(edge => edge.map(idx => idx + startIdx))
98117
);

0 commit comments

Comments
 (0)