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.

2.6 KB
Raw Blame
// Generated by raea-bevy-sdk from raea's Bevy App's TypeRegistry (character (raea-runtime-plugins)); don't edit, regenerate
// (tools/bevy-plugins.sh gen). 2 component.
// - 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; <CharacterSettings> sets the
//   plugin's resources.
// - In a TypeScript program (raea/bevy's BevyApp): `character` 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";

/** raea_runtime_plugins::character::CharacterGoal */
export interface CharacterGoal {
  motion: string;
  spec: string;
  start: number;
}

/** raea_runtime_plugins::character::CharacterPose */
export interface CharacterPose {
  frame: number;
  translation: [number, number, number];
  yaw: number;
}

/** raea_runtime_plugins::character::CharacterGoal (component); default {"motion":"","spec":"","start":0} */
export function CharacterGoal(props: { value?: Partial<CharacterGoal>; from?: number }) {
  return <BevyComponent type="raea_runtime_plugins::character::CharacterGoal" value={props.value ?? {"motion":"","spec":"","start":0}} from={props.from} />;
}

/** raea_runtime_plugins::character::CharacterPose (component); default {"frame":0,"translation":[0.0,0.0,0.0],"yaw":0.0} */
export function CharacterPose(props: { value?: Partial<CharacterPose>; from?: number }) {
  return <BevyComponent type="raea_runtime_plugins::character::CharacterPose" value={props.value ?? {"frame":0,"translation":[0.0,0.0,0.0],"yaw":0.0}} from={props.from} />;
}

/** character's settings: each one given is its resource, set at load (left out, the plugin's default). */
export function CharacterSettings(props: {
  /* no reflected resources */
}) {
  return (
    <>

    </>
  );
}

/** Typed handles for a TypeScript App (raea/bevy): `app.spawn(with(character.X, value))`, `app.trigger(character.E, value)`. */
export const character = {
  plugin: "character" as const,
  raea: true as const,
  /** raea_runtime_plugins::character::CharacterGoal (component) */
  CharacterGoal: component<CharacterGoal>("raea_runtime_plugins::character::CharacterGoal"),
  /** raea_runtime_plugins::character::CharacterPose (component) */
  CharacterPose: component<CharacterPose>("raea_runtime_plugins::character::CharacterPose"),
};

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