Skip to content

mapPoints

mapPoints<P, T>(mapFn, points): { [key in “nose” | “eyeInnerL” | “eyeL” | “eyeOutterL” | “eyeInnerR” | “eyeR” | “eyeOutterR” | “earL” | “earR” | “mouthL” | “mouthR” | “shoulderL” | “shoulderR” | “elbowL” | “elbowR” | “wristL” | “wristR” | “pinkyL” | “pinkyR” | “indexL” | “indexR” | “thumbL” | “thumbR” | “hipL” | “hipR” | “kneeL” | “kneeR” | “ankleL” | “ankleR” | “heelL” | “heelR” | “footIndexL” | “footIndexR”]: T }

Mapping of pose points

Builds a mapped object where values of properties for selected pose points are evaluated by the provided mapping function.

Type Parameters

P extends readonly ("nose" | "eyeInnerL" | "eyeL" | "eyeOutterL" | "eyeInnerR" | "eyeR" | "eyeOutterR" | "earL" | "earR" | "mouthL" | "mouthR" | "shoulderL" | "shoulderR" | "elbowL" | "elbowR" | "wristL" | "wristR" | "pinkyL" | "pinkyR" | "indexL" | "indexR" | "thumbL" | "thumbR" | "hipL" | "hipR" | "kneeL" | "kneeR" | "ankleL" | "ankleR" | "heelL" | "heelR" | "footIndexL" | "footIndexR")[]

T

Type of a mapped object values

Parameters

mapFn

Function mapping a key to a value

points: P

Returns

{ [key in “nose” | “eyeInnerL” | “eyeL” | “eyeOutterL” | “eyeInnerR” | “eyeR” | “eyeOutterR” | “earL” | “earR” | “mouthL” | “mouthR” | “shoulderL” | “shoulderR” | “elbowL” | “elbowR” | “wristL” | “wristR” | “pinkyL” | “pinkyR” | “indexL” | “indexR” | “thumbL” | “thumbR” | “hipL” | “hipR” | “kneeL” | “kneeR” | “ankleL” | “ankleR” | “heelL” | “heelR” | “footIndexL” | “footIndexR”]: T }

Mapped object of pose points