@lovelace_lol/embody 0.0.3 → 0.0.5
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/WasmRuntimeCore.d.ts +2 -24
- package/dist/core/index.d.ts +2 -2
- package/dist/core.cjs +2 -239
- package/dist/core.cjs.map +1 -1
- package/dist/core.js +3 -236
- package/dist/core.js.map +1 -1
- package/dist/index.cjs +14 -239
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +4 -2
- package/dist/index.js +13 -236
- 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 +24 -10
- 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 +12 -10
- package/dist/wasmTypes.d.ts +2 -0
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -45,11 +45,11 @@ export { applyCharacterModelTransform, disposeCharacterModel, loadCharacterModel
|
|
|
45
45
|
export type { CharacterModelLoadOptions, CharacterModelLoadResult, CharacterModelTransform, } from './engines/three/modelLoader';
|
|
46
46
|
export { TsClipCompiler, numericArrayToNumbers, } from './core/TsClipCompiler';
|
|
47
47
|
export { TsRuntimeCore } from './core/TsRuntimeCore';
|
|
48
|
-
export {
|
|
48
|
+
export { WasmRuntimeCore, unpackMorphFrameDelta, unpackBoneFrameDelta, } from './core/WasmRuntimeCore';
|
|
49
49
|
export { EMBODY_CORE_ABI_VERSION, HAIR_CONFIG_FIELDS, HAIR_CONFIG_STRIDE, HAIR_HEAD_STATE_FIELDS, HAIR_HEAD_STATE_STRIDE, HAIR_MORPH_OUTPUT_FIELDS, HAIR_MORPH_OUTPUT_STRIDE, HAIR_STATE_FIELDS, HAIR_STATE_STRIDE, MESH_PROPORTIONS_FIELDS, MESH_PROPORTIONS_STRIDE, PACKED_MORPH_FRAME_DELTA_FIELDS, PACKED_MORPH_FRAME_DELTA_STRIDE, PACKED_BONE_FRAME_DELTA_FIELDS, PACKED_BONE_FRAME_DELTA_STRIDE, TEMPLATE_SKELETON_FIT_SOLUTION_FIELDS, TEMPLATE_SKELETON_FIT_SOLUTION_STRIDE, TEMPLATE_SKELETON_FIT_TRANSFORM_FIELDS, TEMPLATE_SKELETON_FIT_TRANSFORM_STRIDE, getEmbodyCore, requireInitializedEmbodyCore, initEmbodyCore, resetEmbodyCoreForTests, } from './wasm';
|
|
50
50
|
export type { TsClipCompilerInput, TsClipCompilerKeyframe, TsClipCompilerTrackInput, TsClipCurveTarget, TsClipCurvesInput, } from './core/TsClipCompiler';
|
|
51
51
|
export type { TsRuntimeCoreOptions } from './core/TsRuntimeCore';
|
|
52
|
-
export type {
|
|
52
|
+
export type { WasmRuntimeCoreOptions, } from './core/WasmRuntimeCore';
|
|
53
53
|
export type { EmbodyCoreWasmModule, WasmHairPhysicsSolver, WasmHairPhysicsSolverConstructor, } from './wasmTypes';
|
|
54
54
|
export type { HairConfigField, HairHeadStateField, HairMorphOutputField, HairStateField, PackedHairMorphOutput, PackedHairPhysicsState, PackedMorphFrameDelta, PackedMorphFrameDeltaField, PackedTemplateSkeletonFitTransform, TemplateSkeletonFitTransformField, } from './core/contracts';
|
|
55
55
|
export type { EmbodyRuntime, ReadyPayload, EmbodyConfig, } from './interfaces/EmbodyRuntime';
|
|
@@ -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
|
@@ -4209,16 +4209,6 @@ function positiveFiniteOr(value, fallback) {
|
|
|
4209
4209
|
}
|
|
4210
4210
|
|
|
4211
4211
|
// src/core/WasmRuntimeCore.ts
|
|
4212
|
-
var AU_MORPH_BINDING_STRIDE = 5;
|
|
4213
|
-
var VISEME_MORPH_BINDING_STRIDE = 4;
|
|
4214
|
-
var AXIS_GROUP_NEGATIVE = 0;
|
|
4215
|
-
var AXIS_GROUP_POSITIVE = 1;
|
|
4216
|
-
var AXIS_GROUP_PLAIN = 2;
|
|
4217
|
-
var BONE_SIDE_NONE = 0;
|
|
4218
|
-
var BONE_SIDE_LEFT = 1;
|
|
4219
|
-
var BONE_SIDE_RIGHT = 2;
|
|
4220
|
-
var ROTATION_CHANNELS = { rx: 0, ry: 1, rz: 2 };
|
|
4221
|
-
var TRANSLATION_CHANNELS = { tx: 0, ty: 1, tz: 2 };
|
|
4222
4212
|
var WasmRuntimeCore = class {
|
|
4223
4213
|
constructor(options) {
|
|
4224
4214
|
__publicField(this, "wasm");
|
|
@@ -4232,12 +4222,11 @@ var WasmRuntimeCore = class {
|
|
|
4232
4222
|
if (!RuntimeCtor) {
|
|
4233
4223
|
throw new Error("Embody Wasm module does not export RuntimeCore");
|
|
4234
4224
|
}
|
|
4235
|
-
this.core = new RuntimeCtor(
|
|
4225
|
+
this.core = new RuntimeCtor(0);
|
|
4236
4226
|
this.reloadBindings();
|
|
4237
4227
|
}
|
|
4238
4228
|
setProfile(profile) {
|
|
4239
4229
|
this.profile = profile;
|
|
4240
|
-
this.core.set_viseme_slot_count(getProfileVisemeSlots(profile).length);
|
|
4241
4230
|
this.reloadBindings();
|
|
4242
4231
|
}
|
|
4243
4232
|
setModelDescriptor(model) {
|
|
@@ -4282,191 +4271,9 @@ var WasmRuntimeCore = class {
|
|
|
4282
4271
|
};
|
|
4283
4272
|
}
|
|
4284
4273
|
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);
|
|
4274
|
+
this.core.configure_with_profile(JSON.stringify(this.profile), JSON.stringify(this.model));
|
|
4295
4275
|
}
|
|
4296
4276
|
};
|
|
4297
|
-
function compileMorphBindings(profile, model) {
|
|
4298
|
-
const auRows = [];
|
|
4299
|
-
const mixed = [];
|
|
4300
|
-
for (const [auIdText, entry] of Object.entries(profile.auToMorphs || {})) {
|
|
4301
|
-
const auId = Number(auIdText);
|
|
4302
|
-
if (Number.isNaN(auId) || !entry) continue;
|
|
4303
|
-
const meshNames = getMeshNamesForAUProfile(profile, auId);
|
|
4304
|
-
const hasMorphs = !!(entry.left?.length || entry.right?.length || entry.center?.length);
|
|
4305
|
-
if (hasMorphs && profile.auToBones?.[auId]?.length) {
|
|
4306
|
-
mixed.push(auId);
|
|
4307
|
-
}
|
|
4308
|
-
pushAuSide(auRows, auId, 0, entry.left || [], meshNames, model, profile);
|
|
4309
|
-
pushAuSide(auRows, auId, 1, entry.right || [], meshNames, model, profile);
|
|
4310
|
-
pushAuSide(auRows, auId, 2, entry.center || [], meshNames, model, profile);
|
|
4311
|
-
}
|
|
4312
|
-
const visemeRows = [];
|
|
4313
|
-
const visemeMeshNames = getMeshNamesForVisemeProfile(profile);
|
|
4314
|
-
const slotCount = getProfileVisemeSlots(profile).length;
|
|
4315
|
-
for (let index = 0; index < slotCount; index += 1) {
|
|
4316
|
-
for (const bindingTarget of getVisemeBindingTargets(profile, index)) {
|
|
4317
|
-
for (const resolved of resolveMorphTargets(model, profile, bindingTarget.morph, visemeMeshNames)) {
|
|
4318
|
-
visemeRows.push(
|
|
4319
|
-
index,
|
|
4320
|
-
Number(resolved.mesh.id),
|
|
4321
|
-
Number(resolved.morphTarget.id),
|
|
4322
|
-
bindingTarget.weight
|
|
4323
|
-
);
|
|
4324
|
-
}
|
|
4325
|
-
}
|
|
4326
|
-
}
|
|
4327
|
-
return {
|
|
4328
|
-
auBindings: Float32Array.from(auRows),
|
|
4329
|
-
visemeBindings: Float32Array.from(visemeRows),
|
|
4330
|
-
mixedAus: Uint32Array.from(mixed)
|
|
4331
|
-
};
|
|
4332
|
-
}
|
|
4333
|
-
function compileBoneBindings(profile, model) {
|
|
4334
|
-
const referencedBones = /* @__PURE__ */ new Map();
|
|
4335
|
-
const findBone = (nodeKey) => {
|
|
4336
|
-
const bone = findBoneDescriptor(profile, model, nodeKey);
|
|
4337
|
-
if (bone) referencedBones.set(bone.id, bone);
|
|
4338
|
-
return bone;
|
|
4339
|
-
};
|
|
4340
|
-
const boneSideForAU = (auId, nodeKey) => {
|
|
4341
|
-
const side = profile.auToBones?.[auId]?.find((candidate) => candidate.node === nodeKey)?.side;
|
|
4342
|
-
if (side === "left") return BONE_SIDE_LEFT;
|
|
4343
|
-
if (side === "right") return BONE_SIDE_RIGHT;
|
|
4344
|
-
return BONE_SIDE_NONE;
|
|
4345
|
-
};
|
|
4346
|
-
const compositeRows = [];
|
|
4347
|
-
for (const composite of profile.compositeRotations || []) {
|
|
4348
|
-
const bone = findBone(composite.node);
|
|
4349
|
-
if (!bone) continue;
|
|
4350
|
-
const axes = [
|
|
4351
|
-
{ axis: 1, config: composite.yaw },
|
|
4352
|
-
{ axis: 0, config: composite.pitch },
|
|
4353
|
-
{ axis: 2, config: composite.roll }
|
|
4354
|
-
];
|
|
4355
|
-
for (const { axis, config } of axes) {
|
|
4356
|
-
if (!config) continue;
|
|
4357
|
-
const negativeAUs = toAUList(config.negative);
|
|
4358
|
-
const positiveAUs = toAUList(config.positive);
|
|
4359
|
-
const hasDirectional = negativeAUs.length > 0 && positiveAUs.length > 0;
|
|
4360
|
-
const valueRows = [];
|
|
4361
|
-
if (hasDirectional) {
|
|
4362
|
-
for (const auId of negativeAUs) {
|
|
4363
|
-
valueRows.push([auId, AXIS_GROUP_NEGATIVE, boneSideForAU(auId, composite.node)]);
|
|
4364
|
-
}
|
|
4365
|
-
for (const auId of positiveAUs) {
|
|
4366
|
-
valueRows.push([auId, AXIS_GROUP_POSITIVE, boneSideForAU(auId, composite.node)]);
|
|
4367
|
-
}
|
|
4368
|
-
} else {
|
|
4369
|
-
for (const auId of config.aus) {
|
|
4370
|
-
valueRows.push([auId, AXIS_GROUP_PLAIN, boneSideForAU(auId, composite.node)]);
|
|
4371
|
-
}
|
|
4372
|
-
}
|
|
4373
|
-
const bindingRows = [];
|
|
4374
|
-
const pushBindingRows = (auIds, group) => {
|
|
4375
|
-
for (const auId of auIds) {
|
|
4376
|
-
const binding = profile.auToBones?.[auId]?.find(
|
|
4377
|
-
(candidate) => candidate.node === composite.node
|
|
4378
|
-
);
|
|
4379
|
-
if (!binding?.maxDegrees) continue;
|
|
4380
|
-
const channel = ROTATION_CHANNELS[binding.channel];
|
|
4381
|
-
if (channel === void 0) continue;
|
|
4382
|
-
bindingRows.push([
|
|
4383
|
-
auId,
|
|
4384
|
-
group,
|
|
4385
|
-
boneSideForAU(auId, composite.node),
|
|
4386
|
-
channel,
|
|
4387
|
-
binding.scale,
|
|
4388
|
-
binding.maxDegrees
|
|
4389
|
-
]);
|
|
4390
|
-
}
|
|
4391
|
-
};
|
|
4392
|
-
pushBindingRows(negativeAUs, AXIS_GROUP_NEGATIVE);
|
|
4393
|
-
pushBindingRows(positiveAUs, AXIS_GROUP_POSITIVE);
|
|
4394
|
-
pushBindingRows(config.aus, AXIS_GROUP_PLAIN);
|
|
4395
|
-
compositeRows.push(
|
|
4396
|
-
Number(bone.id),
|
|
4397
|
-
axis,
|
|
4398
|
-
hasDirectional ? 1 : 0,
|
|
4399
|
-
valueRows.length,
|
|
4400
|
-
bindingRows.length,
|
|
4401
|
-
0,
|
|
4402
|
-
0,
|
|
4403
|
-
0
|
|
4404
|
-
);
|
|
4405
|
-
for (const row of valueRows) compositeRows.push(...row);
|
|
4406
|
-
for (const row of bindingRows) compositeRows.push(...row);
|
|
4407
|
-
}
|
|
4408
|
-
}
|
|
4409
|
-
const translationRows = [];
|
|
4410
|
-
for (const [auIdText, bindings] of Object.entries(profile.auToBones || {})) {
|
|
4411
|
-
const auId = Number(auIdText);
|
|
4412
|
-
if (Number.isNaN(auId)) continue;
|
|
4413
|
-
for (const binding of bindings || []) {
|
|
4414
|
-
const channel = TRANSLATION_CHANNELS[binding.channel];
|
|
4415
|
-
if (channel === void 0 || binding.maxUnits === void 0) continue;
|
|
4416
|
-
const bone = findBone(binding.node);
|
|
4417
|
-
if (!bone) continue;
|
|
4418
|
-
translationRows.push(auId, Number(bone.id), channel, binding.scale, binding.maxUnits);
|
|
4419
|
-
}
|
|
4420
|
-
}
|
|
4421
|
-
const jawRow = [];
|
|
4422
|
-
const jawBinding = findAutoVisemeJawBinding(profile, model);
|
|
4423
|
-
if (jawBinding?.maxDegrees) {
|
|
4424
|
-
const bone = findBone(jawBinding.node);
|
|
4425
|
-
const channel = ROTATION_CHANNELS[jawBinding.channel];
|
|
4426
|
-
if (bone && channel !== void 0) {
|
|
4427
|
-
jawRow.push(Number(bone.id), channel, jawBinding.scale, jawBinding.maxDegrees);
|
|
4428
|
-
}
|
|
4429
|
-
}
|
|
4430
|
-
const restRows = [];
|
|
4431
|
-
for (const bone of referencedBones.values()) {
|
|
4432
|
-
const position = bone.restTransform?.position;
|
|
4433
|
-
const rotation = bone.restTransform?.rotation;
|
|
4434
|
-
restRows.push(
|
|
4435
|
-
Number(bone.id),
|
|
4436
|
-
position?.x ?? 0,
|
|
4437
|
-
position?.y ?? 0,
|
|
4438
|
-
position?.z ?? 0,
|
|
4439
|
-
rotation?.x ?? 0,
|
|
4440
|
-
rotation?.y ?? 0,
|
|
4441
|
-
rotation?.z ?? 0,
|
|
4442
|
-
rotation?.w ?? 1
|
|
4443
|
-
);
|
|
4444
|
-
}
|
|
4445
|
-
return {
|
|
4446
|
-
restTransforms: Float32Array.from(restRows),
|
|
4447
|
-
compositeAxes: Float32Array.from(compositeRows),
|
|
4448
|
-
translations: Float32Array.from(translationRows),
|
|
4449
|
-
jawBinding: Float32Array.from(jawRow),
|
|
4450
|
-
visemeJawAmounts: Float32Array.from(getVisemeJawAmounts(profile) ?? [])
|
|
4451
|
-
};
|
|
4452
|
-
}
|
|
4453
|
-
function findBoneDescriptor(profile, model, nodeKey) {
|
|
4454
|
-
const configuredName = profile.boneNodes?.[nodeKey] || nodeKey;
|
|
4455
|
-
const prefix = profile.bonePrefix ?? "";
|
|
4456
|
-
const suffix = profile.boneSuffix ?? "";
|
|
4457
|
-
const prefixedName = prefix && !configuredName.startsWith(prefix) ? `${prefix}${configuredName}` : configuredName;
|
|
4458
|
-
const fullName = suffix && !prefixedName.endsWith(suffix) ? `${prefixedName}${suffix}` : prefixedName;
|
|
4459
|
-
const candidates = /* @__PURE__ */ new Set([nodeKey, configuredName, fullName]);
|
|
4460
|
-
return model.bones.find((bone) => candidates.has(bone.name));
|
|
4461
|
-
}
|
|
4462
|
-
function findAutoVisemeJawBinding(profile, model) {
|
|
4463
|
-
const isRotation = (binding) => binding?.channel === "rx" || binding?.channel === "ry" || binding?.channel === "rz";
|
|
4464
|
-
const candidates = [
|
|
4465
|
-
profile.auToBones?.[103]?.find(isRotation),
|
|
4466
|
-
profile.auToBones?.[26]?.find(isRotation)
|
|
4467
|
-
].filter((binding) => !!binding);
|
|
4468
|
-
return candidates.find((binding) => !!findBoneDescriptor(profile, model, binding.node)) ?? candidates[0] ?? null;
|
|
4469
|
-
}
|
|
4470
4277
|
function unpackBoneFrameDelta(values) {
|
|
4471
4278
|
const stride = PACKED_BONE_FRAME_DELTA_STRIDE;
|
|
4472
4279
|
const writes = [];
|
|
@@ -4507,46 +4314,6 @@ function unpackMorphFrameDelta(values) {
|
|
|
4507
4314
|
}
|
|
4508
4315
|
return writes;
|
|
4509
4316
|
}
|
|
4510
|
-
function pushAuSide(rows, auId, side, morphs, meshNames, model, profile) {
|
|
4511
|
-
for (const morph of morphs) {
|
|
4512
|
-
for (const resolved of resolveMorphTargets(model, profile, morph, meshNames)) {
|
|
4513
|
-
rows.push(
|
|
4514
|
-
auId,
|
|
4515
|
-
side,
|
|
4516
|
-
Number(resolved.mesh.id),
|
|
4517
|
-
Number(resolved.morphTarget.id),
|
|
4518
|
-
1
|
|
4519
|
-
);
|
|
4520
|
-
}
|
|
4521
|
-
}
|
|
4522
|
-
}
|
|
4523
|
-
function resolveMorphTargets(model, profile, morph, meshNames) {
|
|
4524
|
-
const result = [];
|
|
4525
|
-
for (const meshName of meshNames) {
|
|
4526
|
-
const mesh = model.meshes.find((candidate) => candidate.name === meshName);
|
|
4527
|
-
if (!mesh) continue;
|
|
4528
|
-
const morphTargets = mesh.morphTargetIds.map((id) => model.morphTargets.find((candidate) => candidate.id === id)).filter((target2) => !!target2);
|
|
4529
|
-
const target = typeof morph === "number" ? morphTargets.find((candidate) => candidate.hostIndex === morph) : resolveMorphTargetByName2(morphTargets, morph, profile);
|
|
4530
|
-
if (target) {
|
|
4531
|
-
result.push({ mesh, morphTarget: target });
|
|
4532
|
-
}
|
|
4533
|
-
}
|
|
4534
|
-
return result;
|
|
4535
|
-
}
|
|
4536
|
-
function resolveMorphTargetByName2(targets, key, profile) {
|
|
4537
|
-
const prefix = profile.morphPrefix || "";
|
|
4538
|
-
const suffix = profile.morphSuffix || "";
|
|
4539
|
-
const fullName = prefix + key + suffix;
|
|
4540
|
-
const exact = targets.find((target) => target.name === fullName);
|
|
4541
|
-
if (exact) return exact;
|
|
4542
|
-
const suffixRegex = profile.suffixPattern ? new RegExp(profile.suffixPattern) : null;
|
|
4543
|
-
if (!suffixRegex) return void 0;
|
|
4544
|
-
return targets.find((target) => {
|
|
4545
|
-
if (!target.name.startsWith(fullName)) return false;
|
|
4546
|
-
const candidateSuffix = target.name.slice(fullName.length);
|
|
4547
|
-
return candidateSuffix === "" || suffixRegex.test(candidateSuffix);
|
|
4548
|
-
});
|
|
4549
|
-
}
|
|
4550
4317
|
|
|
4551
4318
|
// src/hair/appearance.ts
|
|
4552
4319
|
var HAIR_COLOR_PRESETS = {
|
|
@@ -10417,6 +10184,16 @@ var BLENDING_MODES = {
|
|
|
10417
10184
|
"None": 0
|
|
10418
10185
|
// THREE.NoBlending
|
|
10419
10186
|
};
|
|
10187
|
+
|
|
10188
|
+
// src/profiles/rustResolvedProfile.ts
|
|
10189
|
+
function resolveRustProfileView(wasm, profile) {
|
|
10190
|
+
return JSON.parse(wasm.resolve_profile_view(JSON.stringify(profile)));
|
|
10191
|
+
}
|
|
10192
|
+
function resolveRustEmbeddedProfileView(wasm, presetId, profileOverride = null) {
|
|
10193
|
+
return JSON.parse(
|
|
10194
|
+
wasm.resolve_embedded_profile_view(presetId, profileOverride ? JSON.stringify(profileOverride) : "")
|
|
10195
|
+
);
|
|
10196
|
+
}
|
|
10420
10197
|
var DEFAULT_HEAD_BONE_NAMES = ["CC_Base_Head", "Head", "head", "Bip01_Head"];
|
|
10421
10198
|
var DEFAULT_REFERENCE_HEIGHT = 1.8;
|
|
10422
10199
|
var DEFAULT_FORWARD_OFFSET = 0.08;
|
|
@@ -15139,6 +14916,6 @@ function addVec32(a, b) {
|
|
|
15139
14916
|
return [a[0] + b[0], a[1] + b[1], a[2] + b[2]];
|
|
15140
14917
|
}
|
|
15141
14918
|
|
|
15142
|
-
export { AU_INFO, AU_MAPPING_CONFIG, AU_MIX_DEFAULTS,
|
|
14919
|
+
export { AU_INFO, AU_MAPPING_CONFIG, AU_MIX_DEFAULTS, 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, WasmRuntimeCore, analyzeModel, applyAUBoneBindingUpdate, applyBilateralAxisBindingUpdate, applyBoneAxisBindingUpdate, applyCharacterModelTransform, applyCharacterProfileToPreset, buildBoneAuOptions, buildFrameApplierBindings, buildMappingEditorModel, classifyAuAsJointControl, collectMorphMeshes2 as collectMorphMeshes, 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
14920
|
//# sourceMappingURL=index.js.map
|
|
15144
14921
|
//# sourceMappingURL=index.js.map
|