This commit is contained in:
Mikulas Florek 2023-10-03 00:57:12 +02:00
parent 3a1706d77c
commit d96993732b
2 changed files with 9 additions and 11 deletions

View File

@ -1,4 +1,8 @@
return {
dot = function(a, b)
return a[1] * b[1] + a[2] * b[2] + a[3] * b[3]
end,
mulQuat = function(a, b)
return {
a[4] * b[1] + b[4] * a[1] + a[2] * b[3] - b[2] * a[3],
@ -32,8 +36,12 @@ addVec3 = function(a, b)
return {a[1] + b[1], a[2] + b[2], a[3] + b[3]}
end,
subVec3 = function(a, b)
return {a[1] - b[1], a[2] - b[2], a[3] - b[3]}
end,
mulVec3 = function(a, f)
return {a[1] * f, a[2] * f, a[3] * f}
end,
}
}

View File

@ -1051,16 +1051,6 @@ void registerEngineAPI(lua_State* L, Engine* engine)
LuaImGui::registerCFunction(L, "Unindent", &LuaWrapper::wrap<&ImGui::Unindent>);
LuaImGui::registerCFunction(L, "LabelText", &LuaWrapper::wrap<LuaImGui::LabelText>);
LuaWrapper::createSystemVariable(L, "LumixAPI", "INPUT_DEVICE_KEYBOARD", InputSystem::Device::KEYBOARD);
LuaWrapper::createSystemVariable(L, "LumixAPI", "INPUT_DEVICE_MOUSE", InputSystem::Device::MOUSE);
LuaWrapper::createSystemVariable(L, "LumixAPI", "INPUT_DEVICE_CONTROLLER", InputSystem::Device::CONTROLLER);
LuaWrapper::createSystemVariable(L, "LumixAPI", "INPUT_EVENT_BUTTON", InputSystem::Event::BUTTON);
LuaWrapper::createSystemVariable(L, "LumixAPI", "INPUT_EVENT_AXIS", InputSystem::Event::AXIS);
LuaWrapper::createSystemVariable(L, "LumixAPI", "INPUT_EVENT_TEXT_INPUT", InputSystem::Event::TEXT_INPUT);
LuaWrapper::createSystemVariable(L, "LumixAPI", "INPUT_EVENT_DEVICE_ADDED", InputSystem::Event::DEVICE_ADDED);
LuaWrapper::createSystemVariable(L, "LumixAPI", "INPUT_EVENT_DEVICE_REMOVED", InputSystem::Event::DEVICE_REMOVED);
lua_pop(L, 1);
const char* entity_src = R"#(