@lovelace_lol/embody 0.0.4 → 0.0.6

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.
@@ -1,27 +1,32 @@
1
1
  import type { BoneFrameDelta, FrameDelta, ModelDescriptor, MorphTargetFrameDelta } from './contracts';
2
2
  import type { Profile } from '../mappings/types';
3
3
  import type { EmbodyCoreWasmModule } from '../wasmTypes';
4
- export declare const AU_MORPH_BINDING_STRIDE = 5;
5
- export declare const VISEME_MORPH_BINDING_STRIDE = 4;
6
- export type MorphBindingSide = 0 | 1 | 2;
7
4
  export interface WasmRuntimeCoreOptions {
8
5
  readonly profile: Profile;
9
6
  readonly model: ModelDescriptor;
10
7
  readonly wasm: EmbodyCoreWasmModule;
8
+ readonly allowEmptyBindings?: boolean;
11
9
  }
12
10
  /**
13
- * TypeScript facade over the Rust Wasm RuntimeCore for live morph FrameDelta
14
- * evaluation. Bones/composites remain on TsRuntimeCore until a later slice.
11
+ * TypeScript facade over the host-neutral Rust Wasm RuntimeCore.
12
+ * JavaScript only owns JSON handoff and packed FrameDelta unpacking here.
15
13
  */
16
14
  export declare class WasmRuntimeCore {
17
15
  private readonly wasm;
18
16
  private readonly core;
17
+ private readonly allowEmptyBindings;
19
18
  private profile;
20
19
  private model;
21
20
  constructor(options: WasmRuntimeCoreOptions);
22
21
  setProfile(profile: Profile): void;
23
22
  setModelDescriptor(model: ModelDescriptor): void;
24
23
  setAU(id: number, value: number, balance?: number): void;
24
+ setContinuum(negativeAU: number, positiveAU: number, value: number, balance?: number): void;
25
+ transitionAU(id: number, to: number, durationMs: number, balance?: number): void;
26
+ transitionViseme(visemeIndex: number, to: number, durationMs: number, jawScale?: number): void;
27
+ update(deltaSeconds: number): number;
28
+ activeTransitionCount(): number;
29
+ clearTransitions(): void;
25
30
  getAU(id: number): number;
26
31
  setAUMixWeight(id: number, weight: number): void;
27
32
  setViseme(visemeIndex: number, value: number, jawScale?: number): void;
@@ -32,24 +37,5 @@ export declare class WasmRuntimeCore {
32
37
  evaluateFrameDelta(deltaSeconds?: number): FrameDelta;
33
38
  private reloadBindings;
34
39
  }
35
- export declare function compileMorphBindings(profile: Profile, model: ModelDescriptor): {
36
- auBindings: Float32Array;
37
- visemeBindings: Float32Array;
38
- mixedAus: Uint32Array;
39
- };
40
- export interface CompiledBoneBindings {
41
- restTransforms: Float32Array;
42
- compositeAxes: Float32Array;
43
- translations: Float32Array;
44
- jawBinding: Float32Array;
45
- visemeJawAmounts: Float32Array;
46
- }
47
- /**
48
- * Compile profile bone mappings into the packed tables the Rust RuntimeCore
49
- * consumes: rest transforms, composite rotation axes (in yaw/pitch/roll
50
- * application order), AU translations, and the auto viseme jaw binding.
51
- * Mirrors the mapping resolution in TsRuntimeCore.collectBoneWrites.
52
- */
53
- export declare function compileBoneBindings(profile: Profile, model: ModelDescriptor): CompiledBoneBindings;
54
40
  export declare function unpackBoneFrameDelta(values: ArrayLike<number>): BoneFrameDelta[];
55
41
  export declare function unpackMorphFrameDelta(values: ArrayLike<number>): MorphTargetFrameDelta[];
@@ -1,8 +1,6 @@
1
1
  export type { BoneDescriptor, BoneFrameDelta, BoneId, BoneTransformTrackTarget, ChannelId, ClipChannelIR, ClipChannelKind, ClipIR, ClipInterpolation, ClipTrackIR, ClipTrackTarget, ClipTrackTargetKind, ClipTrackTransformProperty, ClipTrackValueType, FrameDelta, FrameValueMode, HostAnimationHandle, HostAnimationPlayOptions, HostAnimationSystem, HostFrameApplier, HostModelInspector, HostTargetId, MeshDescriptor, MeshFrameDelta, MeshId, MeshVisibilityTrackTarget, ModelDescriptor, MorphTargetDescriptor, MorphTargetFrameDelta, MorphTargetId, MorphTargetTrackTarget, NumericArray, PackedMeshProportions, PackedTemplateSkeletonFitSolution, Quat, MeshProportionsField, TemplateSkeletonFitSolutionField, TemplateSkeletonFitManualAdjustment, TemplateSkeletonFitMetadata, TemplateSkeletonFitMetrics, TemplateSkeletonFitStatus, TemplateSkeletonFitTransform, TemplateSkeletonFitTransformField, TemplateSkeletonFitValidationResult, TemplateSkeletonFitVerticalAnchor, TemplateSkeletonFitVerticalAxis, TrackId, Transform, TransformSpace, Vec3, } from './contracts';
2
2
  export { TEMPLATE_SKELETON_FIT_METADATA_KIND, TEMPLATE_SKELETON_FIT_METADATA_VERSION, MESH_PROPORTIONS_FIELDS, MESH_PROPORTIONS_STRIDE, TEMPLATE_SKELETON_FIT_STATUSES, TEMPLATE_SKELETON_FIT_SOLUTION_FIELDS, TEMPLATE_SKELETON_FIT_SOLUTION_STRIDE, TEMPLATE_SKELETON_FIT_TRANSFORM_FIELDS, TEMPLATE_SKELETON_FIT_TRANSFORM_STRIDE, TEMPLATE_SKELETON_FIT_VERTICAL_ANCHORS, TEMPLATE_SKELETON_FIT_VERTICAL_AXES, composeTemplateSkeletonFitTransform, isTemplateSkeletonFitStatus, validateTemplateSkeletonFitMetadata, } from './contracts';
3
3
  export { TsClipCompiler, numericArrayToNumbers, } from './TsClipCompiler';
4
- export { TsRuntimeCore } from './TsRuntimeCore';
5
- export { AU_MORPH_BINDING_STRIDE, VISEME_MORPH_BINDING_STRIDE, WasmRuntimeCore, compileMorphBindings, compileBoneBindings, unpackMorphFrameDelta, unpackBoneFrameDelta, } from './WasmRuntimeCore';
6
- export type { CompiledBoneBindings, MorphBindingSide, WasmRuntimeCoreOptions, } from './WasmRuntimeCore';
4
+ export { WasmRuntimeCore, unpackMorphFrameDelta, unpackBoneFrameDelta, } from './WasmRuntimeCore';
5
+ export type { WasmRuntimeCoreOptions, } from './WasmRuntimeCore';
7
6
  export type { TsClipCompilerInput, TsClipCompilerKeyframe, TsClipCompilerTrackInput, TsClipCurveTarget, TsClipCurvesInput, } from './TsClipCompiler';
8
- export type { TsRuntimeCoreOptions } from './TsRuntimeCore';