FacePetInfoInterface
APJS Script API reference for the FacePetInfoInterface interface.
| Type | Name | Interface Description |
|---|---|---|
| Variables | action: number | • Function: Action type <br/> The 1st, 2nd, and 3rd digits are respectively encoded as: left eye open/close, right eye open/close, mouth open/close |
| Variables | earType: number | • Function: Ear status <br/> 0 indicates the ears are upright, and 1 indicates the ears are drooping. |
| Variables | facePetType: FacePetType | • Function: Pet face types (cat, dog, human) |
| Variables | ID: number | • Function: Each detected pet face has a unique faceID. When a pet face that was lost during tracking is detected again, it will have a new faceID. |
| Variables | pitch: number | • Function: Pitch angle, with the real measurement being negative above and positive below, in radians |
| Variables | pointsArray: Float32Array | • Function: Vector2f Flat Array. Normalized, 2D key point coordinates. |
| Variables | rect: Rect | • Function: The rectangular area of the pet face |
| Variables | roll: number | • Function: Rotation angle in radians. Negative values indicate left tilt and positive values indicate right tilt. |
| Variables | score: number | • Function: Confidence score in the range [0, 1]. |
| Variables | yaw: number | • Function: Horizontal rotation angle in radians. Negative values indicate rightward rotation and positive values indicate leftward rotation. |
Use Case
@component()
export class NewBehaviourScript extends APJS.BasicScriptComponent {
onStart() {
// TODO: instantiate / use FacePetInfoInterface here
}
onUpdate(deltaTime: number) {
}
}