{"id":16122084,"url":"https://github.com/foxcapades/renpy-spritesheet-animation","last_synced_at":"2025-04-06T11:41:39.619Z","repository":{"id":179270541,"uuid":"662866146","full_name":"Foxcapades/renpy-spritesheet-animation","owner":"Foxcapades","description":"Demonstration and source for generating animations from sprite sheets.","archived":false,"fork":false,"pushed_at":"2024-10-11T05:03:24.000Z","size":3405,"stargazers_count":10,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-02-12T17:19:28.332Z","etag":null,"topics":["animation","renpy","spritesheet"],"latest_commit_sha":null,"homepage":"","language":"Ren'Py","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/Foxcapades.png","metadata":{"files":{"readme":"readme.adoc","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,"publiccode":null,"codemeta":null}},"created_at":"2023-07-06T04:01:45.000Z","updated_at":"2025-02-08T17:16:33.000Z","dependencies_parsed_at":"2024-11-01T05:25:20.816Z","dependency_job_id":"39975901-6a8e-4a78-9c2b-804671b4859c","html_url":"https://github.com/Foxcapades/renpy-spritesheet-animation","commit_stats":{"total_commits":22,"total_committers":2,"mean_commits":11.0,"dds":"0.045454545454545414","last_synced_commit":"f855354b45ae547f63c861c942d58bca900a301b"},"previous_names":["foxcapades/renpy-spritesheet-animation-demo","foxcapades/renpy-spritesheet-animation"],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Foxcapades%2Frenpy-spritesheet-animation","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Foxcapades%2Frenpy-spritesheet-animation/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Foxcapades%2Frenpy-spritesheet-animation/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Foxcapades%2Frenpy-spritesheet-animation/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Foxcapades","download_url":"https://codeload.github.com/Foxcapades/renpy-spritesheet-animation/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247478234,"owners_count":20945262,"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":["animation","renpy","spritesheet"],"created_at":"2024-10-09T21:09:20.711Z","updated_at":"2025-04-06T11:41:39.604Z","avatar_url":"https://github.com/Foxcapades.png","language":"Ren'Py","funding_links":[],"categories":[],"sub_categories":[],"readme":"= Animations from Sprite Sheets\n:source-highlighter: highlight.js\n\nSource code for and a basic demonstration of generating animations based on\n`png` or `jpg` sprite sheet files.\n\n[source, python]\n----\nimage explosion = spritesheet_animation(\"images/explosion.png\", 8, 6)\n----\n\n[IMPORTANT]\n--\nRequires Ren'Py 8.3+\n--\n\n== The `spritesheet_animation` Function\n\nGenerates an animation from the given sprite file path.  The given path MUST be\na valid path relative to the game directory including the file extension, e.g.\n`\"images/explosion.png\"`.\n\nThis method supports the following file types: `[ \"png\", \"jpg\" ]`\n\n.Arguments\n--\n[cols=\"1m,1m,8\"]\n|===\n\n| image_path\n| str\n| The path to the sprite sheet image file relative to the game directory.  This\n  path **MUST** include the file extension.  Example: `\"images/explosion.png\"`.\n\n| x_sprite_count\n| int\n| Number of sprites the sprite sheet has along the x-axis.\n\n| y_sprite_count\n| int\n| Number of sprites the sprite sheet has along the y-axis.\n|===\n--\n\n.Keyword Arguments\n--\n[cols=\"1m,1m,8\"]\n|===\n\n| fps\n| int\\|float\n| Frames per second for the animation. Incompatible with the `pause` keyword\n  argument; setting both will cause an error. Defaults to 30.\n\n| pause\n| float\n| How long to pause between each frame. Incompatible with the `fps` keyword\n  argument; setting both will cause an error. Defaults to None.\n\n| looping\n| bool\n| Whether the animation should loop.  Defaults to `False`.\n\n| hold_last_frame\n| bool\n| Whether the animation should hold on the last frame or \"vanish\" after the last\n  frame has played.  Defaults to `False` (vanishing).\n|===\n--\n\n== Caveats\n\n. This function does not allow the creation of animations with different pause\ntimes between frames.  For example replicating the following is not possible:\n+\n[source, python]\n----\nimage foobar:\n    \"frame01\"\n    pause 0.1\n    \"frame02\"\n    pause 0.2\n    \"frame03\"\n    pause 0.3\n----\n. All the sprites on the sprite sheet must be the same size, the function will\ndivide the sprite sheet evenly by the given `x_sprite_count` and\n`y_sprite_count` values.\n\n== Credits\n\n* `__get_image_size` adapted from an answer on\n  link:https://stackoverflow.com/a/20380514[this StackOverflow question].\n* `explosion.png` from https://www.pngegg.com/en/png-nvowz\n\n== License\n\nPublished under the link:license[MIT License] which practically says \"go nuts,\nuse it however you want.\"\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffoxcapades%2Frenpy-spritesheet-animation","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffoxcapades%2Frenpy-spritesheet-animation","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffoxcapades%2Frenpy-spritesheet-animation/lists"}