Skip to content

armgit / 67.js

Public Imported from GitHub
0

3D engine that AI agents drive

Call the rig factory inside createRig instead of createRig itself

Nguyen Xuan An533e526af2ba
diff --git a/bench/runtime-loop/main.js b/bench/runtime-loop/main.js
index 2f70c411..17e794de 100644
--- a/bench/runtime-loop/main.js
+++ b/bench/runtime-loop/main.js
@@ -146,7 +146,7 @@ let rigKind = Object.hasOwn(RIG_FACTORIES, requestedRig ?? '') || requestedRig =
// Only own keys: a name like "toString" from the URL or a button must not reach the prototype.
function createRig(kind) {
if (!Object.hasOwn(RIG_FACTORIES, kind)) throw new Error(`Unknown camera rig "${kind}"; use follow, firstPerson, topDown or static.`);
- return createRig(kind);
+ return RIG_FACTORIES[kind]();
}
const canvas = document.querySelector('canvas');