scrawl-canvas
Version:
Version 8.9.4 - 19 Nov 2022
51 lines (41 loc) • 1.71 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 Particles 010</title>
<link href="css/normalize.css" rel="stylesheet" />
<link href="css/tests.css" rel="stylesheet" />
<style>
canvas {
margin: 0 auto;
}
</style>
</head>
<body>
<h1><a href="index.html">Scrawl-canvas v8</a> - Particles test 010</h1>
<h2>Net entity: using a shape path as a net template</h2>
<h3>The yellow beads are draggable</h3>
<canvas
id="mycanvas"
width="600"
height="600"
data-scrawl-canvas
data-base-background-color="slategray"
></canvas>
<p id="reportmessage"></p>
<div class="testinfo">
<h4>Test purpose</h4>
<ul>
<li>Create a path-based shape entity (an arrow).</li>
<li>Create a Net entity, setting its 'generate' attribute to 'weak-shape' and its 'shapeTemplate' attribute to the arrow entity. Make the Net entity's first particle static.</li>
<li>Clone the arrow, and the Net entity; set the cloned Net's 'generate' attribute to 'strong-shape'</li>
<li>Check that the particles can be dragged, and will - generally - reform their shapes after being dragged (note that the strong arrow is, in particular, unstable in this demo and will collapse if dragged too far).</li>
</ul>
<p><b>Touch test:</b> should work as expected. Known issue: moving the pins is inconsistent (because pins are too small on device screens?)</p>
<p><a href="../docs/demo/particles-010.html">Annotated code</a></p>
</div>
<script src="particles-010.js" type="module"></script>
</body>
</html>