Skip to content

Add Sprite Compositor Mixin - #1

Merged
malware-dev merged 29 commits into
malforge:mainfrom
Lelebees:main
May 15, 2026
Merged

Add Sprite Compositor Mixin#1
malware-dev merged 29 commits into
malforge:mainfrom
Lelebees:main

Conversation

@Lelebees

Copy link
Copy Markdown
Contributor

I created a mixin that lets you compose new sprites from groups of regular sprites, and treat them as if they were one.

Lelebees added 29 commits March 17, 2026 14:30
- 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
malware-dev merged commit 1ab7ed4 into malforge:main May 15, 2026
1 check failed
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"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants