Navigation for the ZIM JavaScript Canvas Framework

AboutExamplesLearnEditorCodeDocsDevsGold
JavaScript 6

ES6 WITH ZIM

You can code ZIM with ES6 (JavaScript 6). See an EXAMPLE page.
collect Plasma Points for the Plasma Points mobile app with ZIM!

ES6 MODULES



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    
    // alternatively, use script tags - see https://zimjs.com/script
    
    import from "https://zimjs.com/cdn/019/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 ANY OF THESE (or combinations):

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

    // PHYSICS
    // for plus Box2D plus physics module and game module
    import "https://zimjs.com/cdn/019/zim_physics";

    // SOCKET 
    // for socket.io plus socket module
    import "https://zimjs.com/cdn/019/zim_socket";

    // THREEJS
    // for plus three module and three.js 
    // and OrbitControls, ObjectControls, FirstPersonControls,
    // PointerLockControls, and GLTFLoader
    import "https://zimjs.com/cdn/019/zim_three";

    // CAM
    // for plus cam module
    import "https://zimjs.com/cdn/019/zim_cam";

    // PIZZAZZ
    // for plus pizzazz modules 1, 2, 3 
    import "https://zimjs.com/cdn/019/zim_pizzazz";

    // MULTIPLE MODULES 
    // for plus three plus pizzazz modules
    import "https://zimjs.com/cdn/019/zim_three";
    import "https://zimjs.com/cdn/019/zim_pizzazz";

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

    // LOCAL
    // for local versions of a module add the .js extension
    import "local/zim.js";   
    
Or you can use SCRIPT TAGS or NPM.