SpriteSource::size (and ::width ::height) properties misleading

KompetenzAirbag
Manual Inserter
Manual Inserter
Posts: 1
Joined: Thu Feb 19, 2026 10:43 am
Contact:

SpriteSource::size (and ::width ::height) properties misleading

Post by KompetenzAirbag »

For AnimationPrototype::size (and ::width and ::height) it clearly states "Height of one frame in pixels". It is clear that one frame (e.g. 64x64) should be provided, not the size of the whole picture.
This is unfortunately not the case for SpriteSource::size. It states "Width of the picture", indicating the whole ".png" file is meant which is not the case. This is quite misleading.
Bilka
Factorio Staff
Factorio Staff
Posts: 3701
Joined: Sat Aug 13, 2016 9:20 am
Contact:

Re: SpriteSource::size (and ::width ::height) properties misleading

Post by Bilka »

The doc says "The width and height of the sprite.", not "picture" because it is indeed the width and height of the sprite that is displayed in-game. "Frame" would be misleading here because a sprite doesn't have animation frames.

::width and ::height however said "picture" and I've changed that to "sprite" for the next version. Thanks for the note.
I'm an admin over at https://wiki.factorio.com. Feel free to contact me if there's anything wrong (or right) with it.
Post Reply

Return to “Resolved Requests”