Skip to content

Conversation

@T5mpler
Copy link
Contributor

@T5mpler T5mpler commented Oct 26, 2025

Normally because of how sprites are drawn with FlxStrip, properties that would be available in FlxSprite like "scale" and "angle" aren't able to be used and do nothing.

This PR adds the ability to be able to use FlxSprite.scale instead of the zoom property to be able to mess with the scaling of a sustain note.

By default, scale.y being 1 represents the default length of the sustain note being controlled (so for example, if you set scale.y to 0.5 then the sustain note will be 50% of it's actual length but will still work), meanwhile scaling x controls the actual width of the sustain note instead of the original zoom property.

Seeing as the zoom property is a private variable in the original class and is only used to initialize the sprite, I don't think this is really a breaking change, but idk.

If you have any suggestions for what to add to this feel free to let me know, as well as if this PR has any issues.

Demonstration here:
sustainnotescaling-ezgif com-video-to-gif-converter

@github-actions github-actions bot added pr: haxe PR modifies game code. status: pending triage Awaiting review. size: medium A medium pull request with 100 or fewer changes. labels Oct 26, 2025
@T5mpler T5mpler changed the title Replacing zoom property with FlxSprite.scale property for SustainTrail.hx Replace "zoom" with FlxSprite.scale property for SustainTrail.hx Oct 26, 2025
@AbnormalPoof AbnormalPoof added the type: enhancement Involves an enhancement or new feature. label Oct 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr: haxe PR modifies game code. size: medium A medium pull request with 100 or fewer changes. status: pending triage Awaiting review. type: enhancement Involves an enhancement or new feature.

Development

Successfully merging this pull request may close these issues.

2 participants