mirror of
https://codeberg.org/vlw/pysheeter.git
synced 2025-09-13 19:23:41 +02:00
Moved example.py into "example/". Removed __init__.py from repo root now PySheeter should be installed as a Python module. Wording in "example.py", also reflected in README
10 lines
No EOL
372 B
Python
10 lines
No EOL
372 B
Python
from pysheeter import PySheeter
|
|
|
|
# Load sprites from './files/' (all sprites are 64x64)
|
|
spritesheet = PySheeter.Sheet("files")
|
|
|
|
# Create a vertical spritesheet with the dimensions 16x16 (scaled)
|
|
spritesheet.put("example_v1616.png",(16,16))
|
|
|
|
# Create a horizontal spritesheet with the dimensions 16x32 (scaled & stretched)
|
|
spritesheet.put("example_h1632.png",(16,32),False) |