@asiyst/sdk 0.1.33 → 0.1.35
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/index.cjs +1534 -570
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +111 -20
- package/dist/index.d.ts +111 -20
- package/dist/index.js +1533 -571
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -347,11 +347,15 @@ type RuntimeLifecycleState = "uninitialized" | "initializing" | "registering" |
|
|
|
347
347
|
type AnimationCategory = "idle" | "movement" | "greeting" | "communication" | "thinking" | "pointing" | "reaction" | "gesture" | "transition";
|
|
348
348
|
interface AvatarAnimation {
|
|
349
349
|
id?: string;
|
|
350
|
+
animationId?: string;
|
|
350
351
|
name: string;
|
|
351
352
|
intent?: string;
|
|
352
353
|
clipName?: string;
|
|
353
354
|
loopMode?: string;
|
|
355
|
+
loop?: boolean;
|
|
354
356
|
durationMs?: number;
|
|
357
|
+
duration?: number | null;
|
|
358
|
+
status?: string;
|
|
355
359
|
assetUrl?: string | null;
|
|
356
360
|
downloadUrl?: string | null;
|
|
357
361
|
integrity?: string;
|
|
@@ -406,6 +410,7 @@ interface AvatarBranding {
|
|
|
406
410
|
interface ProjectConfig {
|
|
407
411
|
schemaVersion: number;
|
|
408
412
|
version: number;
|
|
413
|
+
projectId?: string;
|
|
409
414
|
avatarName: string;
|
|
410
415
|
avatar: string;
|
|
411
416
|
avatarId?: string;
|
|
@@ -590,10 +595,20 @@ declare class CustomHostNavigationAdapter implements NavigationAdapter {
|
|
|
590
595
|
type CanonicalBoneName = "hips" | "spine" | "chest" | "upperChest" | "neck" | "head" | "leftShoulder" | "leftUpperArm" | "leftLowerArm" | "leftHand" | "rightShoulder" | "rightUpperArm" | "rightLowerArm" | "rightHand" | "leftUpperLeg" | "leftLowerLeg" | "leftFoot" | "leftToes" | "rightUpperLeg" | "rightLowerLeg" | "rightFoot" | "rightToes";
|
|
591
596
|
declare const CANONICAL_BONE_NAMES: readonly CanonicalBoneName[];
|
|
592
597
|
type RigType = "mixamo" | "rigify" | "unreal" | "vrm" | "generic_humanoid" | "partial_humanoid" | "unsupported";
|
|
598
|
+
type AnimationSourceMode = "embedded_and_procedural" | "procedural_only" | "embedded_only" | "static";
|
|
599
|
+
interface RigDetectionOptions {
|
|
600
|
+
embeddedAnimationCount?: number;
|
|
601
|
+
}
|
|
593
602
|
interface AvatarRigCapabilities {
|
|
594
603
|
readonly rigType: RigType;
|
|
604
|
+
readonly detectedRigFlavor: RigType;
|
|
595
605
|
readonly isHumanoid: boolean;
|
|
606
|
+
readonly hasSkeleton: boolean;
|
|
607
|
+
readonly hasSkinnedMesh: boolean;
|
|
608
|
+
readonly boneCount: number;
|
|
609
|
+
readonly skinnedMeshCount: number;
|
|
596
610
|
readonly confidence: number;
|
|
611
|
+
readonly proceduralAnimationAvailable: boolean;
|
|
597
612
|
readonly proceduralIdle: boolean;
|
|
598
613
|
readonly proceduralLocomotion: boolean;
|
|
599
614
|
readonly proceduralRunning: boolean;
|
|
@@ -604,7 +619,10 @@ interface AvatarRigCapabilities {
|
|
|
604
619
|
readonly headLookAt: boolean;
|
|
605
620
|
readonly upperBodyGestures: boolean;
|
|
606
621
|
readonly facialAnimation: boolean;
|
|
622
|
+
readonly hasEmbeddedAnimations: boolean;
|
|
623
|
+
readonly embeddedAnimationCount: number;
|
|
607
624
|
readonly clipPlayback: boolean;
|
|
625
|
+
readonly animationSourceMode: AnimationSourceMode;
|
|
608
626
|
readonly missingRequiredBones: CanonicalBoneName[];
|
|
609
627
|
readonly missingOptionalBones: CanonicalBoneName[];
|
|
610
628
|
}
|
|
@@ -950,7 +968,7 @@ declare function createAsiystInstance(options: InitOptions): Promise<AsiystClien
|
|
|
950
968
|
|
|
951
969
|
declare const SDK_VERSION: string;
|
|
952
970
|
|
|
953
|
-
type AsiystErrorCode = "UNAUTHORIZED" | "TOKEN_EXPIRED" | "FORBIDDEN" | "ORIGIN_REQUIRED" | "PROJECT_NOT_FOUND" | "AVATAR_NOT_FOUND" | "ASSET_UNAVAILABLE" | "CONTEXT_INVALID" | "CONFIRMATION_REQUIRED" | "CONFIRMATION_EXPIRED" | "RESTRICTED_CREDENTIAL_TARGET" | "RATE_LIMITED" | "SERVER_ERROR" | "DOMAIN_NOT_APPROVED" | "ORIGIN_NOT_APPROVED" | "AUTHENTICATION_FAILED" | "CONFIG_INVALID" | "OPERATION_CANCELLED" | "ASSET_TIMEOUT" | "ASSET_LOAD_CANCELLED" | "NETWORK_ERROR" | "WEBGL_UNAVAILABLE" | "ASSET_PARSE_FAILED" | "UNSUPPORTED_ASSET_FORMAT" | "SKELETON_INCOMPATIBLE" | "ANIMATION_NOT_FOUND" | "ANIMATION_FAILED" | "TARGET_NOT_FOUND" | "TARGET_STALE" | "RESTRICTED_TARGET" | "MOVEMENT_FAILED" | "SPEECH_UNAVAILABLE" | "NAVIGATION_BLOCKED" | "ACTION_TIMEOUT" | "DEPENDENCY_FAILED" | "RUNTIME_DESTROYED" | "AVATAR_NOT_READY" | "UNKNOWN_ERROR";
|
|
971
|
+
type AsiystErrorCode = "UNAUTHORIZED" | "TOKEN_EXPIRED" | "FORBIDDEN" | "ORIGIN_REQUIRED" | "PROJECT_NOT_FOUND" | "PROJECT_MISMATCH" | "AVATAR_NOT_FOUND" | "AVATAR_NOT_IMPORTED" | "AVATAR_UNPUBLISHED" | "ASSET_UNAVAILABLE" | "MISSING_CHARACTER_FILE" | "MISSING_ANIMATION_FILE" | "INVALID_ASSET_RESPONSE" | "CORS_OR_NETWORK_FAILURE" | "INCOMPATIBLE_FBX" | "CONTEXT_INVALID" | "CONFIRMATION_REQUIRED" | "CONFIRMATION_EXPIRED" | "RESTRICTED_CREDENTIAL_TARGET" | "RATE_LIMITED" | "SERVER_ERROR" | "DOMAIN_NOT_APPROVED" | "ORIGIN_NOT_APPROVED" | "AUTHENTICATION_FAILED" | "CONFIG_INVALID" | "OPERATION_CANCELLED" | "ASSET_TIMEOUT" | "ASSET_LOAD_CANCELLED" | "NETWORK_ERROR" | "WEBGL_UNAVAILABLE" | "ASSET_PARSE_FAILED" | "UNSUPPORTED_ASSET_FORMAT" | "SKELETON_INCOMPATIBLE" | "ANIMATION_NOT_FOUND" | "ANIMATION_FAILED" | "TARGET_NOT_FOUND" | "TARGET_STALE" | "RESTRICTED_TARGET" | "MOVEMENT_FAILED" | "SPEECH_UNAVAILABLE" | "NAVIGATION_BLOCKED" | "ACTION_TIMEOUT" | "DEPENDENCY_FAILED" | "RUNTIME_DESTROYED" | "AVATAR_NOT_READY" | "UNKNOWN_ERROR";
|
|
954
972
|
interface AsiystErrorOptions {
|
|
955
973
|
code: AsiystErrorCode | string;
|
|
956
974
|
message: string;
|
|
@@ -1078,6 +1096,7 @@ interface AssetLoadOptions {
|
|
|
1078
1096
|
integrity?: string;
|
|
1079
1097
|
expectedFormat?: "fbx" | "glb";
|
|
1080
1098
|
assetName?: string;
|
|
1099
|
+
isAnimation?: boolean;
|
|
1081
1100
|
onProgress?: (progress: AsiystProgress) => void;
|
|
1082
1101
|
maxRetries?: number;
|
|
1083
1102
|
}
|
|
@@ -1245,8 +1264,31 @@ declare class AUBRSkeleton {
|
|
|
1245
1264
|
readonly proportions: CharacterProportions;
|
|
1246
1265
|
readonly capabilities: AvatarRigCapabilities;
|
|
1247
1266
|
readonly modelRoot: THREE.Object3D;
|
|
1267
|
+
/** Conversion factor from physical meters (1.8m humanoid scale) to hips parent local units */
|
|
1268
|
+
readonly hipsLocalPerMeter: number;
|
|
1269
|
+
/** Conversion factor from physical meters (1.8m humanoid scale) to world units */
|
|
1270
|
+
readonly worldUnitsPerMeter: number;
|
|
1271
|
+
/** Detected arm rest angle from vertical down in radians (T-pose ≈ 1.57, A-pose ≈ 0.78, relaxed ≈ 0.25) */
|
|
1272
|
+
readonly leftArmRestAngleFromDown: number;
|
|
1273
|
+
readonly rightArmRestAngleFromDown: number;
|
|
1274
|
+
/** Sign around model +Z axis to lower each arm toward -Y (-1 for +X arm, +1 for -X arm) */
|
|
1275
|
+
readonly leftArmLowerSign: number;
|
|
1276
|
+
readonly rightArmLowerSign: number;
|
|
1277
|
+
/** Rest foot positions in modelRoot local space */
|
|
1278
|
+
readonly restLeftFootModelPos: THREE.Vector3;
|
|
1279
|
+
readonly restRightFootModelPos: THREE.Vector3;
|
|
1280
|
+
readonly hasRestFootPositions: boolean;
|
|
1248
1281
|
private readonly boneToCanonical;
|
|
1249
|
-
|
|
1282
|
+
private readonly restModelQuat;
|
|
1283
|
+
private readonly restModelQuatInv;
|
|
1284
|
+
constructor(modelRoot: THREE.Object3D, options?: RigDetectionOptions);
|
|
1285
|
+
private measureArmRest;
|
|
1286
|
+
/**
|
|
1287
|
+
* Applies a rotation delta defined in character model space (+Y up, +Z forward, +X right/left)
|
|
1288
|
+
* relative to the joint's rest pose, converted cleanly into the bone's local coordinate frame.
|
|
1289
|
+
* Allocation-free and rig-agnostic across Mixamo, Rigify, Unreal, VRM, and generic humanoids.
|
|
1290
|
+
*/
|
|
1291
|
+
applyModelDeltaRotation(name: CanonicalBoneName, modelDeltaQuat: THREE.Quaternion, weight?: number, additive?: boolean): void;
|
|
1250
1292
|
getJoint(name: CanonicalBoneName): AUBRJoint | undefined;
|
|
1251
1293
|
getBone(name: CanonicalBoneName): THREE.Bone | undefined;
|
|
1252
1294
|
hasJoint(name: CanonicalBoneName): boolean;
|
|
@@ -1281,10 +1323,12 @@ declare class IKCoordinator {
|
|
|
1281
1323
|
private initChains;
|
|
1282
1324
|
/**
|
|
1283
1325
|
* Solves and applies left leg Two-Bone IK.
|
|
1326
|
+
* `targetFootPosModel` is in `skeleton.modelRoot` local space.
|
|
1284
1327
|
*/
|
|
1285
1328
|
solveLeftLeg(targetFootPosModel: THREE.Vector3, weight?: number): void;
|
|
1286
1329
|
/**
|
|
1287
1330
|
* Solves and applies right leg Two-Bone IK.
|
|
1331
|
+
* `targetFootPosModel` is in `skeleton.modelRoot` local space.
|
|
1288
1332
|
*/
|
|
1289
1333
|
solveRightLeg(targetFootPosModel: THREE.Vector3, weight?: number): void;
|
|
1290
1334
|
/**
|
|
@@ -1302,6 +1346,7 @@ declare class IdleEngine {
|
|
|
1302
1346
|
private targetWeightShift;
|
|
1303
1347
|
private nextWeightShiftTime;
|
|
1304
1348
|
constructor(skeleton: AUBRSkeleton);
|
|
1349
|
+
reset(): void;
|
|
1305
1350
|
update(delta: number, weight?: number): void;
|
|
1306
1351
|
}
|
|
1307
1352
|
|
|
@@ -1333,22 +1378,31 @@ declare class LocomotionEngine {
|
|
|
1333
1378
|
private calibrateStride;
|
|
1334
1379
|
setMotion(params: LocomotionParams): void;
|
|
1335
1380
|
stop(): void;
|
|
1381
|
+
cancel(): void;
|
|
1336
1382
|
update(delta: number, weight?: number): void;
|
|
1337
1383
|
getPhase(): number;
|
|
1338
1384
|
getSpeed(): number;
|
|
1339
1385
|
}
|
|
1340
1386
|
|
|
1387
|
+
type FacingDirection = "left" | "right" | "center" | "forward" | "front";
|
|
1341
1388
|
declare class TurnEngine {
|
|
1342
1389
|
private readonly skeleton;
|
|
1343
1390
|
private currentYaw;
|
|
1344
1391
|
private targetYaw;
|
|
1345
1392
|
private isTurning;
|
|
1346
1393
|
private turnAngularVelocity;
|
|
1347
|
-
|
|
1394
|
+
private readonly turnTarget;
|
|
1395
|
+
private readonly baseYaw;
|
|
1396
|
+
constructor(skeleton: AUBRSkeleton, turnTarget?: THREE.Object3D);
|
|
1348
1397
|
setTargetHeading(targetYawRad: number): void;
|
|
1349
|
-
|
|
1398
|
+
turnLeft(stepRad?: number): void;
|
|
1399
|
+
turnRight(stepRad?: number): void;
|
|
1400
|
+
setFacingDirection(direction: FacingDirection): void;
|
|
1401
|
+
reset(): void;
|
|
1350
1402
|
update(delta: number, isLocomoting?: boolean): void;
|
|
1351
1403
|
getYaw(): number;
|
|
1404
|
+
getTargetYaw(): number;
|
|
1405
|
+
getAngularVelocity(): number;
|
|
1352
1406
|
isTurnActive(): boolean;
|
|
1353
1407
|
}
|
|
1354
1408
|
|
|
@@ -1405,6 +1459,10 @@ declare class GestureEngine {
|
|
|
1405
1459
|
update(delta: number): void;
|
|
1406
1460
|
private getDefaultDuration;
|
|
1407
1461
|
private determineHand;
|
|
1462
|
+
/**
|
|
1463
|
+
* Helper: rotates an upper arm from its rest orientation to a target standing-relative Euler pose in model space.
|
|
1464
|
+
*/
|
|
1465
|
+
private applyStandingArmDelta;
|
|
1408
1466
|
private synthesizeWave;
|
|
1409
1467
|
private synthesizePoint;
|
|
1410
1468
|
private synthesizeAgree;
|
|
@@ -1495,6 +1553,10 @@ declare class MotionCoordinator {
|
|
|
1495
1553
|
blendLayers(hasActiveClip: boolean): void;
|
|
1496
1554
|
}
|
|
1497
1555
|
|
|
1556
|
+
interface ProceduralMovementEngineOptions extends RigDetectionOptions {
|
|
1557
|
+
/** Optional outer Object3D (e.g. centered wrapper group) to apply yaw turning to */
|
|
1558
|
+
turnTarget?: THREE.Object3D;
|
|
1559
|
+
}
|
|
1498
1560
|
declare class ProceduralMovementEngine {
|
|
1499
1561
|
readonly skeleton: AUBRSkeleton;
|
|
1500
1562
|
readonly ik: IKCoordinator;
|
|
@@ -1508,17 +1570,31 @@ declare class ProceduralMovementEngine {
|
|
|
1508
1570
|
readonly stateMachine: MotionStateMachine;
|
|
1509
1571
|
readonly coordinator: MotionCoordinator;
|
|
1510
1572
|
private isEnabled;
|
|
1511
|
-
private
|
|
1512
|
-
|
|
1573
|
+
private paused;
|
|
1574
|
+
private locomotionBlendWeight;
|
|
1575
|
+
private startingTimer;
|
|
1576
|
+
private readonly balanceReachScratch;
|
|
1577
|
+
constructor(modelRoot: THREE.Object3D, options?: ProceduralMovementEngineOptions);
|
|
1513
1578
|
getCapabilities(): AvatarRigCapabilities;
|
|
1579
|
+
getState(): MotionState;
|
|
1514
1580
|
setEnabled(enabled: boolean): void;
|
|
1581
|
+
pause(): void;
|
|
1582
|
+
resume(): void;
|
|
1583
|
+
isPaused(): boolean;
|
|
1584
|
+
resetToRestPose(): void;
|
|
1585
|
+
startIdle(): void;
|
|
1586
|
+
startWalking(speed?: number, screenVelocityPx?: number): void;
|
|
1515
1587
|
walk(speed?: number, screenVelocityPx?: number): void;
|
|
1516
1588
|
run(speed?: number, screenVelocityPx?: number): void;
|
|
1589
|
+
stop(): void;
|
|
1517
1590
|
stopLocomotion(): void;
|
|
1518
|
-
|
|
1519
|
-
|
|
1520
|
-
|
|
1591
|
+
cancelLocomotion(): void;
|
|
1592
|
+
turnLeft(stepRad?: number): void;
|
|
1593
|
+
turnRight(stepRad?: number): void;
|
|
1594
|
+
turnTo(directionOrYaw: FacingDirection | number): void;
|
|
1595
|
+
setFacing(direction: FacingDirection): void;
|
|
1521
1596
|
setTargetHeading(yawRad: number): void;
|
|
1597
|
+
dispose(): void;
|
|
1522
1598
|
playGesture(type: GestureType, options?: {
|
|
1523
1599
|
duration?: number;
|
|
1524
1600
|
targetWorldPos?: THREE.Vector3;
|
|
@@ -1536,9 +1612,9 @@ declare class ProceduralMovementEngine {
|
|
|
1536
1612
|
preMixerUpdate(): void;
|
|
1537
1613
|
/**
|
|
1538
1614
|
* Main procedural pipeline tick.
|
|
1539
|
-
* Invoked in FbxRenderer.startLoop() after mixer.update(delta) and before renderer.render().
|
|
1615
|
+
* Invoked in FbxRenderer.startLoop() or Avatar Studio after mixer.update(delta) and before renderer.render().
|
|
1540
1616
|
*/
|
|
1541
|
-
update(delta: number, hasActiveMixerClip
|
|
1617
|
+
update(delta: number, hasActiveMixerClip?: boolean): void;
|
|
1542
1618
|
}
|
|
1543
1619
|
|
|
1544
1620
|
interface FbxRenderMetrics {
|
|
@@ -1676,6 +1752,7 @@ declare class CssAvatarRenderer implements AvatarRenderer {
|
|
|
1676
1752
|
private loadedFormat;
|
|
1677
1753
|
private activeAssetUrl;
|
|
1678
1754
|
private lastErrorMessage;
|
|
1755
|
+
private lastErrorObj;
|
|
1679
1756
|
private renderMetrics;
|
|
1680
1757
|
private metricsTracker?;
|
|
1681
1758
|
private fallbackOptions?;
|
|
@@ -1725,6 +1802,13 @@ declare class CssAvatarRenderer implements AvatarRenderer {
|
|
|
1725
1802
|
getLoadedFormat(): string | undefined;
|
|
1726
1803
|
getAssetUrl(): string | undefined;
|
|
1727
1804
|
getLastError(): string | undefined;
|
|
1805
|
+
getLastErrorObject(): AsiystError | Error | undefined;
|
|
1806
|
+
getFailedAnimations(): Array<{
|
|
1807
|
+
name: string;
|
|
1808
|
+
id?: string;
|
|
1809
|
+
error: string;
|
|
1810
|
+
code?: string;
|
|
1811
|
+
}>;
|
|
1728
1812
|
getMetrics(): FbxRenderMetrics | undefined;
|
|
1729
1813
|
getFigure(): HTMLElement | undefined;
|
|
1730
1814
|
getFbxRenderer(): FbxRenderer | null;
|
|
@@ -2118,9 +2202,14 @@ declare class TwoBoneIK {
|
|
|
2118
2202
|
static solve(chainOrRoot: TwoBoneIKChain | THREE.Bone, targetOrMid: THREE.Vector3 | THREE.Bone, rootPosOrTip?: THREE.Vector3 | THREE.Bone, poleVectorOrTarget?: THREE.Vector3, optionsOrPole?: TwoBoneIKOptions | THREE.Vector3, extraOptions?: TwoBoneIKOptions): any;
|
|
2119
2203
|
private static solveAnalytical;
|
|
2120
2204
|
/**
|
|
2121
|
-
* Applies solved two-bone IK rotations to the target AUBR joints in-place
|
|
2205
|
+
* Applies solved two-bone IK rotations to the target AUBR leg joints in-place
|
|
2206
|
+
* using rest-pose-preserving world-space delta rotations so Mixamo, Rigify, Unreal,
|
|
2207
|
+
* VRM, and generic humanoid bone orientations are never distorted.
|
|
2208
|
+
*
|
|
2209
|
+
* `targetFootPosWorld` and `poleDirWorld` are in world space (or model space when
|
|
2210
|
+
* `modelRoot` is omitted and bones are evaluated in local space).
|
|
2122
2211
|
*/
|
|
2123
|
-
static applyLegIK(thighBone: THREE.Bone, shinBone: THREE.Bone, footBone: THREE.Bone, thighLength: number, shinLength: number,
|
|
2212
|
+
static applyLegIK(thighBone: THREE.Bone, shinBone: THREE.Bone, footBone: THREE.Bone, thighLength: number, shinLength: number, targetFootPosWorld: THREE.Vector3, poleDirWorld: THREE.Vector3, weight?: number, _modelRoot?: THREE.Object3D): void;
|
|
2124
2213
|
}
|
|
2125
2214
|
|
|
2126
2215
|
interface FABRIKChain {
|
|
@@ -2182,11 +2271,13 @@ declare class FABRIKSolver {
|
|
|
2182
2271
|
*/
|
|
2183
2272
|
static solve(chain: FABRIKChain, targetPos: THREE.Vector3, poleVector?: THREE.Vector3, options?: FABRIKSolverOptions): FABRIKSolveResult;
|
|
2184
2273
|
/**
|
|
2185
|
-
* Projects middle hinge joint onto plane defined by pole vector.
|
|
2274
|
+
* Projects middle hinge joint onto the half-plane defined by the pole direction vector.
|
|
2186
2275
|
*/
|
|
2187
2276
|
private static applyPoleVector;
|
|
2188
2277
|
/**
|
|
2189
2278
|
* Converts solved world positions back into local bone rotations for the Three.js hierarchy.
|
|
2279
|
+
* Calculates delta rotation in world space from current bone direction to solved target direction,
|
|
2280
|
+
* transforming into local bone space to guarantee zero deformation when positions match rest pose.
|
|
2190
2281
|
*/
|
|
2191
2282
|
static applyPositionsToBones(chain: FABRIKChain, solvedPositions: THREE.Vector3[], weight?: number): void;
|
|
2192
2283
|
}
|
|
@@ -2204,18 +2295,18 @@ declare class RigDetector {
|
|
|
2204
2295
|
*/
|
|
2205
2296
|
static cleanBoneName(rawName: string): string;
|
|
2206
2297
|
/**
|
|
2207
|
-
* Analyzes an imported 3D model root, identifies all bones
|
|
2208
|
-
* validates hierarchy, and reports capability profile.
|
|
2298
|
+
* Analyzes an imported 3D model root, identifies all bones and skinned meshes,
|
|
2299
|
+
* maps them to canonical AUBR, validates hierarchy, and reports capability profile.
|
|
2209
2300
|
*/
|
|
2210
|
-
static detect(modelRoot: THREE.Object3D): RigDetectionResult;
|
|
2301
|
+
static detect(modelRoot: THREE.Object3D, options?: RigDetectionOptions): RigDetectionResult;
|
|
2211
2302
|
/**
|
|
2212
2303
|
* Alias for detect()
|
|
2213
2304
|
*/
|
|
2214
|
-
static detectRig(modelRoot: THREE.Object3D): RigDetectionResult;
|
|
2305
|
+
static detectRig(modelRoot: THREE.Object3D, options?: RigDetectionOptions): RigDetectionResult;
|
|
2215
2306
|
/**
|
|
2216
2307
|
* Assesses avatar rig capabilities from detection result or model.
|
|
2217
2308
|
*/
|
|
2218
|
-
static assessCapabilities(detection: RigDetectionResult, modelRoot?: THREE.Object3D): AvatarRigCapabilities;
|
|
2309
|
+
static assessCapabilities(detection: RigDetectionResult, modelRoot?: THREE.Object3D, options?: RigDetectionOptions): AvatarRigCapabilities;
|
|
2219
2310
|
private static identifyRigFlavor;
|
|
2220
2311
|
private static findBestBoneMatch;
|
|
2221
2312
|
private static validateHierarchyConstraints;
|
|
@@ -2224,4 +2315,4 @@ declare class RigDetector {
|
|
|
2224
2315
|
private static createUnsupportedCapabilities;
|
|
2225
2316
|
}
|
|
2226
2317
|
|
|
2227
|
-
export { ACTION_RISK_MAP, ACTION_STATUSES, type AUBRJoint, AUBRSkeleton, AVATAR_ACTION_PROTOCOL_VERSION, AVATAR_ACTION_TYPES, type ActionExecutionContext, type ActionHandler, type ActionKind, ActionNotAllowedError, type ActionRiskLevel, ActionScheduler, type AnimationCategory, type AppRouterLike, Asiyst, type AsiystClientInstance, type AsiystDiagnosticReport, AsiystError, type AsiystErrorCode, type AsiystEventMap, type AsiystEventName, type AsiystFallbackOptions, type AsiystInstance, type AsiystProgress, type AsiystSDKState, AssetLoader, type AssistantMode, AuthenticationError, type AvatarActionItem, type AvatarActionPlan, type AvatarActionStatus, type AvatarActionType, type AvatarAnimation, type AvatarBranding, AvatarController, type AvatarLifecycleState, type AvatarLoadingTimestamps, AvatarMetricsTracker, type AvatarPerformanceMetrics, type AvatarPose, type AvatarRenderer, type AvatarRigCapabilities, type AvatarRuntimeConfig, CANONICAL_BONE_NAMES, type CanonicalBoneName, type CharacterProportions, type ChatLifecycleState, ConfigurationError, ConfirmationManager, type ConfirmationRequestDetails, CssAvatarRenderer, CustomHostNavigationAdapter, DefaultBrowserNavigationAdapter, type DiagnosticResult, type ExpressionType, FABRIKSolver, FacialAnimationEngine, type FbxMountOptions, type FbxRenderMetrics, FbxRenderer, GestureEngine, type GestureType, GreetingManager, type HighlightStyle, IdleEngine, type InitOptions, InitializationError, LocomotionEngine, LookAtEngine, type MappedElement, MotionCoordinator, type MotionLayerWeights, type MotionState, MotionStateMachine, MovementEngine, type NavigationAdapter, NetworkError, NextJsAppRouterNavigationAdapter, NextJsPagesNavigationAdapter, ProceduralMovementEngine, type ProjectConfig, type RegisteredTarget, RigDetector, type RigType, RuntimeEventReporter, type RuntimeLifecycleState, SDK_VERSION, type SpeechOptions, SpeechPlayer, type TargetInput, TargetNotFoundError, type TargetRef, TargetRegistry, type TaskDefinition, TaskExecutionError, TaskStatus, type TaskStep, type TourDefinition, TourEngine, type TourEngineOptions, type TourStatus, type TourStep, type TourStepChangeEvent, TwoBoneIK, type WebsiteMapSnapshot, type WorkflowDefinition, anchorToViewport, asiystInit, canNavigateTo, canTransition, computeAvatarDestination, createAsiystInstance, createNextAppRouterAdapter, evaluateActionPermission, fallbackConfig, isActionAllowed, isSafeSelector, isSensitiveTarget, normalizeProjectConfig, sanitizeText, setGlobalNavigationAdapter, validateActionDependencies, validateActionItem, validateActionPlan, validateInitOptions, validateWebsiteDomain };
|
|
2318
|
+
export { ACTION_RISK_MAP, ACTION_STATUSES, type AUBRJoint, AUBRSkeleton, AVATAR_ACTION_PROTOCOL_VERSION, AVATAR_ACTION_TYPES, type ActionExecutionContext, type ActionHandler, type ActionKind, ActionNotAllowedError, type ActionRiskLevel, ActionScheduler, type AnimationCategory, type AnimationSourceMode, type AppRouterLike, Asiyst, type AsiystClientInstance, type AsiystDiagnosticReport, AsiystError, type AsiystErrorCode, type AsiystEventMap, type AsiystEventName, type AsiystFallbackOptions, type AsiystInstance, type AsiystProgress, type AsiystSDKState, AssetLoader, type AssistantMode, AuthenticationError, type AvatarActionItem, type AvatarActionPlan, type AvatarActionStatus, type AvatarActionType, type AvatarAnimation, type AvatarBranding, AvatarController, type AvatarLifecycleState, type AvatarLoadingTimestamps, AvatarMetricsTracker, type AvatarPerformanceMetrics, type AvatarPose, type AvatarRenderer, type AvatarRigCapabilities, type AvatarRuntimeConfig, BalanceEngine, CANONICAL_BONE_NAMES, type CanonicalBoneName, type CharacterProportions, type ChatLifecycleState, ConfigurationError, ConfirmationManager, type ConfirmationRequestDetails, CssAvatarRenderer, CustomHostNavigationAdapter, DefaultBrowserNavigationAdapter, type DiagnosticResult, type ExpressionType, FABRIKSolver, FacialAnimationEngine, type FacingDirection, type FbxMountOptions, type FbxRenderMetrics, FbxRenderer, GestureEngine, type GestureType, GreetingManager, type HighlightStyle, IdleEngine, type InitOptions, InitializationError, LocomotionEngine, LookAtEngine, type MappedElement, MotionCoordinator, type MotionLayerWeights, type MotionState, MotionStateMachine, MovementEngine, type NavigationAdapter, NetworkError, NextJsAppRouterNavigationAdapter, NextJsPagesNavigationAdapter, ProceduralMovementEngine, type ProceduralMovementEngineOptions, type ProjectConfig, type RegisteredTarget, type RigDetectionOptions, type RigDetectionResult, RigDetector, type RigType, RuntimeEventReporter, type RuntimeLifecycleState, SDK_VERSION, type SpeechOptions, SpeechPlayer, type TargetInput, TargetNotFoundError, type TargetRef, TargetRegistry, type TaskDefinition, TaskExecutionError, TaskStatus, type TaskStep, type TourDefinition, TourEngine, type TourEngineOptions, type TourStatus, type TourStep, type TourStepChangeEvent, TurnEngine, TwoBoneIK, type WebsiteMapSnapshot, type WorkflowDefinition, anchorToViewport, asiystInit, canNavigateTo, canTransition, computeAvatarDestination, createAsiystInstance, createNextAppRouterAdapter, evaluateActionPermission, fallbackConfig, isActionAllowed, isSafeSelector, isSensitiveTarget, normalizeProjectConfig, sanitizeText, setGlobalNavigationAdapter, validateActionDependencies, validateActionItem, validateActionPlan, validateInitOptions, validateWebsiteDomain };
|
package/dist/index.d.ts
CHANGED
|
@@ -347,11 +347,15 @@ type RuntimeLifecycleState = "uninitialized" | "initializing" | "registering" |
|
|
|
347
347
|
type AnimationCategory = "idle" | "movement" | "greeting" | "communication" | "thinking" | "pointing" | "reaction" | "gesture" | "transition";
|
|
348
348
|
interface AvatarAnimation {
|
|
349
349
|
id?: string;
|
|
350
|
+
animationId?: string;
|
|
350
351
|
name: string;
|
|
351
352
|
intent?: string;
|
|
352
353
|
clipName?: string;
|
|
353
354
|
loopMode?: string;
|
|
355
|
+
loop?: boolean;
|
|
354
356
|
durationMs?: number;
|
|
357
|
+
duration?: number | null;
|
|
358
|
+
status?: string;
|
|
355
359
|
assetUrl?: string | null;
|
|
356
360
|
downloadUrl?: string | null;
|
|
357
361
|
integrity?: string;
|
|
@@ -406,6 +410,7 @@ interface AvatarBranding {
|
|
|
406
410
|
interface ProjectConfig {
|
|
407
411
|
schemaVersion: number;
|
|
408
412
|
version: number;
|
|
413
|
+
projectId?: string;
|
|
409
414
|
avatarName: string;
|
|
410
415
|
avatar: string;
|
|
411
416
|
avatarId?: string;
|
|
@@ -590,10 +595,20 @@ declare class CustomHostNavigationAdapter implements NavigationAdapter {
|
|
|
590
595
|
type CanonicalBoneName = "hips" | "spine" | "chest" | "upperChest" | "neck" | "head" | "leftShoulder" | "leftUpperArm" | "leftLowerArm" | "leftHand" | "rightShoulder" | "rightUpperArm" | "rightLowerArm" | "rightHand" | "leftUpperLeg" | "leftLowerLeg" | "leftFoot" | "leftToes" | "rightUpperLeg" | "rightLowerLeg" | "rightFoot" | "rightToes";
|
|
591
596
|
declare const CANONICAL_BONE_NAMES: readonly CanonicalBoneName[];
|
|
592
597
|
type RigType = "mixamo" | "rigify" | "unreal" | "vrm" | "generic_humanoid" | "partial_humanoid" | "unsupported";
|
|
598
|
+
type AnimationSourceMode = "embedded_and_procedural" | "procedural_only" | "embedded_only" | "static";
|
|
599
|
+
interface RigDetectionOptions {
|
|
600
|
+
embeddedAnimationCount?: number;
|
|
601
|
+
}
|
|
593
602
|
interface AvatarRigCapabilities {
|
|
594
603
|
readonly rigType: RigType;
|
|
604
|
+
readonly detectedRigFlavor: RigType;
|
|
595
605
|
readonly isHumanoid: boolean;
|
|
606
|
+
readonly hasSkeleton: boolean;
|
|
607
|
+
readonly hasSkinnedMesh: boolean;
|
|
608
|
+
readonly boneCount: number;
|
|
609
|
+
readonly skinnedMeshCount: number;
|
|
596
610
|
readonly confidence: number;
|
|
611
|
+
readonly proceduralAnimationAvailable: boolean;
|
|
597
612
|
readonly proceduralIdle: boolean;
|
|
598
613
|
readonly proceduralLocomotion: boolean;
|
|
599
614
|
readonly proceduralRunning: boolean;
|
|
@@ -604,7 +619,10 @@ interface AvatarRigCapabilities {
|
|
|
604
619
|
readonly headLookAt: boolean;
|
|
605
620
|
readonly upperBodyGestures: boolean;
|
|
606
621
|
readonly facialAnimation: boolean;
|
|
622
|
+
readonly hasEmbeddedAnimations: boolean;
|
|
623
|
+
readonly embeddedAnimationCount: number;
|
|
607
624
|
readonly clipPlayback: boolean;
|
|
625
|
+
readonly animationSourceMode: AnimationSourceMode;
|
|
608
626
|
readonly missingRequiredBones: CanonicalBoneName[];
|
|
609
627
|
readonly missingOptionalBones: CanonicalBoneName[];
|
|
610
628
|
}
|
|
@@ -950,7 +968,7 @@ declare function createAsiystInstance(options: InitOptions): Promise<AsiystClien
|
|
|
950
968
|
|
|
951
969
|
declare const SDK_VERSION: string;
|
|
952
970
|
|
|
953
|
-
type AsiystErrorCode = "UNAUTHORIZED" | "TOKEN_EXPIRED" | "FORBIDDEN" | "ORIGIN_REQUIRED" | "PROJECT_NOT_FOUND" | "AVATAR_NOT_FOUND" | "ASSET_UNAVAILABLE" | "CONTEXT_INVALID" | "CONFIRMATION_REQUIRED" | "CONFIRMATION_EXPIRED" | "RESTRICTED_CREDENTIAL_TARGET" | "RATE_LIMITED" | "SERVER_ERROR" | "DOMAIN_NOT_APPROVED" | "ORIGIN_NOT_APPROVED" | "AUTHENTICATION_FAILED" | "CONFIG_INVALID" | "OPERATION_CANCELLED" | "ASSET_TIMEOUT" | "ASSET_LOAD_CANCELLED" | "NETWORK_ERROR" | "WEBGL_UNAVAILABLE" | "ASSET_PARSE_FAILED" | "UNSUPPORTED_ASSET_FORMAT" | "SKELETON_INCOMPATIBLE" | "ANIMATION_NOT_FOUND" | "ANIMATION_FAILED" | "TARGET_NOT_FOUND" | "TARGET_STALE" | "RESTRICTED_TARGET" | "MOVEMENT_FAILED" | "SPEECH_UNAVAILABLE" | "NAVIGATION_BLOCKED" | "ACTION_TIMEOUT" | "DEPENDENCY_FAILED" | "RUNTIME_DESTROYED" | "AVATAR_NOT_READY" | "UNKNOWN_ERROR";
|
|
971
|
+
type AsiystErrorCode = "UNAUTHORIZED" | "TOKEN_EXPIRED" | "FORBIDDEN" | "ORIGIN_REQUIRED" | "PROJECT_NOT_FOUND" | "PROJECT_MISMATCH" | "AVATAR_NOT_FOUND" | "AVATAR_NOT_IMPORTED" | "AVATAR_UNPUBLISHED" | "ASSET_UNAVAILABLE" | "MISSING_CHARACTER_FILE" | "MISSING_ANIMATION_FILE" | "INVALID_ASSET_RESPONSE" | "CORS_OR_NETWORK_FAILURE" | "INCOMPATIBLE_FBX" | "CONTEXT_INVALID" | "CONFIRMATION_REQUIRED" | "CONFIRMATION_EXPIRED" | "RESTRICTED_CREDENTIAL_TARGET" | "RATE_LIMITED" | "SERVER_ERROR" | "DOMAIN_NOT_APPROVED" | "ORIGIN_NOT_APPROVED" | "AUTHENTICATION_FAILED" | "CONFIG_INVALID" | "OPERATION_CANCELLED" | "ASSET_TIMEOUT" | "ASSET_LOAD_CANCELLED" | "NETWORK_ERROR" | "WEBGL_UNAVAILABLE" | "ASSET_PARSE_FAILED" | "UNSUPPORTED_ASSET_FORMAT" | "SKELETON_INCOMPATIBLE" | "ANIMATION_NOT_FOUND" | "ANIMATION_FAILED" | "TARGET_NOT_FOUND" | "TARGET_STALE" | "RESTRICTED_TARGET" | "MOVEMENT_FAILED" | "SPEECH_UNAVAILABLE" | "NAVIGATION_BLOCKED" | "ACTION_TIMEOUT" | "DEPENDENCY_FAILED" | "RUNTIME_DESTROYED" | "AVATAR_NOT_READY" | "UNKNOWN_ERROR";
|
|
954
972
|
interface AsiystErrorOptions {
|
|
955
973
|
code: AsiystErrorCode | string;
|
|
956
974
|
message: string;
|
|
@@ -1078,6 +1096,7 @@ interface AssetLoadOptions {
|
|
|
1078
1096
|
integrity?: string;
|
|
1079
1097
|
expectedFormat?: "fbx" | "glb";
|
|
1080
1098
|
assetName?: string;
|
|
1099
|
+
isAnimation?: boolean;
|
|
1081
1100
|
onProgress?: (progress: AsiystProgress) => void;
|
|
1082
1101
|
maxRetries?: number;
|
|
1083
1102
|
}
|
|
@@ -1245,8 +1264,31 @@ declare class AUBRSkeleton {
|
|
|
1245
1264
|
readonly proportions: CharacterProportions;
|
|
1246
1265
|
readonly capabilities: AvatarRigCapabilities;
|
|
1247
1266
|
readonly modelRoot: THREE.Object3D;
|
|
1267
|
+
/** Conversion factor from physical meters (1.8m humanoid scale) to hips parent local units */
|
|
1268
|
+
readonly hipsLocalPerMeter: number;
|
|
1269
|
+
/** Conversion factor from physical meters (1.8m humanoid scale) to world units */
|
|
1270
|
+
readonly worldUnitsPerMeter: number;
|
|
1271
|
+
/** Detected arm rest angle from vertical down in radians (T-pose ≈ 1.57, A-pose ≈ 0.78, relaxed ≈ 0.25) */
|
|
1272
|
+
readonly leftArmRestAngleFromDown: number;
|
|
1273
|
+
readonly rightArmRestAngleFromDown: number;
|
|
1274
|
+
/** Sign around model +Z axis to lower each arm toward -Y (-1 for +X arm, +1 for -X arm) */
|
|
1275
|
+
readonly leftArmLowerSign: number;
|
|
1276
|
+
readonly rightArmLowerSign: number;
|
|
1277
|
+
/** Rest foot positions in modelRoot local space */
|
|
1278
|
+
readonly restLeftFootModelPos: THREE.Vector3;
|
|
1279
|
+
readonly restRightFootModelPos: THREE.Vector3;
|
|
1280
|
+
readonly hasRestFootPositions: boolean;
|
|
1248
1281
|
private readonly boneToCanonical;
|
|
1249
|
-
|
|
1282
|
+
private readonly restModelQuat;
|
|
1283
|
+
private readonly restModelQuatInv;
|
|
1284
|
+
constructor(modelRoot: THREE.Object3D, options?: RigDetectionOptions);
|
|
1285
|
+
private measureArmRest;
|
|
1286
|
+
/**
|
|
1287
|
+
* Applies a rotation delta defined in character model space (+Y up, +Z forward, +X right/left)
|
|
1288
|
+
* relative to the joint's rest pose, converted cleanly into the bone's local coordinate frame.
|
|
1289
|
+
* Allocation-free and rig-agnostic across Mixamo, Rigify, Unreal, VRM, and generic humanoids.
|
|
1290
|
+
*/
|
|
1291
|
+
applyModelDeltaRotation(name: CanonicalBoneName, modelDeltaQuat: THREE.Quaternion, weight?: number, additive?: boolean): void;
|
|
1250
1292
|
getJoint(name: CanonicalBoneName): AUBRJoint | undefined;
|
|
1251
1293
|
getBone(name: CanonicalBoneName): THREE.Bone | undefined;
|
|
1252
1294
|
hasJoint(name: CanonicalBoneName): boolean;
|
|
@@ -1281,10 +1323,12 @@ declare class IKCoordinator {
|
|
|
1281
1323
|
private initChains;
|
|
1282
1324
|
/**
|
|
1283
1325
|
* Solves and applies left leg Two-Bone IK.
|
|
1326
|
+
* `targetFootPosModel` is in `skeleton.modelRoot` local space.
|
|
1284
1327
|
*/
|
|
1285
1328
|
solveLeftLeg(targetFootPosModel: THREE.Vector3, weight?: number): void;
|
|
1286
1329
|
/**
|
|
1287
1330
|
* Solves and applies right leg Two-Bone IK.
|
|
1331
|
+
* `targetFootPosModel` is in `skeleton.modelRoot` local space.
|
|
1288
1332
|
*/
|
|
1289
1333
|
solveRightLeg(targetFootPosModel: THREE.Vector3, weight?: number): void;
|
|
1290
1334
|
/**
|
|
@@ -1302,6 +1346,7 @@ declare class IdleEngine {
|
|
|
1302
1346
|
private targetWeightShift;
|
|
1303
1347
|
private nextWeightShiftTime;
|
|
1304
1348
|
constructor(skeleton: AUBRSkeleton);
|
|
1349
|
+
reset(): void;
|
|
1305
1350
|
update(delta: number, weight?: number): void;
|
|
1306
1351
|
}
|
|
1307
1352
|
|
|
@@ -1333,22 +1378,31 @@ declare class LocomotionEngine {
|
|
|
1333
1378
|
private calibrateStride;
|
|
1334
1379
|
setMotion(params: LocomotionParams): void;
|
|
1335
1380
|
stop(): void;
|
|
1381
|
+
cancel(): void;
|
|
1336
1382
|
update(delta: number, weight?: number): void;
|
|
1337
1383
|
getPhase(): number;
|
|
1338
1384
|
getSpeed(): number;
|
|
1339
1385
|
}
|
|
1340
1386
|
|
|
1387
|
+
type FacingDirection = "left" | "right" | "center" | "forward" | "front";
|
|
1341
1388
|
declare class TurnEngine {
|
|
1342
1389
|
private readonly skeleton;
|
|
1343
1390
|
private currentYaw;
|
|
1344
1391
|
private targetYaw;
|
|
1345
1392
|
private isTurning;
|
|
1346
1393
|
private turnAngularVelocity;
|
|
1347
|
-
|
|
1394
|
+
private readonly turnTarget;
|
|
1395
|
+
private readonly baseYaw;
|
|
1396
|
+
constructor(skeleton: AUBRSkeleton, turnTarget?: THREE.Object3D);
|
|
1348
1397
|
setTargetHeading(targetYawRad: number): void;
|
|
1349
|
-
|
|
1398
|
+
turnLeft(stepRad?: number): void;
|
|
1399
|
+
turnRight(stepRad?: number): void;
|
|
1400
|
+
setFacingDirection(direction: FacingDirection): void;
|
|
1401
|
+
reset(): void;
|
|
1350
1402
|
update(delta: number, isLocomoting?: boolean): void;
|
|
1351
1403
|
getYaw(): number;
|
|
1404
|
+
getTargetYaw(): number;
|
|
1405
|
+
getAngularVelocity(): number;
|
|
1352
1406
|
isTurnActive(): boolean;
|
|
1353
1407
|
}
|
|
1354
1408
|
|
|
@@ -1405,6 +1459,10 @@ declare class GestureEngine {
|
|
|
1405
1459
|
update(delta: number): void;
|
|
1406
1460
|
private getDefaultDuration;
|
|
1407
1461
|
private determineHand;
|
|
1462
|
+
/**
|
|
1463
|
+
* Helper: rotates an upper arm from its rest orientation to a target standing-relative Euler pose in model space.
|
|
1464
|
+
*/
|
|
1465
|
+
private applyStandingArmDelta;
|
|
1408
1466
|
private synthesizeWave;
|
|
1409
1467
|
private synthesizePoint;
|
|
1410
1468
|
private synthesizeAgree;
|
|
@@ -1495,6 +1553,10 @@ declare class MotionCoordinator {
|
|
|
1495
1553
|
blendLayers(hasActiveClip: boolean): void;
|
|
1496
1554
|
}
|
|
1497
1555
|
|
|
1556
|
+
interface ProceduralMovementEngineOptions extends RigDetectionOptions {
|
|
1557
|
+
/** Optional outer Object3D (e.g. centered wrapper group) to apply yaw turning to */
|
|
1558
|
+
turnTarget?: THREE.Object3D;
|
|
1559
|
+
}
|
|
1498
1560
|
declare class ProceduralMovementEngine {
|
|
1499
1561
|
readonly skeleton: AUBRSkeleton;
|
|
1500
1562
|
readonly ik: IKCoordinator;
|
|
@@ -1508,17 +1570,31 @@ declare class ProceduralMovementEngine {
|
|
|
1508
1570
|
readonly stateMachine: MotionStateMachine;
|
|
1509
1571
|
readonly coordinator: MotionCoordinator;
|
|
1510
1572
|
private isEnabled;
|
|
1511
|
-
private
|
|
1512
|
-
|
|
1573
|
+
private paused;
|
|
1574
|
+
private locomotionBlendWeight;
|
|
1575
|
+
private startingTimer;
|
|
1576
|
+
private readonly balanceReachScratch;
|
|
1577
|
+
constructor(modelRoot: THREE.Object3D, options?: ProceduralMovementEngineOptions);
|
|
1513
1578
|
getCapabilities(): AvatarRigCapabilities;
|
|
1579
|
+
getState(): MotionState;
|
|
1514
1580
|
setEnabled(enabled: boolean): void;
|
|
1581
|
+
pause(): void;
|
|
1582
|
+
resume(): void;
|
|
1583
|
+
isPaused(): boolean;
|
|
1584
|
+
resetToRestPose(): void;
|
|
1585
|
+
startIdle(): void;
|
|
1586
|
+
startWalking(speed?: number, screenVelocityPx?: number): void;
|
|
1515
1587
|
walk(speed?: number, screenVelocityPx?: number): void;
|
|
1516
1588
|
run(speed?: number, screenVelocityPx?: number): void;
|
|
1589
|
+
stop(): void;
|
|
1517
1590
|
stopLocomotion(): void;
|
|
1518
|
-
|
|
1519
|
-
|
|
1520
|
-
|
|
1591
|
+
cancelLocomotion(): void;
|
|
1592
|
+
turnLeft(stepRad?: number): void;
|
|
1593
|
+
turnRight(stepRad?: number): void;
|
|
1594
|
+
turnTo(directionOrYaw: FacingDirection | number): void;
|
|
1595
|
+
setFacing(direction: FacingDirection): void;
|
|
1521
1596
|
setTargetHeading(yawRad: number): void;
|
|
1597
|
+
dispose(): void;
|
|
1522
1598
|
playGesture(type: GestureType, options?: {
|
|
1523
1599
|
duration?: number;
|
|
1524
1600
|
targetWorldPos?: THREE.Vector3;
|
|
@@ -1536,9 +1612,9 @@ declare class ProceduralMovementEngine {
|
|
|
1536
1612
|
preMixerUpdate(): void;
|
|
1537
1613
|
/**
|
|
1538
1614
|
* Main procedural pipeline tick.
|
|
1539
|
-
* Invoked in FbxRenderer.startLoop() after mixer.update(delta) and before renderer.render().
|
|
1615
|
+
* Invoked in FbxRenderer.startLoop() or Avatar Studio after mixer.update(delta) and before renderer.render().
|
|
1540
1616
|
*/
|
|
1541
|
-
update(delta: number, hasActiveMixerClip
|
|
1617
|
+
update(delta: number, hasActiveMixerClip?: boolean): void;
|
|
1542
1618
|
}
|
|
1543
1619
|
|
|
1544
1620
|
interface FbxRenderMetrics {
|
|
@@ -1676,6 +1752,7 @@ declare class CssAvatarRenderer implements AvatarRenderer {
|
|
|
1676
1752
|
private loadedFormat;
|
|
1677
1753
|
private activeAssetUrl;
|
|
1678
1754
|
private lastErrorMessage;
|
|
1755
|
+
private lastErrorObj;
|
|
1679
1756
|
private renderMetrics;
|
|
1680
1757
|
private metricsTracker?;
|
|
1681
1758
|
private fallbackOptions?;
|
|
@@ -1725,6 +1802,13 @@ declare class CssAvatarRenderer implements AvatarRenderer {
|
|
|
1725
1802
|
getLoadedFormat(): string | undefined;
|
|
1726
1803
|
getAssetUrl(): string | undefined;
|
|
1727
1804
|
getLastError(): string | undefined;
|
|
1805
|
+
getLastErrorObject(): AsiystError | Error | undefined;
|
|
1806
|
+
getFailedAnimations(): Array<{
|
|
1807
|
+
name: string;
|
|
1808
|
+
id?: string;
|
|
1809
|
+
error: string;
|
|
1810
|
+
code?: string;
|
|
1811
|
+
}>;
|
|
1728
1812
|
getMetrics(): FbxRenderMetrics | undefined;
|
|
1729
1813
|
getFigure(): HTMLElement | undefined;
|
|
1730
1814
|
getFbxRenderer(): FbxRenderer | null;
|
|
@@ -2118,9 +2202,14 @@ declare class TwoBoneIK {
|
|
|
2118
2202
|
static solve(chainOrRoot: TwoBoneIKChain | THREE.Bone, targetOrMid: THREE.Vector3 | THREE.Bone, rootPosOrTip?: THREE.Vector3 | THREE.Bone, poleVectorOrTarget?: THREE.Vector3, optionsOrPole?: TwoBoneIKOptions | THREE.Vector3, extraOptions?: TwoBoneIKOptions): any;
|
|
2119
2203
|
private static solveAnalytical;
|
|
2120
2204
|
/**
|
|
2121
|
-
* Applies solved two-bone IK rotations to the target AUBR joints in-place
|
|
2205
|
+
* Applies solved two-bone IK rotations to the target AUBR leg joints in-place
|
|
2206
|
+
* using rest-pose-preserving world-space delta rotations so Mixamo, Rigify, Unreal,
|
|
2207
|
+
* VRM, and generic humanoid bone orientations are never distorted.
|
|
2208
|
+
*
|
|
2209
|
+
* `targetFootPosWorld` and `poleDirWorld` are in world space (or model space when
|
|
2210
|
+
* `modelRoot` is omitted and bones are evaluated in local space).
|
|
2122
2211
|
*/
|
|
2123
|
-
static applyLegIK(thighBone: THREE.Bone, shinBone: THREE.Bone, footBone: THREE.Bone, thighLength: number, shinLength: number,
|
|
2212
|
+
static applyLegIK(thighBone: THREE.Bone, shinBone: THREE.Bone, footBone: THREE.Bone, thighLength: number, shinLength: number, targetFootPosWorld: THREE.Vector3, poleDirWorld: THREE.Vector3, weight?: number, _modelRoot?: THREE.Object3D): void;
|
|
2124
2213
|
}
|
|
2125
2214
|
|
|
2126
2215
|
interface FABRIKChain {
|
|
@@ -2182,11 +2271,13 @@ declare class FABRIKSolver {
|
|
|
2182
2271
|
*/
|
|
2183
2272
|
static solve(chain: FABRIKChain, targetPos: THREE.Vector3, poleVector?: THREE.Vector3, options?: FABRIKSolverOptions): FABRIKSolveResult;
|
|
2184
2273
|
/**
|
|
2185
|
-
* Projects middle hinge joint onto plane defined by pole vector.
|
|
2274
|
+
* Projects middle hinge joint onto the half-plane defined by the pole direction vector.
|
|
2186
2275
|
*/
|
|
2187
2276
|
private static applyPoleVector;
|
|
2188
2277
|
/**
|
|
2189
2278
|
* Converts solved world positions back into local bone rotations for the Three.js hierarchy.
|
|
2279
|
+
* Calculates delta rotation in world space from current bone direction to solved target direction,
|
|
2280
|
+
* transforming into local bone space to guarantee zero deformation when positions match rest pose.
|
|
2190
2281
|
*/
|
|
2191
2282
|
static applyPositionsToBones(chain: FABRIKChain, solvedPositions: THREE.Vector3[], weight?: number): void;
|
|
2192
2283
|
}
|
|
@@ -2204,18 +2295,18 @@ declare class RigDetector {
|
|
|
2204
2295
|
*/
|
|
2205
2296
|
static cleanBoneName(rawName: string): string;
|
|
2206
2297
|
/**
|
|
2207
|
-
* Analyzes an imported 3D model root, identifies all bones
|
|
2208
|
-
* validates hierarchy, and reports capability profile.
|
|
2298
|
+
* Analyzes an imported 3D model root, identifies all bones and skinned meshes,
|
|
2299
|
+
* maps them to canonical AUBR, validates hierarchy, and reports capability profile.
|
|
2209
2300
|
*/
|
|
2210
|
-
static detect(modelRoot: THREE.Object3D): RigDetectionResult;
|
|
2301
|
+
static detect(modelRoot: THREE.Object3D, options?: RigDetectionOptions): RigDetectionResult;
|
|
2211
2302
|
/**
|
|
2212
2303
|
* Alias for detect()
|
|
2213
2304
|
*/
|
|
2214
|
-
static detectRig(modelRoot: THREE.Object3D): RigDetectionResult;
|
|
2305
|
+
static detectRig(modelRoot: THREE.Object3D, options?: RigDetectionOptions): RigDetectionResult;
|
|
2215
2306
|
/**
|
|
2216
2307
|
* Assesses avatar rig capabilities from detection result or model.
|
|
2217
2308
|
*/
|
|
2218
|
-
static assessCapabilities(detection: RigDetectionResult, modelRoot?: THREE.Object3D): AvatarRigCapabilities;
|
|
2309
|
+
static assessCapabilities(detection: RigDetectionResult, modelRoot?: THREE.Object3D, options?: RigDetectionOptions): AvatarRigCapabilities;
|
|
2219
2310
|
private static identifyRigFlavor;
|
|
2220
2311
|
private static findBestBoneMatch;
|
|
2221
2312
|
private static validateHierarchyConstraints;
|
|
@@ -2224,4 +2315,4 @@ declare class RigDetector {
|
|
|
2224
2315
|
private static createUnsupportedCapabilities;
|
|
2225
2316
|
}
|
|
2226
2317
|
|
|
2227
|
-
export { ACTION_RISK_MAP, ACTION_STATUSES, type AUBRJoint, AUBRSkeleton, AVATAR_ACTION_PROTOCOL_VERSION, AVATAR_ACTION_TYPES, type ActionExecutionContext, type ActionHandler, type ActionKind, ActionNotAllowedError, type ActionRiskLevel, ActionScheduler, type AnimationCategory, type AppRouterLike, Asiyst, type AsiystClientInstance, type AsiystDiagnosticReport, AsiystError, type AsiystErrorCode, type AsiystEventMap, type AsiystEventName, type AsiystFallbackOptions, type AsiystInstance, type AsiystProgress, type AsiystSDKState, AssetLoader, type AssistantMode, AuthenticationError, type AvatarActionItem, type AvatarActionPlan, type AvatarActionStatus, type AvatarActionType, type AvatarAnimation, type AvatarBranding, AvatarController, type AvatarLifecycleState, type AvatarLoadingTimestamps, AvatarMetricsTracker, type AvatarPerformanceMetrics, type AvatarPose, type AvatarRenderer, type AvatarRigCapabilities, type AvatarRuntimeConfig, CANONICAL_BONE_NAMES, type CanonicalBoneName, type CharacterProportions, type ChatLifecycleState, ConfigurationError, ConfirmationManager, type ConfirmationRequestDetails, CssAvatarRenderer, CustomHostNavigationAdapter, DefaultBrowserNavigationAdapter, type DiagnosticResult, type ExpressionType, FABRIKSolver, FacialAnimationEngine, type FbxMountOptions, type FbxRenderMetrics, FbxRenderer, GestureEngine, type GestureType, GreetingManager, type HighlightStyle, IdleEngine, type InitOptions, InitializationError, LocomotionEngine, LookAtEngine, type MappedElement, MotionCoordinator, type MotionLayerWeights, type MotionState, MotionStateMachine, MovementEngine, type NavigationAdapter, NetworkError, NextJsAppRouterNavigationAdapter, NextJsPagesNavigationAdapter, ProceduralMovementEngine, type ProjectConfig, type RegisteredTarget, RigDetector, type RigType, RuntimeEventReporter, type RuntimeLifecycleState, SDK_VERSION, type SpeechOptions, SpeechPlayer, type TargetInput, TargetNotFoundError, type TargetRef, TargetRegistry, type TaskDefinition, TaskExecutionError, TaskStatus, type TaskStep, type TourDefinition, TourEngine, type TourEngineOptions, type TourStatus, type TourStep, type TourStepChangeEvent, TwoBoneIK, type WebsiteMapSnapshot, type WorkflowDefinition, anchorToViewport, asiystInit, canNavigateTo, canTransition, computeAvatarDestination, createAsiystInstance, createNextAppRouterAdapter, evaluateActionPermission, fallbackConfig, isActionAllowed, isSafeSelector, isSensitiveTarget, normalizeProjectConfig, sanitizeText, setGlobalNavigationAdapter, validateActionDependencies, validateActionItem, validateActionPlan, validateInitOptions, validateWebsiteDomain };
|
|
2318
|
+
export { ACTION_RISK_MAP, ACTION_STATUSES, type AUBRJoint, AUBRSkeleton, AVATAR_ACTION_PROTOCOL_VERSION, AVATAR_ACTION_TYPES, type ActionExecutionContext, type ActionHandler, type ActionKind, ActionNotAllowedError, type ActionRiskLevel, ActionScheduler, type AnimationCategory, type AnimationSourceMode, type AppRouterLike, Asiyst, type AsiystClientInstance, type AsiystDiagnosticReport, AsiystError, type AsiystErrorCode, type AsiystEventMap, type AsiystEventName, type AsiystFallbackOptions, type AsiystInstance, type AsiystProgress, type AsiystSDKState, AssetLoader, type AssistantMode, AuthenticationError, type AvatarActionItem, type AvatarActionPlan, type AvatarActionStatus, type AvatarActionType, type AvatarAnimation, type AvatarBranding, AvatarController, type AvatarLifecycleState, type AvatarLoadingTimestamps, AvatarMetricsTracker, type AvatarPerformanceMetrics, type AvatarPose, type AvatarRenderer, type AvatarRigCapabilities, type AvatarRuntimeConfig, BalanceEngine, CANONICAL_BONE_NAMES, type CanonicalBoneName, type CharacterProportions, type ChatLifecycleState, ConfigurationError, ConfirmationManager, type ConfirmationRequestDetails, CssAvatarRenderer, CustomHostNavigationAdapter, DefaultBrowserNavigationAdapter, type DiagnosticResult, type ExpressionType, FABRIKSolver, FacialAnimationEngine, type FacingDirection, type FbxMountOptions, type FbxRenderMetrics, FbxRenderer, GestureEngine, type GestureType, GreetingManager, type HighlightStyle, IdleEngine, type InitOptions, InitializationError, LocomotionEngine, LookAtEngine, type MappedElement, MotionCoordinator, type MotionLayerWeights, type MotionState, MotionStateMachine, MovementEngine, type NavigationAdapter, NetworkError, NextJsAppRouterNavigationAdapter, NextJsPagesNavigationAdapter, ProceduralMovementEngine, type ProceduralMovementEngineOptions, type ProjectConfig, type RegisteredTarget, type RigDetectionOptions, type RigDetectionResult, RigDetector, type RigType, RuntimeEventReporter, type RuntimeLifecycleState, SDK_VERSION, type SpeechOptions, SpeechPlayer, type TargetInput, TargetNotFoundError, type TargetRef, TargetRegistry, type TaskDefinition, TaskExecutionError, TaskStatus, type TaskStep, type TourDefinition, TourEngine, type TourEngineOptions, type TourStatus, type TourStep, type TourStepChangeEvent, TurnEngine, TwoBoneIK, type WebsiteMapSnapshot, type WorkflowDefinition, anchorToViewport, asiystInit, canNavigateTo, canTransition, computeAvatarDestination, createAsiystInstance, createNextAppRouterAdapter, evaluateActionPermission, fallbackConfig, isActionAllowed, isSafeSelector, isSensitiveTarget, normalizeProjectConfig, sanitizeText, setGlobalNavigationAdapter, validateActionDependencies, validateActionItem, validateActionPlan, validateInitOptions, validateWebsiteDomain };
|