JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 12
  • Score
    100M100P100Q39900F
  • License MIT

A JavaScript 2D graphics library based on HTML5 Canvas

Package Exports

  • bu.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (bu.js) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

bu.js

A HTML5 Canvas graphics library

Bu.js Logo

Demos - Guides - API - ChangeLog - Download

Hello World

<!DOCTYPE html>
<html>
<body>
  <script src="https://unpkg.com/bu.js/build/bu.js"></script>
  <script type="text/javascript">
    var bu = new Bu({
      objects: {
        sun: new Bu.Circle(40).fill("#F40").stroke("#820"),
        earth: new Bu.Circle(20).fill("#06F").stroke("#038"),
        moon: new Bu.Circle(10).fill("#FF0").stroke("#880"),
      },
      scene: {
        sun: {
          earth: {
            moon: {}
          }
        }
      },
      update() {
        this.sun.rotation += 0.02
        this.earth.rotation += 0.1
      },
    })
  </script>
</body>
</html>

License

MIT