.watchers.add
Arguments
Returns
Example
import lampix from '@lampix/core';
const draw = (recognizedObject) => {
// Drawing amazing effects
};
const watcher = {
name: 'DepthClassifier',
shape: lampix.helpers.rectangle(0, 0, window.innerWidth, window.innerHeight),
onClassification: (recognizedObjects) => {
recognizedObjects.forEach(draw);
}
};
lampix.watchers.add(watcher)
.then((registeredWatchers) => {
console.log(registeredWatchers.length); // 1
});Notes
Last updated
Was this helpful?