DiagnosticsModule

The DiagnosticsModule class enables diagnostic logging.

Example

//==============================================================================
// The following example demonstrates how to log messages to the Console and
// watch signal values.
//==============================================================================

// Load in the required modules
const Diagnostics = require('Diagnostics');
const FaceTracking = require('FaceTracking');
const Scene = require('Scene');

// Log a message to the Console
Diagnostics.log('Console message logged from the script.');

// Watch a signal's value in the Console
Diagnostics.watch("Mouth Openness - ", FaceTracking.face(0).mouth.openness);

Properties

This module exposes no properties.

Methods

MethodDescription

getModuleNames

getModuleNames(): Array<string>

Returns an array of names of all the scripting modules that can be loaded through a require call. Note: This set of modules is based on the list of enabled capabilities.

getTypeDescriptions

getTypeDescriptions(): Array<string>

Finds the descriptions for each type in the effect.

log

log(content: Object): void

Flattens content to a string and prints it to the debug console. Note: this function can be reassigned to any var (i.e. foo.log = Diagnostics.log;)

watch

watch(tag: String, signal:BoolSignal): void watch(tag: String, signal:ScalarSignal): void watch(tag: String, signal:StringSignal): void

Adds the specified signal to the watch view in AR Studio with the specified tag.

Classes

This module exposes no classes.