{"id":13525882,"url":"https://github.com/Relintai/texture_packer","last_synced_at":"2025-04-01T06:30:37.426Z","repository":{"id":50633091,"uuid":"216412724","full_name":"Relintai/texture_packer","owner":"Relintai","description":"A c++ Godot engine module, to layer, pack, and merge textures at runtime.","archived":false,"fork":false,"pushed_at":"2023-05-28T05:14:13.000Z","size":94,"stargazers_count":65,"open_issues_count":0,"forks_count":13,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-03-24T08:46:35.592Z","etag":null,"topics":["atlases","bake-textures","godot-engine","merge","texture-packer","texturepacker","textures"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Relintai.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2019-10-20T19:04:55.000Z","updated_at":"2025-03-08T16:25:47.000Z","dependencies_parsed_at":"2024-04-12T03:03:10.527Z","dependency_job_id":null,"html_url":"https://github.com/Relintai/texture_packer","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Relintai%2Ftexture_packer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Relintai%2Ftexture_packer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Relintai%2Ftexture_packer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Relintai%2Ftexture_packer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Relintai","download_url":"https://codeload.github.com/Relintai/texture_packer/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246596548,"owners_count":20802844,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["atlases","bake-textures","godot-engine","merge","texture-packer","texturepacker","textures"],"created_at":"2024-08-01T06:01:23.136Z","updated_at":"2025-04-01T06:30:37.187Z","avatar_url":"https://github.com/Relintai.png","language":"C++","funding_links":[],"categories":["Modules"],"sub_categories":["3D"],"readme":"# Texture Packer for the Godot Engine\n\nThis is a texture packer engine module, for the Godot Engine.\n\nIt can create texture atlases for you even in the running game.\n\nIt uses the legacy version of [rectpack2D](https://github.com/TeamHypersomnia/rectpack2D/tree/legacy)\n\nIt should work on all platforms.\n\n# Building\n\nBuild Godot. [Tutorial](https://docs.godotengine.org/en/latest/development/compiling/index.html)\n\n# Features and Usage\n\n## TexturePacker\n\nThis is the class that can merge textures. Add every texture you want into it using it's API (add_texture()), and then call merge().\n\nadd_texture() will return an AtlasTexture, this is the texture you want to use in your classes. It is immediately usable, it will just contain the original texture. Calling merge() will change it, to point to the new (merged) texture.\n\nSupports filters, custom background color, margins.\n\n### The keep_original_atlases option:\n\nIf you set this to true, and then add AtlasTextures, TexturePacker will change these ones (the ones you actually added)\nafter the bake.\n\nYou can use this to bake gui textures together, without changing the resources everywhere at runtime.\nThink of rpgs, when you have a huge number of potential icons that the player can put on his or her actionbars.\nYou can take look at Tales of Maj'Eyal or pretty much every actually complex MMORPGs as an example.\n\nNote: Doing something like this in only recommended, if you can't pre-make the atlases (or it's really unfeasible), you are better off\nmaking the atlases yourself during development.\n\n## TextureMerger\n\nA Node that can bake textures for you. It uses TexturePacker internally.\n\nIt has an exposed Array, so you can assign textures to it in the editor.\n\n## PackerImageResource\n\nThis is a simple Texture, which just contains an imported Image. It has no logic for drawing.\n\nUseful for textures you only need for baking, as this class will not register it's data into the VisualServer.\n\nThe module also contains an editor plugin which can import textures as `PackerImageResource` Resource.\n\nTo access it, click on a texture, switch to the import tab, and in the \"Import As\" Dropdown, select \"Packer Image Recource\".\n\n## TextureLayerMerger\n\nThis class can merge together textures as layers. Useful for example to merge together (and color) skin, and clothes for a character.\n\nIt can handle both AtlasTextures and normal Textures.\n\nAdd the layers from bottom to top with the add_texture() method, when you added everything call merge().\n\nYou can set the resulting image's size with the `width`, and `height` properties. If you leave them at 0, they will\nchange to the first added texture's size.\n\nadd_texture looks like this:\n\n```\nvoid add_texture(Ref\u003cTexture\u003e p_texture, Color p_color = Color(1, 1, 1, 1), Vector2 p_position = Vector2(), Rect2 p_rect = Rect2());\n```\n\nThe color parameter will color the given texture on merge().\nWith the position parameter you can offset your texture (in the resulted texture), and with the rect parameter, you can crop it.\n\nThere are setters to manipulate the added data later.\n\nAfter the merge, you can either use `get_result_as_texture()` (it creates an ImageTexture on the fly), or the `data` property to\ngrab the resulting Image.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FRelintai%2Ftexture_packer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FRelintai%2Ftexture_packer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FRelintai%2Ftexture_packer/lists"}