Disclosure: This draft was generated with AI and checked against the cited primary sources, with a separate AI editorial review. It was prepared for the FrameSprite team, which has a commercial interest in FrameSprite. Proposed examples are not executed tests unless explicitly identified as recorded fixture results.
A pre-rotated HaxeFlixel projectile needs enough canvas space for its rotated corners. loadRotatedGraphic can create a buffered rotation sheet; without sufficient bounds, long artwork can clip at diagonal angles. Select the source frame and buffering policy explicitly. The FlxSprite rotation API documents these options.
Key Takeaways
- A baked rotation sheet and runtime rotation are different asset paths.
- Confirm the intended source frame before generating rotations.
- Evaluate visual continuity and memory before increasing the rotation count.
Inspect the unrotated source
Use a copy of the projectile with a contrasting outline around its full canvas. A long spear or arrow often reaches close to the source bounds. Rotating that rectangle requires different bounds from simply moving an unchanged image.
Separate unwanted crop in the input from clipping introduced during rotation. The sprite-sheet preparation guide covers the source-canvas stage. No rotation option can recover a spear tip already missing from the PNG.
If the input is a sheet rather than one image, confirm which frame is selected. Passing the whole strip as a single projectile can bake every pose into a large rotating rectangle.
Compare buffering with one known frame
A minimal fragment for a standalone source is:
// HaxeFlixel 6.x API fragment; not compiled or run here.
projectile.loadRotatedGraphic(
"assets/images/arrow.png",
32,
-1,
false,
true
);
Here the rotation count is an illustrative design choice, -1 selects the whole graphic, anti-aliasing is disabled, and automatic buffering is requested. Do not copy the whole-graphic choice when your source actually contains multiple square frames.
The FlxFrame API describes individual frame geometry. When working from an atlas frame, inspect loadRotatedFrame and preserve its trimmed-frame metadata rather than guessing a rectangle from the packed image.
Choose the visual tradeoff
More baked directions can make angular changes less obvious, but also create more stored images. A small pixel projectile and a large painted weapon may need different rotation counts. Avoid presenting one count as a performance recommendation without measuring the actual target.
The FlxGraphic reference is relevant to the resulting image ownership and cache. Record whether the asset is shared across identical projectiles or regenerated for every spawn.
| Symptom | Check |
|---|---|
| Tips disappear only diagonally | Rotation canvas and buffer |
| Several poses rotate together | Whole-sheet versus selected-frame input |
| Stepped turning | Baked direction count and desired art style |
| Blurred source pixels | Anti-aliasing and final display scale |
For deliberately asymmetrical projectiles or weapons, also review the left-right mirroring guide. Rotation and mirroring do not produce equivalent artwork.
Acceptance around a full turn
Inspect cardinal and diagonal directions against a contrasting background. Check the entire outline, not just the projectile center. Repeat at the final gameplay size and with any trail disabled, since a trail can hide a clipped tail.
Confirm the collision proxy still represents the intended gameplay shape. A larger buffered canvas should not automatically become a larger projectile collider. Record the source frame, rotation count, buffer policy and collision proxy in the delivery checklist.
This article describes the linked HaxeFlixel 6.x API snapshot checked October 20, 2026. No baked sheet was generated, no engine run was performed, and no speed or memory improvement is claimed.
Inspect the attachment point after buffering
Buffering adds visual space around the source, so inspect the projectile's intended attachment or launch point after the rotation sheet is generated. A preserved outline can still look wrong if the shaft no longer starts at the muzzle or hand marker. Keep a small launch-point indicator in the diagnostic copy and compare it through several directions. Do not compensate by moving the gameplay projectile differently for every angle unless that is an explicit design requirement. Store the visual attachment policy independently from the collision proxy.
Sources and editorial ownership
Primary references checked on October 20, 2026:
Editorial owner: FrameSprite Workflow Team. Editorial and verification policy. Report a documentation correction.
Top comments (0)