Constructors

Methods

  • Calls a method inside the iframe to control or interact with the character. Provides direct access to most functionality exposed by the character.

    This function requires that the character has been initialized successfully. If the character failed to load and returned a loadError, use postLoadErrorCall instead.

    Type Parameters

    • P extends
          | (keyof RpcMethods_AICharacterManager)
          | (keyof RpcMethods_VRMManager)
          | (keyof RpcMethods_Misc)
          | (keyof RpcMethods_ChainManager)
          | (keyof RpcMethods_LlmManager)
          | (keyof RpcMethods_AsrManager)
          | (keyof RpcMethods_MicManager)
          | "_vrmManager.vrm.update"
          | (keyof RpcMethods_FocusManager)
          | (keyof RpcMethods_ExpressionManager)
          | (keyof RpcMethods_PositionManager)
          | "_misc.sentenceSplitter.split"
          | "_misc.arrayBufferProvider.urlify"
          | (keyof RpcMethods_LlmClient)
          | (keyof RpcMethods_AsrClient)
          | "_vrmManager.focusManager._camera.getWorldDirection"
          | (keyof RpcMethods_Vector3)
          | (keyof RpcMethods_MouthExpressionManager)
          | (keyof RpcMethods_FaceExpressionManager)
          | (keyof RpcMethods_MotionExpressionManager)
          | (keyof RpcMethods_Layers)
          | (keyof RpcMethods_Matrix4)
          | (keyof RpcMethods_AnimationMixer)
          | (keyof RpcMethods_FBXConverter)
          | (keyof RpcMethods_BVHConverter)
          | (keyof RpcMethods_VRMAConverter)
          | "_vrmManager.expressionManager.motion._fbxConverter._loader.parse"
          | "_vrmManager.expressionManager.motion._bvhConverter._loader.parse"
          | (keyof RpcMethods_GLTFLoader)

      The key of the RPC method to call.

    Parameters

    • path: P

      Path through the object representing the method to call. TypeScript will infer valid options.

    • ...args: AllRpcMethods[P]["args"]

      Arguments to pass to the target method.

    Returns Promise<AllRpcMethods[P]["return"]>

    • A promise that resolves with the result of the called method.
  • Calls a method even if the character failed to load properly. Use this for methods that can be invoked in error states, e.g., logging or fallback operations.

    Type Parameters

    • P extends
          | (keyof RpcMethods_Misc)
          | "sentenceSplitter.split"
          | "arrayBufferProvider.urlify"

      The key of the miscellaneous RPC method to call.

    Parameters

    • path: P

      Path through the object representing the method to call. TypeScript will infer valid options.

    • ...args: AllRpcMethods[P]["args"]

      Arguments to pass to the target method.

    Returns Promise<AllRpcMethods[P]["return"]>

    • A promise that resolves with the result of the called method.