VibHub-Browser
The library can be cloned from here.
Setup
Start by importing the library:
import {default as VH, VhProgram as Program, VhStage as Stage} from 'vh-socket.js';
Next you'll want to extend VH with a class of your own.
class App extends VH{
Constructor:
constructor(...args){
super(...args);
}
All done for our VibHub manager class! Let's try sending a program!
(async () => { const manager = new App(); manager.onDeviceOnline = function(device){ device.set(255); // Sets all ports on the device to max intensity (or 1/4 if you enable high res) }; await manager.addDevice("<your device ID>"); })();