save code

This commit is contained in:
xsl
2026-01-13 08:12:46 +08:00
parent 496d56f9c6
commit 52c9da08ed
10 changed files with 25 additions and 4 deletions
+2
View File
@@ -1377,6 +1377,8 @@ void FaceApp::SetInitArg(const char* arg)
pushConstants.g = _initArg.g;
pushConstants.b = _initArg.b;
pushConstants.radius = _initArg.radius;
pushConstants.offset_x = _initArg.offset_x;
pushConstants.offset_y = _initArg.offset_y;
}
void FaceApp::drawFrame(long long frameTime)
+5 -1
View File
@@ -42,8 +42,10 @@ struct InitArg
float g;
float b;
float radius;
float offset_x;
float offset_y;
//Motion motion;
NLOHMANN_DEFINE_TYPE_INTRUSIVE(InitArg, action_fps, zoom, r, g, b, radius);
NLOHMANN_DEFINE_TYPE_INTRUSIVE(InitArg, action_fps, zoom, r, g, b, radius, offset_x, offset_y);
};
@@ -55,6 +57,8 @@ struct PushConstants {
float radius = 240;
float ux = 0;
float uy = 0;
float offset_x = 0;
float offset_y = 0;
};
using Callback = std::function<void()>;
+2
View File
@@ -154,6 +154,8 @@ int main() {
init_arg.g = 0;
init_arg.b = 0;
init_arg.radius = 240;
init_arg.offset_x = 100;
init_arg.offset_y = -100;
string json_str = json(init_arg).dump();