mirror of
https://github.com/Doodle3D/Doodle3D-API
synced 2024-12-21 21:33:48 +01:00
src | ||
.babelrc | ||
.gitignore | ||
.npmignore | ||
index.js | ||
package-lock.json | ||
package.json | ||
README.md | ||
test.gcode | ||
webpack.config.js |
Doodle3D-API
Doodle3D API for communication with the Doodle3D WiFi-Box
import { Doodle3DManager } from 'Doodle3D/Doodle3D-API';
const doodle3DManager = new Doodle3DManager();
doodle3DManager.addEventListener('boxappeared', ({box}) => {
box.addEventListener('connect', (event) => {
});
box.addEventListener('disconnect', (event) => {
});
box.addEventListener('update', (event) => {
const status = event.state;
});
box.setAutoUpdate(true, 1000);
});
doodle3DManager.setAutoUpdate(true, 1000);