mirror of
https://github.com/Doodle3D/Doodle3D-API
synced 2024-11-05 04:33:24 +01:00
f3cadff7d5
Where plausible used parameter as arguments (https://github.com/Doodle3D/Doodle3D-API/issues/2) added doodle box manager for a cleaner structure (https://github.com/Doodle3D/Doodle3D-API/issues/9)
532 B
532 B
Doodle3D-API
Doodle3D API for communication with the Doodle3D WiFi-Box
import Doodle3DManager from 'src/doodle3dmanager.js';
var doodle3DManager = new Doodle3DManager();
doodle3DManager.addEventListener('boxappeared', (event) => {
var box = event.box;
box.addEventListener('connect', (event) => {
});
box.addEventListener('disconnect', (event) => {
});
box.addEventListener('update', (event) => {
var status = event.state;
});
box.setAutoUpdate(true);
});
doodle3DManager.setAutoUpdate(true);