Skip to content

GeoLine triangle-strip mesh render#77

Merged
coopbri merged 9 commits intoomnidotdev:masterfrom
nickw1:composite-geo-line
Mar 23, 2026
Merged

GeoLine triangle-strip mesh render#77
coopbri merged 9 commits intoomnidotdev:masterfrom
nickw1:composite-geo-line

Conversation

@nickw1
Copy link
Contributor

@nickw1 nickw1 commented Mar 21, 2026

Description

A new CompositeGeoLine component has been added, with similar functionality to GeoLine. However it is a mesh made up of individual triangles, meaning smoother lines with less rendering artefacts than GeoLine, at the expense of dashed lines not being possible.

It could either exist alongside GeoLine or replace it, particularly if further enhancements to allow dashing are added (nb: I am unlikely to do this myself, at least for now).

Test Steps

Run the geolocation demo. Working on a desktop with fake location set, or a mobile device with mock GPS location (signal poor indoors).

@changeset-bot
Copy link

changeset-bot bot commented Mar 21, 2026

🦋 Changeset detected

Latest commit: bd8e104

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@omnidotdev/rdk Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@nickw1 nickw1 changed the title Composite geoline, made up of triangles in BufferGeometry, implemented CompositeGeoLine - smoother GeoLine with less rendering artefacts Mar 21, 2026
@pkg-pr-new
Copy link

pkg-pr-new bot commented Mar 21, 2026

Open in StackBlitz

npm i https://pkg.pr.new/@omnidotdev/rdk@77

commit: bd8e104

@coopbri
Copy link
Contributor

coopbri commented Mar 22, 2026

Cool perf idea. Let me test this out a bit more, I think it could be beneficial to completely improve GeoLine using tris in one sweep instead of having a period of time where we maintain two completely separate implementations. I'll play with this tomorrow

coopbri and others added 5 commits March 22, 2026 20:09
Remove separate CompositeGeoLine component. Triangle-strip mesh
rendering is now built into GeoLine, with Line2 fallback for dashing.
Use BufferGeometry with indexed triangles for smoother, artifact-free
line rendering. Falls back to Line2 when dashing is enabled. Widen
color prop to accept ColorRepresentation.
@coopbri
Copy link
Contributor

coopbri commented Mar 23, 2026

Love the triangle-mesh approach for render optimization.

I integrated the work directly into GeoLine, now it uses the triangle-strip mesh rendering (your BufferGeometry approach) by default

When isDashed is enabled, falls back to Line2. Made a couple other minor tweaks

I pushed these changes to your branch, give this a look and let me know

Thank you for the great baseline

@nickw1
Copy link
Contributor Author

nickw1 commented Mar 23, 2026

@coopbri sounds good, will test later and let you know.

@nickw1
Copy link
Contributor Author

nickw1 commented Mar 23, 2026

@coopbri seems to work fine.

@coopbri coopbri changed the title CompositeGeoLine - smoother GeoLine with less rendering artefacts GeoLine triangle-strip mesh render Mar 23, 2026
@coopbri coopbri merged commit 9aa76cb into omnidotdev:master Mar 23, 2026
5 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Mar 23, 2026
@coopbri
Copy link
Contributor

coopbri commented Mar 23, 2026

Live in v0.10.0. Thanks!

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants