8art 中文文档教程
8art
8 位设计,带有该死的 javascript 数组
usage
<canvas id="example" width="300" height="300"></canvas>
// from "designs/you.json"
// "#$$$$$$" for transparent color <3
var exampleArr = [
["#$$$$$$","#$$$$$$","#$$$$$$","#$$$$$$","#$$$$$$","#$$$$$$","#8bae21","#8bae21","#8bae21","#8bae21","#8bae21","#$$$$$$","#$$$$$$","#$$$$$$","#$$$$$$","#$$$$$$","#$$$$$$"],
["#$$$$$$","#$$$$$$","#$$$$$$","#$$$$$$","#8bae21","#8bae21","#$$$$$$","#$$$$$$","#$$$$$$","#$$$$$$","#$$$$$$","#8bae21","#8bae21","#$$$$$$","#$$$$$$","#$$$$$$","#$$$$$$"],
["#$$$$$$","#$$$$$$","#$$$$$$","#8bae21","#$$$$$$","#$$$$$$","#$$$$$$","#$$$$$$","#$$$$$$","#$$$$$$","#$$$$$$","#$$$$$$","#$$$$$$","#8bae21","#$$$$$$","#$$$$$$","#$$$$$$"],
["#$$$$$$","#$$$$$$","#8bae21","#$$$$$$","#$$$$$$","#$$$$$$","#$$$$$$","#$$$$$$","#$$$$$$","#$$$$$$","#$$$$$$","#$$$$$$","#$$$$$$","#$$$$$$","#8bae21","#$$$$$$","#$$$$$$"],
["#$$$$$$","#$$$$$$","#8bae21","#$$$$$$","#$$$$$$","#$$$$$$","#8bae21","#$$$$$$","#$$$$$$","#$$$$$$","#8bae21","#$$$$$$","#$$$$$$","#$$$$$$","#8bae21","#$$$$$$","#$$$$$$"],
["#$$$$$$","#$$$$$$","#8bae21","#$$$$$$","#$$$$$$","#$$$$$$","#cccccc","#$$$$$$","#$$$$$$","#$$$$$$","#cccccc","#$$$$$$","#$$$$$$","#$$$$$$","#8bae21","#$$$$$$","#$$$$$$"],
["#$$$$$$","#$$$$$$","#8bae21","#$$$$$$","#$$$$$$","#$$$$$$","#cccccc","#$$$$$$","#$$$$$$","#$$$$$$","#cccccc","#$$$$$$","#$$$$$$","#$$$$$$","#8bae21","#$$$$$$","#$$$$$$"],
["#$$$$$$","#$$$$$$","#8bae21","#$$$$$$","#$$$$$$","#$$$$$$","#8bae21","#$$$$$$","#$$$$$$","#$$$$$$","#8bae21","#$$$$$$","#$$$$$$","#$$$$$$","#8bae21","#$$$$$$","#$$$$$$"],
["#$$$$$$","#$$$$$$","#8bae21","#$$$$$$","#$$$$$$","#$$$$$$","#$$$$$$","#$$$$$$","#$$$$$$","#$$$$$$","#$$$$$$","#$$$$$$","#$$$$$$","#$$$$$$","#8bae21","#$$$$$$","#$$$$$$"],
["#$$$$$$","#$$$$$$","#$$$$$$","#8bae21","#$$$$$$","#$$$$$$","#$$$$$$","#$$$$$$","#$$$$$$","#$$$$$$","#$$$$$$","#$$$$$$","#$$$$$$","#8bae21","#$$$$$$","#$$$$$$","#$$$$$$"],
["#$$$$$$","#$$$$$$","#8bae21","#$$$$$$","#8bae21","#8bae21","#8bae21","#8bae21","#8bae21","#8bae21","#8bae21","#8bae21","#8bae21","#$$$$$$","#8bae21","#$$$$$$","#$$$$$$"],
["#$$$$$$","#8bae21","#$$$$$$","#$$$$$$","#8bae21","#$$$$$$","#$$$$$$","#$$$$$$","#$$$$$$","#$$$$$$","#$$$$$$","#$$$$$$","#8bae21","#$$$$$$","#$$$$$$","#8bae21","#$$$$$$"],
["#$$$$$$","#8bae21","#$$$$$$","#8bae21","#$$$$$$","#$$$$$$","#$$$$$$","#$$$$$$","#$$$$$$","#$$$$$$","#$$$$$$","#$$$$$$","#$$$$$$","#8bae21","#$$$$$$","#8bae21","#$$$$$$"],
["#8bae21","#8bae21","#8bae21","#8bae21","#$$$$$$","#$$$$$$","#$$$$$$","#$$$$$$","#$$$$$$","#$$$$$$","#$$$$$$","#$$$$$$","#$$$$$$","#8bae21","#8bae21","#8bae21","#8bae21"],
["#8bae21","#$$$$$$","#$$$$$$","#8bae21","#$$$$$$","#$$$$$$","#$$$$$$","#$$$$$$","#$$$$$$","#$$$$$$","#$$$$$$","#$$$$$$","#$$$$$$","#8bae21","#$$$$$$","#$$$$$$","#8bae21"],
["#$$$$$$","#8bae21","#8bae21","#8bae21","#$$$$$$","#$$$$$$","#$$$$$$","#$$$$$$","#$$$$$$","#$$$$$$","#$$$$$$","#$$$$$$","#$$$$$$","#8bae21","#8bae21","#8bae21","#$$$$$$"],
["#$$$$$$","#$$$$$$","#$$$$$$","#8bae21","#$$$$$$","#$$$$$$","#$$$$$$","#8bae21","#8bae21","#8bae21","#$$$$$$","#$$$$$$","#$$$$$$","#8bae21","#$$$$$$","#$$$$$$","#$$$$$$"],
["#$$$$$$","#$$$$$$","#$$$$$$","#8bae21","#8bae21","#8bae21","#8bae21","#8bae21","#$$$$$$","#8bae21","#8bae21","#8bae21","#8bae21","#8bae21","#$$$$$$","#$$$$$$","#$$$$$$"],
["#$$$$$$","#$$$$$$","#$$$$$$","#8bae21","#$$$$$$","#$$$$$$","#$$$$$$","#8bae21","#$$$$$$","#8bae21","#$$$$$$","#$$$$$$","#$$$$$$","#8bae21","#$$$$$$","#$$$$$$","#$$$$$$"],
["#$$$$$$","#$$$$$$","#$$$$$$","#8bae21","#8bae21","#8bae21","#8bae21","#8bae21","#$$$$$$","#8bae21","#8bae21","#8bae21","#8bae21","#8bae21","#$$$$$$","#$$$$$$","#$$$$$$"]
];
var example = new $art({
target : document.getElementById("example"), // canvas element
image : exampleArr, // image arr
size : 10, // pixel size
success : function() { // success callback
alert("such w0w amaze!");
}
});
example.draw();
example.resize(5); // yes, u can!
result
future tasks
- [x] Initial Release
- [ ] Test
- [ ] And more development processes (best part)
contributing
- Fork it!
- Create your feature branch:
git checkout -b my-new-feature
- Commit your changes:
git commit -m 'Add some feature'
- Push to the branch:
git push origin my-new-feature
- Submit a pull request :D
8art
8bit design thing with fuckin' javascript array
usage
<canvas id="example" width="300" height="300"></canvas>
// from "designs/you.json"
// "#$$$$$$" for transparent color <3
var exampleArr = [
["#$$$$$$","#$$$$$$","#$$$$$$","#$$$$$$","#$$$$$$","#$$$$$$","#8bae21","#8bae21","#8bae21","#8bae21","#8bae21","#$$$$$$","#$$$$$$","#$$$$$$","#$$$$$$","#$$$$$$","#$$$$$$"],
["#$$$$$$","#$$$$$$","#$$$$$$","#$$$$$$","#8bae21","#8bae21","#$$$$$$","#$$$$$$","#$$$$$$","#$$$$$$","#$$$$$$","#8bae21","#8bae21","#$$$$$$","#$$$$$$","#$$$$$$","#$$$$$$"],
["#$$$$$$","#$$$$$$","#$$$$$$","#8bae21","#$$$$$$","#$$$$$$","#$$$$$$","#$$$$$$","#$$$$$$","#$$$$$$","#$$$$$$","#$$$$$$","#$$$$$$","#8bae21","#$$$$$$","#$$$$$$","#$$$$$$"],
["#$$$$$$","#$$$$$$","#8bae21","#$$$$$$","#$$$$$$","#$$$$$$","#$$$$$$","#$$$$$$","#$$$$$$","#$$$$$$","#$$$$$$","#$$$$$$","#$$$$$$","#$$$$$$","#8bae21","#$$$$$$","#$$$$$$"],
["#$$$$$$","#$$$$$$","#8bae21","#$$$$$$","#$$$$$$","#$$$$$$","#8bae21","#$$$$$$","#$$$$$$","#$$$$$$","#8bae21","#$$$$$$","#$$$$$$","#$$$$$$","#8bae21","#$$$$$$","#$$$$$$"],
["#$$$$$$","#$$$$$$","#8bae21","#$$$$$$","#$$$$$$","#$$$$$$","#cccccc","#$$$$$$","#$$$$$$","#$$$$$$","#cccccc","#$$$$$$","#$$$$$$","#$$$$$$","#8bae21","#$$$$$$","#$$$$$$"],
["#$$$$$$","#$$$$$$","#8bae21","#$$$$$$","#$$$$$$","#$$$$$$","#cccccc","#$$$$$$","#$$$$$$","#$$$$$$","#cccccc","#$$$$$$","#$$$$$$","#$$$$$$","#8bae21","#$$$$$$","#$$$$$$"],
["#$$$$$$","#$$$$$$","#8bae21","#$$$$$$","#$$$$$$","#$$$$$$","#8bae21","#$$$$$$","#$$$$$$","#$$$$$$","#8bae21","#$$$$$$","#$$$$$$","#$$$$$$","#8bae21","#$$$$$$","#$$$$$$"],
["#$$$$$$","#$$$$$$","#8bae21","#$$$$$$","#$$$$$$","#$$$$$$","#$$$$$$","#$$$$$$","#$$$$$$","#$$$$$$","#$$$$$$","#$$$$$$","#$$$$$$","#$$$$$$","#8bae21","#$$$$$$","#$$$$$$"],
["#$$$$$$","#$$$$$$","#$$$$$$","#8bae21","#$$$$$$","#$$$$$$","#$$$$$$","#$$$$$$","#$$$$$$","#$$$$$$","#$$$$$$","#$$$$$$","#$$$$$$","#8bae21","#$$$$$$","#$$$$$$","#$$$$$$"],
["#$$$$$$","#$$$$$$","#8bae21","#$$$$$$","#8bae21","#8bae21","#8bae21","#8bae21","#8bae21","#8bae21","#8bae21","#8bae21","#8bae21","#$$$$$$","#8bae21","#$$$$$$","#$$$$$$"],
["#$$$$$$","#8bae21","#$$$$$$","#$$$$$$","#8bae21","#$$$$$$","#$$$$$$","#$$$$$$","#$$$$$$","#$$$$$$","#$$$$$$","#$$$$$$","#8bae21","#$$$$$$","#$$$$$$","#8bae21","#$$$$$$"],
["#$$$$$$","#8bae21","#$$$$$$","#8bae21","#$$$$$$","#$$$$$$","#$$$$$$","#$$$$$$","#$$$$$$","#$$$$$$","#$$$$$$","#$$$$$$","#$$$$$$","#8bae21","#$$$$$$","#8bae21","#$$$$$$"],
["#8bae21","#8bae21","#8bae21","#8bae21","#$$$$$$","#$$$$$$","#$$$$$$","#$$$$$$","#$$$$$$","#$$$$$$","#$$$$$$","#$$$$$$","#$$$$$$","#8bae21","#8bae21","#8bae21","#8bae21"],
["#8bae21","#$$$$$$","#$$$$$$","#8bae21","#$$$$$$","#$$$$$$","#$$$$$$","#$$$$$$","#$$$$$$","#$$$$$$","#$$$$$$","#$$$$$$","#$$$$$$","#8bae21","#$$$$$$","#$$$$$$","#8bae21"],
["#$$$$$$","#8bae21","#8bae21","#8bae21","#$$$$$$","#$$$$$$","#$$$$$$","#$$$$$$","#$$$$$$","#$$$$$$","#$$$$$$","#$$$$$$","#$$$$$$","#8bae21","#8bae21","#8bae21","#$$$$$$"],
["#$$$$$$","#$$$$$$","#$$$$$$","#8bae21","#$$$$$$","#$$$$$$","#$$$$$$","#8bae21","#8bae21","#8bae21","#$$$$$$","#$$$$$$","#$$$$$$","#8bae21","#$$$$$$","#$$$$$$","#$$$$$$"],
["#$$$$$$","#$$$$$$","#$$$$$$","#8bae21","#8bae21","#8bae21","#8bae21","#8bae21","#$$$$$$","#8bae21","#8bae21","#8bae21","#8bae21","#8bae21","#$$$$$$","#$$$$$$","#$$$$$$"],
["#$$$$$$","#$$$$$$","#$$$$$$","#8bae21","#$$$$$$","#$$$$$$","#$$$$$$","#8bae21","#$$$$$$","#8bae21","#$$$$$$","#$$$$$$","#$$$$$$","#8bae21","#$$$$$$","#$$$$$$","#$$$$$$"],
["#$$$$$$","#$$$$$$","#$$$$$$","#8bae21","#8bae21","#8bae21","#8bae21","#8bae21","#$$$$$$","#8bae21","#8bae21","#8bae21","#8bae21","#8bae21","#$$$$$$","#$$$$$$","#$$$$$$"]
];
var example = new $art({
target : document.getElementById("example"), // canvas element
image : exampleArr, // image arr
size : 10, // pixel size
success : function() { // success callback
alert("such w0w amaze!");
}
});
example.draw();
example.resize(5); // yes, u can!
result
future tasks
- [x] Initial Release
- [ ] Test
- [ ] And more development processes (best part)
contributing
- Fork it!
- Create your feature branch:
git checkout -b my-new-feature
- Commit your changes:
git commit -m 'Add some feature'
- Push to the branch:
git push origin my-new-feature
- Submit a pull request :D