Checkpoint 2: integrate native Editor, MCP, gameplay builds and standalone export

This commit is contained in:
Emil
2026-09-18 03:40:15 +03:00
parent 5c6b24d34d
commit 999686a896
125 changed files with 16086 additions and 1714 deletions
+28
View File
@@ -0,0 +1,28 @@
#pragma once
#include <faset/runtime/Runtime.hpp>
namespace beacon {
inline nlohmann::json schema() {
return {{"id", "example.beacon"},
{"name", "Beacon"},
{"version", 1},
{"fields",
{{"speed",
{{"id", "speed"},
{"name", "Rotation speed"},
{"type", "number"},
{"default", 1.0},
{"units", "rad/s"}}}}}};
}
inline void register_behavior(faset::runtime::Runtime& runtime) {
faset::runtime::Behavior behavior;
behavior.fixedUpdate = [](faset::runtime::Runtime& world, faset::runtime::EntityHandle self,
double dt) {
auto pose = world.transform(self);
pose.rotation[1] +=
world.fields(self, "example.beacon").value("speed", 1.0f) * static_cast<float>(dt);
world.setTransform(self, pose);
};
runtime.registerBehavior("example.beacon", std::move(behavior));
}
} // namespace beacon