Navigation for the ZIM JavaScript Canvas Framework

HOMENewsAboutExamplesLearnCodeDocsDevs
JavaScript 6

You can code ZIM with ES6 (JavaScript 6). See an EXAMPLE page.


ES6 Modules can be imported for ZIM and helper libraries. See the IMPORT examples. (The imports include CreateJS as well.)
    <script type="module">
    
    // note the type="module" in the script tag above 
    // the module file must on a server to run   
    // alternatively, use script tags - see https://zimjs.com/script
    
    import zim from "https://zimjs.com/cdn/02/zim";
        
    new Frame(FIT, 1024, 768, light, dark, ready);
    function ready() {
            
        // put your code here
        
        new Circle(100, blue).center().drag();
        
    }
    
    </script>
There modules for the following libraries. Each of these includes ZIM and CreateJS. See the IMPORT examples.
    // USE ONE OF THESE:

    // REGULAR
    import zim from "https://zimjs.com/cdn/02/zim";
        
    // GAME
    // for ZIM plus game module
    import zim from "https://zimjs.com/cdn/02/zim_game";

    // PHYSICS
    // for ZIM plus Box2D plus physics module and game module
    import zim from "https://zimjs.com/cdn/02/zim_physics";

    // SOCKET 
    // Must also include a script tag above with 
    // <script src=https://zimjs.org/cdn/2.3.0/socket.io.js></script>
    import zim from "https://zimjs.com/cdn/02/zim_socket";

    // THREEJS
    // for ZIM plus three module and three.js
    import zim from "https://zimjs.com/cdn/02/zim_three";

    // CAM
    // for ZIM plus cam module
    import zim from "https://zimjs.com/cdn/02/zim_cam";

    // PIZZAZZ
    // for ZIM pluss pizzazz modules 1, 2, 3
    import zim from "https://zimjs.com/cdn/02/zim_pizzazz";

    // TEST
    // for unminified ZIM (better error messages)
    import zim from "https://zimjs.com/cdn/02/zim_test";
   
    

Or you can use SCRIPT TAGS or NPM.