InstructionModule
Example
//==============================================================================
// The following example demonstrates how to hide an instruction when more than
// one face is detected and show it if not.
//
// Project setup:
// - Set the 'Max Faces' of the 'Face Tracking' capability to 2 or more
// - Add the 'Instructions' capability
// - Select 'Custom Instructions'
// - Add the 'Try it with friends' instruction
//==============================================================================
// Load in the required modules
const Instruction = require('Instruction');
const FaceTracking = require('FaceTracking');
// Define a boolean that will be true until 2 faces are detected
var show = FaceTracking.count.lt(2);
// Bind the visibility of the instruction to the boolean
Instruction.bind(show, 'try_with_friends');Properties
Methods
Classes
Last updated
Was this helpful?