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
Section titled “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
Section titled “Parameters”(p) => T
Function mapping a key to a value
points
Section titled “points”P
Returns
Section titled “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