-
Notifications
You must be signed in to change notification settings - Fork 3.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add tapered glowing lines as an option on PolylineGlowMaterial. #7626
Conversation
Thanks for the pull request @emackey!
Reviewers, don't forget to make sure that:
|
More demo fun. |
# Conflicts: # CHANGES.md
I merged master in here, but the tests failed. The failures look like they might be related to #7579, createImageBitmap. |
Merged master again, nothing test-related there, but tests pass this time. |
# Conflicts: # CHANGES.md
This is ready. |
# Conflicts: # CHANGES.md
👍 Thanks @emackey. |
@emackey the demo page is 404 |
@iamsee you can get the updated demo URL by taking the same query parameters with the |
@OmarShehata thx |
This adds a new
uniform
parameter toPolylineGlowMaterial
calledtaperPower
, to go alongside the existingglowPower
parameter.When set, this parameter will taper off the glowing line, using a strength falloff profile that matches the
glowPower
falloff for the equivalent number.The default value is
1.0
. Numbers1.0
and higher produce no tapering effect, so, the default behavior will exactly replicate the look ofPolylineGlowMaterial
prior to the introduction of this new parameter.The core of what actually changed here is in the file
PolylineGlowMaterial.glsl
.The best sample usage of this new parameter is in the HeadingPitchRoll demo, where the aircraft now leaves behind a tapered glowing line, simply by adding the new parameter to its code. Use the arrow keys to steer the aircraft.