Repository navigation
Add ThrusterButton - #46
Merged
Merged
Conversation
The button parks on the floor of its container and treats the whole thing as its playground: move the cursor in and it lifts off and flies its center onto the pointer, bouncing off the walls; move out and it comes straight down and lands where it is. It steers with two compressed-air jets on each of the bottom, left and right edges. With no top jets it descends on gravity, so the autopilot cuts lift early on a climb to avoid overshooting into the ceiling. The exhaust is a small WebGL2 stable-fluids sim (advection, pressure projection, vorticity confinement) that the jets feed with velocity and smoke, plus a ground burst on touchdown. Without WebGL2 it still flies. The docs live-preview stage is now relative so the playground fills the stage rather than the whole frame with the props panel.
The fake top-left lighting drew dark outlines around every curl. The smoke is now flat tint, with less density, a faster fade and a softer touchdown burst.
Jet power and bank were scaled by the thrust prop, so low thrust always read as full blast and high thrust barely smoked, even for the same motion. They are now scaled against a fixed force. Changing a prop also re-ran the flight effect, whose cleanup lost the WebGL context; the re-run got the dead context back and the smoke never returned. Props are now read through a ref, and dispose frees GPU resources without losing the context.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Note Currently processing new changes in this PR. This may take a few minutes, please wait... ⚙️ Run configuration
📒 Files selected for processing: 12
✨ Finishing Touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
This branch was successfully deployed
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.
A magnetic button that flies to the cursor on compressed-air jets.
thrust,tilt,playgroundClassName. Jet visuals are scaled against a fixed force so the look stays consistent across thrust values, and props are read live so dialing them never restarts the sim.relativeso the playground fills the stage rather than the whole frame with the props panel.Checked:
registry:test,typecheck,lint; flown headlessly in light and dark mode.Summary by CodeRabbit