@ssafy-mhk/e-ver 1.0.2 → 1.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +183 -114
- package/dist/api/EverClient.d.ts +12 -1
- package/dist/api/EverClient.test.d.ts +1 -0
- package/dist/avatar/VRMCompat.d.ts +8 -0
- package/dist/avatar/avatarLoader.d.ts +12 -0
- package/dist/avatar/humanoidBindings.d.ts +7 -0
- package/dist/bodyPreset/presetSelection.d.ts +31 -0
- package/dist/components/CameraView.d.ts +5 -0
- package/dist/components/EverCanvas.d.ts +2 -0
- package/dist/components/EverFittingScene.d.ts +18 -0
- package/dist/components/EverFittingScene.test.d.ts +1 -0
- package/dist/components/EverProvider.d.ts +0 -8
- package/dist/components/EverTrackedGarment.d.ts +15 -0
- package/dist/components/TrackedGarmentPoseDriver.d.ts +13 -0
- package/dist/components/WebcamPlaneBackground.d.ts +7 -0
- package/dist/components/ever-context.d.ts +9 -0
- package/dist/compositing/videoCover.d.ts +14 -0
- package/dist/fitting/bodyFirstFitting.d.ts +14 -0
- package/dist/fitting/bodyFirstFitting.test.d.ts +1 -0
- package/dist/garment/constants.d.ts +1 -0
- package/dist/garment/fitMotion.d.ts +18 -0
- package/dist/garment/garmentFitProfile.d.ts +24 -0
- package/dist/garment/poseApplication.d.ts +18 -0
- package/dist/garment/trackedGarmentMotion.d.ts +32 -0
- package/dist/garment/trackedModelTransform.d.ts +40 -0
- package/dist/hooks/useAvatarVariant.d.ts +12 -0
- package/dist/hooks/useBodyMeasurer.d.ts +13 -4
- package/dist/hooks/useBodyMeasurer.test.d.ts +1 -0
- package/dist/hooks/useBodyPresetSelection.d.ts +3 -0
- package/dist/hooks/useEverFitting.d.ts +51 -0
- package/dist/hooks/useEverFitting.test.d.ts +1 -0
- package/dist/hooks/useEverGeneration.d.ts +4 -5
- package/dist/hooks/useEverGeneration.test.d.ts +1 -0
- package/dist/hooks/useMeasurement.d.ts +19 -0
- package/dist/hooks/usePoseMapper.d.ts +2 -1
- package/dist/hooks/usePoseTracker.d.ts +24 -6
- package/dist/hooks/usePoseTracker.test.d.ts +1 -0
- package/dist/hooks/useWebcam.d.ts +19 -0
- package/dist/hooks/useWebcam.test.d.ts +1 -0
- package/dist/index.d.ts +45 -0
- package/dist/index.es.js +3119 -40588
- package/dist/index.umd.js +1 -4415
- package/dist/measurement/garmentScaler.d.ts +19 -0
- package/dist/measurement/scaleCalculator.d.ts +5 -0
- package/dist/measurement/scaleCalculator.test.d.ts +1 -0
- package/dist/measurement/silhouetteExtractor.d.ts +3 -0
- package/dist/measurement/sizeRecommender.d.ts +2 -0
- package/dist/pose/boneMapping.d.ts +14 -0
- package/dist/pose/coordinateTransform.d.ts +9 -0
- package/dist/pose/facingDetector.d.ts +35 -0
- package/dist/pose/interpolation.d.ts +16 -0
- package/dist/pose/landmarkPoseSolver.d.ts +9 -0
- package/dist/pose/landmarkerFactory.d.ts +13 -0
- package/dist/pose/poseSolver.d.ts +2 -0
- package/dist/pose/segmentation.d.ts +9 -0
- package/dist/pose/smoothing.d.ts +12 -0
- package/dist/pose/yawDirectionStabilizer.d.ts +20 -0
- package/dist/pose/yawFreezeController.d.ts +11 -0
- package/dist/publicApi.test.d.ts +1 -0
- package/dist/store/useEverStore.d.ts +10 -5
- package/dist/tracking/personLock.d.ts +39 -0
- package/dist/tracking/trackingStability.d.ts +6 -0
- package/dist/tracking/trackingState.d.ts +18 -0
- package/dist/types/bodyPreset.d.ts +65 -0
- package/dist/types/fitting.d.ts +15 -0
- package/dist/types/measurement.d.ts +42 -0
- package/dist/types/pose.d.ts +81 -0
- package/dist/types/tracking.d.ts +13 -0
- package/package.json +11 -6
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import * as THREE from "three";
|
|
2
|
+
export interface GarmentBoneBinding {
|
|
3
|
+
bone: THREE.Bone;
|
|
4
|
+
restQuaternion: THREE.Quaternion;
|
|
5
|
+
restScale: THREE.Vector3;
|
|
6
|
+
restWorldPosition?: THREE.Vector3;
|
|
7
|
+
restWorldQuaternion?: THREE.Quaternion;
|
|
8
|
+
restParentWorldQuaternion?: THREE.Quaternion;
|
|
9
|
+
}
|
|
10
|
+
export type GarmentBoneBindingMap = Map<string, GarmentBoneBinding[]>;
|
|
11
|
+
export interface GarmentFitProfile {
|
|
12
|
+
anchor: THREE.Vector3;
|
|
13
|
+
shoulderCenter: THREE.Vector3;
|
|
14
|
+
hipCenter: THREE.Vector3;
|
|
15
|
+
referenceWidth: number;
|
|
16
|
+
referenceTorsoHeight: number;
|
|
17
|
+
trackingHeight: number;
|
|
18
|
+
boundsCenter: THREE.Vector3;
|
|
19
|
+
boundsSize: THREE.Vector3;
|
|
20
|
+
hasBoneAnchors: boolean;
|
|
21
|
+
}
|
|
22
|
+
export declare function captureBoneBinding(bone: THREE.Bone): GarmentBoneBinding;
|
|
23
|
+
export declare function computeGarmentFitProfile(scene: THREE.Group, bones: GarmentBoneBindingMap, fallbackWidth?: number): GarmentFitProfile;
|
|
24
|
+
export declare function resetBoneRotations(bones: GarmentBoneBindingMap): void;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { NormalizedLandmark } from "@mediapipe/tasks-vision";
|
|
2
|
+
import { type MutableRefObject } from "react";
|
|
3
|
+
import * as THREE from "three";
|
|
4
|
+
import { type LandmarkCoordinateSpace } from "../pose/landmarkPoseSolver";
|
|
5
|
+
import { type GarmentBoneBindingMap } from "./garmentFitProfile";
|
|
6
|
+
export interface PoseApplicationRefs {
|
|
7
|
+
clockRef: MutableRefObject<THREE.Timer>;
|
|
8
|
+
prevRotationsRef: MutableRefObject<Map<string, THREE.Quaternion>>;
|
|
9
|
+
}
|
|
10
|
+
interface ApplyLandmarkPoseOptions {
|
|
11
|
+
coordinateSpace?: LandmarkCoordinateSpace;
|
|
12
|
+
excludeBones?: Set<string>;
|
|
13
|
+
}
|
|
14
|
+
export declare function usePoseApplicationRefs(): PoseApplicationRefs;
|
|
15
|
+
export declare function applyLandmarkPoseToGarment(landmarks: NormalizedLandmark[], bones: GarmentBoneBindingMap, refs: PoseApplicationRefs, options?: ApplyLandmarkPoseOptions): void;
|
|
16
|
+
export declare function resetPoseState(bones: GarmentBoneBindingMap, refs: PoseApplicationRefs): void;
|
|
17
|
+
export declare function blendBonesToRest(bones: GarmentBoneBindingMap, factor: number, delta: number, onlyBones?: Set<string>): void;
|
|
18
|
+
export {};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import type { NormalizedLandmark } from "@mediapipe/tasks-vision";
|
|
2
|
+
import * as THREE from "three";
|
|
3
|
+
import { FacingDetector, type FacingState } from "../pose/facingDetector";
|
|
4
|
+
import { YawFreezeController } from "../pose/yawFreezeController";
|
|
5
|
+
import type { GarmentBoneBindingMap, GarmentFitProfile } from "./garmentFitProfile";
|
|
6
|
+
import { type TrackedModelTransformScratch } from "./trackedModelTransform";
|
|
7
|
+
import { type PoseApplicationRefs } from "./poseApplication";
|
|
8
|
+
export interface TrackedGarmentMotionState {
|
|
9
|
+
transformScratch: TrackedModelTransformScratch;
|
|
10
|
+
facingDetector: FacingDetector;
|
|
11
|
+
yawFreezeController: YawFreezeController;
|
|
12
|
+
displayYaw: number | null;
|
|
13
|
+
lastFacingState: FacingState | null;
|
|
14
|
+
hasInitialPosition: boolean;
|
|
15
|
+
}
|
|
16
|
+
export interface UpdateTrackedGarmentMotionParams {
|
|
17
|
+
fitProfile: GarmentFitProfile;
|
|
18
|
+
garmentRoot: THREE.Group;
|
|
19
|
+
boneBindingMap: GarmentBoneBindingMap;
|
|
20
|
+
poseRefs: PoseApplicationRefs;
|
|
21
|
+
motionState: TrackedGarmentMotionState;
|
|
22
|
+
landmarks: NormalizedLandmark[] | null;
|
|
23
|
+
worldLandmarks?: NormalizedLandmark[] | null;
|
|
24
|
+
viewportWidth: number;
|
|
25
|
+
viewportHeight: number;
|
|
26
|
+
poseFrameWidth?: number;
|
|
27
|
+
poseFrameHeight?: number;
|
|
28
|
+
delta: number;
|
|
29
|
+
}
|
|
30
|
+
export declare function createTrackedGarmentMotionState(): TrackedGarmentMotionState;
|
|
31
|
+
export declare function resetTrackedGarmentMotionState(state: TrackedGarmentMotionState): void;
|
|
32
|
+
export declare function updateTrackedGarmentMotion({ fitProfile, garmentRoot, boneBindingMap, poseRefs, motionState, landmarks, worldLandmarks, viewportWidth, viewportHeight, poseFrameWidth, poseFrameHeight, delta, }: UpdateTrackedGarmentMotionParams): FacingState | null;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import type { NormalizedLandmark } from "@mediapipe/tasks-vision";
|
|
2
|
+
import * as THREE from "three";
|
|
3
|
+
import type { GarmentFitProfile } from "./garmentFitProfile";
|
|
4
|
+
export interface TrackedModelTransformScratch {
|
|
5
|
+
leftShoulder: THREE.Vector3;
|
|
6
|
+
rightShoulder: THREE.Vector3;
|
|
7
|
+
leftHip: THREE.Vector3;
|
|
8
|
+
rightHip: THREE.Vector3;
|
|
9
|
+
shoulderCenter: THREE.Vector3;
|
|
10
|
+
hipCenter: THREE.Vector3;
|
|
11
|
+
bodyTop: THREE.Vector3;
|
|
12
|
+
bodyBottom: THREE.Vector3;
|
|
13
|
+
anchor: THREE.Vector3;
|
|
14
|
+
scaledAnchor: THREE.Vector3;
|
|
15
|
+
position: THREE.Vector3;
|
|
16
|
+
scale: THREE.Vector3;
|
|
17
|
+
stabilizedBodyHeightScale: number | null;
|
|
18
|
+
missingBodyHeightFrames: number;
|
|
19
|
+
smoothedGlobalScale: number;
|
|
20
|
+
hasSmoothedGlobalScale: boolean;
|
|
21
|
+
effectiveYaw: number;
|
|
22
|
+
previousDepthProxy: number;
|
|
23
|
+
scaleVelocity: number;
|
|
24
|
+
smoothedXDeviation: number;
|
|
25
|
+
smoothedAnchor: THREE.Vector3;
|
|
26
|
+
hasSmoothedAnchor: boolean;
|
|
27
|
+
}
|
|
28
|
+
export interface TrackedModelTransformOptions {
|
|
29
|
+
scaleX?: number;
|
|
30
|
+
scaleY?: number;
|
|
31
|
+
scaleZ?: number;
|
|
32
|
+
scaleMultiplier?: number;
|
|
33
|
+
depthOffset?: number;
|
|
34
|
+
sourceWidth?: number;
|
|
35
|
+
sourceHeight?: number;
|
|
36
|
+
bodyYaw?: number;
|
|
37
|
+
worldLandmarks?: NormalizedLandmark[] | null;
|
|
38
|
+
}
|
|
39
|
+
export declare function createTrackedModelTransformScratch(): TrackedModelTransformScratch;
|
|
40
|
+
export declare function updateTrackedModelTransform(fitProfile: GarmentFitProfile, landmarks: NormalizedLandmark[], viewportWidth: number, viewportHeight: number, scratch: TrackedModelTransformScratch, options?: TrackedModelTransformOptions): boolean;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import * as THREE from "three";
|
|
2
|
+
import { type VRMCompatHumanoid } from "../avatar/VRMCompat";
|
|
3
|
+
import type { GarmentBoneBindingMap } from "../garment/garmentFitProfile";
|
|
4
|
+
export interface UseAvatarVariantParams {
|
|
5
|
+
url: string;
|
|
6
|
+
}
|
|
7
|
+
export interface UseAvatarVariantResult {
|
|
8
|
+
scene: THREE.Group;
|
|
9
|
+
humanoid: VRMCompatHumanoid;
|
|
10
|
+
bones: GarmentBoneBindingMap;
|
|
11
|
+
}
|
|
12
|
+
export declare function useAvatarVariant({ url, }: UseAvatarVariantParams): UseAvatarVariantResult;
|
|
@@ -1,11 +1,20 @@
|
|
|
1
|
+
export interface BodyMeasurerOptions {
|
|
2
|
+
wasmUrl?: string;
|
|
3
|
+
modelUrl?: string;
|
|
4
|
+
referenceHeightCm?: number;
|
|
5
|
+
weightKg?: number | null;
|
|
6
|
+
measurementIntervalMs?: number;
|
|
7
|
+
}
|
|
1
8
|
/**
|
|
2
9
|
* Extracts silhouette, calculates body dimensions periodically (e.g. 1Hz).
|
|
3
10
|
* Evaluates clothing fit.
|
|
11
|
+
*
|
|
12
|
+
* `wasmUrl` / `modelUrl` are reserved for future segmentation model integration.
|
|
4
13
|
*/
|
|
5
|
-
export declare const useBodyMeasurer: () => {
|
|
14
|
+
export declare const useBodyMeasurer: (_options?: BodyMeasurerOptions) => {
|
|
6
15
|
dimensions: {
|
|
7
|
-
shoulder: number;
|
|
8
|
-
chest: number;
|
|
9
|
-
waist: number;
|
|
16
|
+
shoulder: number | null;
|
|
17
|
+
chest: number | null;
|
|
18
|
+
waist: number | null;
|
|
10
19
|
} | null;
|
|
11
20
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { BodyMeasurements } from "../types/measurement";
|
|
2
|
+
import type { BodyPresetSelectionState, UseBodyPresetSelectionOptions } from "../types/bodyPreset";
|
|
3
|
+
export declare function useBodyPresetSelection(measurements: BodyMeasurements | null, options?: UseBodyPresetSelectionOptions): BodyPresetSelectionState;
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import type { UseBodyPresetSelectionOptions } from "../types/bodyPreset";
|
|
2
|
+
import type { BodyMorphResult, FitType } from "../types/fitting";
|
|
3
|
+
import type { GarmentScaleParams, MeasurementConfig } from "../types/measurement";
|
|
4
|
+
import { useBodyPresetSelection } from "./useBodyPresetSelection";
|
|
5
|
+
import { useMeasurement } from "./useMeasurement";
|
|
6
|
+
import { type PoseTrackerOptions, usePoseTracker } from "./usePoseTracker";
|
|
7
|
+
import { type UseWebcamOptions, useWebcam } from "./useWebcam";
|
|
8
|
+
export interface EverFittingOptions extends Pick<UseWebcamOptions, "width" | "height" | "facingMode" | "enabled" | "mockMode">, Pick<PoseTrackerOptions, "modelComplexity" | "numPoses" | "minDetectionConfidence" | "minTrackingConfidence" | "outputSegmentationMasks" | "viewportWidth" | "viewportHeight"> {
|
|
9
|
+
measurementEnabled?: boolean;
|
|
10
|
+
autoStartMeasurement?: boolean;
|
|
11
|
+
measurementConfig?: Partial<MeasurementConfig>;
|
|
12
|
+
bodyPresetOptions?: UseBodyPresetSelectionOptions;
|
|
13
|
+
fitType?: FitType;
|
|
14
|
+
garmentScaleHint?: number | null;
|
|
15
|
+
}
|
|
16
|
+
export interface EverFittingResult {
|
|
17
|
+
videoRef: ReturnType<typeof useWebcam>["videoRef"];
|
|
18
|
+
webcamReady: boolean;
|
|
19
|
+
webcamError: string | null;
|
|
20
|
+
startWebcam: ReturnType<typeof useWebcam>["start"];
|
|
21
|
+
stopWebcam: ReturnType<typeof useWebcam>["stop"];
|
|
22
|
+
isTrackerReady: ReturnType<typeof usePoseTracker>["isTrackerReady"];
|
|
23
|
+
landmarks: ReturnType<typeof usePoseTracker>["landmarks"];
|
|
24
|
+
worldLandmarks: ReturnType<typeof usePoseTracker>["worldLandmarks"];
|
|
25
|
+
poseRig: ReturnType<typeof usePoseTracker>["poseRig"];
|
|
26
|
+
confidence: number;
|
|
27
|
+
fps: number;
|
|
28
|
+
isTracking: boolean;
|
|
29
|
+
drawLandmarks: ReturnType<typeof usePoseTracker>["drawLandmarks"];
|
|
30
|
+
silhouetteWidths: ReturnType<typeof usePoseTracker>["silhouetteWidths"];
|
|
31
|
+
poseFrameWidth: number;
|
|
32
|
+
poseFrameHeight: number;
|
|
33
|
+
detectedPersonCount: number;
|
|
34
|
+
lockedPersonId: string | null;
|
|
35
|
+
trackingQuality: ReturnType<typeof usePoseTracker>["trackingQuality"];
|
|
36
|
+
config: ReturnType<typeof useMeasurement>["config"];
|
|
37
|
+
measurements: ReturnType<typeof useMeasurement>["measurements"];
|
|
38
|
+
sizeRecommendation: ReturnType<typeof useMeasurement>["sizeRecommendation"];
|
|
39
|
+
garmentScale: ReturnType<typeof useMeasurement>["garmentScale"];
|
|
40
|
+
finalGarmentScale: GarmentScaleParams;
|
|
41
|
+
bodyMorphResult: BodyMorphResult | null;
|
|
42
|
+
isMeasuring: boolean;
|
|
43
|
+
canMeasure: boolean;
|
|
44
|
+
startMeasurement: ReturnType<typeof useMeasurement>["startMeasurement"];
|
|
45
|
+
updateConfig: ReturnType<typeof useMeasurement>["updateConfig"];
|
|
46
|
+
bodyPresetSelection: ReturnType<typeof useBodyPresetSelection>["selection"];
|
|
47
|
+
bodyPresetLoading: boolean;
|
|
48
|
+
bodyPresetError: string | null;
|
|
49
|
+
}
|
|
50
|
+
export type EverFittingRuntimeState = EverFittingResult;
|
|
51
|
+
export declare function useEverFitting(options?: EverFittingOptions): EverFittingResult;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,13 +1,12 @@
|
|
|
1
|
-
import { type BodyPresetMatchRequest, type GarmentData } from "../api/EverClient";
|
|
1
|
+
import { type EverClientOptions, type BodyPresetMatchRequest, type GarmentData } from "../api/EverClient";
|
|
2
2
|
export type GenerationStatus = "idle" | "uploading" | "processing" | "ready" | "error";
|
|
3
3
|
/**
|
|
4
4
|
* Coordinates backend-backed model acquisition for the SDK demo flows.
|
|
5
5
|
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
* synthesis. Blob input therefore resolves to a default preset match.
|
|
6
|
+
* Accepts an optional `EverClientOptions` to configure apiKey / baseUrl.
|
|
7
|
+
* For backward compatibility, a plain `string` baseUrl is still accepted.
|
|
9
8
|
*/
|
|
10
|
-
export declare function useEverGeneration(
|
|
9
|
+
export declare function useEverGeneration(options?: string | EverClientOptions): {
|
|
11
10
|
status: GenerationStatus;
|
|
12
11
|
resultUrl: string | null;
|
|
13
12
|
error: string | null;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { type BodyMeasurements, type GarmentScaleParams, type MeasurementConfig, type SilhouetteWidths, type SizeRecommendation } from "../types/measurement";
|
|
2
|
+
import type { PoseLandmarkLike } from "../types/pose";
|
|
3
|
+
interface MeasurementInputOptions {
|
|
4
|
+
silhouetteWidths?: SilhouetteWidths | null;
|
|
5
|
+
imageWidth?: number;
|
|
6
|
+
imageHeight?: number;
|
|
7
|
+
}
|
|
8
|
+
interface UseMeasurementResult {
|
|
9
|
+
measure: (landmarks: PoseLandmarkLike[], options?: MeasurementInputOptions) => void;
|
|
10
|
+
startMeasurement: () => void;
|
|
11
|
+
measurements: BodyMeasurements | null;
|
|
12
|
+
sizeRecommendation: SizeRecommendation | null;
|
|
13
|
+
garmentScale: GarmentScaleParams | null;
|
|
14
|
+
isMeasuring: boolean;
|
|
15
|
+
updateConfig: (config: Partial<MeasurementConfig>) => void;
|
|
16
|
+
config: MeasurementConfig;
|
|
17
|
+
}
|
|
18
|
+
export declare function useMeasurement(): UseMeasurementResult;
|
|
19
|
+
export type { UseMeasurementResult, MeasurementInputOptions };
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import * as THREE from "three";
|
|
2
|
+
import { type PoseLandmarkLike } from "../types/pose";
|
|
2
3
|
/**
|
|
3
4
|
* Custom hook to map MediaPipe 2D/3D landmarks to 3D bones (Quaternions).
|
|
4
5
|
*/
|
|
5
6
|
export declare const usePoseMapper: () => {
|
|
6
|
-
mapPoseToBones: (landmarks:
|
|
7
|
+
mapPoseToBones: (landmarks: PoseLandmarkLike[], targetBones: Record<string, THREE.Bone>) => void;
|
|
7
8
|
};
|
|
@@ -1,7 +1,25 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
export
|
|
1
|
+
import { type ModelComplexity } from "../pose/landmarkerFactory";
|
|
2
|
+
import { type PoseState } from "../types/pose";
|
|
3
|
+
import { type TrackingRuntimeState } from "../types/tracking";
|
|
4
|
+
import type { SilhouetteWidths } from "../types/measurement";
|
|
5
|
+
export interface PoseTrackerOptions {
|
|
6
|
+
enabled?: boolean;
|
|
7
|
+
modelComplexity?: ModelComplexity;
|
|
8
|
+
numPoses?: number;
|
|
9
|
+
minDetectionConfidence?: number;
|
|
10
|
+
minTrackingConfidence?: number;
|
|
11
|
+
outputSegmentationMasks?: boolean;
|
|
12
|
+
viewportWidth?: number;
|
|
13
|
+
viewportHeight?: number;
|
|
14
|
+
}
|
|
15
|
+
export interface PoseTrackerResult extends PoseState {
|
|
6
16
|
isTrackerReady: boolean;
|
|
7
|
-
|
|
17
|
+
drawLandmarks: (canvas: HTMLCanvasElement) => void;
|
|
18
|
+
silhouetteWidths: SilhouetteWidths | null;
|
|
19
|
+
poseFrameWidth: number;
|
|
20
|
+
poseFrameHeight: number;
|
|
21
|
+
detectedPersonCount: number;
|
|
22
|
+
lockedPersonId: string | null;
|
|
23
|
+
trackingQuality: TrackingRuntimeState["trackingQuality"];
|
|
24
|
+
}
|
|
25
|
+
export declare const usePoseTracker: (videoRef: React.RefObject<HTMLVideoElement | null>, options?: PoseTrackerOptions) => PoseTrackerResult;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { RefObject } from "react";
|
|
2
|
+
export interface UseWebcamOptions {
|
|
3
|
+
width?: number;
|
|
4
|
+
height?: number;
|
|
5
|
+
facingMode?: "user" | "environment";
|
|
6
|
+
enabled?: boolean;
|
|
7
|
+
mockMode?: boolean;
|
|
8
|
+
videoRef?: RefObject<HTMLVideoElement | null>;
|
|
9
|
+
onReadyChange?: (ready: boolean) => void;
|
|
10
|
+
onErrorChange?: (message: string | null) => void;
|
|
11
|
+
}
|
|
12
|
+
export interface UseWebcamResult {
|
|
13
|
+
videoRef: RefObject<HTMLVideoElement | null>;
|
|
14
|
+
isReady: boolean;
|
|
15
|
+
error: string | null;
|
|
16
|
+
start: () => Promise<void>;
|
|
17
|
+
stop: () => void;
|
|
18
|
+
}
|
|
19
|
+
export declare function useWebcam(options?: UseWebcamOptions): UseWebcamResult;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/index.d.ts
CHANGED
|
@@ -1,11 +1,56 @@
|
|
|
1
1
|
export * from "./store/useEverStore";
|
|
2
2
|
export * from "./components/EverProvider";
|
|
3
|
+
export * from "./components/ever-context";
|
|
3
4
|
export * from "./components/EverCanvas";
|
|
5
|
+
export * from "./components/EverFittingScene";
|
|
6
|
+
export * from "./components/EverTrackedGarment";
|
|
4
7
|
export * from "./components/CameraView";
|
|
5
8
|
export * from "./components/AvatarModel";
|
|
6
9
|
export * from "./components/GarmentModel";
|
|
10
|
+
export * from "./components/TrackedGarmentPoseDriver";
|
|
11
|
+
export * from "./components/WebcamPlaneBackground";
|
|
7
12
|
export * from "./hooks/usePoseTracker";
|
|
8
13
|
export * from "./hooks/usePoseMapper";
|
|
9
14
|
export * from "./hooks/useBodyMeasurer";
|
|
15
|
+
export * from "./hooks/useMeasurement";
|
|
16
|
+
export * from "./hooks/useWebcam";
|
|
17
|
+
export * from "./hooks/useEverFitting";
|
|
18
|
+
export * from "./hooks/useAvatarVariant";
|
|
19
|
+
export * from "./hooks/useBodyPresetSelection";
|
|
10
20
|
export * from "./api/EverClient";
|
|
11
21
|
export * from "./hooks/useEverGeneration";
|
|
22
|
+
export * from "./types/measurement";
|
|
23
|
+
export * from "./types/pose";
|
|
24
|
+
export * from "./types/tracking";
|
|
25
|
+
export * from "./types/fitting";
|
|
26
|
+
export type { BodyPresetGender, BodyPresetSelectionSource, BodyPresetTaxonomy, BodyPresetMetrics, BodyPresetSelection, BodyPresetSelectionState, BodyPresetSummary, UseBodyPresetSelectionOptions, } from "./types/bodyPreset";
|
|
27
|
+
export * from "./measurement/scaleCalculator";
|
|
28
|
+
export * from "./measurement/sizeRecommender";
|
|
29
|
+
export * from "./measurement/garmentScaler";
|
|
30
|
+
export * from "./measurement/silhouetteExtractor";
|
|
31
|
+
export * from "./bodyPreset/presetSelection";
|
|
32
|
+
export * from "./fitting/bodyFirstFitting";
|
|
33
|
+
export * from "./garment/garmentFitProfile";
|
|
34
|
+
export * from "./garment/fitMotion";
|
|
35
|
+
export * from "./garment/trackedModelTransform";
|
|
36
|
+
export * from "./garment/constants";
|
|
37
|
+
export * from "./garment/poseApplication";
|
|
38
|
+
export * from "./garment/trackedGarmentMotion";
|
|
39
|
+
export * from "./avatar/avatarLoader";
|
|
40
|
+
export * from "./avatar/VRMCompat";
|
|
41
|
+
export * from "./avatar/humanoidBindings";
|
|
42
|
+
export * from "./compositing/videoCover";
|
|
43
|
+
export * from "./pose/coordinateTransform";
|
|
44
|
+
export * from "./pose/landmarkPoseSolver";
|
|
45
|
+
export * from "./pose/poseSolver";
|
|
46
|
+
export * from "./pose/smoothing";
|
|
47
|
+
export * from "./pose/interpolation";
|
|
48
|
+
export * from "./pose/landmarkerFactory";
|
|
49
|
+
export * from "./pose/segmentation";
|
|
50
|
+
export * from "./pose/boneMapping";
|
|
51
|
+
export * from "./pose/facingDetector";
|
|
52
|
+
export * from "./pose/yawFreezeController";
|
|
53
|
+
export * from "./pose/yawDirectionStabilizer";
|
|
54
|
+
export * from "./tracking/personLock";
|
|
55
|
+
export * from "./tracking/trackingState";
|
|
56
|
+
export * from "./tracking/trackingStability";
|