/* tslint:disable */
/* eslint-disable */
/**
*/
export function init(): void;
/**
* @returns {MmdRuntime}
*/
export function createMmdRuntime(): MmdRuntime;
/**
* @returns {AnimationPool}
*/
export function createAnimationPool(): AnimationPool;
/**
* @param {number} num_threads
* @returns {Promise<any>}
*/
export function initThreadPool(num_threads: number): Promise<any>;
/**
* @param {number} receiver
*/
export function wbg_rayon_start_worker(receiver: number): void;
/**
*/
export class AnimationPool {
  free(): void;
/**
* @param {number} count
* @returns {number}
*/
  allocateLengthsBuffer(count: number): number;
/**
* @param {number} ptr
* @param {number} count
*/
  deallocateLengthsBuffer(ptr: number, count: number): void;
/**
* @param {number} track_lengths
* @param {number} track_count
* @returns {number}
*/
  createBoneTracks(track_lengths: number, track_count: number): number;
/**
* @param {number} tracks
* @param {number} index
* @returns {number}
*/
  getBoneTrackFrameNumbers(tracks: number, index: number): number;
/**
* @param {number} tracks
* @param {number} index
* @returns {number}
*/
  getBoneTrackRotations(tracks: number, index: number): number;
/**
* @param {number} tracks
* @param {number} index
* @returns {number}
*/
  getBoneTrackRotationInterpolations(tracks: number, index: number): number;
/**
* @param {number} track_lengths
* @param {number} track_count
* @returns {number}
*/
  createMovableBoneTracks(track_lengths: number, track_count: number): number;
/**
* @param {number} tracks
* @param {number} index
* @returns {number}
*/
  getMovableBoneTrackFrameNumbers(tracks: number, index: number): number;
/**
* @param {number} tracks
* @param {number} index
* @returns {number}
*/
  getMovableBoneTrackPositions(tracks: number, index: number): number;
/**
* @param {number} tracks
* @param {number} index
* @returns {number}
*/
  getMovableBoneTrackPositionInterpolations(tracks: number, index: number): number;
/**
* @param {number} tracks
* @param {number} index
* @returns {number}
*/
  getMovableBoneTrackRotations(tracks: number, index: number): number;
/**
* @param {number} tracks
* @param {number} index
* @returns {number}
*/
  getMovableBoneTrackRotationInterpolations(tracks: number, index: number): number;
/**
* @param {number} track_lengths
* @param {number} track_count
* @returns {number}
*/
  createMorphTracks(track_lengths: number, track_count: number): number;
/**
* @param {number} tracks
* @param {number} index
* @returns {number}
*/
  getMorphTrackFrameNumbers(tracks: number, index: number): number;
/**
* @param {number} tracks
* @param {number} index
* @returns {number}
*/
  getMorphTrackWeights(tracks: number, index: number): number;
/**
* @param {number} bone_tracks_ptr
* @param {number} bone_track_count
* @param {number} movable_bone_tracks_ptr
* @param {number} movable_bone_track_count
* @param {number} morph_tracks_ptr
* @param {number} morph_track_count
* @param {number} property_track_length
* @param {number} property_track_ik_count
* @returns {number}
*/
  createAnimation(bone_tracks_ptr: number, bone_track_count: number, movable_bone_tracks_ptr: number, movable_bone_track_count: number, morph_tracks_ptr: number, morph_track_count: number, property_track_length: number, property_track_ik_count: number): number;
/**
* @param {number} animation_ptr
* @returns {number}
*/
  getPropertyTrackFrameNumbers(animation_ptr: number): number;
/**
* @param {number} animation_ptr
* @param {number} index
* @returns {number}
*/
  getPropertyTrackIkStates(animation_ptr: number, index: number): number;
/**
* @param {number} animation_ptr
*/
  destroyAnimation(animation_ptr: number): void;
/**
* @param {number} animation_ptr
* @returns {number}
*/
  createBoneBindIndexMap(animation_ptr: number): number;
/**
* @param {number} animation_ptr
* @returns {number}
*/
  createMovableBoneBindIndexMap(animation_ptr: number): number;
/**
* @param {number} animation_ptr
* @param {number} morph_lengths
* @returns {number}
*/
  createMorphBindIndexMap(animation_ptr: number, morph_lengths: number): number;
/**
* @param {number} morph_bind_index_map
* @param {number} index
* @returns {number}
*/
  getNthMorphBindIndexMap(morph_bind_index_map: number, index: number): number;
/**
* @param {number} animation_ptr
* @returns {number}
*/
  createIkSolverBindIndexMap(animation_ptr: number): number;
/**
* @param {number} animation_ptr
* @param {number} bone_bind_index_map
* @param {number} movable_bone_bind_index_map
* @param {number} morph_bind_index_map
* @param {number} ik_solver_bind_index_map
* @returns {number}
*/
  createRuntimeAnimation(animation_ptr: number, bone_bind_index_map: number, movable_bone_bind_index_map: number, morph_bind_index_map: number, ik_solver_bind_index_map: number): number;
/**
* @param {number} runtime_animation_ptr
*/
  destroyRuntimeAnimation(runtime_animation_ptr: number): void;
/**
* @param {number} animation_ptr
* @param {number} mmd_model_ptr
* @param {number} frame_time
*/
  animateMmdModel(animation_ptr: number, mmd_model_ptr: number, frame_time: number): void;
}
/**
*/
export class MmdRuntime {
  free(): void;
/**
* @param {number} size
* @returns {number}
*/
  allocateBuffer(size: number): number;
/**
* @param {number} ptr
* @param {number} size
*/
  deallocateBuffer(ptr: number, size: number): void;
/**
* @param {number} serialized_metadata_ptr
* @param {number} serialized_metadata_size
* @returns {number}
*/
  createMmdModel(serialized_metadata_ptr: number, serialized_metadata_size: number): number;
/**
* @param {number} ptr
*/
  destroyMmdModel(ptr: number): void;
/**
* @param {number} ptr
* @returns {number}
*/
  getAnimationArena(ptr: number): number;
/**
* @param {number} ptr
* @returns {number}
*/
  getAnimationIkSolverStateArena(ptr: number): number;
/**
* @param {number} ptr
* @returns {number}
*/
  getAnimationMorphArena(ptr: number): number;
/**
* @param {number} ptr
* @returns {number}
*/
  getBoneWorldMatrixArena(ptr: number): number;
/**
* @param {number} ptr
* @returns {number}
*/
  createBoneWorldMatrixBackBuffer(ptr: number): number;
/**
* @param {number} ptr
* @param {number} runtime_animation
*/
  setRuntimeAnimation(ptr: number, runtime_animation: number): void;
/**
* @param {number | undefined} [frame_time]
*/
  beforePhysics(frame_time?: number): void;
/**
*/
  afterPhysics(): void;
/**
* @returns {number}
*/
  getLockStatePtr(): number;
/**
*/
  swapWorldMatrixBuffer(): void;
/**
* @param {MmdRuntime} mmd_runtime
* @param {number | undefined} [frame_time]
*/
  static bufferedBeforePhysics(mmd_runtime: MmdRuntime, frame_time?: number): void;
/**
* @param {MmdRuntime} mmd_runtime
* @param {number | undefined} [frame_time]
*/
  static bufferedUpdate(mmd_runtime: MmdRuntime, frame_time?: number): void;
/**
* @param {number} ptr
* @param {number} root
*/
  updateBoneWorldMatrix(ptr: number, root: number): void;
/**
* @param {number} ptr
* @param {number} root
*/
  updateBackBufferBoneWorldMatrix(ptr: number, root: number): void;
/**
* @param {number} ptr
*/
  updataBoneLocalMatrices(ptr: number): void;
}
/**
*/
export class wbg_rayon_PoolBuilder {
  free(): void;
/**
* @returns {number}
*/
  numThreads(): number;
/**
* @returns {number}
*/
  receiver(): number;
/**
*/
  build(): void;
}

export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembly.Module;

export interface InitOutput {
  readonly __wbg_animationpool_free: (a: number) => void;
  readonly animationpool_allocateLengthsBuffer: (a: number, b: number) => number;
  readonly animationpool_deallocateLengthsBuffer: (a: number, b: number, c: number) => void;
  readonly animationpool_createBoneTracks: (a: number, b: number, c: number) => number;
  readonly animationpool_getBoneTrackFrameNumbers: (a: number, b: number, c: number) => number;
  readonly animationpool_getBoneTrackRotations: (a: number, b: number, c: number) => number;
  readonly animationpool_getBoneTrackRotationInterpolations: (a: number, b: number, c: number) => number;
  readonly animationpool_createMovableBoneTracks: (a: number, b: number, c: number) => number;
  readonly animationpool_getMovableBoneTrackFrameNumbers: (a: number, b: number, c: number) => number;
  readonly animationpool_getMovableBoneTrackPositions: (a: number, b: number, c: number) => number;
  readonly animationpool_getMovableBoneTrackPositionInterpolations: (a: number, b: number, c: number) => number;
  readonly animationpool_getMovableBoneTrackRotations: (a: number, b: number, c: number) => number;
  readonly animationpool_getMovableBoneTrackRotationInterpolations: (a: number, b: number, c: number) => number;
  readonly animationpool_createMorphTracks: (a: number, b: number, c: number) => number;
  readonly animationpool_getMorphTrackFrameNumbers: (a: number, b: number, c: number) => number;
  readonly animationpool_getMorphTrackWeights: (a: number, b: number, c: number) => number;
  readonly animationpool_createAnimation: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number) => number;
  readonly animationpool_getPropertyTrackFrameNumbers: (a: number, b: number) => number;
  readonly animationpool_getPropertyTrackIkStates: (a: number, b: number, c: number) => number;
  readonly animationpool_destroyAnimation: (a: number, b: number) => void;
  readonly animationpool_createBoneBindIndexMap: (a: number, b: number) => number;
  readonly animationpool_createMovableBoneBindIndexMap: (a: number, b: number) => number;
  readonly animationpool_createMorphBindIndexMap: (a: number, b: number, c: number) => number;
  readonly animationpool_getNthMorphBindIndexMap: (a: number, b: number, c: number) => number;
  readonly animationpool_createIkSolverBindIndexMap: (a: number, b: number) => number;
  readonly animationpool_createRuntimeAnimation: (a: number, b: number, c: number, d: number, e: number, f: number) => number;
  readonly animationpool_destroyRuntimeAnimation: (a: number, b: number) => void;
  readonly animationpool_animateMmdModel: (a: number, b: number, c: number, d: number) => void;
  readonly __wbg_mmdruntime_free: (a: number) => void;
  readonly mmdruntime_allocateBuffer: (a: number, b: number) => number;
  readonly mmdruntime_deallocateBuffer: (a: number, b: number, c: number) => void;
  readonly mmdruntime_createMmdModel: (a: number, b: number, c: number) => number;
  readonly mmdruntime_destroyMmdModel: (a: number, b: number) => void;
  readonly mmdruntime_getAnimationArena: (a: number, b: number) => number;
  readonly mmdruntime_getAnimationIkSolverStateArena: (a: number, b: number) => number;
  readonly mmdruntime_getAnimationMorphArena: (a: number, b: number) => number;
  readonly mmdruntime_getBoneWorldMatrixArena: (a: number, b: number) => number;
  readonly mmdruntime_createBoneWorldMatrixBackBuffer: (a: number, b: number) => number;
  readonly mmdruntime_setRuntimeAnimation: (a: number, b: number, c: number) => void;
  readonly mmdruntime_beforePhysics: (a: number, b: number, c: number) => void;
  readonly mmdruntime_afterPhysics: (a: number) => void;
  readonly mmdruntime_getLockStatePtr: (a: number) => number;
  readonly mmdruntime_swapWorldMatrixBuffer: (a: number) => void;
  readonly mmdruntime_bufferedBeforePhysics: (a: number, b: number, c: number) => void;
  readonly mmdruntime_bufferedUpdate: (a: number, b: number, c: number) => void;
  readonly mmdruntime_updateBoneWorldMatrix: (a: number, b: number, c: number) => void;
  readonly mmdruntime_updateBackBufferBoneWorldMatrix: (a: number, b: number, c: number) => void;
  readonly mmdruntime_updataBoneLocalMatrices: (a: number, b: number) => void;
  readonly init: () => void;
  readonly createMmdRuntime: () => number;
  readonly createAnimationPool: () => number;
  readonly __wbg_wbg_rayon_poolbuilder_free: (a: number) => void;
  readonly wbg_rayon_poolbuilder_numThreads: (a: number) => number;
  readonly wbg_rayon_poolbuilder_receiver: (a: number) => number;
  readonly wbg_rayon_poolbuilder_build: (a: number) => void;
  readonly initThreadPool: (a: number) => number;
  readonly wbg_rayon_start_worker: (a: number) => void;
  readonly memory: WebAssembly.Memory;
  readonly __wbindgen_exn_store: (a: number) => void;
  readonly __wbindgen_thread_destroy: (a?: number, b?: number) => void;
  readonly __wbindgen_start: () => void;
}

export type SyncInitInput = BufferSource | WebAssembly.Module;
/**
* Instantiates the given `module`, which can either be bytes or
* a precompiled `WebAssembly.Module`.
*
* @param {SyncInitInput} module
* @param {WebAssembly.Memory} maybe_memory
*
* @returns {InitOutput}
*/
export function initSync(module: SyncInitInput, maybe_memory?: WebAssembly.Memory): InitOutput;

/**
* If `module_or_path` is {RequestInfo} or {URL}, makes a request and
* for everything else, calls `WebAssembly.instantiate` directly.
*
* @param {InitInput | Promise<InitInput>} module_or_path
* @param {WebAssembly.Memory} maybe_memory
*
* @returns {Promise<InitOutput>}
*/
export default function __wbg_init (module_or_path?: InitInput | Promise<InitInput>, maybe_memory?: WebAssembly.Memory): Promise<InitOutput>;
