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.
TypeScript 3dagent-skillsai-agentsai-videobevyclaude-codegame-enginegpulinuxmacosmotion-designmotion-graphicsreactrusttypescriptvideo-editingvideo-renderingwgpuwindows
// The names each GodotJS module has, read from the typings GodotJS's codegen wrote (src/types): the top-level
// declarations inside each `declare module "NAME" { ... }`. src/shim/names.gen.js lists the "godot" module's, which
// the bundles' shim (src/shim/godot.js) answers as its own: rolldown copies a CommonJS module's own names when a
// bundle imports it, and GodotJS's godot module makes each class only when it's first read, so it has almost none.
// Run by tools/gen.sh; bun tools/names.ts TYPES_DIR OUT.js
import { readdirSync, readFileSync, writeFileSync } from "node:fs";
import { join } from "node:path";
const [dir, out] = process.argv.slice(2);
if (!dir || !out) throw new Error("bun tools/names.ts TYPES_DIR OUT.js");
// a value (class, namespace, enum, function, const) at the module's top level; interfaces and types aren't at run time
const DECL = /^ (?:export )?(?:declare )?(?:abstract )?(?:class|namespace|enum|function|const|let|var) +([A-Za-z_$][\w$]*)/;
const names = new Set<string>();
for (const f of readdirSync(dir).filter((f) => f.endsWith(".d.ts")).sort()) {
let module: string | null = null;
for (const line of readFileSync(join(dir, f), "utf8").split("\n")) {
const open = /^declare module "([^"]+)"/.exec(line);
if (open) module = open[1];
else if (line.startsWith("}")) module = null;
else if (module === "godot") {
const m = DECL.exec(line);
if (m) names.add(m[1]);
}
}
}
if (names.size < 1000) throw new Error(`only ${names.size} names in the godot module: are the typings in ${dir} GodotJS's full codegen?`);
const list = [...names].sort();
writeFileSync(
out,
`// Generated by tools/gen.sh from src/types (tools/names.ts): the "godot" module's ${list.length} names. The list's\n` +
`// line ends with gitleaks:allow because gitleaks takes "KeyModifierMask","KinematicCollision2D" for a key and its value.\n` +
`module.exports = ${JSON.stringify(list)}; // gitleaks:allow\n`,
);
console.log(`${list.length} names in the godot module`);