{"id":13570335,"url":"https://github.com/AustinEast/heaps-aseprite","last_synced_at":"2025-04-04T06:32:24.217Z","repository":{"id":41435538,"uuid":"305015790","full_name":"AustinEast/heaps-aseprite","owner":"AustinEast","description":"An Aseprite File Parser for Heaps","archived":false,"fork":false,"pushed_at":"2024-01-26T21:13:13.000Z","size":78,"stargazers_count":29,"open_issues_count":2,"forks_count":9,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-26T16:08:22.652Z","etag":null,"topics":["aseprite","haxe","heaps"],"latest_commit_sha":null,"homepage":"https://lib.haxe.org/p/heaps-aseprite/","language":"Haxe","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/AustinEast.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}},"created_at":"2020-10-18T03:39:23.000Z","updated_at":"2025-02-06T17:18:30.000Z","dependencies_parsed_at":"2024-01-03T03:54:04.413Z","dependency_job_id":"df5cb517-1aa2-4a48-bf53-ba65dc254f5d","html_url":"https://github.com/AustinEast/heaps-aseprite","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/AustinEast%2Fheaps-aseprite","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AustinEast%2Fheaps-aseprite/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AustinEast%2Fheaps-aseprite/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AustinEast%2Fheaps-aseprite/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AustinEast","download_url":"https://codeload.github.com/AustinEast/heaps-aseprite/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247134992,"owners_count":20889412,"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":["aseprite","haxe","heaps"],"created_at":"2024-08-01T14:00:51.165Z","updated_at":"2025-04-04T06:32:19.209Z","avatar_url":"https://github.com/AustinEast.png","language":"Haxe","funding_links":[],"categories":["Haxe","Miscellaneous"],"sub_categories":["Animation"],"readme":"# heaps-aseprite\nLoad and render sprites and animations in Aseprite format. Based on the [ase](https://github.com/miriti/ase) and [openfl-aseprite](https://github.com/miriti/openfl-aseprite) libraries. Sample Aseprite files all borrowed from `openfl-aseprite`.\n\n## Features\n* Hooks into the Heaps Engine's resource management to automatically handle any `.aseprite` or `.ase` file\n* Optimizes runtime performance by parsing Aseprite files during compilation (generating `.png` and `.asedata` files)\n* Supports all Color Modes, Animation Tags, Layers, and Slices (including 9-Slices!)\n* Includes the `AseAnim` Class to easily render Animations (based on the Heaps Engine's `Anim` Class)\n* Supports Live Resource Updating\n* Gets Type-safe references to an Aseprite file's Tags and Slices (thanks @deepnight!)\n\n## Getting Started\n\nheaps-aseprite requires [Haxe 4](https://haxe.org/download/) and the [Heaps Engine](https://heaps.io) to run.\n\nInstall the library from haxelib:\n```\nhaxelib install heaps-aseprite\n```\nAlternatively the dev version of the library can be installed from github:\n```\nhaxelib git heaps-aseprite https://github.com/AustinEast/heaps-aseprite.git\n```\n\nInstall heaps-aseprite's dependency, [ase](https://github.com/miriti/ase).\n```\nhaxelib install ase\n```\n\nThen include the library in your project's `.hxml`:\n```hxml\n-lib heaps-aseprite\n```\n\n## Example\n\n```haxe\n// Get the whole sprite as a Tile\nvar spr1 = new Bitmap(Res.single_frame_sprite.toAseprite().toTile(), s2d);\n\n// Alternatively get the sprite directly as an Image\nvar image = new Bitmap(Res.single_frame_sprite.toImage().toTile(), s2d);\n\n// Get an animation from the sprite's tag\nvar spr2 = new AseAnim(Res.animated_sprite.toAseprite().getTag('walk'), s2d);\nspr2.loop = true;\n\n// Override the direction of a tagged animation\nvar spr3 = new AseAnim(Res.animated_sprite.toAseprite().getTag('walk', AnimationDirection.REVERSE), s2d);\nspr3.loop = true;\n\n// Get an animation based on tag and slice\nvar spr4 = new AseAnim(Res.animated_sprite.toAseprite().getTag('walk', -1, 'Head'), s2d);\nspr4.loop = true;\n\n// Get a single frame from a slice\nvar slice = new Bitmap(Res.slices.toAseprite().getSlice('Slice 1').tile, s2d);\n\n// Get all frames from a slice\nvar slice2 = new AseAnim(Res.slices.toAseprite().getSlices('Slice 1'), s2d);\nslice2.loop = true;\n\n// Get a 9-Slice ScaleGrid from a slice\nvar nineSlice = Res.nine_slices.toAseprite().toScaleGrid('9-Slices', 0, s2d);\n\n// Live Resource Updatng\nvar animation = new AseAnim(Res.animated_sprite.toAseprite().getTag('walk'), s2d);\nanimation.loop = true;\nRes.animated_sprite.watch(() -\u003e {\n  // Make sure to call the default `watch()` callback!\n  Res.animated_sprite.updateData();\n\n  // Replay the animation to get the updated frames\n  animation.play(Res.animated_sprite.toAseprite().getTag('walk'));\n});\n\n// Want type-safe Tags and Slices? Use the `Dictionary` class to get typed references from an Aseprite resource\nvar typeSafeTags = Dictionary.getTags(Res.animated_sprite);\nnew AseAnim(Res.animated_sprite.toAseprite().getTag(typeSafeTags.walk), flow);\n\nvar typeSafeSlices = Dictionary.getSlices(Res.slices);\nnew Bitmap(Res.slices.toAseprite().getSlice(typeSafeSlices.Slice_1).tile, flow);\n```\n\n## Roadmap\n* Document codebase (public fields and methods)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FAustinEast%2Fheaps-aseprite","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FAustinEast%2Fheaps-aseprite","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FAustinEast%2Fheaps-aseprite/lists"}