Add Sprite Compositor Mixin - #1
Merged
Merged
Conversation
- Reversed the polarity of the angle used in sine and cosine calculations (I multiplied the angle by -1) - Prevented the rotation from spiraling in on itself by only modifiying the X-coordinate of a sprite after the correct Y value was also calculated
- Removed AngleUnit in favor of static creator methods - Fixed an issue where rotation or scaling of a sprite group would create a small error that compounded over time. - Added builder pattern for Text and Texture sprites - Changed functions that take a Vector2 to have an overload that takes 2 floats instead
- Changed TextSprites to scale like other sprites (instead of setting the scale to whatever was entered) - You can now set the scale of a TextSprite through the property accessor - Changed SpriteGroup to be a generic abstract class
Also reduced code size by defining eligible functions using arrow syntax. I wonder if this skips instruction counters? I doubt it.
- Converted regular method calls to expression bodies where possible - Moved Mirror functions to SpriteGroup and TextureSprite, as they are the only ones that actually benefit from it (negative scale on a TextSprite has the same effect as positive scale) - Changed Angle's Radians() and Degrees() methods to be properties instead of functions
- Add License and Copyright notices to mixin files - Updated documentation to reflect current state of the project - Add License and Copyright notice to Demo Project - Updated Mixin Library information
# Conflicts: # libraries/Lelebees.MdkScriptMixin.SpriteCompositor/SpriteCompositor.Test/src/SpriteGroupTest.cs
malware-dev
pushed a commit
that referenced
this pull request
May 19, 2026
Fix links only working in one context, and the project being referred to as "Sprite Composer" while the project name is actually "Sprite Compositor"
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.
I created a mixin that lets you compose new sprites from groups of regular sprites, and treat them as if they were one.