Skip to content

Latest commit

 

History

History
30 lines (22 loc) · 785 Bytes

README.md

File metadata and controls

30 lines (22 loc) · 785 Bytes

contextfree.js

JavaScript Implementation of Context Free.

almost compatible with Context Free 2.x, but tile directive and path directive are not supported yet.

see demo.

Usage

<script type="text/javascript" src="contextfree.js"></script>
<script type="text/javascript" src="cfdg.js"></script>
<script type="text/javascript">
    window.onload = function() {
        var src = '....'; // cfdg source
        var contextfree = new ContextFree(src, document.querySelector('canvas'));
        contextfree.render(function() {
            ... // called when rendering is done
        });
    };
</script>

License

MIT

Copyright (c) alpicola