Skip to content

@typegpu/geometry Improve line rendering APIs#2470

Open
deluksic wants to merge 1 commit intosoftware-mansion:mainfrom
deluksic:de/improve-line-rendering-api
Open

@typegpu/geometry Improve line rendering APIs#2470
deluksic wants to merge 1 commit intosoftware-mansion:mainfrom
deluksic:de/improve-line-rendering-api

Conversation

@deluksic
Copy link
Copy Markdown
Contributor

@deluksic deluksic commented May 8, 2026

Renamed and reordered the APIs a bit, and allow customization of arrow caps.

  • lineSegmentVariableWidth(vertexIndex, A, B, C, D, MAX_JOIN_COUNT) -> polylineVariableWidth(A, B, C, D, vertexIndex, MAX_JOIN_COUNT)
  • new API: lineVariableWidth(A, B, vertexIndex, MAX_JOIN_COUNT)

New arrowCapParamsSlot, one can change arrow cap sizes:

image

Copilot AI review requested due to automatic review settings May 8, 2026 17:25
@deluksic deluksic force-pushed the de/improve-line-rendering-api branch from 88e23e0 to 1b5ba58 Compare May 8, 2026 17:29
label: getName(this) ?? '<unnamed>',
format: props.format,
size: props.size,
size: [...props.size],
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was getting some type issues in my strict codebase, not sure if you want to fix it upstream.


functionDefinition(options: FunctionDefinitionOptions): string;
typeInstantiation(schema: BaseData, args: readonly Snippet[]): ResolvedSnippet;
typeInstantiation(schema: BaseData, args: readonly (Snippet | undefined)[]): ResolvedSnippet;
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same here

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants