scrawl-canvas
Version:
Version 8.9.4 - 19 Nov 2022
56 lines (42 loc) • 1.67 kB
HTML
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Demo Modules 003</title>
<link href="css/normalize.css" rel="stylesheet" />
<link href="css/tests.css" rel="stylesheet" />
<style>
canvas {
margin: 0 auto 1em;
}
</style>
</head>
<body>
<h1><a href="index.html">Scrawl-canvas v8</a> - Modules test 003</h1>
<h2>Factory functions to create more complex, compound entitys</h2>
<canvas
id="mycanvas"
width="600"
height="600"
data-scrawl-canvas
data-base-background-color="azure"
></canvas>
<p id="reportmessage"></p>
<div class="testinfo">
<h4>Test purpose</h4>
<ul>
<li>Create a function that will take some parameters and, from that data, go away and create a complex layout; the function should return an object containing a reference to a Cell which displays the complex layout, alongside a kill function to remove all parts of the layout from the Scrawl-canvas ecosystem.</li>
<li>In this case, we build a "ring" layout which takes entitys and lays them out in an overlapping ring</li>
<li>Use the function to create assets to use in Picture entitys for the final scene.</li>
<li>Animate the scene using a mix of delta and tween animations.</li>
</ul>
<p><a href="../docs/demo/modules-003.html">Annotated code</a></p>
<ul>
<li><a href="../docs/demo/modules/entity-ring-builder.html">Entity ring builder module</a></li>
</ul>
</div>
<script src="modules-003.js" type="module"></script>
</body>
</html>