// AUTO GENERATED FILE, DO NOT EDIT.
//
// Generated by `package:ffigen`.
// ignore_for_file: type=lint
import 'dart:ffi' as ffi;

@ffi.Native<
        ffi.Void Function(
            ffi.Pointer<ffi.Void>, ffi.Int32, ffi.Pointer<ffi.Void>)>(
    symbol: '_thermion_flutter_web_load_resource_callback',
    assetId: 'thermion_dart')
external void thermion_flutter_web_load_resource_callback(
  ffi.Pointer<ffi.Void> data,
  int length,
  ffi.Pointer<ffi.Void> context,
);

@ffi.Native<ffi.Char Function(ffi.Pointer<ffi.Char>, ffi.Int32)>(
    symbol: '_thermion_flutter_web_get', assetId: 'thermion_dart')
external int thermion_flutter_web_get(
  ffi.Pointer<ffi.Char> ptr,
  int offset,
);

@ffi.Native<ffi.Float Function(ffi.Pointer<ffi.Float>, ffi.Int32)>(
    symbol: '_thermion_flutter_web_get_float', assetId: 'thermion_dart')
external double thermion_flutter_web_get_float(
  ffi.Pointer<ffi.Float> ptr,
  int offset,
);

@ffi.Native<ffi.Double Function(ffi.Pointer<ffi.Double>, ffi.Int32)>(
    symbol: '_thermion_flutter_web_get_double', assetId: 'thermion_dart')
external double thermion_flutter_web_get_double(
  ffi.Pointer<ffi.Double> ptr,
  int offset,
);

@ffi.Native<
        ffi.Pointer<ffi.Void> Function(
            ffi.Pointer<ffi.Pointer<ffi.Void>>, ffi.Int32)>(
    symbol: '_thermion_flutter_web_get_pointer', assetId: 'thermion_dart')
external ffi.Pointer<ffi.Void> thermion_flutter_web_get_pointer(
  ffi.Pointer<ffi.Pointer<ffi.Void>> ptr,
  int offset,
);

@ffi.Native<ffi.Void Function(ffi.Pointer<ffi.Char>, ffi.Int32, ffi.Int32)>(
    symbol: '_thermion_flutter_web_set', assetId: 'thermion_dart')
external void thermion_flutter_web_set(
  ffi.Pointer<ffi.Char> ptr,
  int offset,
  int val,
);

@ffi.Native<ffi.Void Function(ffi.Pointer<ffi.Float>, ffi.Int32, ffi.Float)>(
    symbol: '_thermion_flutter_web_set_float', assetId: 'thermion_dart')
external void thermion_flutter_web_set_float(
  ffi.Pointer<ffi.Float> ptr,
  int offset,
  double val,
);

@ffi.Native<ffi.Void Function(ffi.Pointer<ffi.Double>, ffi.Int32, ffi.Double)>(
    symbol: '_thermion_flutter_web_set_double', assetId: 'thermion_dart')
external void thermion_flutter_web_set_double(
  ffi.Pointer<ffi.Double> ptr,
  int offset,
  double val,
);

@ffi.Native<
        ffi.Void Function(ffi.Pointer<ffi.Pointer<ffi.Void>>, ffi.Int32,
            ffi.Pointer<ffi.Void>)>(
    symbol: '_thermion_flutter_web_set_pointer', assetId: 'thermion_dart')
external void thermion_flutter_web_set_pointer(
  ffi.Pointer<ffi.Pointer<ffi.Void>> ptr,
  int offset,
  ffi.Pointer<ffi.Void> val,
);

@ffi.Native<ffi.Int32 Function(ffi.Pointer<ffi.Int32>, ffi.Int32)>(
    symbol: '_thermion_flutter_web_get_int32', assetId: 'thermion_dart')
external int thermion_flutter_web_get_int32(
  ffi.Pointer<ffi.Int32> ptr,
  int offset,
);

@ffi.Native<ffi.Void Function(ffi.Pointer<ffi.Int32>, ffi.Int32, ffi.Int32)>(
    symbol: '_thermion_flutter_web_set_int32', assetId: 'thermion_dart')
external void thermion_flutter_web_set_int32(
  ffi.Pointer<ffi.Int32> ptr,
  int offset,
  int value,
);

@ffi.Native<ffi.Long Function(ffi.Pointer<ffi.Pointer<ffi.Void>>)>(
    symbol: '_thermion_flutter_web_get_address', assetId: 'thermion_dart')
external int thermion_flutter_web_get_address(
  ffi.Pointer<ffi.Pointer<ffi.Void>> out,
);

@ffi.Native<ffi.Pointer<ffi.Void> Function(ffi.Int32)>(
    symbol: '_thermion_flutter_web_allocate', assetId: 'thermion_dart')
external ffi.Pointer<ffi.Void> thermion_flutter_web_allocate(
  int size,
);

@ffi.Native<ffi.Void Function(ffi.Pointer<ffi.Void>)>(
    symbol: '_thermion_flutter_web_free', assetId: 'thermion_dart')
external void thermion_flutter_web_free(
  ffi.Pointer<ffi.Void> ptr,
);

@ffi.Native<ffi.Int Function()>(
    symbol: '_thermion_dart_web_create_gl_context', assetId: 'thermion_dart')
external int thermion_dart_web_create_gl_context();

@ffi.Native<ffi.Pointer<ffi.Void> Function()>(
    symbol: '_thermion_dart_web_get_resource_loader_wrapper',
    assetId: 'thermion_dart')
external ffi.Pointer<ffi.Void> thermion_dart_web_get_resource_loader_wrapper();

@ffi.Native<
        ffi.Pointer<ffi.Void> Function(LoadFilamentResourceFromOwner,
            FreeFilamentResourceFromOwner, ffi.Pointer<ffi.Void>)>(
    symbol: '_make_resource_loader', assetId: 'thermion_dart')
external ffi.Pointer<ffi.Void> make_resource_loader(
  LoadFilamentResourceFromOwner loadFn,
  FreeFilamentResourceFromOwner freeFn,
  ffi.Pointer<ffi.Void> owner,
);

@ffi.Native<
        ffi.Pointer<ffi.Void> Function(
            ffi.Pointer<ffi.Void>,
            ffi.Pointer<ffi.Void>,
            ffi.Pointer<ffi.Void>,
            ffi.Pointer<ffi.Char>)>(
    symbol: '_create_filament_viewer', assetId: 'thermion_dart')
external ffi.Pointer<ffi.Void> create_filament_viewer(
  ffi.Pointer<ffi.Void> context,
  ffi.Pointer<ffi.Void> loader,
  ffi.Pointer<ffi.Void> platform,
  ffi.Pointer<ffi.Char> uberArchivePath,
);

@ffi.Native<ffi.Void Function(ffi.Pointer<ffi.Void>)>(
    symbol: '_destroy_filament_viewer', assetId: 'thermion_dart')
external void destroy_filament_viewer(
  ffi.Pointer<ffi.Void> viewer,
);

@ffi.Native<ffi.Pointer<ffi.Void> Function(ffi.Pointer<ffi.Void>)>(
    symbol: '_get_scene_manager', assetId: 'thermion_dart')
external ffi.Pointer<ffi.Void> get_scene_manager(
  ffi.Pointer<ffi.Void> viewer,
);

@ffi.Native<
    ffi.Void Function(ffi.Pointer<ffi.Void>, ffi.IntPtr, ffi.Uint32,
        ffi.Uint32)>(symbol: '_create_render_target', assetId: 'thermion_dart')
external void create_render_target(
  ffi.Pointer<ffi.Void> viewer,
  int texture,
  int width,
  int height,
);

@ffi.Native<ffi.Void Function(ffi.Pointer<ffi.Void>)>(
    symbol: '_clear_background_image', assetId: 'thermion_dart')
external void clear_background_image(
  ffi.Pointer<ffi.Void> viewer,
);

@ffi.Native<
    ffi.Void Function(ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Char>,
        ffi.Bool)>(symbol: '_set_background_image', assetId: 'thermion_dart')
external void set_background_image(
  ffi.Pointer<ffi.Void> viewer,
  ffi.Pointer<ffi.Char> path,
  bool fillHeight,
);

@ffi.Native<
        ffi.Void Function(
            ffi.Pointer<ffi.Void>, ffi.Float, ffi.Float, ffi.Bool)>(
    symbol: '_set_background_image_position', assetId: 'thermion_dart')
external void set_background_image_position(
  ffi.Pointer<ffi.Void> viewer,
  double x,
  double y,
  bool clamp,
);

@ffi.Native<
    ffi.Void Function(ffi.Pointer<ffi.Void>, ffi.Float, ffi.Float, ffi.Float,
        ffi.Float)>(symbol: '_set_background_color', assetId: 'thermion_dart')
external void set_background_color(
  ffi.Pointer<ffi.Void> viewer,
  double r,
  double g,
  double b,
  double a,
);

@ffi.Native<ffi.Void Function(ffi.Pointer<ffi.Void>, ffi.Int)>(
    symbol: '_set_tone_mapping', assetId: 'thermion_dart')
external void set_tone_mapping(
  ffi.Pointer<ffi.Void> viewer,
  int toneMapping,
);

@ffi.Native<ffi.Void Function(ffi.Pointer<ffi.Void>, ffi.Float)>(
    symbol: '_set_bloom', assetId: 'thermion_dart')
external void set_bloom(
  ffi.Pointer<ffi.Void> viewer,
  double strength,
);

@ffi.Native<ffi.Void Function(ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Char>)>(
    symbol: '_load_skybox', assetId: 'thermion_dart')
external void load_skybox(
  ffi.Pointer<ffi.Void> viewer,
  ffi.Pointer<ffi.Char> skyboxPath,
);

@ffi.Native<
    ffi.Void Function(ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Char>,
        ffi.Float)>(symbol: '_load_ibl', assetId: 'thermion_dart')
external void load_ibl(
  ffi.Pointer<ffi.Void> viewer,
  ffi.Pointer<ffi.Char> iblPath,
  double intensity,
);

@ffi.Native<ffi.Void Function(ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Float>)>(
    symbol: '_rotate_ibl', assetId: 'thermion_dart')
external void rotate_ibl(
  ffi.Pointer<ffi.Void> viewer,
  ffi.Pointer<ffi.Float> rotationMatrix,
);

@ffi.Native<ffi.Void Function(ffi.Pointer<ffi.Void>)>(
    symbol: '_remove_skybox', assetId: 'thermion_dart')
external void remove_skybox(
  ffi.Pointer<ffi.Void> viewer,
);

@ffi.Native<ffi.Void Function(ffi.Pointer<ffi.Void>)>(
    symbol: '_remove_ibl', assetId: 'thermion_dart')
external void remove_ibl(
  ffi.Pointer<ffi.Void> viewer,
);

@ffi.Native<
    EntityId Function(
        ffi.Pointer<ffi.Void>,
        ffi.Uint8,
        ffi.Float,
        ffi.Float,
        ffi.Float,
        ffi.Float,
        ffi.Float,
        ffi.Float,
        ffi.Float,
        ffi.Float,
        ffi.Float,
        ffi.Float,
        ffi.Float,
        ffi.Float,
        ffi.Float,
        ffi.Float,
        ffi.Bool)>(symbol: '_add_light', assetId: 'thermion_dart')
external int add_light(
  ffi.Pointer<ffi.Void> viewer,
  int type,
  double colour,
  double intensity,
  double posX,
  double posY,
  double posZ,
  double dirX,
  double dirY,
  double dirZ,
  double falloffRadius,
  double spotLightConeInner,
  double spotLightConeOuter,
  double sunAngularRadius,
  double sunHaloSize,
  double sunHaloFallof,
  bool shadows,
);

@ffi.Native<ffi.Void Function(ffi.Pointer<ffi.Void>, EntityId)>(
    symbol: '_remove_light', assetId: 'thermion_dart')
external void remove_light(
  ffi.Pointer<ffi.Void> viewer,
  int entityId,
);

@ffi.Native<ffi.Void Function(ffi.Pointer<ffi.Void>)>(
    symbol: '_clear_lights', assetId: 'thermion_dart')
external void clear_lights(
  ffi.Pointer<ffi.Void> viewer,
);

@ffi.Native<
    EntityId Function(ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Char>,
        ffi.Int)>(symbol: '_load_glb', assetId: 'thermion_dart')
external int load_glb(
  ffi.Pointer<ffi.Void> sceneManager,
  ffi.Pointer<ffi.Char> assetPath,
  int numInstances,
);

@ffi.Native<
    EntityId Function(ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>,
        ffi.Size)>(symbol: '_load_glb_from_buffer', assetId: 'thermion_dart')
external int load_glb_from_buffer(
  ffi.Pointer<ffi.Void> sceneManager,
  ffi.Pointer<ffi.Void> data,
  int length,
);

@ffi.Native<
    EntityId Function(ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Char>,
        ffi.Pointer<ffi.Char>)>(symbol: '_load_gltf', assetId: 'thermion_dart')
external int load_gltf(
  ffi.Pointer<ffi.Void> sceneManager,
  ffi.Pointer<ffi.Char> assetPath,
  ffi.Pointer<ffi.Char> relativePath,
);

@ffi.Native<EntityId Function(ffi.Pointer<ffi.Void>, EntityId)>(
    symbol: '_create_instance', assetId: 'thermion_dart')
external int create_instance(
  ffi.Pointer<ffi.Void> sceneManager,
  int id,
);

@ffi.Native<ffi.Int Function(ffi.Pointer<ffi.Void>, EntityId)>(
    symbol: '_get_instance_count', assetId: 'thermion_dart')
external int get_instance_count(
  ffi.Pointer<ffi.Void> sceneManager,
  int entityId,
);

@ffi.Native<
        ffi.Void Function(
            ffi.Pointer<ffi.Void>, EntityId, ffi.Pointer<EntityId>)>(
    symbol: '_get_instances', assetId: 'thermion_dart')
external void get_instances(
  ffi.Pointer<ffi.Void> sceneManager,
  int entityId,
  ffi.Pointer<EntityId> out,
);

@ffi.Native<ffi.Void Function(ffi.Pointer<ffi.Void>)>(
    symbol: '_set_main_camera', assetId: 'thermion_dart')
external void set_main_camera(
  ffi.Pointer<ffi.Void> viewer,
);

@ffi.Native<EntityId Function(ffi.Pointer<ffi.Void>)>(
    symbol: '_get_main_camera', assetId: 'thermion_dart')
external int get_main_camera(
  ffi.Pointer<ffi.Void> viewer,
);

@ffi.Native<
    ffi.Bool Function(ffi.Pointer<ffi.Void>, EntityId,
        ffi.Pointer<ffi.Char>)>(symbol: '_set_camera', assetId: 'thermion_dart')
external bool set_camera(
  ffi.Pointer<ffi.Void> viewer,
  int entity,
  ffi.Pointer<ffi.Char> nodeName,
);

@ffi.Native<ffi.Void Function(ffi.Pointer<ffi.Void>, ffi.Bool)>(
    symbol: '_set_view_frustum_culling', assetId: 'thermion_dart')
external void set_view_frustum_culling(
  ffi.Pointer<ffi.Void> viewer,
  bool enabled,
);

@ffi.Native<
    ffi.Void Function(
        ffi.Pointer<ffi.Void>,
        ffi.Uint64,
        ffi.Pointer<ffi.Void>,
        ffi.Pointer<
            ffi.NativeFunction<
                ffi.Void Function(ffi.Pointer<ffi.Void> buf, ffi.Size size,
                    ffi.Pointer<ffi.Void> data)>>,
        ffi.Pointer<ffi.Void>)>(symbol: '_render', assetId: 'thermion_dart')
external void render(
  ffi.Pointer<ffi.Void> viewer,
  int frameTimeInNanos,
  ffi.Pointer<ffi.Void> pixelBuffer,
  ffi.Pointer<
          ffi.NativeFunction<
              ffi.Void Function(ffi.Pointer<ffi.Void> buf, ffi.Size size,
                  ffi.Pointer<ffi.Void> data)>>
      callback,
  ffi.Pointer<ffi.Void> data,
);

@ffi.Native<
    ffi.Void Function(ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>, ffi.Uint32,
        ffi.Uint32)>(symbol: '_create_swap_chain', assetId: 'thermion_dart')
external void create_swap_chain(
  ffi.Pointer<ffi.Void> viewer,
  ffi.Pointer<ffi.Void> window,
  int width,
  int height,
);

@ffi.Native<ffi.Void Function(ffi.Pointer<ffi.Void>)>(
    symbol: '_destroy_swap_chain', assetId: 'thermion_dart')
external void destroy_swap_chain(
  ffi.Pointer<ffi.Void> viewer,
);

@ffi.Native<ffi.Void Function(ffi.Pointer<ffi.Void>, ffi.Float)>(
    symbol: '_set_frame_interval', assetId: 'thermion_dart')
external void set_frame_interval(
  ffi.Pointer<ffi.Void> viewer,
  double interval,
);

@ffi.Native<
        ffi.Void Function(
            ffi.Pointer<ffi.Void>, ffi.Uint32, ffi.Uint32, ffi.Float)>(
    symbol: '_update_viewport_and_camera_projection', assetId: 'thermion_dart')
external void update_viewport_and_camera_projection(
  ffi.Pointer<ffi.Void> viewer,
  int width,
  int height,
  double scaleFactor,
);

@ffi.Native<ffi.Void Function(ffi.Pointer<ffi.Void>)>(
    symbol: '_scroll_begin', assetId: 'thermion_dart')
external void scroll_begin(
  ffi.Pointer<ffi.Void> viewer,
);

@ffi.Native<
    ffi.Void Function(ffi.Pointer<ffi.Void>, ffi.Float, ffi.Float,
        ffi.Float)>(symbol: '_scroll_update', assetId: 'thermion_dart')
external void scroll_update(
  ffi.Pointer<ffi.Void> viewer,
  double x,
  double y,
  double z,
);

@ffi.Native<ffi.Void Function(ffi.Pointer<ffi.Void>)>(
    symbol: '_scroll_end', assetId: 'thermion_dart')
external void scroll_end(
  ffi.Pointer<ffi.Void> viewer,
);

@ffi.Native<
    ffi.Void Function(ffi.Pointer<ffi.Void>, ffi.Float, ffi.Float,
        ffi.Bool)>(symbol: '_grab_begin', assetId: 'thermion_dart')
external void grab_begin(
  ffi.Pointer<ffi.Void> viewer,
  double x,
  double y,
  bool pan,
);

@ffi.Native<ffi.Void Function(ffi.Pointer<ffi.Void>, ffi.Float, ffi.Float)>(
    symbol: '_grab_update', assetId: 'thermion_dart')
external void grab_update(
  ffi.Pointer<ffi.Void> viewer,
  double x,
  double y,
);

@ffi.Native<ffi.Void Function(ffi.Pointer<ffi.Void>)>(
    symbol: '_grab_end', assetId: 'thermion_dart')
external void grab_end(
  ffi.Pointer<ffi.Void> viewer,
);

@ffi.Native<
    ffi.Void Function(
        ffi.Pointer<ffi.Void>,
        EntityId,
        ffi.Pointer<ffi.Char>,
        ffi.Pointer<ffi.Float>,
        ffi.Int)>(symbol: '_apply_weights', assetId: 'thermion_dart')
external void apply_weights(
  ffi.Pointer<ffi.Void> sceneManager,
  int entity,
  ffi.Pointer<ffi.Char> entityName,
  ffi.Pointer<ffi.Float> weights,
  int count,
);

@ffi.Native<
    ffi.Bool Function(ffi.Pointer<ffi.Void>, EntityId, ffi.Pointer<ffi.Float>,
        ffi.Int)>(symbol: '_set_morph_target_weights', assetId: 'thermion_dart')
external bool set_morph_target_weights(
  ffi.Pointer<ffi.Void> sceneManager,
  int entity,
  ffi.Pointer<ffi.Float> morphData,
  int numWeights,
);

@ffi.Native<
    ffi.Bool Function(
        ffi.Pointer<ffi.Void>,
        EntityId,
        ffi.Pointer<ffi.Float>,
        ffi.Pointer<ffi.Int>,
        ffi.Int,
        ffi.Int,
        ffi.Float)>(symbol: '_set_morph_animation', assetId: 'thermion_dart')
external bool set_morph_animation(
  ffi.Pointer<ffi.Void> sceneManager,
  int entity,
  ffi.Pointer<ffi.Float> morphData,
  ffi.Pointer<ffi.Int> morphIndices,
  int numMorphTargets,
  int numFrames,
  double frameLengthInMs,
);

@ffi.Native<ffi.Void Function(ffi.Pointer<ffi.Void>, EntityId)>(
    symbol: '_reset_to_rest_pose', assetId: 'thermion_dart')
external void reset_to_rest_pose(
  ffi.Pointer<ffi.Void> sceneManager,
  int asset,
);

@ffi.Native<
    ffi.Void Function(
        ffi.Pointer<ffi.Void>,
        EntityId,
        ffi.Int,
        ffi.Int,
        ffi.Pointer<ffi.Float>,
        ffi.Int,
        ffi.Float,
        ffi.Float,
        ffi.Float,
        ffi.Float)>(symbol: '_add_bone_animation', assetId: 'thermion_dart')
external void add_bone_animation(
  ffi.Pointer<ffi.Void> sceneManager,
  int entity,
  int skinIndex,
  int boneIndex,
  ffi.Pointer<ffi.Float> frameData,
  int numFrames,
  double frameLengthInMs,
  double fadeOutInSecs,
  double fadeInInSecs,
  double maxDelta,
);

@ffi.Native<
        ffi.Void Function(
            ffi.Pointer<ffi.Void>, EntityId, ffi.Pointer<ffi.Float>)>(
    symbol: '_get_local_transform', assetId: 'thermion_dart')
external void get_local_transform(
  ffi.Pointer<ffi.Void> sceneManager,
  int entityId,
  ffi.Pointer<ffi.Float> arg2,
);

@ffi.Native<
    ffi.Void Function(
        ffi.Pointer<ffi.Void>,
        EntityId,
        ffi.Int,
        ffi.Pointer<ffi.Float>,
        ffi.Int)>(symbol: '_get_rest_local_transforms', assetId: 'thermion_dart')
external void get_rest_local_transforms(
  ffi.Pointer<ffi.Void> sceneManager,
  int entityId,
  int skinIndex,
  ffi.Pointer<ffi.Float> out,
  int numBones,
);

@ffi.Native<
        ffi.Void Function(
            ffi.Pointer<ffi.Void>, EntityId, ffi.Pointer<ffi.Float>)>(
    symbol: '_get_world_transform', assetId: 'thermion_dart')
external void get_world_transform(
  ffi.Pointer<ffi.Void> sceneManager,
  int entityId,
  ffi.Pointer<ffi.Float> arg2,
);

@ffi.Native<
        ffi.Void Function(ffi.Pointer<ffi.Void>, EntityId, ffi.Int, ffi.Int,
            ffi.Pointer<ffi.Float>)>(
    symbol: '_get_inverse_bind_matrix', assetId: 'thermion_dart')
external void get_inverse_bind_matrix(
  ffi.Pointer<ffi.Void> sceneManager,
  int entityId,
  int skinIndex,
  int boneIndex,
  ffi.Pointer<ffi.Float> arg4,
);

@ffi.Native<
        ffi.Bool Function(ffi.Pointer<ffi.Void>, EntityId, ffi.Int, ffi.Int,
            ffi.Pointer<ffi.Float>)>(
    symbol: '_set_bone_transform', assetId: 'thermion_dart')
external bool set_bone_transform(
  ffi.Pointer<ffi.Void> sceneManager,
  int entity,
  int skinIndex,
  int boneIndex,
  ffi.Pointer<ffi.Float> transform,
);

@ffi.Native<
    ffi.Void Function(
        ffi.Pointer<ffi.Void>,
        EntityId,
        ffi.Int,
        ffi.Bool,
        ffi.Bool,
        ffi.Bool,
        ffi.Float)>(symbol: '_play_animation', assetId: 'thermion_dart')
external void play_animation(
  ffi.Pointer<ffi.Void> sceneManager,
  int entity,
  int index,
  bool loop,
  bool reverse,
  bool replaceActive,
  double crossfade,
);

@ffi.Native<
        ffi.Void Function(ffi.Pointer<ffi.Void>, EntityId, ffi.Int, ffi.Int)>(
    symbol: '_set_animation_frame', assetId: 'thermion_dart')
external void set_animation_frame(
  ffi.Pointer<ffi.Void> sceneManager,
  int entity,
  int animationIndex,
  int animationFrame,
);

@ffi.Native<ffi.Void Function(ffi.Pointer<ffi.Void>, EntityId, ffi.Int)>(
    symbol: '_stop_animation', assetId: 'thermion_dart')
external void stop_animation(
  ffi.Pointer<ffi.Void> sceneManager,
  int entity,
  int index,
);

@ffi.Native<ffi.Int Function(ffi.Pointer<ffi.Void>, EntityId)>(
    symbol: '_get_animation_count', assetId: 'thermion_dart')
external int get_animation_count(
  ffi.Pointer<ffi.Void> sceneManager,
  int asset,
);

@ffi.Native<
    ffi.Void Function(ffi.Pointer<ffi.Void>, EntityId, ffi.Pointer<ffi.Char>,
        ffi.Int)>(symbol: '_get_animation_name', assetId: 'thermion_dart')
external void get_animation_name(
  ffi.Pointer<ffi.Void> sceneManager,
  int entity,
  ffi.Pointer<ffi.Char> outPtr,
  int index,
);

@ffi.Native<ffi.Float Function(ffi.Pointer<ffi.Void>, EntityId, ffi.Int)>(
    symbol: '_get_animation_duration', assetId: 'thermion_dart')
external double get_animation_duration(
  ffi.Pointer<ffi.Void> sceneManager,
  int entity,
  int index,
);

@ffi.Native<ffi.Int Function(ffi.Pointer<ffi.Void>, EntityId, ffi.Int)>(
    symbol: '_get_bone_count', assetId: 'thermion_dart')
external int get_bone_count(
  ffi.Pointer<ffi.Void> sceneManager,
  int assetEntity,
  int skinIndex,
);

@ffi.Native<
    ffi.Void Function(
        ffi.Pointer<ffi.Void>,
        EntityId,
        ffi.Pointer<ffi.Pointer<ffi.Char>>,
        ffi.Int)>(symbol: '_get_bone_names', assetId: 'thermion_dart')
external void get_bone_names(
  ffi.Pointer<ffi.Void> sceneManager,
  int assetEntity,
  ffi.Pointer<ffi.Pointer<ffi.Char>> outPtr,
  int skinIndex,
);

@ffi.Native<
        EntityId Function(ffi.Pointer<ffi.Void>, EntityId, ffi.Int, ffi.Int)>(
    symbol: '_get_bone', assetId: 'thermion_dart')
external int get_bone(
  ffi.Pointer<ffi.Void> sceneManager,
  int entityId,
  int skinIndex,
  int boneIndex,
);

@ffi.Native<
        ffi.Bool Function(
            ffi.Pointer<ffi.Void>, EntityId, ffi.Pointer<ffi.Float>)>(
    symbol: '_set_transform', assetId: 'thermion_dart')
external bool set_transform(
  ffi.Pointer<ffi.Void> sceneManager,
  int entityId,
  ffi.Pointer<ffi.Float> transform,
);

@ffi.Native<ffi.Bool Function(ffi.Pointer<ffi.Void>, EntityId)>(
    symbol: '_update_bone_matrices', assetId: 'thermion_dart')
external bool update_bone_matrices(
  ffi.Pointer<ffi.Void> sceneManager,
  int entityId,
);

@ffi.Native<
    ffi.Void Function(
        ffi.Pointer<ffi.Void>,
        EntityId,
        EntityId,
        ffi.Pointer<ffi.Char>,
        ffi.Int)>(symbol: '_get_morph_target_name', assetId: 'thermion_dart')
external void get_morph_target_name(
  ffi.Pointer<ffi.Void> sceneManager,
  int assetEntity,
  int childEntity,
  ffi.Pointer<ffi.Char> outPtr,
  int index,
);

@ffi.Native<ffi.Int Function(ffi.Pointer<ffi.Void>, EntityId, EntityId)>(
    symbol: '_get_morph_target_name_count', assetId: 'thermion_dart')
external int get_morph_target_name_count(
  ffi.Pointer<ffi.Void> sceneManager,
  int assetEntity,
  int childEntity,
);

@ffi.Native<ffi.Void Function(ffi.Pointer<ffi.Void>, EntityId)>(
    symbol: '_remove_entity', assetId: 'thermion_dart')
external void remove_entity(
  ffi.Pointer<ffi.Void> viewer,
  int asset,
);

@ffi.Native<ffi.Void Function(ffi.Pointer<ffi.Void>)>(
    symbol: '_clear_entities', assetId: 'thermion_dart')
external void clear_entities(
  ffi.Pointer<ffi.Void> viewer,
);

@ffi.Native<
    ffi.Bool Function(
        ffi.Pointer<ffi.Void>,
        EntityId,
        ffi.Pointer<ffi.Char>,
        ffi.Int,
        ffi.Float,
        ffi.Float,
        ffi.Float,
        ffi.Float)>(symbol: '_set_material_color', assetId: 'thermion_dart')
external bool set_material_color(
  ffi.Pointer<ffi.Void> sceneManager,
  int entity,
  ffi.Pointer<ffi.Char> meshName,
  int materialIndex,
  double r,
  double g,
  double b,
  double a,
);

@ffi.Native<ffi.Void Function(ffi.Pointer<ffi.Void>, EntityId)>(
    symbol: '_transform_to_unit_cube', assetId: 'thermion_dart')
external void transform_to_unit_cube(
  ffi.Pointer<ffi.Void> sceneManager,
  int asset,
);

@ffi.Native<
    ffi.Void Function(
        ffi.Pointer<ffi.Void>,
        EntityId,
        ffi.Float,
        ffi.Float,
        ffi.Float,
        ffi.Bool)>(symbol: '_queue_position_update', assetId: 'thermion_dart')
external void queue_position_update(
  ffi.Pointer<ffi.Void> sceneManager,
  int entity,
  double x,
  double y,
  double z,
  bool relative,
);

@ffi.Native<
    ffi.Void Function(
        ffi.Pointer<ffi.Void>,
        EntityId,
        ffi.Float,
        ffi.Float,
        ffi.Float,
        ffi.Float,
        ffi.Float,
        ffi.Bool)>(symbol: '_queue_rotation_update', assetId: 'thermion_dart')
external void queue_rotation_update(
  ffi.Pointer<ffi.Void> sceneManager,
  int entity,
  double rads,
  double x,
  double y,
  double z,
  double w,
  bool relative,
);

@ffi.Native<
    ffi.Void Function(ffi.Pointer<ffi.Void>, EntityId, ffi.Float, ffi.Float,
        ffi.Float)>(symbol: '_set_position', assetId: 'thermion_dart')
external void set_position(
  ffi.Pointer<ffi.Void> sceneManager,
  int entity,
  double x,
  double y,
  double z,
);

@ffi.Native<
    ffi.Void Function(
        ffi.Pointer<ffi.Void>,
        EntityId,
        ffi.Float,
        ffi.Float,
        ffi.Float,
        ffi.Float,
        ffi.Float)>(symbol: '_set_rotation', assetId: 'thermion_dart')
external void set_rotation(
  ffi.Pointer<ffi.Void> sceneManager,
  int entity,
  double rads,
  double x,
  double y,
  double z,
  double w,
);

@ffi.Native<ffi.Void Function(ffi.Pointer<ffi.Void>, EntityId, ffi.Float)>(
    symbol: '_set_scale', assetId: 'thermion_dart')
external void set_scale(
  ffi.Pointer<ffi.Void> sceneManager,
  int entity,
  double scale,
);

@ffi.Native<ffi.Void Function(ffi.Pointer<ffi.Void>, EntityId)>(
    symbol: '_move_camera_to_asset', assetId: 'thermion_dart')
external void move_camera_to_asset(
  ffi.Pointer<ffi.Void> viewer,
  int asset,
);

@ffi.Native<
    ffi.Void Function(ffi.Pointer<ffi.Void>, ffi.Float, ffi.Float,
        ffi.Float)>(symbol: '_set_camera_exposure', assetId: 'thermion_dart')
external void set_camera_exposure(
  ffi.Pointer<ffi.Void> viewer,
  double aperture,
  double shutterSpeed,
  double sensitivity,
);

@ffi.Native<
    ffi.Void Function(ffi.Pointer<ffi.Void>, ffi.Float, ffi.Float,
        ffi.Float)>(symbol: '_set_camera_position', assetId: 'thermion_dart')
external void set_camera_position(
  ffi.Pointer<ffi.Void> viewer,
  double x,
  double y,
  double z,
);

@ffi.Native<ffi.Void Function(ffi.Pointer<ffi.Void>)>(
    symbol: '_get_camera_position', assetId: 'thermion_dart')
external void get_camera_position(
  ffi.Pointer<ffi.Void> viewer,
);

@ffi.Native<
    ffi.Void Function(ffi.Pointer<ffi.Void>, ffi.Float, ffi.Float, ffi.Float,
        ffi.Float)>(symbol: '_set_camera_rotation', assetId: 'thermion_dart')
external void set_camera_rotation(
  ffi.Pointer<ffi.Void> viewer,
  double w,
  double x,
  double y,
  double z,
);

@ffi.Native<ffi.Void Function(ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Float>)>(
    symbol: '_set_camera_model_matrix', assetId: 'thermion_dart')
external void set_camera_model_matrix(
  ffi.Pointer<ffi.Void> viewer,
  ffi.Pointer<ffi.Float> matrix,
);

@ffi.Native<ffi.Pointer<ffi.Double> Function(ffi.Pointer<ffi.Void>)>(
    symbol: '_get_camera_model_matrix', assetId: 'thermion_dart')
external ffi.Pointer<ffi.Double> get_camera_model_matrix(
  ffi.Pointer<ffi.Void> viewer,
);

@ffi.Native<ffi.Pointer<ffi.Double> Function(ffi.Pointer<ffi.Void>)>(
    symbol: '_get_camera_view_matrix', assetId: 'thermion_dart')
external ffi.Pointer<ffi.Double> get_camera_view_matrix(
  ffi.Pointer<ffi.Void> viewer,
);

@ffi.Native<ffi.Pointer<ffi.Double> Function(ffi.Pointer<ffi.Void>)>(
    symbol: '_get_camera_projection_matrix', assetId: 'thermion_dart')
external ffi.Pointer<ffi.Double> get_camera_projection_matrix(
  ffi.Pointer<ffi.Void> viewer,
);

@ffi.Native<
        ffi.Void Function(ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Double>,
            ffi.Double, ffi.Double)>(
    symbol: '_set_camera_projection_matrix', assetId: 'thermion_dart')
external void set_camera_projection_matrix(
  ffi.Pointer<ffi.Void> viewer,
  ffi.Pointer<ffi.Double> matrix,
  double near,
  double far,
);

@ffi.Native<ffi.Void Function(ffi.Pointer<ffi.Void>, ffi.Double, ffi.Double)>(
    symbol: '_set_camera_culling', assetId: 'thermion_dart')
external void set_camera_culling(
  ffi.Pointer<ffi.Void> viewer,
  double near,
  double far,
);

@ffi.Native<ffi.Double Function(ffi.Pointer<ffi.Void>)>(
    symbol: '_get_camera_culling_near', assetId: 'thermion_dart')
external double get_camera_culling_near(
  ffi.Pointer<ffi.Void> viewer,
);

@ffi.Native<ffi.Double Function(ffi.Pointer<ffi.Void>)>(
    symbol: '_get_camera_culling_far', assetId: 'thermion_dart')
external double get_camera_culling_far(
  ffi.Pointer<ffi.Void> viewer,
);

@ffi.Native<ffi.Pointer<ffi.Double> Function(ffi.Pointer<ffi.Void>)>(
    symbol: '_get_camera_culling_projection_matrix', assetId: 'thermion_dart')
external ffi.Pointer<ffi.Double> get_camera_culling_projection_matrix(
  ffi.Pointer<ffi.Void> viewer,
);

@ffi.Native<ffi.Pointer<ffi.Double> Function(ffi.Pointer<ffi.Void>)>(
    symbol: '_get_camera_frustum', assetId: 'thermion_dart')
external ffi.Pointer<ffi.Double> get_camera_frustum(
  ffi.Pointer<ffi.Void> viewer,
);

@ffi.Native<ffi.Void Function(ffi.Pointer<ffi.Void>, ffi.Float, ffi.Float)>(
    symbol: '_set_camera_fov', assetId: 'thermion_dart')
external void set_camera_fov(
  ffi.Pointer<ffi.Void> viewer,
  double fovInDegrees,
  double aspect,
);

@ffi.Native<ffi.Void Function(ffi.Pointer<ffi.Void>, ffi.Float)>(
    symbol: '_set_camera_focal_length', assetId: 'thermion_dart')
external void set_camera_focal_length(
  ffi.Pointer<ffi.Void> viewer,
  double focalLength,
);

@ffi.Native<ffi.Void Function(ffi.Pointer<ffi.Void>, ffi.Float)>(
    symbol: '_set_camera_focus_distance', assetId: 'thermion_dart')
external void set_camera_focus_distance(
  ffi.Pointer<ffi.Void> viewer,
  double focusDistance,
);

@ffi.Native<
        ffi.Void Function(ffi.Pointer<ffi.Void>, _ManipulatorMode, ffi.Double,
            ffi.Double, ffi.Double)>(
    symbol: '_set_camera_manipulator_options', assetId: 'thermion_dart')
external void set_camera_manipulator_options(
  ffi.Pointer<ffi.Void> viewer,
  int mode,
  double orbitSpeedX,
  double orbitSpeedY,
  double zoomSpeed,
);

@ffi.Native<
    ffi.Int Function(ffi.Pointer<ffi.Void>, EntityId,
        ffi.Pointer<ffi.Char>)>(symbol: '_hide_mesh', assetId: 'thermion_dart')
external int hide_mesh(
  ffi.Pointer<ffi.Void> sceneManager,
  int entity,
  ffi.Pointer<ffi.Char> meshName,
);

@ffi.Native<
    ffi.Int Function(ffi.Pointer<ffi.Void>, EntityId,
        ffi.Pointer<ffi.Char>)>(symbol: '_reveal_mesh', assetId: 'thermion_dart')
external int reveal_mesh(
  ffi.Pointer<ffi.Void> sceneManager,
  int entity,
  ffi.Pointer<ffi.Char> meshName,
);

@ffi.Native<ffi.Void Function(ffi.Pointer<ffi.Void>, ffi.Bool)>(
    symbol: '_set_post_processing', assetId: 'thermion_dart')
external void set_post_processing(
  ffi.Pointer<ffi.Void> viewer,
  bool enabled,
);

@ffi.Native<
        ffi.Void Function(ffi.Pointer<ffi.Void>, ffi.Bool, ffi.Bool, ffi.Bool)>(
    symbol: '_set_antialiasing', assetId: 'thermion_dart')
external void set_antialiasing(
  ffi.Pointer<ffi.Void> viewer,
  bool msaa,
  bool fxaa,
  bool taa,
);

@ffi.Native<
        ffi.Void Function(
            ffi.Pointer<ffi.Void>,
            ffi.Int,
            ffi.Int,
            ffi.Pointer<
                ffi.NativeFunction<
                    ffi.Void Function(
                        EntityId entityId, ffi.Int x, ffi.Int y)>>)>(
    symbol: '_filament_pick', assetId: 'thermion_dart')
external void filament_pick(
  ffi.Pointer<ffi.Void> viewer,
  int x,
  int y,
  ffi.Pointer<
          ffi.NativeFunction<
              ffi.Void Function(EntityId entityId, ffi.Int x, ffi.Int y)>>
      callback,
);

@ffi.Native<ffi.Pointer<ffi.Char> Function(ffi.Pointer<ffi.Void>, EntityId)>(
    symbol: '_get_name_for_entity', assetId: 'thermion_dart')
external ffi.Pointer<ffi.Char> get_name_for_entity(
  ffi.Pointer<ffi.Void> sceneManager,
  int entityId,
);

@ffi.Native<
        EntityId Function(
            ffi.Pointer<ffi.Void>, EntityId, ffi.Pointer<ffi.Char>)>(
    symbol: '_find_child_entity_by_name', assetId: 'thermion_dart')
external int find_child_entity_by_name(
  ffi.Pointer<ffi.Void> sceneManager,
  int parent,
  ffi.Pointer<ffi.Char> name,
);

@ffi.Native<ffi.Int Function(ffi.Pointer<ffi.Void>, EntityId, ffi.Bool)>(
    symbol: '_get_entity_count', assetId: 'thermion_dart')
external int get_entity_count(
  ffi.Pointer<ffi.Void> sceneManager,
  int target,
  bool renderableOnly,
);

@ffi.Native<
        ffi.Void Function(
            ffi.Pointer<ffi.Void>, EntityId, ffi.Bool, ffi.Pointer<EntityId>)>(
    symbol: '_get_entities', assetId: 'thermion_dart')
external void get_entities(
  ffi.Pointer<ffi.Void> sceneManager,
  int target,
  bool renderableOnly,
  ffi.Pointer<EntityId> out,
);

@ffi.Native<
    ffi.Pointer<ffi.Char> Function(ffi.Pointer<ffi.Void>, EntityId, ffi.Int,
        ffi.Bool)>(symbol: '_get_entity_name_at', assetId: 'thermion_dart')
external ffi.Pointer<ffi.Char> get_entity_name_at(
  ffi.Pointer<ffi.Void> sceneManager,
  int target,
  int index,
  bool renderableOnly,
);

@ffi.Native<ffi.Void Function(ffi.Pointer<ffi.Void>, ffi.Bool)>(
    symbol: '_set_recording', assetId: 'thermion_dart')
external void set_recording(
  ffi.Pointer<ffi.Void> viewer,
  bool recording,
);

@ffi.Native<ffi.Void Function(ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Char>)>(
    symbol: '_set_recording_output_directory', assetId: 'thermion_dart')
external void set_recording_output_directory(
  ffi.Pointer<ffi.Void> viewer,
  ffi.Pointer<ffi.Char> outputDirectory,
);

@ffi.Native<ffi.Void Function()>(symbol: '_ios_dummy', assetId: 'thermion_dart')
external void ios_dummy();

@ffi.Native<ffi.Void Function(ffi.Pointer<ffi.Void>)>(
    symbol: '_thermion_flutter_free', assetId: 'thermion_dart')
external void thermion_flutter_free(
  ffi.Pointer<ffi.Void> ptr,
);

@ffi.Native<
    ffi.Void Function(
        ffi.Pointer<ffi.Void>,
        EntityId,
        ffi.Pointer<
            ffi.NativeFunction<
                ffi.Void Function(EntityId entityId1, EntityId entityId2)>>,
        ffi.Bool)>(symbol: '_add_collision_component', assetId: 'thermion_dart')
external void add_collision_component(
  ffi.Pointer<ffi.Void> sceneManager,
  int entityId,
  ffi.Pointer<
          ffi.NativeFunction<
              ffi.Void Function(EntityId entityId1, EntityId entityId2)>>
      callback,
  bool affectsCollidingTransform,
);

@ffi.Native<ffi.Void Function(ffi.Pointer<ffi.Void>, EntityId)>(
    symbol: '_remove_collision_component', assetId: 'thermion_dart')
external void remove_collision_component(
  ffi.Pointer<ffi.Void> sceneManager,
  int entityId,
);

@ffi.Native<ffi.Bool Function(ffi.Pointer<ffi.Void>, EntityId)>(
    symbol: '_add_animation_component', assetId: 'thermion_dart')
external bool add_animation_component(
  ffi.Pointer<ffi.Void> sceneManager,
  int entityId,
);

@ffi.Native<ffi.Void Function(ffi.Pointer<ffi.Void>, EntityId)>(
    symbol: '_remove_animation_component', assetId: 'thermion_dart')
external void remove_animation_component(
  ffi.Pointer<ffi.Void> sceneManager,
  int entityId,
);

@ffi.Native<
        EntityId Function(
            ffi.Pointer<ffi.Void>,
            ffi.Pointer<ffi.Float>,
            ffi.Int,
            ffi.Pointer<ffi.Uint16>,
            ffi.Int,
            ffi.Int,
            ffi.Pointer<ffi.Char>)>(
    symbol: '_create_geometry', assetId: 'thermion_dart')
external int create_geometry(
  ffi.Pointer<ffi.Void> viewer,
  ffi.Pointer<ffi.Float> vertices,
  int numVertices,
  ffi.Pointer<ffi.Uint16> indices,
  int numIndices,
  int primitiveType,
  ffi.Pointer<ffi.Char> materialPath,
);

@ffi.Native<EntityId Function(ffi.Pointer<ffi.Void>, EntityId)>(
    symbol: '_get_parent', assetId: 'thermion_dart')
external int get_parent(
  ffi.Pointer<ffi.Void> sceneManager,
  int child,
);

@ffi.Native<ffi.Void Function(ffi.Pointer<ffi.Void>, EntityId, EntityId)>(
    symbol: '_set_parent', assetId: 'thermion_dart')
external void set_parent(
  ffi.Pointer<ffi.Void> sceneManager,
  int child,
  int parent,
);

@ffi.Native<ffi.Void Function(ffi.Pointer<ffi.Void>, EntityId)>(
    symbol: '_test_collisions', assetId: 'thermion_dart')
external void test_collisions(
  ffi.Pointer<ffi.Void> sceneManager,
  int entity,
);

@ffi.Native<ffi.Void Function(ffi.Pointer<ffi.Void>, EntityId, ffi.Int)>(
    symbol: '_set_priority', assetId: 'thermion_dart')
external void set_priority(
  ffi.Pointer<ffi.Void> sceneManager,
  int entityId,
  int priority,
);

@ffi.Native<ffi.Void Function(ffi.Pointer<ffi.Void>, ffi.Pointer<EntityId>)>(
    symbol: '_get_gizmo', assetId: 'thermion_dart')
external void get_gizmo(
  ffi.Pointer<ffi.Void> sceneManager,
  ffi.Pointer<EntityId> out,
);

@ffi.Native<
        ffi.Void Function(
            ffi.Pointer<ffi.Void>,
            ffi.Pointer<ffi.Void>,
            ffi.Pointer<ffi.Char>,
            ffi.Pointer<ffi.Void>,
            ffi
                .Pointer<
                    ffi.NativeFunction<
                        ffi.Void Function(
                            ffi.Pointer<ffi.Void> renderCallbackOwner)>>,
            ffi.Pointer<ffi.Void>,
            ffi.Pointer<
                ffi.NativeFunction<
                    ffi.Void Function(ffi.Pointer<ffi.Void> viewer)>>)>(
    symbol: '_create_filament_viewer_ffi', assetId: 'thermion_dart')
external void create_filament_viewer_ffi(
  ffi.Pointer<ffi.Void> context,
  ffi.Pointer<ffi.Void> platform,
  ffi.Pointer<ffi.Char> uberArchivePath,
  ffi.Pointer<ffi.Void> loader,
  ffi.Pointer<
          ffi.NativeFunction<
              ffi.Void Function(ffi.Pointer<ffi.Void> renderCallbackOwner)>>
      renderCallback,
  ffi.Pointer<ffi.Void> renderCallbackOwner,
  ffi.Pointer<
          ffi.NativeFunction<ffi.Void Function(ffi.Pointer<ffi.Void> viewer)>>
      callback,
);

@ffi.Native<
        ffi.Void Function(
            ffi.Pointer<ffi.Void>,
            ffi.Pointer<ffi.Void>,
            ffi.Uint32,
            ffi.Uint32,
            ffi.Pointer<ffi.NativeFunction<ffi.Void Function()>>)>(
    symbol: '_create_swap_chain_ffi', assetId: 'thermion_dart')
external void create_swap_chain_ffi(
  ffi.Pointer<ffi.Void> viewer,
  ffi.Pointer<ffi.Void> surface,
  int width,
  int height,
  ffi.Pointer<ffi.NativeFunction<ffi.Void Function()>> onComplete,
);

@ffi.Native<
        ffi.Void Function(ffi.Pointer<ffi.Void>,
            ffi.Pointer<ffi.NativeFunction<ffi.Void Function()>>)>(
    symbol: '_destroy_swap_chain_ffi', assetId: 'thermion_dart')
external void destroy_swap_chain_ffi(
  ffi.Pointer<ffi.Void> viewer,
  ffi.Pointer<ffi.NativeFunction<ffi.Void Function()>> onComplete,
);

@ffi.Native<
        ffi.Void Function(ffi.Pointer<ffi.Void>, ffi.IntPtr, ffi.Uint32,
            ffi.Uint32, ffi.Pointer<ffi.NativeFunction<ffi.Void Function()>>)>(
    symbol: '_create_render_target_ffi', assetId: 'thermion_dart')
external void create_render_target_ffi(
  ffi.Pointer<ffi.Void> viewer,
  int nativeTextureId,
  int width,
  int height,
  ffi.Pointer<ffi.NativeFunction<ffi.Void Function()>> onComplete,
);

@ffi.Native<ffi.Void Function(ffi.Pointer<ffi.Void>)>(
    symbol: '_destroy_filament_viewer_ffi', assetId: 'thermion_dart')
external void destroy_filament_viewer_ffi(
  ffi.Pointer<ffi.Void> viewer,
);

@ffi.Native<ffi.Void Function(ffi.Pointer<ffi.Void>)>(
    symbol: '_render_ffi', assetId: 'thermion_dart')
external void render_ffi(
  ffi.Pointer<ffi.Void> viewer,
);

@ffi.Native<FilamentRenderCallback Function(FilamentRenderCallback)>(
    symbol: '_make_render_callback_fn_pointer', assetId: 'thermion_dart')
external FilamentRenderCallback make_render_callback_fn_pointer(
  FilamentRenderCallback arg0,
);

@ffi.Native<
        ffi.Void Function(ffi.Pointer<ffi.Void>, ffi.Bool,
            ffi.Pointer<ffi.NativeFunction<ffi.Void Function()>>)>(
    symbol: '_set_rendering_ffi', assetId: 'thermion_dart')
external void set_rendering_ffi(
  ffi.Pointer<ffi.Void> viewer,
  bool rendering,
  ffi.Pointer<ffi.NativeFunction<ffi.Void Function()>> onComplete,
);

@ffi.Native<ffi.Void Function(ffi.Pointer<ffi.Void>, ffi.Float)>(
    symbol: '_set_frame_interval_ffi', assetId: 'thermion_dart')
external void set_frame_interval_ffi(
  ffi.Pointer<ffi.Void> viewer,
  double frameInterval,
);

@ffi.Native<
        ffi.Void Function(ffi.Pointer<ffi.Void>, ffi.Uint32, ffi.Uint32,
            ffi.Float, ffi.Pointer<ffi.NativeFunction<ffi.Void Function()>>)>(
    symbol: '_update_viewport_and_camera_projection_ffi',
    assetId: 'thermion_dart')
external void update_viewport_and_camera_projection_ffi(
  ffi.Pointer<ffi.Void> viewer,
  int width,
  int height,
  double scaleFactor,
  ffi.Pointer<ffi.NativeFunction<ffi.Void Function()>> onComplete,
);

@ffi.Native<
        ffi.Void Function(
            ffi.Pointer<ffi.Void>, ffi.Float, ffi.Float, ffi.Float, ffi.Float)>(
    symbol: '_set_background_color_ffi', assetId: 'thermion_dart')
external void set_background_color_ffi(
  ffi.Pointer<ffi.Void> viewer,
  double r,
  double g,
  double b,
  double a,
);

@ffi.Native<ffi.Void Function(ffi.Pointer<ffi.Void>)>(
    symbol: '_clear_background_image_ffi', assetId: 'thermion_dart')
external void clear_background_image_ffi(
  ffi.Pointer<ffi.Void> viewer,
);

@ffi.Native<
        ffi.Void Function(ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Char>,
            ffi.Bool, ffi.Pointer<ffi.NativeFunction<ffi.Void Function()>>)>(
    symbol: '_set_background_image_ffi', assetId: 'thermion_dart')
external void set_background_image_ffi(
  ffi.Pointer<ffi.Void> viewer,
  ffi.Pointer<ffi.Char> path,
  bool fillHeight,
  ffi.Pointer<ffi.NativeFunction<ffi.Void Function()>> onComplete,
);

@ffi.Native<
        ffi.Void Function(
            ffi.Pointer<ffi.Void>, ffi.Float, ffi.Float, ffi.Bool)>(
    symbol: '_set_background_image_position_ffi', assetId: 'thermion_dart')
external void set_background_image_position_ffi(
  ffi.Pointer<ffi.Void> viewer,
  double x,
  double y,
  bool clamp,
);

@ffi.Native<ffi.Void Function(ffi.Pointer<ffi.Void>, ffi.Int)>(
    symbol: '_set_tone_mapping_ffi', assetId: 'thermion_dart')
external void set_tone_mapping_ffi(
  ffi.Pointer<ffi.Void> viewer,
  int toneMapping,
);

@ffi.Native<ffi.Void Function(ffi.Pointer<ffi.Void>, ffi.Float)>(
    symbol: '_set_bloom_ffi', assetId: 'thermion_dart')
external void set_bloom_ffi(
  ffi.Pointer<ffi.Void> viewer,
  double strength,
);

@ffi.Native<
        ffi.Void Function(ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Char>,
            ffi.Pointer<ffi.NativeFunction<ffi.Void Function()>>)>(
    symbol: '_load_skybox_ffi', assetId: 'thermion_dart')
external void load_skybox_ffi(
  ffi.Pointer<ffi.Void> viewer,
  ffi.Pointer<ffi.Char> skyboxPath,
  ffi.Pointer<ffi.NativeFunction<ffi.Void Function()>> onComplete,
);

@ffi.Native<
    ffi.Void Function(ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Char>,
        ffi.Float)>(symbol: '_load_ibl_ffi', assetId: 'thermion_dart')
external void load_ibl_ffi(
  ffi.Pointer<ffi.Void> viewer,
  ffi.Pointer<ffi.Char> iblPath,
  double intensity,
);

@ffi.Native<ffi.Void Function(ffi.Pointer<ffi.Void>)>(
    symbol: '_remove_skybox_ffi', assetId: 'thermion_dart')
external void remove_skybox_ffi(
  ffi.Pointer<ffi.Void> viewer,
);

@ffi.Native<ffi.Void Function(ffi.Pointer<ffi.Void>)>(
    symbol: '_remove_ibl_ffi', assetId: 'thermion_dart')
external void remove_ibl_ffi(
  ffi.Pointer<ffi.Void> viewer,
);

@ffi.Native<
        ffi.Void Function(
            ffi.Pointer<ffi.Void>,
            ffi.Uint8,
            ffi.Float,
            ffi.Float,
            ffi.Float,
            ffi.Float,
            ffi.Float,
            ffi.Float,
            ffi.Float,
            ffi.Float,
            ffi.Float,
            ffi.Float,
            ffi.Float,
            ffi.Float,
            ffi.Float,
            ffi.Float,
            ffi.Bool,
            ffi.Pointer<ffi.NativeFunction<ffi.Void Function(EntityId)>>)>(
    symbol: '_add_light_ffi', assetId: 'thermion_dart')
external void add_light_ffi(
  ffi.Pointer<ffi.Void> viewer,
  int type,
  double colour,
  double intensity,
  double posX,
  double posY,
  double posZ,
  double dirX,
  double dirY,
  double dirZ,
  double falloffRadius,
  double spotLightConeInner,
  double spotLightConeOuter,
  double sunAngularRadius,
  double sunHaloSize,
  double sunHaloFallof,
  bool shadows,
  ffi.Pointer<ffi.NativeFunction<ffi.Void Function(EntityId)>> callback,
);

@ffi.Native<ffi.Void Function(ffi.Pointer<ffi.Void>, EntityId)>(
    symbol: '_remove_light_ffi', assetId: 'thermion_dart')
external void remove_light_ffi(
  ffi.Pointer<ffi.Void> viewer,
  int entityId,
);

@ffi.Native<ffi.Void Function(ffi.Pointer<ffi.Void>)>(
    symbol: '_clear_lights_ffi', assetId: 'thermion_dart')
external void clear_lights_ffi(
  ffi.Pointer<ffi.Void> viewer,
);

@ffi.Native<
        ffi.Void Function(ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Char>, ffi.Int,
            ffi.Pointer<ffi.NativeFunction<ffi.Void Function(EntityId)>>)>(
    symbol: '_load_glb_ffi', assetId: 'thermion_dart')
external void load_glb_ffi(
  ffi.Pointer<ffi.Void> sceneManager,
  ffi.Pointer<ffi.Char> assetPath,
  int numInstances,
  ffi.Pointer<ffi.NativeFunction<ffi.Void Function(EntityId)>> callback,
);

@ffi.Native<
        ffi.Void Function(
            ffi.Pointer<ffi.Void>,
            ffi.Pointer<ffi.Void>,
            ffi.Size,
            ffi.Int,
            ffi.Pointer<ffi.NativeFunction<ffi.Void Function(EntityId)>>)>(
    symbol: '_load_glb_from_buffer_ffi', assetId: 'thermion_dart')
external void load_glb_from_buffer_ffi(
  ffi.Pointer<ffi.Void> sceneManager,
  ffi.Pointer<ffi.Void> data,
  int length,
  int numInstances,
  ffi.Pointer<ffi.NativeFunction<ffi.Void Function(EntityId)>> callback,
);

@ffi.Native<
        ffi.Void Function(
            ffi.Pointer<ffi.Void>,
            ffi.Pointer<ffi.Char>,
            ffi.Pointer<ffi.Char>,
            ffi.Pointer<ffi.NativeFunction<ffi.Void Function(EntityId)>>)>(
    symbol: '_load_gltf_ffi', assetId: 'thermion_dart')
external void load_gltf_ffi(
  ffi.Pointer<ffi.Void> sceneManager,
  ffi.Pointer<ffi.Char> assetPath,
  ffi.Pointer<ffi.Char> relativePath,
  ffi.Pointer<ffi.NativeFunction<ffi.Void Function(EntityId)>> callback,
);

@ffi.Native<
        ffi.Void Function(ffi.Pointer<ffi.Void>, EntityId,
            ffi.Pointer<ffi.NativeFunction<ffi.Void Function(EntityId)>>)>(
    symbol: '_create_instance_ffi', assetId: 'thermion_dart')
external void create_instance_ffi(
  ffi.Pointer<ffi.Void> sceneManager,
  int entityId,
  ffi.Pointer<ffi.NativeFunction<ffi.Void Function(EntityId)>> callback,
);

@ffi.Native<
        ffi.Void Function(ffi.Pointer<ffi.Void>, EntityId,
            ffi.Pointer<ffi.NativeFunction<ffi.Void Function()>>)>(
    symbol: '_remove_entity_ffi', assetId: 'thermion_dart')
external void remove_entity_ffi(
  ffi.Pointer<ffi.Void> viewer,
  int asset,
  ffi.Pointer<ffi.NativeFunction<ffi.Void Function()>> callback,
);

@ffi.Native<
        ffi.Void Function(ffi.Pointer<ffi.Void>,
            ffi.Pointer<ffi.NativeFunction<ffi.Void Function()>>)>(
    symbol: '_clear_entities_ffi', assetId: 'thermion_dart')
external void clear_entities_ffi(
  ffi.Pointer<ffi.Void> viewer,
  ffi.Pointer<ffi.NativeFunction<ffi.Void Function()>> callback,
);

@ffi.Native<
        ffi.Void Function(
            ffi.Pointer<ffi.Void>,
            EntityId,
            ffi.Pointer<ffi.Char>,
            ffi.Pointer<ffi.NativeFunction<ffi.Void Function(ffi.Bool)>>)>(
    symbol: '_set_camera_ffi', assetId: 'thermion_dart')
external void set_camera_ffi(
  ffi.Pointer<ffi.Void> viewer,
  int asset,
  ffi.Pointer<ffi.Char> nodeName,
  ffi.Pointer<ffi.NativeFunction<ffi.Void Function(ffi.Bool)>> callback,
);

@ffi.Native<
    ffi.Void Function(
        ffi.Pointer<ffi.Void>,
        EntityId,
        ffi.Pointer<ffi.Char>,
        ffi.Pointer<ffi.Float>,
        ffi.Int)>(symbol: '_apply_weights_ffi', assetId: 'thermion_dart')
external void apply_weights_ffi(
  ffi.Pointer<ffi.Void> sceneManager,
  int asset,
  ffi.Pointer<ffi.Char> entityName,
  ffi.Pointer<ffi.Float> weights,
  int count,
);

@ffi.Native<
        ffi.Void Function(ffi.Pointer<ffi.Void>, EntityId, ffi.Int, ffi.Int)>(
    symbol: '_set_animation_frame_ffi', assetId: 'thermion_dart')
external void set_animation_frame_ffi(
  ffi.Pointer<ffi.Void> sceneManager,
  int asset,
  int animationIndex,
  int animationFrame,
);

@ffi.Native<ffi.Void Function(ffi.Pointer<ffi.Void>, EntityId, ffi.Int)>(
    symbol: '_stop_animation_ffi', assetId: 'thermion_dart')
external void stop_animation_ffi(
  ffi.Pointer<ffi.Void> sceneManager,
  int asset,
  int index,
);

@ffi.Native<
        ffi.Void Function(ffi.Pointer<ffi.Void>, EntityId,
            ffi.Pointer<ffi.NativeFunction<ffi.Void Function(ffi.Int)>>)>(
    symbol: '_get_animation_count_ffi', assetId: 'thermion_dart')
external void get_animation_count_ffi(
  ffi.Pointer<ffi.Void> sceneManager,
  int asset,
  ffi.Pointer<ffi.NativeFunction<ffi.Void Function(ffi.Int)>> callback,
);

@ffi.Native<
        ffi.Void Function(
            ffi.Pointer<ffi.Void>,
            EntityId,
            ffi.Pointer<ffi.Char>,
            ffi.Int,
            ffi.Pointer<ffi.NativeFunction<ffi.Void Function()>>)>(
    symbol: '_get_animation_name_ffi', assetId: 'thermion_dart')
external void get_animation_name_ffi(
  ffi.Pointer<ffi.Void> sceneManager,
  int asset,
  ffi.Pointer<ffi.Char> outPtr,
  int index,
  ffi.Pointer<ffi.NativeFunction<ffi.Void Function()>> callback,
);

@ffi.Native<
        ffi.Void Function(
            ffi.Pointer<ffi.Void>,
            EntityId,
            EntityId,
            ffi.Pointer<ffi.Char>,
            ffi.Int,
            ffi.Pointer<ffi.NativeFunction<ffi.Void Function()>>)>(
    symbol: '_get_morph_target_name_ffi', assetId: 'thermion_dart')
external void get_morph_target_name_ffi(
  ffi.Pointer<ffi.Void> sceneManager,
  int assetEntity,
  int childEntity,
  ffi.Pointer<ffi.Char> outPtr,
  int index,
  ffi.Pointer<ffi.NativeFunction<ffi.Void Function()>> callback,
);

@ffi.Native<
        ffi.Void Function(ffi.Pointer<ffi.Void>, EntityId, EntityId,
            ffi.Pointer<ffi.NativeFunction<ffi.Void Function(ffi.Int32)>>)>(
    symbol: '_get_morph_target_name_count_ffi', assetId: 'thermion_dart')
external void get_morph_target_name_count_ffi(
  ffi.Pointer<ffi.Void> sceneManager,
  int asset,
  int childEntity,
  ffi.Pointer<ffi.NativeFunction<ffi.Void Function(ffi.Int32)>> callback,
);

@ffi.Native<
        ffi.Void Function(
            ffi.Pointer<ffi.Void>,
            EntityId,
            ffi.Pointer<ffi.Float>,
            ffi.Int,
            ffi.Pointer<ffi.NativeFunction<ffi.Void Function(ffi.Bool)>>)>(
    symbol: '_set_morph_target_weights_ffi', assetId: 'thermion_dart')
external void set_morph_target_weights_ffi(
  ffi.Pointer<ffi.Void> sceneManager,
  int asset,
  ffi.Pointer<ffi.Float> morphData,
  int numWeights,
  ffi.Pointer<ffi.NativeFunction<ffi.Void Function(ffi.Bool)>> callback,
);

@ffi.Native<
        ffi.Void Function(ffi.Pointer<ffi.Void>, EntityId,
            ffi.Pointer<ffi.NativeFunction<ffi.Void Function(ffi.Bool)>>)>(
    symbol: '_update_bone_matrices_ffi', assetId: 'thermion_dart')
external void update_bone_matrices_ffi(
  ffi.Pointer<ffi.Void> sceneManager,
  int asset,
  ffi.Pointer<ffi.NativeFunction<ffi.Void Function(ffi.Bool)>> callback,
);

@ffi.Native<
        ffi.Void Function(
            ffi.Pointer<ffi.Void>,
            EntityId,
            ffi.Int,
            ffi.Int,
            ffi.Pointer<ffi.Float>,
            ffi.Pointer<ffi.NativeFunction<ffi.Void Function(ffi.Bool)>>)>(
    symbol: '_set_bone_transform_ffi', assetId: 'thermion_dart')
external void set_bone_transform_ffi(
  ffi.Pointer<ffi.Void> sceneManager,
  int asset,
  int skinIndex,
  int boneIndex,
  ffi.Pointer<ffi.Float> transform,
  ffi.Pointer<ffi.NativeFunction<ffi.Void Function(ffi.Bool)>> callback,
);

@ffi.Native<ffi.Void Function(ffi.Pointer<ffi.Void>, ffi.Bool)>(
    symbol: '_set_post_processing_ffi', assetId: 'thermion_dart')
external void set_post_processing_ffi(
  ffi.Pointer<ffi.Void> viewer,
  bool enabled,
);

@ffi.Native<
        ffi.Void Function(ffi.Pointer<ffi.Void>, EntityId,
            ffi.Pointer<ffi.NativeFunction<ffi.Void Function()>>)>(
    symbol: '_reset_to_rest_pose_ffi', assetId: 'thermion_dart')
external void reset_to_rest_pose_ffi(
  ffi.Pointer<ffi.Void> sceneManager,
  int entityId,
  ffi.Pointer<ffi.NativeFunction<ffi.Void Function()>> callback,
);

@ffi.Native<
        ffi.Void Function(
            ffi.Pointer<ffi.Void>,
            ffi.Pointer<ffi.Float>,
            ffi.Int,
            ffi.Pointer<ffi.Uint16>,
            ffi.Int,
            ffi.Int,
            ffi.Pointer<ffi.Char>,
            ffi.Pointer<ffi.NativeFunction<ffi.Void Function(EntityId)>>)>(
    symbol: '_create_geometry_ffi', assetId: 'thermion_dart')
external void create_geometry_ffi(
  ffi.Pointer<ffi.Void> viewer,
  ffi.Pointer<ffi.Float> vertices,
  int numVertices,
  ffi.Pointer<ffi.Uint16> indices,
  int numIndices,
  int primitiveType,
  ffi.Pointer<ffi.Char> materialPath,
  ffi.Pointer<ffi.NativeFunction<ffi.Void Function(EntityId)>> callback,
);

typedef LoadFilamentResourceFromOwner
    = ffi.Pointer<ffi.NativeFunction<LoadFilamentResourceFromOwnerFunction>>;
typedef LoadFilamentResourceFromOwnerFunction = ResourceBuffer Function(
    ffi.Pointer<ffi.Char>, ffi.Pointer<ffi.Void>);

final class ResourceBuffer extends ffi.Struct {
  external ffi.Pointer<ffi.Void> data;

  @ffi.Int32()
  external int size;

  @ffi.Int32()
  external int id;
}

typedef FreeFilamentResourceFromOwner
    = ffi.Pointer<ffi.NativeFunction<FreeFilamentResourceFromOwnerFunction>>;
typedef FreeFilamentResourceFromOwnerFunction = ffi.Void Function(
    ResourceBuffer, ffi.Pointer<ffi.Void>);
typedef DartFreeFilamentResourceFromOwnerFunction = void Function(
    ResourceBuffer, ffi.Pointer<ffi.Void>);

/// This header replicates most of the methods in ThermionDartApi.h.
/// It represents the interface for:
/// - invoking those methods that must be called on the main Filament engine thread
/// - setting up a render loop
typedef EntityId = ffi.Int32;
typedef DartEntityId = int;
typedef _ManipulatorMode = ffi.Int32;
typedef Dart_ManipulatorMode = int;
typedef FilamentRenderCallback
    = ffi.Pointer<ffi.NativeFunction<FilamentRenderCallbackFunction>>;
typedef FilamentRenderCallbackFunction = ffi.Void Function(
    ffi.Pointer<ffi.Void> owner);
typedef ThermionDartRenderCallbackFunction = void Function(
    ffi.Pointer<ffi.Void> owner);

const int __bool_true_false_are_defined = 1;

const int true1 = 1;

const int false1 = 0;
