<html>

<head>
    <title>Shapes</title>
</head>

<body>
    <script type="module">
        import Animator from 'https://code.agentscript.org/src/Animator.js'
        import TwoDraw from 'https://code.agentscript.org/src/TwoDraw.js'

        import Model from 'https://code.agentscript.org/models/ShapesModel.js'
        import TwoDrawOptions from 'https://code.agentscript.org/views2/shapesOptions.js'

        const model = new Model()
        await model.startup()
        model.setup()

        const view = new TwoDraw(model, await TwoDrawOptions("modelDiv", model))

        const anim = new Animator(
            () => {
                model.step()
                view.draw()
            },
            500, // how many steps
            30 // at fps steps/second
        )
    </script>
    <div id="modelDiv"></div>
</body>

</html>