Navigation for the ZIM JavaScript Canvas Framework

HOMENewsAboutExamplesLearnCodeDocsDevs
Script Tags

You can add CreateJS and ZIM as script tags above your code. The scripts can be found on the CDN. Alternatively, use Modules.
<!-- Individual Scripts from CDN -->
<script src="https://zimjs.org/cdn/1.3.4/createjs.js"></script>
<script src="https://zimjs.org/cdn/00/zim_min.js"></script>

<script>
const frame = new Frame(FIT, 1024, 768, light, dark);
frame.on("ready", () => {
    const stage = frame.stage;
    let stageW = frame.width;
    let stageH = frame.height;
    // put your code here
        
    stage.update(); 
});
</script>
Here is an example of importing the scripts for Physics. Note: this becomes one line when using Modules. Other helper libraries are similar. The top of the DOCS has commonly used libraries.
<!-- Individual Scripts from CDN -->
<script src="https://zimjs.org/cdn/1.3.4/createjs.js"></script>
<script src="https://zimjs.org/cdn/00/zim_min.js"></script>
<script src="https://zimjs.org/cdn/2.1.3/box2d.js"></script>
<script src="https://zimjs.org/cdn/physics_2.1.js"></script>

<script>
const frame = new Frame(FIT, 1024, 768, light, dark);
frame.on("ready", () => {
    const stage = frame.stage;
    let stageW = frame.width;
    let stageH = frame.height;
    // put your code here
        
    stage.update(); 
});
</script>
Or you can use ES6 MODULES or NPM.