Skip to content

Add color animation support #12202

@alice-i-cecile

Description

@alice-i-cecile

There are four sections to this issue:

  • Implement Animatable for all of our color types.
  • Implement Point (in the sense of bevy_math for all of our color types.
  • Figure out the correct way to handle color addition/subtraction and scalar multiplication and division.
  • Add examples demonstrating color animation

Our options for handling alpha during color addition and subtraction from #12163 (comment):

  1. Average: leads to fairly surprising behavior, non-associative.
  2. Use the left-hand alpha: fairly surprising, non-commutative.
  3. Set the alpha to 1: very surprising, associative and commutative.
  4. Don't support adding colors with alpha: panic, remove the implementation, or create a set of alpha-free colors.
  5. Just add and subtract alpha like RGB: simple, but leads to values outside of 0-1.0 very easily.
  6. Apply alpha blending: a little more expensive, probably well-behaved.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-AnimationMake things move and change over timeA-RenderingDrawing game state to the screenC-FeatureA new feature, making something new possible

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions