save code
This commit is contained in:
@@ -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
@@ -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()>;
|
||||
|
||||
@@ -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();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user