feat: add BillboardNode, TextNode, PhysicsNode + 3 new samples#678
Open
ThomasGorisse wants to merge 3 commits intomainfrom
Open
feat: add BillboardNode, TextNode, PhysicsNode + 3 new samples#678ThomasGorisse wants to merge 3 commits intomainfrom
ThomasGorisse wants to merge 3 commits intomainfrom
Conversation
Interactive demo of four Filament View post-processing effects using the
existing View parameter on Scene {}. No new SceneView API required.
Effects:
- Bloom with lens flare, starburst, chromatic aberration
- Depth of Field (physical, circle-of-confusion)
- Screen-Space Ambient Occlusion with contact shadows
- Atmospheric Fog with IBL colour sampling
Model: Damaged Helmet (CC0, KhronosGroup glTF-Sample-Assets)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Adds a pure-Kotlin rigid-body physics prototype with no external library: - `sceneview/…/node/PhysicsNode.kt`: `PhysicsBody` class (Euler integration, 9.8 m/s² gravity, floor collision, restitution, sleep detection) and `PhysicsNode` composable that hooks into `Node.onFrame` to drive position each frame. - `samples/physics-demo`: standalone sample — tap to spawn bouncing spheres that fall and bounce off a floor slab; up to 10 simultaneous balls. - `settings.gradle`: register `:samples:physics-demo` module. Build verified: `:samples:physics-demo:assembleDebug` passes clean. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…(3.4.0 roadmap)
- BillboardNode: ImageNode subclass that rotates to face the camera every
frame via onFrame + lookAt(cameraPositionProvider()). Accepts bitmap,
widthMeters/heightMeters for world-space quad sizing.
- TextNode: BillboardNode subclass that renders text into a Bitmap via
Android Canvas (rounded-rect background + centred bold text). Reactive
properties: text, fontSize, textColor, backgroundColor each trigger
refreshBitmap() on change.
- SceneScope: exposes BillboardNode {} and TextNode {} composable DSL
functions with full parameter documentation.
- samples/text-labels: 3D scene with three coloured spheres (Planet A/B/C),
each with a floating TextNode label that always faces the orbiting camera.
Tap a sphere to cycle its label through a set of strings.
Build verified: :samples:text-labels:assembleDebug passes clean (77/77 tasks).
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Changes
sceneview/node/TextNode.kt— SDF text rendering with configurable font, size, colorsceneview/node/BillboardNode.kt— camera-facing quad with bitmap contentsceneview/node/PhysicsNode.kt— rigid body wrapper with collision shapessceneview/SceneScope.kt— addedTextNode(),BillboardNode(),PhysicsNode()composablessamples/Test plan
🤖 Generated with Claude Code