8#include <nlohmann/json.hpp>
36 this->
m_tf = std::move(t.m_tf);
48 nlohmann::json json =
"{}"_json;
50 json[
"pos"][
"x"] =
m_tf.get_pos().x;
51 json[
"pos"][
"y"] =
m_tf.get_pos().y;
52 json[
"rotation"] =
m_tf.get_rotation();
53 json[
"scale"][
"x"] =
m_tf.get_scale().x;
54 json[
"scale"][
"y"] =
m_tf.get_scale().y;
55 json[
"origin"][
"x"] =
m_tf.get_origin().x;
56 json[
"origin"][
"y"] =
m_tf.get_origin().y;
63 const auto& pos = json.at(
"pos");
64 m_tf.set_pos(pos.at(
"x"), pos.at(
"y"));
66 m_tf.set_rotation(json.at(
"rotation"));
68 const auto& scale = json.at(
"scale");
69 m_tf.set_scale_horizontal(scale.at(
"x"));
70 m_tf.set_scale_vertical(scale.at(
"y"));
72 const auto& origin = json.at(
"origin");
73 m_tf.set_origin(origin.at(
"x"), origin.at(
"y"));