Skip to content

alpicola/contextfree.js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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