)]}'
{
  "commit": "ce0af130b3aef629a7c70d99b66453191c5620cc",
  "tree": "a7f4df5f00bf67a27886e51a3760e803386f40ff",
  "parents": [
    "fe9112bbe8f27381dfad2c1fb98326bbb2a545d1"
  ],
  "author": {
    "name": "luigi-rosso",
    "email": "hello@rive.app",
    "time": "Tue Aug 30 23:14:30 2022 +0000"
  },
  "committer": {
    "name": "luigi-rosso",
    "email": "hello@rive.app",
    "time": "Tue Aug 30 23:14:30 2022 +0000"
  },
  "message": "Example for how to pack an atlas with tools\n\nImplements an example Atlas packer (ideally run offline/in a pre-runtime step using the runtime API). Imagine a game engine like Defold using this at edit time/from within engine tooling to pack all the images necessary for all the Rive files in one level into a single Atlas/set of Atlases to minimize state changes when drawing the whole scene.\n\nExample implementation is mostly here: packages/runtime/viewer/src/sample_tools\n\nThe example does both atlas packing and runtime image resolving from the Atlas from the same set of utility classes and their corresponding objects in order to keep the example simple (no serialization of the atlas metadata or pixels). It also uses a very naive packing technique, but it illustrates these main features:\n\n1. find all the image assets in a file\n2. packing them sequentially into an atlas\n3. ...while building up metadata of where they are in the atlas\n4. strips the images from the file\n5. shows how to then re-load the file (with no in-band images) and use the generated atlas\n6. implements a FileAssetResolver to resolve the images in the Atlas and provide UV transforms\n\nSteps 1-4 are what an engine would do at edit/export time. Steps 5-6 show what a runtime would do to then use the files generated in steps 1-4.\n\nAll of this is implemented in the viewer, minor changes were necessary to the runtime to transform UVs with a transform provided by the RenderImage and fix some bugs. See how the viewer wires this all up here: https://github.com/rive-app/rive/blob/86dbad80c66d9963701d229f637fe5bdc8173090/packages/runtime/viewer/src/viewer_content/scene_content.cpp#L185-L233\n\nDiffs\u003d\n38b70a98d Cleanup\nac44c1ad7 Fix broken test.\n40d2fa966 Fixing UV modification at load time.\n736bcf133 Adding an example atlas packer.\ne42e484eb Starting to add example atlas packer.\n438f98716 Adding imgui menu bar\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "5895a7e32798df343c865ea189939774e30f1a78",
      "old_mode": 33188,
      "old_path": ".rive_head",
      "new_id": "54ed70180ea995021e55d739d1e2bd13ab9d7c31",
      "new_mode": 33188,
      "new_path": ".rive_head"
    },
    {
      "type": "modify",
      "old_id": "65b58b147d148326b28afadd7a9f5462c19d6caf",
      "old_mode": 33188,
      "old_path": "build/premake5.lua",
      "new_id": "685ba8e2207640c343d7884b9d397c1282f18c96",
      "new_mode": 33188,
      "new_path": "build/premake5.lua"
    },
    {
      "type": "modify",
      "old_id": "f876a6ecff93aec617d0797cf9c3676999729b70",
      "old_mode": 33188,
      "old_path": "include/rive/assets/image_asset.hpp",
      "new_id": "0083e796e6b5594c286d058c4a8eb93fad733e33",
      "new_mode": 33188,
      "new_path": "include/rive/assets/image_asset.hpp"
    },
    {
      "type": "modify",
      "old_id": "c027fc3647f5a969e1c80bab0c1b3652ba89d049",
      "old_mode": 33188,
      "old_path": "include/rive/file.hpp",
      "new_id": "60ed1e64c3805cd8722a5fcaaad9c3d6840b9bbf",
      "new_mode": 33188,
      "new_path": "include/rive/file.hpp"
    },
    {
      "type": "modify",
      "old_id": "6a40d4ebf69c3618328fb7ec105f9ac87782f5fb",
      "old_mode": 33188,
      "old_path": "include/rive/importers/import_stack.hpp",
      "new_id": "26f5b593e5c826d21b835a4024e989e646fcfb85",
      "new_mode": 33188,
      "new_path": "include/rive/importers/import_stack.hpp"
    },
    {
      "type": "modify",
      "old_id": "b6601192cab5be528e1fea1d92885850fa65cca8",
      "old_mode": 33188,
      "old_path": "include/rive/renderer.hpp",
      "new_id": "75b3a1b061f3f27e0cc3f2dfa213e8f84be16be5",
      "new_mode": 33188,
      "new_path": "include/rive/renderer.hpp"
    },
    {
      "type": "modify",
      "old_id": "3c193aa084e1586aec3e9f0abb147eac2b9baae1",
      "old_mode": 33188,
      "old_path": "include/rive/shapes/mesh.hpp",
      "new_id": "473bce726702af6644303cb19d63f22bad9063bc",
      "new_mode": 33188,
      "new_path": "include/rive/shapes/mesh.hpp"
    },
    {
      "type": "modify",
      "old_id": "7fe63040f3c342efcad002e61733c6733d06c3cb",
      "old_mode": 33188,
      "old_path": "src/assets/image_asset.cpp",
      "new_id": "1d07ef3f2cb2f046a461d26c3818bea2b0b89dbc",
      "new_mode": 33188,
      "new_path": "src/assets/image_asset.cpp"
    },
    {
      "type": "modify",
      "old_id": "a0101206c4ddd18fa60bcad7fc09cf8d7c25616e",
      "old_mode": 33188,
      "old_path": "src/file.cpp",
      "new_id": "41e40047f6be5e4f3f466ea43a4e504aa5ce1fdb",
      "new_mode": 33188,
      "new_path": "src/file.cpp"
    },
    {
      "type": "modify",
      "old_id": "35efecd4fe339d672ea2e8356260f6e9bb34bfb2",
      "old_mode": 33188,
      "old_path": "src/importers/backboard_importer.cpp",
      "new_id": "46b33037b4ebb8e0dcbbe5db5474767a057d3181",
      "new_mode": 33188,
      "new_path": "src/importers/backboard_importer.cpp"
    },
    {
      "type": "modify",
      "old_id": "165f1e086419853e27c32eac40d529be80ee65e5",
      "old_mode": 33188,
      "old_path": "src/renderer.cpp",
      "new_id": "45fb4dfc3f679923d5a8743f20fff4606fa2b151",
      "new_mode": 33188,
      "new_path": "src/renderer.cpp"
    },
    {
      "type": "modify",
      "old_id": "45af115b387859006f89ca7fe6161624214dffe7",
      "old_mode": 33188,
      "old_path": "src/shapes/image.cpp",
      "new_id": "04d90a5be31a27856b61d76807e09a206786bef4",
      "new_mode": 33188,
      "new_path": "src/shapes/image.cpp"
    },
    {
      "type": "modify",
      "old_id": "fd2811ec242a69219193afd8d80cad4aa13d0435",
      "old_mode": 33188,
      "old_path": "src/shapes/mesh.cpp",
      "new_id": "5c843d98228441cb46104a3726815674a0244a05",
      "new_mode": 33188,
      "new_path": "src/shapes/mesh.cpp"
    },
    {
      "type": "modify",
      "old_id": "a8c956897a962474ee04b9293eadd52c124124a1",
      "old_mode": 33188,
      "old_path": "tess/include/rive/tess/sokol/sokol_tess_renderer.hpp",
      "new_id": "9ee0a730e0a5cae9f2330be2e7ccf549ddbd1edc",
      "new_mode": 33188,
      "new_path": "tess/include/rive/tess/sokol/sokol_tess_renderer.hpp"
    },
    {
      "type": "modify",
      "old_id": "59a9c36fb3742f088d6a332b4f32ccc516a7f11f",
      "old_mode": 33188,
      "old_path": "tess/src/sokol/sokol_tess_renderer.cpp",
      "new_id": "e968d896f0977f68a03255805e8786832b09e91d",
      "new_mode": 33188,
      "new_path": "tess/src/sokol/sokol_tess_renderer.cpp"
    },
    {
      "type": "modify",
      "old_id": "5e8079f83913d73c344df6c6e406c37b11ea494a",
      "old_mode": 33188,
      "old_path": "utils/no_op_factory.cpp",
      "new_id": "ab6ebbd323682cb05c7bfc2d2e4e2abba740aa19",
      "new_mode": 33188,
      "new_path": "utils/no_op_factory.cpp"
    },
    {
      "type": "modify",
      "old_id": "6f1a3606cbac3c6057d4ff8373c1b8897c9cde60",
      "old_mode": 33261,
      "old_path": "viewer/build/macosx/build_viewer.sh",
      "new_id": "3876b043681eaf4a184a7e0f37416ac48f6f39e5",
      "new_mode": 33261,
      "new_path": "viewer/build/macosx/build_viewer.sh"
    },
    {
      "type": "modify",
      "old_id": "aedf2e2434adf16ae5d22225bf755f19d571ca00",
      "old_mode": 33188,
      "old_path": "viewer/build/premake5_viewer.lua",
      "new_id": "e048076cc39162988fd4597f96e5d6cd2a3d6471",
      "new_mode": 33188,
      "new_path": "viewer/build/premake5_viewer.lua"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "c131e3f1503fe60d01a70c6fab48dd64574f0af8",
      "new_mode": 33188,
      "new_path": "viewer/include/viewer/sample_tools/sample_atlas_packer.hpp"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "cc06ffd8979fa811a8fb40ef32e6d49ac247c1bd",
      "new_mode": 33188,
      "new_path": "viewer/src/sample_tools/sample_atlas_packer.cpp"
    },
    {
      "type": "modify",
      "old_id": "cf9ac5cdd36f6c8cc11a2f8a75190cf284b9b409",
      "old_mode": 33188,
      "old_path": "viewer/src/tess/viewer_sokol_factory.cpp",
      "new_id": "f36b4aa24553c9015685c1b9d6eb5eda0580f04b",
      "new_mode": 33188,
      "new_path": "viewer/src/tess/viewer_sokol_factory.cpp"
    },
    {
      "type": "modify",
      "old_id": "1234e6fc13a132a2335df8289999bf87edd4bab5",
      "old_mode": 33188,
      "old_path": "viewer/src/viewer_content/scene_content.cpp",
      "new_id": "774084c6401e950be292f5e0c8722844ac94c72d",
      "new_mode": 33188,
      "new_path": "viewer/src/viewer_content/scene_content.cpp"
    }
  ]
}
