UNPKG

sandai-react

Version:

React components and utilities for the Sandai 3D AI Characters.

36 lines 1.56 kB
import { VRMPose, VRMPoseTransform } from "@davidcks/r3f-vrm"; import * as poseDetect from "@tensorflow-models/pose-detection"; import { Quaternion, Vector3 } from "three"; export declare class PoseUtils { static flipPosePositions(pose: VRMPose): any; static rotatePosePositions(pose: VRMPose): { [k: string]: VRMPoseTransform; }; static rotateKp3d(root: Vector3, kp: poseDetect.Keypoint, angle: number, axis?: Vector3): Vector3; static getKeypoint3DMiddle(left: poseDetect.Keypoint, right: poseDetect.Keypoint): Vector3 & { forward: Vector3; }; static getVec3Middle(left: Vector3 & { forward?: Vector3; }, right: Vector3 & { forward?: Vector3; }, biasRight?: number): Vector3 & { forward: Vector3; }; static keypoint3DToVec3(keypoint3D: poseDetect.Keypoint): Vector3; static flipQuaternion(q: Quaternion): Quaternion; static mirrorQuaternion(q: Quaternion): Quaternion; /** * Rotates a point around the local X axis defined by origin->a, * by the angle between origin->a and origin->b. * * @param origin The origin point (vertex) * @param a Point defining local Y axis (origin -> a) * @param b Point to measure angle with (origin -> b) * @param point The point to rotate * @returns The rotated point in world space */ static rotatePointAroundLocalXByAngle(origin: Vector3, a: Vector3, b: Vector3, point: Vector3): Vector3; static debugPointsWithZLabels(points: any): void; } //# sourceMappingURL=PoseUtils.d.ts.map