Early work on Mapp, will move to Github or Gitlab if something becomes of it.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

27 lines
953 B

5 years ago
  1. # mapp-board
  2. **Mapp board is in early, early development. Contribution and issues are welcome, but it's a long way from being ready for any actual production use.**
  3. This is a module for a canvas-based board to help you make a mapping tool for your role-playing website. It has no API, and must be controlled through settings and events.
  4. ## Using
  5. ```javascript
  6. const mappBoard = require("mapp-board"); // Import as pre-ES6 node module
  7. import * as mappBoard from "mapp-board"; // Import as ES6 module
  8. // Omit both if you import as <script> tag.
  9. document.addEventListener("DOMContentLoaded", function() {
  10. var board = new mappBoard.Board("container");
  11. window.addEventListener('resize', function() {
  12. board.resize(window.innerWidth, window.innerHeight);
  13. }, false);
  14. board.resize(window.innerWidth, window.innerHeight);
  15. });
  16. ```
  17. It's an exercise to the reader to wrap it in React, angular, vue, marko or whatever library you use.
  18. ## Develop