Skip to content

Commit

Permalink
last style cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
GarboMuffin committed Aug 15, 2024
1 parent 38c4213 commit 3e3d0c5
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/PenSkin.js
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ class PenSkin extends Skin {
instancedArraysExtension
);
} else {
// Inefficient but still supported
this.instancedRendering = false;
}
}
Expand Down Expand Up @@ -390,13 +391,13 @@ class PenSkin extends Skin {
this.attribute_index++;
this.attribute_data[this.attribute_index] = penColor[3];
this.attribute_index++;

this.attribute_data[this.attribute_index] = lineThickness;
this.attribute_index++;

this.attribute_data[this.attribute_index] = lineLength;
this.attribute_index++;

this.attribute_data[this.attribute_index] = x0;
this.attribute_index++;
this.attribute_data[this.attribute_index] = -y0;
Expand Down Expand Up @@ -440,13 +441,13 @@ class PenSkin extends Skin {
this.glVertexAttribDivisor(this.a_lineColor_loc, 1);
this.glVertexAttribDivisor(this.a_lineThicknessAndLength_loc, 1);
this.glVertexAttribDivisor(this.a_penPoints_loc, 1);

this.glDrawArraysInstanced(
gl.TRIANGLES,
0, 6,
this.attribute_index / PEN_ATTRIBUTE_STRIDE
);

this.glVertexAttribDivisor(this.a_lineColor_loc, 0);
this.glVertexAttribDivisor(this.a_lineThicknessAndLength_loc, 0);
this.glVertexAttribDivisor(this.a_penPoints_loc, 0);
Expand Down

0 comments on commit 3e3d0c5

Please sign in to comment.