From 9bcd1238c93c967f3d8b8b5ef20d89b6d02f8798 Mon Sep 17 00:00:00 2001 From: Victor Westerlund Date: Thu, 26 Nov 2020 16:34:38 +0100 Subject: [PATCH] 1.0.6-cleanup 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 --- README.md | 8 ++++---- __init__.py | 1 - example.py | 10 ---------- example/example.py | 10 ++++++++++ example/{ => files}/1.png | Bin example/{ => files}/2.png | Bin example/{ => files}/3.png | Bin example/{ => files}/4.png | Bin example/{ => files}/5.png | Bin example/{ => files}/6.png | Bin example/{ => files}/7.png | Bin example/{ => files}/8.png | Bin example/{ => files}/9.png | Bin 13 files changed, 14 insertions(+), 15 deletions(-) delete mode 100644 __init__.py delete mode 100644 example.py create mode 100644 example/example.py rename example/{ => files}/1.png (100%) rename example/{ => files}/2.png (100%) rename example/{ => files}/3.png (100%) rename example/{ => files}/4.png (100%) rename example/{ => files}/5.png (100%) rename example/{ => files}/6.png (100%) rename example/{ => files}/7.png (100%) rename example/{ => files}/8.png (100%) rename example/{ => files}/9.png (100%) diff --git a/README.md b/README.md index fa17233..f8d0abb 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ Lightweight Pillow Python package to create and scale sprite sheets from individual PNGs or whole folders ## Get started / Basic usage -1. Download and install [Python 3](https://www.python.org/downloads/) for your architecture +1. Download and install the latest version of [Python 3](https://www.python.org/downloads/) for your architecture 2. Install the latest build of PySheeter with [`pip3`](https://pypi.org/project/pysheeter/) ```bash $ python3 -m pip install pysheeter @@ -31,13 +31,13 @@ __Example usage:__ # from 'example.py' from pysheeter import PySheeter -# Load sprites from 'example/' +# Load sprites from './files/' (all sprites are 64x64) spritesheet = PySheeter.Sheet("example") -# Create a vertical spritesheet with the dimensions 16x16 +# Create a vertical spritesheet with the dimensions 16x16 (scaled) spritesheet.put("example_v1616.png",(16,16)) -# Create a horizontal spritesheet with the dimensions 16x32 +# Create a horizontal spritesheet with the dimensions 16x32 (scaled & stretched) spritesheet.put("example_h1632.png",(16,32),False) ``` ![Example 1](https://storage.googleapis.com/public.victorwesterlund.com/github/VictorWesterlund/pysheeter/1example_v1616.png) diff --git a/__init__.py b/__init__.py deleted file mode 100644 index acc8eac..0000000 --- a/__init__.py +++ /dev/null @@ -1 +0,0 @@ -from lib import PySheeter \ No newline at end of file diff --git a/example.py b/example.py deleted file mode 100644 index 3fec735..0000000 --- a/example.py +++ /dev/null @@ -1,10 +0,0 @@ -from pysheeter import PySheeter - -# Load sprites from 'example/' -spritesheet = PySheeter.Sheet("example") - -# Create a vertical spritesheet with the dimensions 16x16 -spritesheet.put("example_v1616.png",(16,16)) - -# Create a horizontal spritesheet with the dimensions 16x32 -spritesheet.put("example_h1632.png",(16,32),False) \ No newline at end of file diff --git a/example/example.py b/example/example.py new file mode 100644 index 0000000..c22efcd --- /dev/null +++ b/example/example.py @@ -0,0 +1,10 @@ +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) \ No newline at end of file diff --git a/example/1.png b/example/files/1.png similarity index 100% rename from example/1.png rename to example/files/1.png diff --git a/example/2.png b/example/files/2.png similarity index 100% rename from example/2.png rename to example/files/2.png diff --git a/example/3.png b/example/files/3.png similarity index 100% rename from example/3.png rename to example/files/3.png diff --git a/example/4.png b/example/files/4.png similarity index 100% rename from example/4.png rename to example/files/4.png diff --git a/example/5.png b/example/files/5.png similarity index 100% rename from example/5.png rename to example/files/5.png diff --git a/example/6.png b/example/files/6.png similarity index 100% rename from example/6.png rename to example/files/6.png diff --git a/example/7.png b/example/files/7.png similarity index 100% rename from example/7.png rename to example/files/7.png diff --git a/example/8.png b/example/files/8.png similarity index 100% rename from example/8.png rename to example/files/8.png diff --git a/example/9.png b/example/files/9.png similarity index 100% rename from example/9.png rename to example/files/9.png