Skip to main content
Version: v3+

onWristMotion

Start from API_LEVEL 3.0 . Please refer to API_LEVEL.

Monitoring hand movement events.

Type​

function onWristMotion(option: Option): void

Parameters​

Option​

PropertyTypeRequiredDefaultValueDescriptionAPI_LEVEL
callback(params: Params) => voidY-Digital crown rotation event callback function3.0

Params​

PropertyTypeDescriptionAPI_LEVEL
typenumberAction type, 0 - palm covering, 3 - wrist event3.6
motionnumberAction code, value reference hand motion constant3.0

Constants​

Hand motion constant​

ConstantDescriptionAPI_LEVEL
WRIST_MOTION_LIFTWrist lift2.0
WRIST_MOTION_LOWERWrist down2.0
WRIST_MOTION_FLIPFlip wrist movement2.0

Example​

import { onWristMotion, WRIST_MOTION_LIFT } from '@zos/interaction'

onWristMotion({
callback: (result) => {
const { type, motion } = result

if (type === 3) {
console.log(motion === WRIST_MOTION_LIFT)
}
},
})