@lovelace_lol/embody 0.0.2 → 0.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/dist/core.cjs +2 -12
- package/dist/core.cjs.map +1 -1
- package/dist/core.js +2 -12
- package/dist/core.js.map +1 -1
- package/dist/index.cjs +14 -12
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.js +13 -13
- package/dist/index.js.map +1 -1
- package/dist/profiles/rustResolvedProfile.d.ts +31 -0
- package/dist/three.cjs +2 -233
- package/dist/three.cjs.map +1 -1
- package/dist/three.js +2 -233
- package/dist/three.js.map +1 -1
- package/dist/wasm/embody_wasm.d.ts +29 -15
- package/dist/wasm/embody_wasm.js +57 -0
- package/dist/wasm/embody_wasm_bg.wasm +0 -0
- package/dist/wasm/embody_wasm_bg.wasm.d.ts +17 -15
- package/dist/wasmTypes.d.ts +2 -0
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -64,6 +64,8 @@ export type { Profile, MorphTargetsBySide, MorphTargetRef, HairPhysicsProfileCon
|
|
|
64
64
|
export { BLENDING_MODES } from './mappings/types';
|
|
65
65
|
export { buildMappingEditorModel, compileVisemeKeys, getMeshNamesForAUProfile, getMeshNamesForVisemeProfile, getProfileVisemeSlots, getVisemeBindingTargets, getVisemeJawAmounts, getVisemeSlotIndex, mapProviderVisemeToSlot, resolveVisemeMeshCategory, } from './mappings/visemeSystem';
|
|
66
66
|
export type { ProviderVisemeEvent, ProviderVisemeMatch, ResolvedVisemeBindingTarget, } from './mappings/visemeSystem';
|
|
67
|
+
export { resolveRustEmbeddedProfileView, resolveRustProfileView, } from './profiles/rustResolvedProfile';
|
|
68
|
+
export type { RustResolvedProfileView, RustResolvedVisemeBindingTarget, } from './profiles/rustResolvedProfile';
|
|
67
69
|
export { applyAUBoneBindingUpdate, applyBilateralAxisBindingUpdate, applyBoneAxisBindingUpdate, buildBoneAuOptions, classifyAuAsJointControl, createBilateralBoneAxisAu, createBoneAxisAu, DEFAULT_AXIS_TO_CHANNEL, DEFAULT_BONE_MAX_DEGREES, ensureBilateralBoneNodeKeys, ensureBoneNodeKey, findNodeKeyForBone, formatAxisDirectionLabel, formatAxisLabel, getAUBoneBindingState, getAxisFromChannel, getBilateralAxisBindingState, getBoneAxisBindingState, inferChiralBoneNamePair, inferEyeControlFamily, inferEyeControlScope, isJointControlAuInfo, isMaxDegreesOnlyAxisBindingUpdate, JOINT_CONTROL_SECTION, resolveBoneAxisChannel, resolveBoneNameForNodeKey, resolveContinuumDisplayLabel, stripConfiguredBoneAffixes, } from './authoring/boneAuthoring';
|
|
68
70
|
export type { AUBoneBindingState, BilateralAxisBindingState, BilateralAxisDirectionScaleState, BilateralAxisScopeBindingState, BilateralBoneAxisScope, BoneAxisBindingState, BoneAxisBindingUpdate, BoneAxisDirection, BoneAxisDirectionScale, BoneAxisKey, BoneControlFamily, BoneControlScope, ChiralBoneNamePair, CreatedBoneAxisAu, RotationChannel, } from './authoring/boneAuthoring';
|
|
69
71
|
export type { ProfileOverrides, ProfilePresetId, ProfileRuntimeConfig, ResolvedProfileRuntimeConfig, PresetBackedProfileRuntimeConfig, CustomProfileRuntimeConfig, CharacterProfile, ProfileRegistry, CharacterConfig, CharacterRegistry, } from './profiles/types';
|
package/dist/index.js
CHANGED
|
@@ -4232,12 +4232,11 @@ var WasmRuntimeCore = class {
|
|
|
4232
4232
|
if (!RuntimeCtor) {
|
|
4233
4233
|
throw new Error("Embody Wasm module does not export RuntimeCore");
|
|
4234
4234
|
}
|
|
4235
|
-
this.core = new RuntimeCtor(
|
|
4235
|
+
this.core = new RuntimeCtor(0);
|
|
4236
4236
|
this.reloadBindings();
|
|
4237
4237
|
}
|
|
4238
4238
|
setProfile(profile) {
|
|
4239
4239
|
this.profile = profile;
|
|
4240
|
-
this.core.set_viseme_slot_count(getProfileVisemeSlots(profile).length);
|
|
4241
4240
|
this.reloadBindings();
|
|
4242
4241
|
}
|
|
4243
4242
|
setModelDescriptor(model) {
|
|
@@ -4282,16 +4281,7 @@ var WasmRuntimeCore = class {
|
|
|
4282
4281
|
};
|
|
4283
4282
|
}
|
|
4284
4283
|
reloadBindings() {
|
|
4285
|
-
|
|
4286
|
-
this.core.load_au_morph_bindings(auBindings);
|
|
4287
|
-
this.core.load_viseme_morph_bindings(visemeBindings);
|
|
4288
|
-
this.core.set_mixed_aus(mixedAus);
|
|
4289
|
-
const boneBindings = compileBoneBindings(this.profile, this.model);
|
|
4290
|
-
this.core.load_bone_rest_transforms(boneBindings.restTransforms);
|
|
4291
|
-
this.core.load_composite_axes(boneBindings.compositeAxes);
|
|
4292
|
-
this.core.load_bone_translations(boneBindings.translations);
|
|
4293
|
-
this.core.load_jaw_binding(boneBindings.jawBinding);
|
|
4294
|
-
this.core.load_viseme_jaw_amounts(boneBindings.visemeJawAmounts);
|
|
4284
|
+
this.core.configure_with_profile(JSON.stringify(this.profile), JSON.stringify(this.model));
|
|
4295
4285
|
}
|
|
4296
4286
|
};
|
|
4297
4287
|
function compileMorphBindings(profile, model) {
|
|
@@ -10417,6 +10407,16 @@ var BLENDING_MODES = {
|
|
|
10417
10407
|
"None": 0
|
|
10418
10408
|
// THREE.NoBlending
|
|
10419
10409
|
};
|
|
10410
|
+
|
|
10411
|
+
// src/profiles/rustResolvedProfile.ts
|
|
10412
|
+
function resolveRustProfileView(wasm, profile) {
|
|
10413
|
+
return JSON.parse(wasm.resolve_profile_view(JSON.stringify(profile)));
|
|
10414
|
+
}
|
|
10415
|
+
function resolveRustEmbeddedProfileView(wasm, presetId, profileOverride = null) {
|
|
10416
|
+
return JSON.parse(
|
|
10417
|
+
wasm.resolve_embedded_profile_view(presetId, profileOverride ? JSON.stringify(profileOverride) : "")
|
|
10418
|
+
);
|
|
10419
|
+
}
|
|
10420
10420
|
var DEFAULT_HEAD_BONE_NAMES = ["CC_Base_Head", "Head", "head", "Bip01_Head"];
|
|
10421
10421
|
var DEFAULT_REFERENCE_HEIGHT = 1.8;
|
|
10422
10422
|
var DEFAULT_FORWARD_OFFSET = 0.08;
|
|
@@ -15139,6 +15139,6 @@ function addVec32(a, b) {
|
|
|
15139
15139
|
return [a[0] + b[0], a[1] + b[1], a[2] + b[2]];
|
|
15140
15140
|
}
|
|
15141
15141
|
|
|
15142
|
-
export { AU_INFO, AU_MAPPING_CONFIG, AU_MIX_DEFAULTS, AU_MORPH_BINDING_STRIDE, AU_TO_MORPHS, ThreeAnimationSystem as AnimationController, BETTA_FISH_PRESET, BLENDING_MODES, BONE_AU_TO_BINDINGS, ThreeAnimationSystem as BakedAnimationController, CC4_BONES, CC4_BONE_NODES, CC4_BONE_PREFIX, CC4_EYE_MESH_NODES, CC4_MAPPING_SECTIONS, CC4_MESHES, CC4_PRESET, CC4_PROFILE_BONE_BINDINGS, CC4_SUFFIX_PATTERN, CC4_VISEME_SLOTS, CC4_VISEME_SYSTEM_ID, CHARACTER_SCENE_TYPES, CHARACTER_SCENE_TYPE_IDS, COMPOSITE_ROTATIONS, CONTINUUM_LABELS, CONTINUUM_PAIRS_MAP, DEFAULT_AXIS_TO_CHANNEL, DEFAULT_BONE_MAX_DEGREES, DEFAULT_CHARACTER_LIGHTING_PRESETS, DEFAULT_CHARACTER_LIGHTING_PRESET_ID, DEFAULT_CHARACTER_LIGHTING_PRESET_IDS, DEFAULT_CHARACTER_LIGHTING_SETTINGS, DEFAULT_CHARACTER_SCENE_TYPE_ID, DEFAULT_HAIR_COLOR_APPEARANCE, DEFAULT_HAIR_PHYSICS_CONFIG, Embody, FISH_AU_MAPPING_CONFIG, HAIR_COLOR_PRESETS, HUMANOID_SKELETON_TEMPLATES, HairPhysics, HairPhysicsController, JOINT_CONTROL_SECTION, JONATHAN_HUMANOID_SKELETON_TEMPLATE, LIP_SYNC_CONTROL_TO_BINDINGS, MORPH_TO_MESH, RustAnnotationCameraCore, RustCameraFlight, RustCameraOrbit, RustHairPhysics, TEMPLATE_SKELETON_FIT_METADATA_KIND, TEMPLATE_SKELETON_FIT_METADATA_VERSION, TEMPLATE_SKELETON_FIT_STATUSES, TEMPLATE_SKELETON_FIT_VERTICAL_ANCHORS, TEMPLATE_SKELETON_FIT_VERTICAL_AXES, THREE_BLENDING_MODES, ThreeAnimationRuntime, ThreeAnimationSystem, ThreeClipAdapter, ThreeFrameApplier, ThreeModelInspector, TsClipCompiler, TsRuntimeCore, VISEME_JAW_AMOUNTS, VISEME_KEYS, VISEME_MORPH_BINDING_STRIDE, WasmRuntimeCore, analyzeModel, applyAUBoneBindingUpdate, applyBilateralAxisBindingUpdate, applyBoneAxisBindingUpdate, applyCharacterModelTransform, applyCharacterProfileToPreset, buildBoneAuOptions, buildFrameApplierBindings, buildMappingEditorModel, classifyAuAsJointControl, collectMorphMeshes2 as collectMorphMeshes, compileBoneBindings, compileMorphBindings, compileVisemeKeys, composeTemplateSkeletonFitTransform, computeCameraRelativeGazeOffset, computeHumanoidSkeletonTemplateRestBounds, createBilateralBoneAxisAu, createBoneAxisAu, createCharacterHost, createDefaultCharacterLighting, createDefaultCharacterScene, createRustAnnotationCameraCore, createRustHairPhysics, createShadowPlane, createValidationSkeletonFromHumanoidTemplate, detectAnnotationLaterality, detectFacingDirection, disposeCharacterModel, ensureBilateralBoneNodeKeys, ensureBoneNodeKey, extendCharacterConfigWithPreset, extendPresetWithProfile, extendProfileConfigWithPreset, extractFromGLTF, extractHumanoidSkeletonTemplateFromModel, extractLegacyCharacterProfileOverrides, extractModelData, extractProfileOverrides, findFaceCenter, findNodeKeyForBone, formatAxisDirectionLabel, formatAxisLabel, fuzzyNameMatch, generateMappingCorrections, getAUBoneBindingState, getAxisFromChannel, getBilateralAxisBindingState, getBoneAxisBindingState, getDefaultAnnotationLaterality, getHumanoidSkeletonTemplate, getHumanoidSkeletonTemplateBoneNames, getMeshNamesForAUProfile, getMeshNamesForVisemeProfile, getModelForwardDirection, getModelLocalOrbitAngle, getPreset, getPresetWithProfile, getProfilePresetId, getProfileVisemeSlots, getRegionSemanticSide, getSemanticHorizontalSign, getSemanticHorizontalSignForSide, getVisemeBindingTargets, getVisemeJawAmounts, getVisemeSlotIndex, getWorldDirectionForCameraAngle, hasLeftRightMorphs, inferChiralBoneNamePair, inferEyeControlFamily, inferEyeControlScope, isJointControlAuInfo, isMaxDegreesOnlyAxisBindingUpdate, isMixedAU, isPresetCompatible, isTemplateSkeletonFitStatus, loadCharacterModel, mapProviderVisemeToSlot, mergeRegionsByName as mergeCharacterRegionsByName, mergePresetWithProfile, mergeProfileRegionsByName, normalizeCameraAngle, normalizeDefaultCharacterLightingSettings, normalizeHairColorAppearance, numericArrayToNumbers, packHairConfig, packHeadState, parseCharacterModel, passesMarkerCameraAngleGate, resolveBoneAxisChannel, resolveBoneName, resolveBoneNameForNodeKey, resolveBoneNames, resolveContinuumDisplayLabel, resolveFaceCenter, resolvePreset, resolvePresetWithOverrides, resolveProfileFromPreset, resolveRegionCameraAngle, resolveRegionVisibilityCameraAngle, resolveVisemeMeshCategory, stripConfiguredBoneAffixes, suggestBestPreset, toModelLocalDirection2 as toModelLocalDirection, toWorldDirection, unpackBoneFrameDelta, unpackHairConfig, unpackHairMorphOutput, unpackHairState, unpackMorphFrameDelta, validateMappingConfig, validateMappings, validateTemplateSkeletonFitMetadata };
|
|
15142
|
+
export { AU_INFO, AU_MAPPING_CONFIG, AU_MIX_DEFAULTS, AU_MORPH_BINDING_STRIDE, AU_TO_MORPHS, ThreeAnimationSystem as AnimationController, BETTA_FISH_PRESET, BLENDING_MODES, BONE_AU_TO_BINDINGS, ThreeAnimationSystem as BakedAnimationController, CC4_BONES, CC4_BONE_NODES, CC4_BONE_PREFIX, CC4_EYE_MESH_NODES, CC4_MAPPING_SECTIONS, CC4_MESHES, CC4_PRESET, CC4_PROFILE_BONE_BINDINGS, CC4_SUFFIX_PATTERN, CC4_VISEME_SLOTS, CC4_VISEME_SYSTEM_ID, CHARACTER_SCENE_TYPES, CHARACTER_SCENE_TYPE_IDS, COMPOSITE_ROTATIONS, CONTINUUM_LABELS, CONTINUUM_PAIRS_MAP, DEFAULT_AXIS_TO_CHANNEL, DEFAULT_BONE_MAX_DEGREES, DEFAULT_CHARACTER_LIGHTING_PRESETS, DEFAULT_CHARACTER_LIGHTING_PRESET_ID, DEFAULT_CHARACTER_LIGHTING_PRESET_IDS, DEFAULT_CHARACTER_LIGHTING_SETTINGS, DEFAULT_CHARACTER_SCENE_TYPE_ID, DEFAULT_HAIR_COLOR_APPEARANCE, DEFAULT_HAIR_PHYSICS_CONFIG, Embody, FISH_AU_MAPPING_CONFIG, HAIR_COLOR_PRESETS, HUMANOID_SKELETON_TEMPLATES, HairPhysics, HairPhysicsController, JOINT_CONTROL_SECTION, JONATHAN_HUMANOID_SKELETON_TEMPLATE, LIP_SYNC_CONTROL_TO_BINDINGS, MORPH_TO_MESH, RustAnnotationCameraCore, RustCameraFlight, RustCameraOrbit, RustHairPhysics, TEMPLATE_SKELETON_FIT_METADATA_KIND, TEMPLATE_SKELETON_FIT_METADATA_VERSION, TEMPLATE_SKELETON_FIT_STATUSES, TEMPLATE_SKELETON_FIT_VERTICAL_ANCHORS, TEMPLATE_SKELETON_FIT_VERTICAL_AXES, THREE_BLENDING_MODES, ThreeAnimationRuntime, ThreeAnimationSystem, ThreeClipAdapter, ThreeFrameApplier, ThreeModelInspector, TsClipCompiler, TsRuntimeCore, VISEME_JAW_AMOUNTS, VISEME_KEYS, VISEME_MORPH_BINDING_STRIDE, WasmRuntimeCore, analyzeModel, applyAUBoneBindingUpdate, applyBilateralAxisBindingUpdate, applyBoneAxisBindingUpdate, applyCharacterModelTransform, applyCharacterProfileToPreset, buildBoneAuOptions, buildFrameApplierBindings, buildMappingEditorModel, classifyAuAsJointControl, collectMorphMeshes2 as collectMorphMeshes, compileBoneBindings, compileMorphBindings, compileVisemeKeys, composeTemplateSkeletonFitTransform, computeCameraRelativeGazeOffset, computeHumanoidSkeletonTemplateRestBounds, createBilateralBoneAxisAu, createBoneAxisAu, createCharacterHost, createDefaultCharacterLighting, createDefaultCharacterScene, createRustAnnotationCameraCore, createRustHairPhysics, createShadowPlane, createValidationSkeletonFromHumanoidTemplate, detectAnnotationLaterality, detectFacingDirection, disposeCharacterModel, ensureBilateralBoneNodeKeys, ensureBoneNodeKey, extendCharacterConfigWithPreset, extendPresetWithProfile, extendProfileConfigWithPreset, extractFromGLTF, extractHumanoidSkeletonTemplateFromModel, extractLegacyCharacterProfileOverrides, extractModelData, extractProfileOverrides, findFaceCenter, findNodeKeyForBone, formatAxisDirectionLabel, formatAxisLabel, fuzzyNameMatch, generateMappingCorrections, getAUBoneBindingState, getAxisFromChannel, getBilateralAxisBindingState, getBoneAxisBindingState, getDefaultAnnotationLaterality, getHumanoidSkeletonTemplate, getHumanoidSkeletonTemplateBoneNames, getMeshNamesForAUProfile, getMeshNamesForVisemeProfile, getModelForwardDirection, getModelLocalOrbitAngle, getPreset, getPresetWithProfile, getProfilePresetId, getProfileVisemeSlots, getRegionSemanticSide, getSemanticHorizontalSign, getSemanticHorizontalSignForSide, getVisemeBindingTargets, getVisemeJawAmounts, getVisemeSlotIndex, getWorldDirectionForCameraAngle, hasLeftRightMorphs, inferChiralBoneNamePair, inferEyeControlFamily, inferEyeControlScope, isJointControlAuInfo, isMaxDegreesOnlyAxisBindingUpdate, isMixedAU, isPresetCompatible, isTemplateSkeletonFitStatus, loadCharacterModel, mapProviderVisemeToSlot, mergeRegionsByName as mergeCharacterRegionsByName, mergePresetWithProfile, mergeProfileRegionsByName, normalizeCameraAngle, normalizeDefaultCharacterLightingSettings, normalizeHairColorAppearance, numericArrayToNumbers, packHairConfig, packHeadState, parseCharacterModel, passesMarkerCameraAngleGate, resolveBoneAxisChannel, resolveBoneName, resolveBoneNameForNodeKey, resolveBoneNames, resolveContinuumDisplayLabel, resolveFaceCenter, resolvePreset, resolvePresetWithOverrides, resolveProfileFromPreset, resolveRegionCameraAngle, resolveRegionVisibilityCameraAngle, resolveRustEmbeddedProfileView, resolveRustProfileView, resolveVisemeMeshCategory, stripConfiguredBoneAffixes, suggestBestPreset, toModelLocalDirection2 as toModelLocalDirection, toWorldDirection, unpackBoneFrameDelta, unpackHairConfig, unpackHairMorphOutput, unpackHairState, unpackMorphFrameDelta, validateMappingConfig, validateMappings, validateTemplateSkeletonFitMetadata };
|
|
15143
15143
|
//# sourceMappingURL=index.js.map
|
|
15144
15144
|
//# sourceMappingURL=index.js.map
|