Difference between revisions of "Sprite"
From Sega Retro
m (Text replacement - "Category:Sega Retro templates" to "Category:Templates") |
|||
(2 intermediate revisions by one other user not shown) | |||
Line 13: | Line 13: | ||
<tt><nowiki>{{</nowiki>sprite|'''{{green|image name.png}}'''|'''{{red|f}}'''}}</tt> | <tt><nowiki>{{</nowiki>sprite|'''{{green|image name.png}}'''|'''{{red|f}}'''}}</tt> | ||
− | * <tt>{{red|f}}</tt> = scaling factor (i.e. 2 is double size). | + | * <tt>{{red|'''f'''}}</tt> = scaling factor (i.e. 2 is double size). |
− | [[Category: | + | ===Cropping sprites=== |
+ | If using a spritesheet, add the following parameters to crop a single sprite: | ||
+ | |||
+ | <pre> | ||
+ | {{sprite|image name.png|f | ||
+ | | crop_width= | ||
+ | | crop_height= | ||
+ | | crop_x= | ||
+ | | crop_y= | ||
+ | }} | ||
+ | </pre> | ||
+ | |||
+ | [[Category:Templates]]</noinclude> |
Latest revision as of 18:08, 1 January 2022
Display a sprite with optional scaling.
Usage
{{sprite|image name.png|f}}
- f = scaling factor (i.e. 2 is double size).
Cropping sprites
If using a spritesheet, add the following parameters to crop a single sprite:
{{sprite|image name.png|f | crop_width= | crop_height= | crop_x= | crop_y= }}