Skip to content

Commit 08adb04

Browse files
authored
refactor: clarify purpose of skeleton node drawing in lines only rendering mode (#1039)
* refactor: remove draw node guard completely and comment why
1 parent 8bec586 commit 08adb04

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

src/skeleton/frontend.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -339,7 +339,7 @@ void emitDefault() {
339339
drawSkeleton(
340340
gl: GL,
341341
edgeShader: ShaderProgram,
342-
nodeShader: ShaderProgram | null,
342+
nodeShader: ShaderProgram,
343343
skeletonChunk: SkeletonChunk,
344344
projectionParameters: { width: number; height: number },
345345
) {
@@ -377,7 +377,10 @@ void emitDefault() {
377377
gl.disableVertexAttribArray(aVertexIndex);
378378
}
379379

380-
if (nodeShader !== null) {
380+
// Draw nodes - this is performed also in line render mode
381+
// so that there are no visible gaps between the edges
382+
// as the point size is set to the line width
383+
{
381384
nodeShader.bind();
382385
initializeCircleShader(nodeShader, projectionParameters, {
383386
featherWidthInPixels: this.targetIsSliceView ? 1.0 : 0.0,

0 commit comments

Comments
 (0)