AlgorithmManager
Access point for frame-based algorithm results exposed by the engine, such as face detection, face attributes, and related tracking data.
| Type | Name | Interface Description |
|---|---|---|
| Static Functions | getResult(): AlgorithmResult | • Function: Returns the current frame's algorithm result wrapper. The returned object exposes typed accessors such as face count, face base information, and face attribute information. |
Examples
getResult(): AlgorithmResult
const result = APJS.AlgorithmManager.getResult();
if (result.getFaceCount() > 0) {
const face = result.getFaceBaseInfo(0);
const isLookingLeft = face.yaw > 0.2;
}
Use Case
@component()
export class NewBehaviourScript extends APJS.BasicScriptComponent {
onStart() {
// TODO: instantiate / use AlgorithmManager here
}
onUpdate(deltaTime: number) {
}
}