scrawl-canvas
Version:
Version 8.9.4 - 19 Nov 2022
55 lines (44 loc) • 1.66 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 012</title>
<link href="css/normalize.css" rel="stylesheet" />
<link href="css/tests.css" rel="stylesheet" />
<style>
canvas {
margin: 0 auto;
}
img {
display: none;
}
</style>
</head>
<body>
<h1><a href="index.html">Scrawl-canvas v8</a> - Particles test 012</h1>
<h2>Use Net entity particles as reference coordinates for other artefacts</h2>
<h3>The Net entity particles can be dragged around the canvas</h3>
<canvas
id="mycanvas"
width="600"
height="400"
data-scrawl-canvas
data-base-background-color="aliceblue"
></canvas>
<p id="reportmessage"></p>
<div class="testinfo">
<h4>Test purpose</h4>
<ul>
<li>Create a Net entity with draggable Particles</li>
<li>Create a range of other entitys of different types, and position them on the Net entity by reference to the Net's Particle objects.</li>
<li>Check that when the Net's particles are dragged, the other entitys will update their positions accordingly.</li>
</ul>
<p><b>Touch test:</b> should work as expected. Known issue: moving the pins is inconsistent (because particle drag zones are too small on device screens?) Also, the particle system will often fail in lower-spec devices</p>
<p><a href="../docs/demo/particles-012.html">Annotated code</a></p>
</div>
<script src="particles-012.js" type="module"></script>
<img id="bunny" src="img/bunny.png" />
</body>
</html>