Skip to content

armgit / raea

Public Imported from GitHub
0

Render Anything Engine: tell your AI what to make. Videos, motion graphics, 3D and games as React and TypeScript, rendered on your own GPU. Rust + Bevy, macOS, Linux and Windows.

3.3 KB
Raw Blame
// Generated by raea-bevy-sdk from raea's Bevy App's TypeRegistry (egui (bevy_egui)); don't edit, regenerate
// (tools/bevy-plugins.sh gen). 1 component, 1 resource.
// - In a scene (TSX): 2 wrappers, each a <BevyComponent> (or <BevyResource>) naming its type path, which raea-render
//   applies with ReflectComponent::insert. Put a component inside the <Mesh3d> it belongs to; <EguiSettings> sets the
//   plugin's resources.
// - In a TypeScript program (raea/bevy's BevyApp): `egui` holds a typed handle for every component,
//   resource, event, message and state, to spawn, insert, get, trigger, write, observe and set.
import { BevyComponent, BevyResource } from "raea/3d";
import { component, resource, event, message, state } from "raea/bevy";

/** bevy_egui::EguiInputSystemSettings */
export interface EguiInputSystemSettings {
  run_write_modifiers_keys_state_system: boolean;
  run_write_window_pointer_moved_messages: boolean;
  run_write_pointer_button_messages: boolean;
  run_write_window_touch_messages_system: boolean;
  run_write_non_window_pointer_moved_messages_system: boolean;
  run_write_mouse_wheel_messages_system: boolean;
  run_write_pinch_gesture_messages_system: boolean;
  run_write_non_window_touch_messages_system: boolean;
  run_write_keyboard_input_messages_system: boolean;
  run_write_ime_messages_system: boolean;
  run_write_file_dnd_messages_system: boolean;
}

/** bevy_egui::EguiContextSettings */
export interface EguiContextSettings {
  run_manually: boolean;
  capture_pointer_input: boolean;
  input_system_settings: EguiInputSystemSettings;
  enable_cursor_icon_updates: boolean;
  enable_ime: boolean;
}

/** bevy_egui::EguiGlobalSettings */
export interface EguiGlobalSettings {
  auto_create_primary_context: boolean;
  enable_focused_non_window_context_updates: boolean;
  input_system_settings: EguiInputSystemSettings;
  enable_absorb_bevy_input_system: boolean;
  enable_cursor_icon_updates: boolean;
  enable_ime: boolean;
}

/** bevy_egui::EguiContextSettings (component) */
export function EguiContextSettings(props: { value: EguiContextSettings; from?: number }) {
  return <BevyComponent type="bevy_egui::EguiContextSettings" value={props.value ?? null} from={props.from} />;
}

/** bevy_egui::EguiGlobalSettings (resource) */
export function EguiGlobalSettingsResource(props: { value: EguiGlobalSettings }) {
  return <BevyResource type="bevy_egui::EguiGlobalSettings" value={props.value ?? null} />;
}

/** egui's settings: each one given is its resource, set at load (left out, the plugin's default). */
export function EguiSettings(props: {
  EguiGlobalSettings?: EguiGlobalSettings;
}) {
  return (
    <>
      {props.EguiGlobalSettings !== undefined && <BevyResource type="bevy_egui::EguiGlobalSettings" value={props.EguiGlobalSettings} />}
    </>
  );
}

/** Typed handles for a TypeScript App (raea/bevy): `app.spawn(with(egui.X, value))`, `app.trigger(egui.E, value)`. */
export const egui = {
  plugin: "egui" as const,
  /** bevy_egui::EguiContextSettings (component) */
  EguiContextSettings: component<EguiContextSettings>("bevy_egui::EguiContextSettings"),
  /** bevy_egui::EguiGlobalSettings (resource) */
  EguiGlobalSettings: resource<EguiGlobalSettings>("bevy_egui::EguiGlobalSettings"),
};

void BevyResource;
void BevyComponent;
void component;
void resource;
void event;
void message;
void state;