UNPKG

scrawl-canvas

Version:
55 lines (44 loc) 1.89 kB
<!DOCTYPE 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 Canvas 001</title> <link href="css/normalize.css" rel="stylesheet" /> <link href="css/tests.css" rel="stylesheet" /> </head> <body> <h1><a href="index.html">Scrawl-canvas v8</a> - Canvas test 001</h1> <h2>Block and wheel entitys (make, clone, method)<br />Drag and drop block and wheel entitys</h2> <canvas id="mycanvas" width="600" height="600" data-scrawl-canvas data-base-background-color="aliceblue" ></canvas> <p id="reportmessage"></p> <div class="testinfo"> <h4>Test purpose</h4> <ul> <li>Create block and wheel entitys</li> <li>Clone the entitys</li> <li>Position the entitys on the canvas</li> <li>Change the state of a subset of entitys sharing the same state object</li> <li>Check the various drawing methods available to the entitys</li> <li>Check that the 'purge' attribute has removed all non-essential path, pivot, mimic and filter attributes from Wheel entitys</li> </ul> <ul> <li>Check that when a drag operation starts, the dragged entity does not suddenly jump</li> <li>Check that when a drag operation ends, the dragged entity does not suddenly jump</li> </ul> <ul> <li>Kill and resurrect several entitys to make sure they remove themselves entirely from the Scrawl-canvas system, and cleanly recreate themselves from saved packets</li> </ul> <p><b>Touch test:</b> should work as expected - though flicking a block/wheel may lead to it moving beyond the canvas border and out of sight!</p> <p><a href="../docs/demo/canvas-001.html">Annotated code</a></p> </div> <script src="canvas-001.js" type="module"></script> </body> </html>