项目作者: jarvisniu

项目描述 :
A HTML5 Canvas graphics library
高级语言: JavaScript
项目地址: git://github.com/jarvisniu/bu.js.git
创建时间: 2016-01-03T14:08:38Z
项目社区:https://github.com/jarvisniu/bu.js

开源协议:MIT License

下载


bu.js

A HTML5 Canvas graphics library

bu.js logo

Examples -

API -
ChangeLog -
Download

Hello World

  1. <!DOCTYPE html>
  2. <html>
  3. <body>
  4. <script src="https://unpkg.com/bu.js/build/bu.js"></script>
  5. <script type="text/javascript">
  6. var bu = new Bu({
  7. objects: {
  8. sun: new Bu.Circle(40).fill("#F40").stroke("#820"),
  9. earth: new Bu.Circle(20).fill("#06F").stroke("#038"),
  10. moon: new Bu.Circle(10).fill("#FF0").stroke("#880"),
  11. },
  12. scene: {
  13. sun: {
  14. earth: {
  15. moon: {}
  16. }
  17. }
  18. },
  19. update() {
  20. this.sun.rotation += 0.02
  21. this.earth.rotation += 0.1
  22. },
  23. })
  24. </script>
  25. </body>
  26. </html>

License

MIT