Source animation state
Target animation state
Optional custom transition rules (defaults to DEFAULT_TRANSITIONS)
Whether the transition is allowed
// Valid transitions
isTransitionAllowed("idle", "walk"); // true
isTransitionAllowed("attack", "idle"); // true
isTransitionAllowed("hit", "idle"); // true
// Invalid transitions
isTransitionAllowed("ko", "idle"); // false (KO is terminal)
isTransitionAllowed("attack", "walk"); // false (must return to idle first)
Check if a transition from one animation state to another is allowed