28 lines
953 B
Markdown
28 lines
953 B
Markdown
# mapp-board
|
|
|
|
**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.**
|
|
|
|
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.
|
|
|
|
## Using
|
|
|
|
```javascript
|
|
const mappBoard = require("mapp-board"); // Import as pre-ES6 node module
|
|
import * as mappBoard from "mapp-board"; // Import as ES6 module
|
|
// Omit both if you import as <script> tag.
|
|
|
|
document.addEventListener("DOMContentLoaded", function() {
|
|
var board = new mappBoard.Board("container");
|
|
|
|
window.addEventListener('resize', function() {
|
|
board.resize(window.innerWidth, window.innerHeight);
|
|
}, false);
|
|
board.resize(window.innerWidth, window.innerHeight);
|
|
});
|
|
```
|
|
|
|
It's an exercise to the reader to wrap it in React, angular, vue, marko or whatever library you use.
|
|
|
|
## Develop
|
|
|