From b73889da9f33b883894db6a989037030fee99f95 Mon Sep 17 00:00:00 2001 From: Indrajith K L Date: Sun, 1 Aug 2021 02:26:00 +0530 Subject: Basic Renderer * Adds Tiled map JSON rendering * TODO Cleanup & Organization --- scratch.md | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 scratch.md (limited to 'scratch.md') 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 -- cgit v1.2.3