diff options
author | Jared Adams <jaxad0127@gmail.com> | 2013-06-25 18:53:45 -0600 |
---|---|---|
committer | Jared Adams <jaxad0127@gmail.com> | 2013-06-25 18:53:45 -0600 |
commit | d4f71d8ed7a57cddb59dd58ca0b60558a984a2a1 (patch) | |
tree | 7556b6ca7240d66e29f434c297bc4c16e6b4e10b /public/playground.html | |
parent | da89573679309ad3c8ed11b93a806ea6384ba6fb (diff) | |
download | manaportal-d4f71d8ed7a57cddb59dd58ca0b60558a984a2a1.tar.gz manaportal-d4f71d8ed7a57cddb59dd58ca0b60558a984a2a1.tar.bz2 manaportal-d4f71d8ed7a57cddb59dd58ca0b60558a984a2a1.tar.xz manaportal-d4f71d8ed7a57cddb59dd58ca0b60558a984a2a1.zip |
Add basic dye tool.
Diffstat (limited to 'public/playground.html')
-rw-r--r-- | public/playground.html | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/public/playground.html b/public/playground.html index 3099b83..10ac6c2 100644 --- a/public/playground.html +++ b/public/playground.html @@ -11,16 +11,9 @@ <script src="js/mp/dye.js"></script> <script src="js/mp/resource.js"></script> <script> -var dyeData = { - "R": [ - [0xed, 0xe5, 0xb2], - [0xff, 0xf7, 0xbf] - ], - "G": [ - [0xcc, 0xcc, 0xcc], - [0xff, 0xff, 0xff] - ] -}; +var dyeString = "R:#ede5b2,fff7bf|G:#cccccc,ffffff"; +var dyeData = mp.dye.parseDyeString(dyeString); + mp.resource.loadImage("bigcake.png", function(err, imageData) { var oContext = document.getElementById("original").getContext("2d"); var dContext = document.getElementById("dyed").getContext("2d"); |