@ssafy-mhk/e-ver 1.0.6 → 1.0.7

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 CHANGED
@@ -27,18 +27,6 @@ pnpm add @ssafy-mhk/e-ver
27
27
  pnpm add react react-dom three @react-three/fiber @react-three/drei @mediapipe/tasks-vision zustand
28
28
  ```
29
29
 
30
- 이 레포에서 `ever/frontend`로 로컬 검증할 때는:
31
-
32
- ```bash
33
- pnpm run sdk:use-tarball
34
- ```
35
-
36
- 퍼블리시된 버전으로 되돌릴 때는:
37
-
38
- ```bash
39
- pnpm run sdk:use-version -- 1.0.4
40
- ```
41
-
42
30
  ## 서버와 인증
43
31
 
44
32
  기본 API 서버는 `http://localhost:8000/api/v1`입니다.
@@ -50,12 +38,10 @@ const client = new EverClient();
50
38
 
51
39
  const publicClient = new EverClient({
52
40
  apiKey: "ever_live_xxxxxxxx",
41
+ baseUrl: "http://localhost:8080/api/v1",
53
42
  });
54
43
  ```
55
44
 
56
- - 기본 생성자: 쿠키 인증 또는 같은 오리진 환경에서 사용
57
- - `apiKey` 지정 시: `/sdk/public/*` 경로를 사용하는 공개 SDK 모드
58
-
59
45
  `useEverGeneration`도 동일하게 `apiKey`를 받을 수 있습니다.
60
46
 
61
47
  ## 권장 사용 흐름
@@ -69,15 +55,15 @@ const publicClient = new EverClient({
69
55
 
70
56
  ## 핵심 API
71
57
 
72
- | 분류 | 모듈 | 역할 |
73
- | --- | --- | --- |
74
- | Client | `EverClient` | body preset 조회/매칭, garment 생성, 이미지 업로드, `generate-3d`, polling |
75
- | Hook | `useEverGeneration` | 의류 생성 플로우를 훅으로 제공 |
76
- | Scene | `EverFittingScene` | webcam, tracking, measurement, body preset selection, garment 렌더링 통합 |
77
- | Scene | `EverTrackedGarment` | 준비된 의류 GLB를 추적 렌더링 |
78
- | Hook | `useEverFitting` | 고수준 fitting runtime 상태 제공 |
79
- | Hook | `useBodyPresetSelection` | 측정값 기반 body preset 자동 선택 |
80
- | Renderer | `EverCanvas` | 저수준 R3F canvas wrapper |
58
+ | 분류 | 모듈 | 역할 |
59
+ | -------- | ------------------------ | -------------------------------------------------------------------------- |
60
+ | Client | `EverClient` | body preset 조회/매칭, garment 생성, 이미지 업로드, `generate-3d`, polling |
61
+ | Hook | `useEverGeneration` | 의류 생성 플로우를 훅으로 제공 |
62
+ | Scene | `EverFittingScene` | webcam, tracking, measurement, body preset selection, garment 렌더링 통합 |
63
+ | Scene | `EverTrackedGarment` | 준비된 의류 GLB를 추적 렌더링 |
64
+ | Hook | `useEverFitting` | 고수준 fitting runtime 상태 제공 |
65
+ | Hook | `useBodyPresetSelection` | 측정값 기반 body preset 자동 선택 |
66
+ | Renderer | `EverCanvas` | 저수준 R3F canvas wrapper |
81
67
 
82
68
  ## Quick Start
83
69
 
@@ -198,7 +184,11 @@ function Generator() {
198
184
  직접 조립이 필요하면 `useEverFitting`과 `EverTrackedGarment`를 사용할 수 있습니다.
199
185
 
200
186
  ```tsx
201
- import { EverCanvas, EverTrackedGarment, useEverFitting } from "@ssafy-mhk/e-ver";
187
+ import {
188
+ EverCanvas,
189
+ EverTrackedGarment,
190
+ useEverFitting,
191
+ } from "@ssafy-mhk/e-ver";
202
192
 
203
193
  function CustomScene({ garmentUrl }: { garmentUrl: string }) {
204
194
  const fitting = useEverFitting({
@@ -2,7 +2,7 @@ import { type CSSProperties } from "react";
2
2
  import type { UseBodyPresetSelectionOptions } from "../types/bodyPreset";
3
3
  import { type EverFittingOptions, type EverFittingRuntimeState } from "../hooks/useEverFitting";
4
4
  import { type GarmentLoadState } from "./EverTrackedGarment";
5
- export interface EverFittingSceneProps extends Pick<EverFittingOptions, "enabled" | "width" | "height" | "facingMode" | "mockMode" | "viewportWidth" | "viewportHeight" | "measurementEnabled" | "autoStartMeasurement" | "measurementConfig" | "fitType" | "garmentScaleHint"> {
5
+ export interface EverFittingSceneProps extends Pick<EverFittingOptions, "enabled" | "width" | "height" | "facingMode" | "mockMode" | "modelComplexity" | "numPoses" | "minDetectionConfidence" | "minTrackingConfidence" | "outputSegmentationMasks" | "viewportWidth" | "viewportHeight" | "measurementEnabled" | "autoStartMeasurement" | "measurementConfig" | "fitType" | "garmentScaleHint"> {
6
6
  garmentUrl: string | null;
7
7
  bodyPresetOptions?: UseBodyPresetSelectionOptions;
8
8
  className?: string;
@@ -15,4 +15,4 @@ export interface EverFittingSceneProps extends Pick<EverFittingOptions, "enabled
15
15
  onRuntimeStateChange?: (state: EverFittingRuntimeState) => void;
16
16
  onGarmentLoadStateChange?: (state: GarmentLoadState) => void;
17
17
  }
18
- export declare function EverFittingScene({ garmentUrl, enabled, width, height, facingMode, mockMode, viewportWidth, viewportHeight, measurementEnabled, autoStartMeasurement, measurementConfig, fitType, garmentScaleHint, bodyPresetOptions, className, style, debugMaterials, showEnvironment, showStats, showWebcamBackground, onCanvasReadyChange, onRuntimeStateChange, onGarmentLoadStateChange, }: EverFittingSceneProps): import("react/jsx-runtime").JSX.Element;
18
+ export declare function EverFittingScene({ garmentUrl, enabled, width, height, facingMode, mockMode, modelComplexity, numPoses, minDetectionConfidence, minTrackingConfidence, outputSegmentationMasks, viewportWidth, viewportHeight, measurementEnabled, autoStartMeasurement, measurementConfig, fitType, garmentScaleHint, bodyPresetOptions, className, style, debugMaterials, showEnvironment, showStats, showWebcamBackground, onCanvasReadyChange, onRuntimeStateChange, onGarmentLoadStateChange, }: EverFittingSceneProps): import("react/jsx-runtime").JSX.Element;
@@ -10,6 +10,8 @@ export interface TrackedGarmentMotionState {
10
10
  facingDetector: FacingDetector;
11
11
  yawFreezeController: YawFreezeController;
12
12
  displayYaw: number | null;
13
+ displayPitch: number | null;
14
+ displayRoll: number | null;
13
15
  lastFacingState: FacingState | null;
14
16
  hasInitialPosition: boolean;
15
17
  }
@@ -14,8 +14,12 @@ export interface TrackedModelTransformScratch {
14
14
  scaledAnchor: THREE.Vector3;
15
15
  position: THREE.Vector3;
16
16
  scale: THREE.Vector3;
17
+ rootQuaternion: THREE.Quaternion;
18
+ bodyPitch: number;
19
+ bodyRoll: number;
17
20
  stabilizedBodyHeightScale: number | null;
18
21
  missingBodyHeightFrames: number;
22
+ stableTorsoHeightToShoulderRatio: number | null;
19
23
  smoothedGlobalScale: number;
20
24
  hasSmoothedGlobalScale: boolean;
21
25
  effectiveYaw: number;
@@ -35,6 +39,7 @@ export interface TrackedModelTransformOptions {
35
39
  sourceHeight?: number;
36
40
  bodyYaw?: number;
37
41
  worldLandmarks?: NormalizedLandmark[] | null;
42
+ deltaSeconds?: number;
38
43
  }
39
44
  export declare function createTrackedModelTransformScratch(): TrackedModelTransformScratch;
40
45
  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 { BONE_MAPPING } from "../pose/boneMapping";
3
+ export type StandardHumanoidBoneName = keyof typeof BONE_MAPPING;
4
+ /** 번호 본(bone_0, bone_1 등) 패턴의 스켈레톤인지 판별 */
5
+ export declare function isLikelyNumberedHumanoidSkeleton(skeleton: THREE.Skeleton): boolean;
6
+ /**
7
+ * 번호 본 스켈레톤에서 위치 기반 휴리스틱으로 표준 휴머노이드 본 별칭을 추론한다.
8
+ *
9
+ * 하드코딩된 인덱스 매핑 없이 본의 월드 좌표와 계층 구조만으로
10
+ * Hips, Spine, Chest, 팔·다리 체인 등을 자동 식별한다.
11
+ */
12
+ export declare function inferNumberedHumanoidBoneAliases(skeleton: THREE.Skeleton): Map<THREE.Bone, StandardHumanoidBoneName>;
package/dist/index.d.ts CHANGED
@@ -28,6 +28,7 @@ export * from "./garment/trackedModelTransform";
28
28
  export * from "./garment/constants";
29
29
  export * from "./garment/poseApplication";
30
30
  export * from "./garment/trackedGarmentMotion";
31
+ export * from "./humanoid/numberedBoneAliases";
31
32
  export * from "./avatar/avatarLoader";
32
33
  export * from "./avatar/VRMCompat";
33
34
  export * from "./avatar/humanoidBindings";
@@ -41,8 +42,11 @@ export * from "./pose/landmarkerFactory";
41
42
  export * from "./pose/segmentation";
42
43
  export * from "./pose/boneMapping";
43
44
  export * from "./pose/facingDetector";
45
+ export * from "./pose/trackingConfidence";
44
46
  export * from "./pose/yawFreezeController";
45
47
  export * from "./pose/yawDirectionStabilizer";
48
+ export * from "./pose/frameSmoothing";
49
+ export * from "./pose/detectionCadence";
46
50
  export * from "./tracking/personLock";
47
51
  export * from "./tracking/trackingState";
48
52
  export * from "./tracking/trackingStability";