toio-browser
v1.0.0-1
Published
toio.js for browser
Downloads
1
Readme
toio-browser
toio.js for web browsers
Usage
<script src="https://snoguchi.github.io/toio-browser/toio-browser-1.0.0.js"></script>
Example
<!DOCTYPE html>
<html>
<head>
<script src="https://snoguchi.github.io/toio-browser/toio-browser-1.0.0.js"></script>
</head>
<body>
<button id="connect">connect to cube</button>
<script>
document.getElementById("connect").addEventListener("click", async ev => {
const cube = await new toio.scanner.NearestScanner().start();
await cube.connect();
cube.move(100, 100, 1000);
});
</script>
</body>
</html>