coherent-gameface-interaction-manager
Version:
Library for the most common UI interactions
30 lines (29 loc) • 1.02 kB
HTML
<!--Copyright (c) Coherent Labs AD. All rights reserved. Licensed under the MIT License. See License.txt in the project root for license information. -->
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Draggable demo</title>
<style>
body {
background-color: white;
user-select: none;
}
.square {
width: 100px;
height: 100px;
background-color: cadetblue;
}
</style>
</head>
<body>
<h1>Drag around the square on the screen</h1>
<div class="square"></div>
<script src="../../dist/draggable.js"></script>
<script>
const square = new draggable({ element: '.square' });
</script>
</body>
</html>