8art 中文文档教程

发布于 8年前 浏览 30 项目主页 更新于 3年前

Logo

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

  1. Fork it!
  2. Create your feature branch: git checkout -b my-new-feature
  3. Commit your changes: git commit -m 'Add some feature'
  4. Push to the branch: git push origin my-new-feature
  5. Submit a pull request :D

Logo

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

Result

future tasks

  • [x] Initial Release
  • [ ] Test
  • [ ] And more development processes (best part)

contributing

  1. Fork it!
  2. Create your feature branch: git checkout -b my-new-feature
  3. Commit your changes: git commit -m 'Add some feature'
  4. Push to the branch: git push origin my-new-feature
  5. Submit a pull request :D
    我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
    原文