This is JavaScript API Reference for broox.js library.
Provides context to the apps executed within the Media Player.
import { BlobsController, getMediaInfo } from './brooxMediaPlayer.js';
Parses tuio events recieved by apps and keeps track of the blobs.
// example
const blobsController = new BlobsController(width, height, false, () => {...);
const skeletons = blobsController.getSkeletons();
Allows apps to persist json values associated to a project and a key.
// example
const user = {
firstName: 'John',
lastName: 'Doe'
};
const keyValue = new KeyValue();
keyValue.set('testApp', 'profile', user);
const profile = keyValue.get('testApp', 'profile');
Parses OSC events recieved by apps and allows to handle the different gestures.
// example
const gestureHandler = new GestureHandler(500, 2);
gestureHandler.onPresence(() => console.log('Presence'));
Listens to OSC events and executes callback functions.
// example
const oscListener = new OscListener();
oscListener.add('/start', () => console.log('Start'));
Provides classes and functions related to the rendering process of different media.
import { Composition, startDevice } from './brooxMedia.js';
Allows to create an image based on many media objects (images, videos, etc.).
// example
const composition = new Composition(width, height, borderWidth);
composition.addElement(webcam, 0, 0, webcam.videoWidth, webcam.videoHeight, 1, false);
composition.get().then(blob => {
image.src = URL.createObjectURL(blob);
)};
// example
const recorder = new Recorder(stream);
recorder.start();
setTimeout(() => {
recorder.stop().then(blob => {
console.log(blob);
)};
}, 10000);
Provides logging options.
import { LogController } from './brooxLogger.js';
Enables or disables logs to console.
// example
const logController = new LogController(true, () => {...);
console.log(message);
Provides context to communicate with Vision Node.
import { SkeletonController } from './brooxVisionNode.js';
Parses MQTT events sent by Vision Node and keeps track of the skeletons.
// example
const skeletonController = new SkeletonController(width, height, () => {...);
const skeletons = blobsController.getSkeletons();
Parses MQTT events sent by Vision Node and allows to handle the different gestures.
// example
const gestureHandler = new GestureHandler(500, 2);
gestureHandler.onPresence(() => console.log('Presence'));
Allows apps to persist json values associated to a project and a key.
// example
const user = {
firstName: 'John',
lastName: 'Doe'
};
const keyValue = new KeyValue();
keyValue.set('testApp', 'profile', user);
const profile = keyValue.get('testApp', 'profile');
MQTT client.
// example
const client = new MqttClient('localhost', 1884);
client.onMessage(() => console.log(message));
Provides context to communicate with Controller.
import { getNodes } from './brooxController.js';
Generated using TypeDoc