Difference between revisions of "Sprite"

From Sega Retro

Line 14: Line 14:
  
 
* <tt>{{red|'''f'''}}</tt> = scaling factor (i.e. 2 is double size).
 
* <tt>{{red|'''f'''}}</tt> = scaling factor (i.e. 2 is double size).
 +
 +
===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:Sega Retro templates]]</noinclude>
 
[[Category:Sega Retro templates]]</noinclude>

Revision as of 13:40, 25 July 2015

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=
}}