Skip to content

Instantly share code, notes, and snippets.

@yearofthewhopper
Created February 21, 2021 00:33
Show Gist options
  • Save yearofthewhopper/092eb37e5a7787ba2a83fa45c381e3fc to your computer and use it in GitHub Desktop.
Save yearofthewhopper/092eb37e5a7787ba2a83fa45c381e3fc to your computer and use it in GitHub Desktop.
const Scene = require('Scene');
const Patches = require('Patches');
const Reactive = require('Reactive');
export const Diagnostics = require('Diagnostics');
(async function () {
const onCameraRecord = await Patches.outputs.getBoolean('cameraRec');
// const onScreenTap = await Patches.outputs.getPulse('onScreenTap');
onCameraRecord.subscribe(() => {
Diagnostics.log('cameraRecord!');
Patches.inputs.setPulse('pulseFromCameraRecord', Reactive.once())
})
// onScreenTap.subscribe(() => {
// Diagnostics.log('screenTapped!')
// Patches.inputs.setPulse('pulseFromScreenTap', Reactive.once())
// })
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment