Closed singlecoder closed 3 months ago
The updates across SpriteRenderer.ts
, TextRenderer.ts
, and associated test files enhance the handling of color changes. An event binding for color updates and private methods to respond to color changes are introduced. Tests now verify RGBA components separately rather than entire color objects.
File(s) | Change Summary |
---|---|
packages/core/src/2d/sprite/SpriteRenderer.ts |
Removed a flag-setting line, added an event handler binding, and introduced a private method _onColorChanged |
packages/core/src/2d/text/TextRenderer.ts |
Removed _init method, added _onColorChanged method, introduced _updateColor method, and added a Color flag to DirtyFlag enum |
tests/src/core/SpriteRenderer.test.ts |
Modified assertions for spriteRenderer.color property to check individual RGBA components separately |
In the world of sprites and text so fair,
Colors now change with utmost care.
No longer full objects need verify,
Just RGBA - see how they fly! 🎨
Our code’s now sharp, precise and grand,
Thanks to thoughtful, guiding hand.
Oh, what a joyous, bright new lore,
In code we trust, ever more! 🐰✨
[!TIP]
Early access features: enabled
We are currently testing the following features in early access: - **OpenAI `gpt-4o` model for code reviews and chat**: OpenAI claims that this model is better at understanding and generating code than the previous models. We seek your feedback over the next few weeks before making it generally available. Note: - You can enable or disable early access features from the CodeRabbit UI or by updating the CodeRabbit configuration file. - Please join our [Discord Community](https://discord.com/invite/GsXnASn26c) to provide feedback and report issues. - OSS projects are currently opted into early access features by default.
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
Summary by CodeRabbit
New Features
SpriteRenderer
andTextRenderer
classes for more dynamic rendering.Bug Fixes
SpriteRenderer
andTextRenderer
to address issues with color rendering.Tests
SpriteRenderer
to validate individual RGBA components, ensuring more precise color validation.