Snap.svg plugin for creating hexagonal UI elements.
npm install snapsvg snapsvg-hexagonal
AMD (Require.js)
Add to paths attrbute of requirejs config file and require in code
// config.js
requirejs.config({
paths: {
snapsvg: 'path/to/node_modules/snapsvg/snapsvg',
hexagonal: 'path/to/node_modules/snapsvg-hexagonal/dist/snapsvg-hexagonal'
}
});
// main.js
define(function(require) {
'use strict';
const Snap = require('snapsvg');
const hexagonal = require('hexagonal');
Snap.plugin(hexagonal);
});
Browser global
<!DOCTYPE html>
<html lang="en">
<head>...</head>
<body>
<script src="path/to/node_modules/snapsvg/snapsvg.js"></script>
<script src="path/to/node_modules/snapsvg-hexagonal/dist/snapsvg-hexagonal.js"></script>
<script type="text/javascript">
Snap.plugin('hexagonal');
/* code code code */
</script>
</body>
</html>
Under construction
Please read the contributing guide
- Follow progress on Trello
- Under construction