PAIR-code / megaplot

Apache License 2.0
19 stars 5 forks source link

Implement generic solution to non-zero default sprite attribute values #81

Open jimbojw opened 2 years ago

jimbojw commented 2 years ago

Currently, all sprite attribute values default to 0. This makes initialization easy since a freshly allocated texture will have zeros flashed throughout. When a sprite is released, its swatch of texture data is flashed back to 0 before that swatch is reused.

Instead, Megaplot should implement a generic solution for specifying non-zero default values. This new mechanism should be used to support TransitionTimeMs, which currently receives special treatment.

Design consideration: provide an API for the user to override any or all sprite attribute default values.