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.

1.9 KB
Raw Blame
// Generated by raea-bevy-sdk from raea's Bevy App's TypeRegistry (tnua (bevy-tnua)); don't edit, regenerate
// (tools/bevy-plugins.sh gen). 1 component.
// - In a scene (TSX): 1 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; <TnuaSettings> sets the
//   plugin's resources.
// - In a TypeScript program (raea/bevy's BevyApp): `tnua` 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_bevy_plugins::tnua::TnuaInput */
export interface TnuaInput {
  motion: [number, number, number];
  jump: boolean;
  crouch: boolean;
  dash: boolean;
}

/** raea_bevy_plugins::tnua::TnuaInput (component); default {"motion":[0.0,0.0,0.0],"jump":false,"crouch":false,"dash":false} */
export function TnuaInput(props: { value?: Partial<TnuaInput>; from?: number }) {
  return <BevyComponent type="raea_bevy_plugins::tnua::TnuaInput" value={props.value ?? {"motion":[0.0,0.0,0.0],"jump":false,"crouch":false,"dash":false}} from={props.from} />;
}

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

    </>
  );
}

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

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