Dumb(er)(est) question ? Local install

Never mind. It was a dumb question :wink:

hahaha - we did a vid about local usage - and a ZIP example under the CDN section of CODE:

https://zimjs.com/code.html#cdn

image

1 Like

maybe a little follow up, but I can preload a font in the Frame code using a WAITER, but I'd like to see a progress bar. Is this possible?

Code below doesn't seem to do anything


<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8" />
    <title>MIJNCODE</title>
    <script type="module">
        import zim from "https://zimjs.org/cdn/017/zim";
        new Frame(FIT, 960, 540, light, dark, ready, "playwrite.ttf", "", new ProgressBar());
        function ready() {
            // given F (Frame), S (Stage), W (width), H (height)
        new Label("Mol en beer gaan op avontuur", 10, "playwrite").center().sca(5).drag();
        new Circle(100, purple).center().drag();
        }
    </script>
    <meta name="viewport" content="width=device-width, user-scalable=no" />
</head>

<body></body>

</html>

It would do something if the file is big enough that you are loading. Certainly if you are loading locally, you will not see anything.

well I do have bandwidth throttling so it should show up, but it doesn't. 100% this should workl this way ? I throttle to a slow 3G connection and load a 200kB font with caching disabled

Add an image or two and see what it does.

Yep that changed. So when only preloading 1 single ttf font, it doesn't show up. Multiple images and even 1 image and a ttf do show up. So... it works :wink:

Hmm... interesting. Will see what the reason is for that when we are poking around in the Frame loadAssets code.