aboutsummaryrefslogtreecommitdiff
path: root/scratch.md
diff options
context:
space:
mode:
authorIndrajith K L2021-08-01 02:26:00 +0530
committerIndrajith K L2021-08-01 02:26:00 +0530
commitb73889da9f33b883894db6a989037030fee99f95 (patch)
treefde19617d41bd0cfd71224a3166aa3f38c53b54d /scratch.md
parent4cd16130dcab278e3c1204eebcc04d47f2676007 (diff)
downloadrebirth-wren-b73889da9f33b883894db6a989037030fee99f95.tar.gz
rebirth-wren-b73889da9f33b883894db6a989037030fee99f95.tar.bz2
rebirth-wren-b73889da9f33b883894db6a989037030fee99f95.zip
Basic Renderer
* Adds Tiled map JSON rendering * TODO Cleanup & Organization
Diffstat (limited to 'scratch.md')
-rw-r--r--scratch.md22
1 files changed, 22 insertions, 0 deletions
diff --git a/scratch.md b/scratch.md
new file mode 100644
index 0000000..0eb82bf
--- /dev/null
+++ b/scratch.md
@@ -0,0 +1,22 @@
+
+## Wren Scratch
+### Matrix
+```wren
+var matrix = [[1, 2, 3], [4, 5, 6]]
+System.print(matrix[0][0])
+for(layer in _layerData) {
+ System.print(layer)
+}
+```
+
+### Sprite Sheet Transform
+```wren
+_spriteSheet.transform({
+ "srcX": 16*14,
+ "srcY": 0,
+ "srcW": 16,
+ "srcH": 16,
+ "scaleX": 2,
+ "scaleY": 2
+ }).draw(0,0)
+``` \ No newline at end of file