Skip to content

feat: LineNode, PathNode, BillboardNode, TextNode + samples (3.4.0)#675

Merged
ThomasGorisse merged 2 commits intomainfrom
feat/line-path-node
Mar 20, 2026
Merged

feat: LineNode, PathNode, BillboardNode, TextNode + samples (3.4.0)#675
ThomasGorisse merged 2 commits intomainfrom
feat/line-path-node

Conversation

@ThomasGorisse
Copy link
Contributor

Summary

  • Line geometryPrimitiveType.LINES geometry: 2 vertices, index pair [0, 1]; update() re-uploads vertex buffer without re-creating the node.
  • Path geometry — polyline of N points; each consecutive pair becomes a LINE segment; optional closed flag adds the closing segment.
  • LineNodeGeometryNode wrapping Line; updateGeometry(start, end) hot-updates the GPU buffer.
  • PathNodeGeometryNode wrapping Path; updateGeometry(points, closed) hot-updates.
  • BillboardNodeImageNode that rotates toward the camera every frame via onFrame + lookAt.
  • TextNode — extends BillboardNode; renders text to a Bitmap with Canvas (rounded-rect background, centred text); auto-regenerates bitmap on property change.
  • SceneScope DSLLineNode {}, PathNode {}, BillboardNode {}, TextNode {} composable wrappers.
  • samples/line-path — 3-axis gizmo (LineNode × 3), spiral PathNode, animated sine-wave PathNode driven by Compose state.
  • samples/text-labels — 3 labelled spheres with orbit camera; tap a sphere to cycle its label.

Roadmap

Closes 3.4.0 items: LineNode / PathNode, BillboardNode, TextNode.

Test plan

  • Build :samples:line-path:assembleDebug and :samples:text-labels:assembleDebug
  • line-path: verify axis gizmo renders 3 coloured lines, spiral is smooth
  • text-labels: labels float above spheres and face camera during orbit
  • Tap a sphere label to cycle text
  • CI passes

🤖 Generated with Claude Code

ThomasGorisse and others added 2 commits March 20, 2026 20:32
…p-3.4.0)

- Add `Line` geometry (LINES primitive, 2 vertices, index pair 0→1)
- Add `Path` geometry (LINES primitive, explicit pairs for each segment,
  optional closing segment when `closed = true`)
- Add `LineNode` wrapping `Line` geometry with `updateGeometry(start, end)`
- Add `PathNode` wrapping `Path` geometry with `updateGeometry(points, closed)`
- Expose `LineNode {}` and `PathNode {}` composable DSL functions in `SceneScope`
- Add `samples/line-path` sample: 3D axis gizmo (LineNode × 3), spiral
  PathNode, and an animated sine-wave PathNode driven by Compose state
- Fix pre-existing `return@let` label error in `BillboardNode.onFrame` lambda

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
TextNode renders a 2D bitmap label in 3D world space via Canvas, delegates
camera-facing rotation to BillboardNode. The text-labels sample shows three
labelled coloured spheres with orbit camera; tapping a sphere cycles labels.

settings.gradle: add :samples:text-labels

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@ThomasGorisse ThomasGorisse merged commit e44f069 into main Mar 20, 2026
2 checks passed
@ThomasGorisse ThomasGorisse deleted the feat/line-path-node branch March 20, 2026 19:33
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.

1 participant