mirror of
https://github.com/Doodle3D/Doodle3D-API
synced 2025-01-05 11:03:49 +01:00
Update README.md
This commit is contained in:
parent
65d61dd492
commit
8557a3e55b
@ -4,11 +4,9 @@ Doodle3D API for communication with the Doodle3D WiFi-Box
|
|||||||
```javascript
|
```javascript
|
||||||
import Doodle3DManager from 'src/doodle3dmanager.js';
|
import Doodle3DManager from 'src/doodle3dmanager.js';
|
||||||
|
|
||||||
var doodle3DManager = new Doodle3DManager();
|
const doodle3DManager = new Doodle3DManager();
|
||||||
|
|
||||||
doodle3DManager.addEventListener('boxappeared', (event) => {
|
|
||||||
var box = event.box;
|
|
||||||
|
|
||||||
|
doodle3DManager.addEventListener('boxappeared', ({box}) => {
|
||||||
box.addEventListener('connect', (event) => {
|
box.addEventListener('connect', (event) => {
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -16,7 +14,7 @@ doodle3DManager.addEventListener('boxappeared', (event) => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
box.addEventListener('update', (event) => {
|
box.addEventListener('update', (event) => {
|
||||||
var status = event.state;
|
let status = event.state;
|
||||||
});
|
});
|
||||||
|
|
||||||
box.setAutoUpdate(true);
|
box.setAutoUpdate(true);
|
||||||
|
Loading…
Reference in New Issue
Block a user