@lovelace_lol/embody 0.0.1
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/LICENSE +21 -0
- package/README.md +2411 -0
- package/dist/authoring/boneAuthoring.d.ts +132 -0
- package/dist/camera/annotationCameraAngles.d.ts +28 -0
- package/dist/camera/cameraRelativeGaze.d.ts +15 -0
- package/dist/camera/rustAnnotationCameraCore.d.ts +136 -0
- package/dist/cljs.cjs +362 -0
- package/dist/cljs.cjs.map +1 -0
- package/dist/cljs.d.ts +5 -0
- package/dist/cljs.js +359 -0
- package/dist/cljs.js.map +1 -0
- package/dist/core/TsClipCompiler.d.ts +51 -0
- package/dist/core/TsRuntimeCore.d.ts +40 -0
- package/dist/core/WasmRuntimeCore.d.ts +55 -0
- package/dist/core/compositeAxis.d.ts +4 -0
- package/dist/core/contracts/abi.d.ts +70 -0
- package/dist/core/contracts/clip.d.ts +44 -0
- package/dist/core/contracts/frame.d.ts +27 -0
- package/dist/core/contracts/host.d.ts +28 -0
- package/dist/core/contracts/ids.d.ts +15 -0
- package/dist/core/contracts/index.d.ts +10 -0
- package/dist/core/contracts/model.d.ts +31 -0
- package/dist/core/contracts/primitives.d.ts +17 -0
- package/dist/core/contracts/skeletonFit.d.ts +41 -0
- package/dist/core/index.d.ts +8 -0
- package/dist/core/types.d.ts +472 -0
- package/dist/core.cjs +1065 -0
- package/dist/core.cjs.map +1 -0
- package/dist/core.js +1040 -0
- package/dist/core.js.map +1 -0
- package/dist/engines/three/Embody.d.ts +373 -0
- package/dist/engines/three/ThreeAnimationRuntime.d.ts +203 -0
- package/dist/engines/three/ThreeClipAdapter.d.ts +24 -0
- package/dist/engines/three/ThreeFrameApplier.d.ts +68 -0
- package/dist/engines/three/ThreeModelInspector.d.ts +54 -0
- package/dist/engines/three/bakedClipPartitioning.d.ts +16 -0
- package/dist/engines/three/balanceUtils.d.ts +3 -0
- package/dist/engines/three/characterHost.d.ts +80 -0
- package/dist/engines/three/characterScene.d.ts +98 -0
- package/dist/engines/three/hair/HairPhysicsController.d.ts +124 -0
- package/dist/engines/three/index.d.ts +20 -0
- package/dist/engines/three/modelLoader.d.ts +61 -0
- package/dist/engines/three/profileTestScene.d.ts +52 -0
- package/dist/engines/three/types.d.ts +20 -0
- package/dist/hair/appearance.d.ts +29 -0
- package/dist/index.cjs +15431 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.ts +100 -0
- package/dist/index.js +15141 -0
- package/dist/index.js.map +1 -0
- package/dist/interfaces/Animation.d.ts +315 -0
- package/dist/interfaces/EmbodyRuntime.d.ts +90 -0
- package/dist/interfaces/Hair.d.ts +181 -0
- package/dist/interfaces/HairPhysics.d.ts +90 -0
- package/dist/interfaces/index.d.ts +11 -0
- package/dist/mappings/extendPresetWithProfile.d.ts +17 -0
- package/dist/mappings/types.d.ts +309 -0
- package/dist/mappings/visemeSystem.d.ts +26 -0
- package/dist/physics/HairPhysics.d.ts +86 -0
- package/dist/physics/RustHairPhysics.d.ts +18 -0
- package/dist/physics/index.d.ts +6 -0
- package/dist/preset.cjs +2000 -0
- package/dist/preset.cjs.map +1 -0
- package/dist/preset.js +1997 -0
- package/dist/preset.js.map +1 -0
- package/dist/presets/bettaFish.d.ts +328 -0
- package/dist/presets/cc4.d.ts +145 -0
- package/dist/presets/index.d.ts +27 -0
- package/dist/profiles/resolveProfileConfig.d.ts +36 -0
- package/dist/profiles/types.d.ts +118 -0
- package/dist/regions/normalizeRegionTree.d.ts +6 -0
- package/dist/regions/regionMapping.d.ts +17 -0
- package/dist/regions/types.d.ts +122 -0
- package/dist/skeletonTemplates/humanoidSkeletonTemplates.d.ts +32 -0
- package/dist/test/setupWasm.d.ts +1 -0
- package/dist/three.cjs +10115 -0
- package/dist/three.cjs.map +1 -0
- package/dist/three.js +10086 -0
- package/dist/three.js.map +1 -0
- package/dist/validation/analyzeModel.d.ts +68 -0
- package/dist/validation/extractModelData.d.ts +90 -0
- package/dist/validation/generateMappingCorrections.d.ts +32 -0
- package/dist/validation/geometryHelpers.d.ts +66 -0
- package/dist/validation/types.d.ts +10 -0
- package/dist/validation/validateMappings.d.ts +77 -0
- package/dist/wasm/LICENSE +21 -0
- package/dist/wasm/README.md +72 -0
- package/dist/wasm/embody_wasm.d.ts +531 -0
- package/dist/wasm/embody_wasm.js +1635 -0
- package/dist/wasm/embody_wasm_bg.wasm +0 -0
- package/dist/wasm/embody_wasm_bg.wasm.d.ts +107 -0
- package/dist/wasm.cjs +302 -0
- package/dist/wasm.cjs.map +1 -0
- package/dist/wasm.d.ts +43 -0
- package/dist/wasm.js +268 -0
- package/dist/wasm.js.map +1 -0
- package/dist/wasmTypes.d.ts +121 -0
- package/package.json +99 -0
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import * as THREE from 'three';
|
|
2
|
+
import type { Region } from './types';
|
|
3
|
+
export interface BoneResolutionProfile {
|
|
4
|
+
bonePrefix?: string;
|
|
5
|
+
boneSuffix?: string;
|
|
6
|
+
boneNodes?: Record<string, string>;
|
|
7
|
+
suffixPattern?: string;
|
|
8
|
+
}
|
|
9
|
+
export interface ResolvedFaceCenter {
|
|
10
|
+
center: THREE.Vector3;
|
|
11
|
+
method: string;
|
|
12
|
+
debugInfo: string[];
|
|
13
|
+
}
|
|
14
|
+
export declare function resolveBoneName(semanticName: string, profile?: BoneResolutionProfile): string;
|
|
15
|
+
export declare function resolveBoneNames(names: string[] | undefined, profile?: BoneResolutionProfile): string[];
|
|
16
|
+
export declare function fuzzyNameMatch(objectName: string, targetName: string, suffixPattern?: string): boolean;
|
|
17
|
+
export declare function resolveFaceCenter(model: THREE.Object3D, region: Region, profile?: BoneResolutionProfile): ResolvedFaceCenter;
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
/** Line stroke style */
|
|
2
|
+
export type LineStyle = 'solid' | 'dashed' | 'dotted';
|
|
3
|
+
/** Line curve type */
|
|
4
|
+
export type LineCurve = 'straight' | 'bezier' | 'arc';
|
|
5
|
+
/** Named direction presets for line orientation */
|
|
6
|
+
export type NamedDirection = 'radial' | 'camera' | 'up' | 'down' | 'left' | 'right' | 'forward' | 'backward';
|
|
7
|
+
/** Line configuration for markers */
|
|
8
|
+
export interface LineConfig {
|
|
9
|
+
/** Stroke style. Default: 'solid' */
|
|
10
|
+
style?: LineStyle;
|
|
11
|
+
/** Curve type. Default: 'straight' */
|
|
12
|
+
curve?: LineCurve;
|
|
13
|
+
/** Show arrow head at end. Default: false */
|
|
14
|
+
arrowHead?: boolean;
|
|
15
|
+
/** Line thickness (affects dash size). Default: 2 */
|
|
16
|
+
thickness?: number;
|
|
17
|
+
/** Line length override (model units) */
|
|
18
|
+
length?: number;
|
|
19
|
+
}
|
|
20
|
+
/** Style overrides that can be applied per-region */
|
|
21
|
+
export interface MarkerStyleOverrides {
|
|
22
|
+
/** Override marker sphere color (hex) */
|
|
23
|
+
markerColor?: number;
|
|
24
|
+
/** Override marker sphere radius (model units) */
|
|
25
|
+
markerRadius?: number;
|
|
26
|
+
/** Override line color (hex) */
|
|
27
|
+
lineColor?: number;
|
|
28
|
+
/** Override label text color (CSS) */
|
|
29
|
+
labelColor?: string;
|
|
30
|
+
/** Override label background (CSS) */
|
|
31
|
+
labelBackground?: string;
|
|
32
|
+
/** Override label font size (pixels) */
|
|
33
|
+
labelFontSize?: number;
|
|
34
|
+
/** Override overall marker opacity (0-1) */
|
|
35
|
+
opacity?: number;
|
|
36
|
+
/** Custom line direction: named preset or explicit vector */
|
|
37
|
+
lineDirection?: NamedDirection | {
|
|
38
|
+
x: number;
|
|
39
|
+
y: number;
|
|
40
|
+
z: number;
|
|
41
|
+
};
|
|
42
|
+
/** Line styling options */
|
|
43
|
+
line?: LineConfig;
|
|
44
|
+
}
|
|
45
|
+
/** Animation style for expanding/collapsing child markers */
|
|
46
|
+
export type ExpandAnimation = 'outward' | 'staggered';
|
|
47
|
+
/** Expanded region state */
|
|
48
|
+
export interface ExpandedRegionState {
|
|
49
|
+
regionName: string;
|
|
50
|
+
isExpanded: boolean;
|
|
51
|
+
children: string[];
|
|
52
|
+
}
|
|
53
|
+
/** Fallback behavior configuration */
|
|
54
|
+
export interface FallbackConfig {
|
|
55
|
+
/** Name of the fallback marker to show when all group markers are occluded */
|
|
56
|
+
fallbackMarker?: string;
|
|
57
|
+
/** Behavior when clicking fallback: 'fit-all' tries to fit all in frame, 'rotate' rotates camera */
|
|
58
|
+
clickBehavior?: 'fit-all' | 'rotate';
|
|
59
|
+
}
|
|
60
|
+
/** Marker group for fallback behavior */
|
|
61
|
+
export interface MarkerGroup {
|
|
62
|
+
/** Unique group identifier */
|
|
63
|
+
groupId: string;
|
|
64
|
+
/** Region names in this group */
|
|
65
|
+
regions: string[];
|
|
66
|
+
/** Fallback configuration */
|
|
67
|
+
fallback?: FallbackConfig;
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* Single annotation region definition - maps a name to geometry targets.
|
|
71
|
+
*/
|
|
72
|
+
export interface AnnotationRegion {
|
|
73
|
+
/** Display name for the annotation */
|
|
74
|
+
name: string;
|
|
75
|
+
/** Bone names to focus on */
|
|
76
|
+
bones?: string[];
|
|
77
|
+
/** Mesh object names to focus on */
|
|
78
|
+
meshes?: string[];
|
|
79
|
+
/** Any object names (bones or meshes). Use ['*'] for all objects */
|
|
80
|
+
objects?: string[];
|
|
81
|
+
/**
|
|
82
|
+
* Camera framing multiplier for this annotation.
|
|
83
|
+
* Smaller values zoom in tighter; larger values leave more space around the target.
|
|
84
|
+
*/
|
|
85
|
+
paddingFactor?: number;
|
|
86
|
+
/**
|
|
87
|
+
* Camera angle in degrees around the Y axis (horizontal orbit).
|
|
88
|
+
* 0 = front (default), 90 = right side, 180 = back, 270 = left side
|
|
89
|
+
*/
|
|
90
|
+
cameraAngle?: number;
|
|
91
|
+
/** Fine-tune camera position offset */
|
|
92
|
+
cameraOffset?: {
|
|
93
|
+
x?: number;
|
|
94
|
+
y?: number;
|
|
95
|
+
z?: number;
|
|
96
|
+
};
|
|
97
|
+
/** Parent region name - children animate outward from parent when expanded */
|
|
98
|
+
parent?: string;
|
|
99
|
+
/** Child region names - shown when this region is expanded */
|
|
100
|
+
children?: string[];
|
|
101
|
+
/** Animation style for expand/collapse. Default: 'outward' */
|
|
102
|
+
expandAnimation?: ExpandAnimation;
|
|
103
|
+
/** Per-marker style overrides */
|
|
104
|
+
style?: MarkerStyleOverrides;
|
|
105
|
+
/** Marker group ID for fallback behavior */
|
|
106
|
+
groupId?: string;
|
|
107
|
+
/** If true, this marker acts as a fallback for its group */
|
|
108
|
+
isFallback?: boolean;
|
|
109
|
+
/** Custom position override (user-adjusted). If set, overrides calculated position. */
|
|
110
|
+
customPosition?: {
|
|
111
|
+
x: number;
|
|
112
|
+
y: number;
|
|
113
|
+
z: number;
|
|
114
|
+
};
|
|
115
|
+
}
|
|
116
|
+
export type Region = AnnotationRegion;
|
|
117
|
+
/**
|
|
118
|
+
* Marker style for annotation visualization
|
|
119
|
+
* - 'html': Simple HTML overlay markers with numbered dots directly over targets
|
|
120
|
+
* - '3d': 3D markers with lines and labels rendered in scene space
|
|
121
|
+
*/
|
|
122
|
+
export type MarkerStyle = 'html' | '3d';
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import * as THREE from 'three';
|
|
2
|
+
export type HumanoidSkeletonTemplateVec3 = readonly [number, number, number];
|
|
3
|
+
export type HumanoidSkeletonTemplateBounds = readonly [number, number, number, number, number, number];
|
|
4
|
+
export interface HumanoidSkeletonTemplateBone {
|
|
5
|
+
readonly name: string;
|
|
6
|
+
readonly parent: string | null;
|
|
7
|
+
readonly translation: HumanoidSkeletonTemplateVec3;
|
|
8
|
+
}
|
|
9
|
+
export interface HumanoidSkeletonTemplate {
|
|
10
|
+
readonly id: string;
|
|
11
|
+
readonly sourceCharacterId: string;
|
|
12
|
+
readonly sourceAsset: string;
|
|
13
|
+
readonly sourceSkinName: string;
|
|
14
|
+
readonly bones: readonly HumanoidSkeletonTemplateBone[];
|
|
15
|
+
}
|
|
16
|
+
export interface ExtractHumanoidSkeletonTemplateOptions {
|
|
17
|
+
readonly id: string;
|
|
18
|
+
readonly sourceCharacterId: string;
|
|
19
|
+
readonly sourceAsset?: string;
|
|
20
|
+
readonly sourceSkinName?: string;
|
|
21
|
+
}
|
|
22
|
+
export declare const HUMANOID_SKELETON_TEMPLATES: readonly [HumanoidSkeletonTemplate];
|
|
23
|
+
export declare const JONATHAN_HUMANOID_SKELETON_TEMPLATE: HumanoidSkeletonTemplate;
|
|
24
|
+
export declare function getHumanoidSkeletonTemplate(templateId: string): HumanoidSkeletonTemplate | null;
|
|
25
|
+
export declare function getHumanoidSkeletonTemplateBoneNames(template?: HumanoidSkeletonTemplate): string[];
|
|
26
|
+
export declare function createValidationSkeletonFromHumanoidTemplate(template?: HumanoidSkeletonTemplate): {
|
|
27
|
+
bones: Array<{
|
|
28
|
+
name: string;
|
|
29
|
+
}>;
|
|
30
|
+
};
|
|
31
|
+
export declare function computeHumanoidSkeletonTemplateRestBounds(template: HumanoidSkeletonTemplate): HumanoidSkeletonTemplateBounds;
|
|
32
|
+
export declare function extractHumanoidSkeletonTemplateFromModel(root: THREE.Object3D, options: ExtractHumanoidSkeletonTemplateOptions): HumanoidSkeletonTemplate;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|