{"id":17242419,"url":"https://github.com/loudoweb/spriterhaxeengine","last_synced_at":"2026-01-31T23:38:18.732Z","repository":{"id":14472627,"uuid":"17184734","full_name":"loudoweb/SpriterHaxeEngine","owner":"loudoweb","description":"Engine to use Brashmonkey's Spriter SCML for haxe.","archived":false,"fork":false,"pushed_at":"2023-05-02T14:37:23.000Z","size":220,"stargazers_count":66,"open_issues_count":6,"forks_count":15,"subscribers_count":13,"default_branch":"master","last_synced_at":"2025-03-26T03:27:29.164Z","etag":null,"topics":["brashmonkey-spriter-scml","haxe","openfl","spriter"],"latest_commit_sha":null,"homepage":"","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/loudoweb.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,"publiccode":null,"codemeta":null}},"created_at":"2014-02-25T19:11:56.000Z","updated_at":"2024-08-22T14:50:47.000Z","dependencies_parsed_at":"2024-10-12T01:29:30.437Z","dependency_job_id":"16d6d137-06d2-4c91-b929-0a5deacc550b","html_url":"https://github.com/loudoweb/SpriterHaxeEngine","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/loudoweb/SpriterHaxeEngine","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/loudoweb%2FSpriterHaxeEngine","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/loudoweb%2FSpriterHaxeEngine/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/loudoweb%2FSpriterHaxeEngine/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/loudoweb%2FSpriterHaxeEngine/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/loudoweb","download_url":"https://codeload.github.com/loudoweb/SpriterHaxeEngine/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/loudoweb%2FSpriterHaxeEngine/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259568064,"owners_count":22877837,"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":["brashmonkey-spriter-scml","haxe","openfl","spriter"],"created_at":"2024-10-15T06:13:15.532Z","updated_at":"2026-01-31T23:38:13.697Z","avatar_url":"https://github.com/loudoweb.png","language":"Haxe","funding_links":[],"categories":[],"sub_categories":[],"readme":"SpriterHaxeEngine \n=============\n\nThe point of this project is to offer a Brashmonkey's Spriter SCML renderer compatible with Haxe 3 and openfl.\nBase code of SCML definitions from http://www.brashmonkey.com/ScmlDocs/ScmlReference.html \n\nInspired by \n - https://github.com/Acemobe/SpriterAS3Anim\n - https://bitbucket.org/ClockworkMagpie/haxe-spriter/\n - https://github.com/ibilon/HaxePunk-Spriter\n\nInstall:\n``haxelib install SpriterHaxeEngine``\n\nChoose your drawing library:\n\n```as3\n/**\n* Example with the TilemapLibrary which uses openfl-atlas (haxelib install openfl-atlas)\n*/\n//set the root canvas where to add all the animations\nvar spriterRoot:Sprite = new Sprite();\naddChild(spriterRoot);\n//get an atlas\nvar tileset:TilesetEx = new SpriterTileset(Assets.getBitmapData('assets/atlas.png'), Assets.getText('assets/atlas.xml'));\n//choose a rendering method.\nvar lib = new TilemapLibrary([tileset], spriterRoot, stage.stageWidth, stage.stageHeight);\n\n/**\n* Example with the BitmapLibrary which uses BitmapData.copypixels() and BitmapData.draw()\n*/\n//set the root canvas where to add all the animations\nvar canvas:BitmapData = new BitmapData(800, 480);\nvar spriterRoot:Bitmap = new Bitmap(canvas, PixelSnapping.AUTO, true);\naddChild(spriterRoot);\n//choose a rendering method.\nvar lib:BitmapLibrary = new BitmapLibrary('assets/', canvas);\n\n/**\n* Other libraries exist to use Spriter with flixel and other rendering method!\n*/\n```\n\nInstantiate the engine:\n\n```as3\n//Create the engine.\n//you can specify a default scml or you can specify it later in addSpriter()\nengine = new SpriterEngine(Assets.getText('assets/test.scml'), lib );\n\t\t\n//Add a Spriter in the engine. A Spriter contains all data from the scml (all entities, animations, boxes, tags...)\n//By default, it will play the first animation of the first entity of your scml\nengine.addSpriter('uniqueId', x,  y);\n\n//Set the \"run\" animation of the entity\nengine.getSpriter('uniqueId').playAnim('run', myCallback);\n\n//Apply the \"gun\" map of the entity\nengine.getSpriter('uniqueId').applyCharacterMap('gun', true);\n\n//Update on enter frame to draw all Spriters on screen\nengine.update();\n\n//Callback on end anim\nfunction myCallback(s:Spriter):Void\n\n//callback\nengine.getSpriterAt(0).onVarChanged = function varCallback(name:String, value:Dynamic):Void{}\nengine.getSpriterAt(0).onEvent = function eventCallback(name:String):Void{}\nengine.getSpriterAt(0).onSound = function soundCallback(name:String):Void{}\n\n//current points and boxes\nvar points:Array\u003cSpatialInfo\u003e = engine.getSpriterAt(0).points;\nvar boxes:Array\u003cQuadrilateral\u003e = engine.getSpriterAt(0).boxes;\n\n//current tags\nvar tags:Array\u003cString\u003e = engine.getSpriterAt(0).tags;\n\n//current variables values\nvar value:Dynamic = engine.getSpriterAt(0).getVariable('myVar');\n\n\n//stack anims\nengine.getSpriter('uniqueId').playAnimsStackFromEntity(\"entityName\", [\"anim1\",\"anim2\"], myCallback).\n\n```\n\nSpriter Haxe Engine Features\n--------------\n\n**SCML API**\n\n**Engine**\n - Can be overrided to fit your need\n - simple z-ordering\n - Fixed tick, variable tick or use your own time\n - Pause\n - simple auto removal\n - default scml\n \n**Spriter entity**\n - character mapping by name\n - change animation easily by name in a Spriter entity\n - callback when animation ended\n - play, stack anim, pause\n - you can display duplicate of spriter entity and manipulate them separatly\n - callback when events, sounds are triggered\n - callback when variables change\n - Points (usage example : to shot a bullet when gun fire)\n - Boxes (usage example : hitbox)\n - Tags (usage example : state vulnerable)\n - sub entities\n - playing backward and reflect\n\n**Libraries**\n - TilemapLibrary (use openfl tilemap, dependency: [openfl](https://github.com/openfl/openfl), [openfl-atlas](https://github.com/loudoweb/openfl-atlas))\n - Simple bitmap library (bitmaps handled with addChild, dependency : [openfl](https://github.com/openfl/openfl))\n - BitmapData library (copypixels, dependency : [openfl](https://github.com/openfl/openfl))\n - Tilelayer library (drawTiles using only one tilesheet)(dependency : [openfl-tilelayer](https://github.com/elsassph/openfl-tilelayer) and [openfl](https://github.com/openfl/openfl)).\n - DrawTiles library (using many tilesheets)(dependency : [openfl-tilelayer](https://github.com/elsassph/openfl-tilelayer) and [openfl](https://github.com/openfl/openfl)).\n - Flixel Library (atlas support or bitmaps handled with addChild, dependency : [flixel](https://github.com/HaxeFlixel/flixel)) by Zaphod\n - Heaps Library (h3d/heaps, dependency : [heaps](https://github.com/ncannasse/heaps) ) by Delahee\n - Luxe Library (dependency : [luxe](https://github.com/underscorediscovery/luxe) )\n - override the AbstractLibrary to provide a new library\n \n**Other features**\n - own texture packer exporter\n - macro to parse scml into binaries\n\n**Cross-platform**\n - flash\n - windows\n - neko\n - android\n - html5\n\nTODO\n----\n - interpolation on variable\n - variable/tags of sub entities\n - add tilesheet stage 3d support : https://github.com/as3boyan/TilesheetStage3D/\n - add ash and haxepunk support\n - add Flambe support (waiting for pull request, see here https://github.com/quinnhoener/SpriterHaxeEngine)\n - add Kha support (waiting for pull request, see here https://github.com/sh-dave/SpriterHaxeEngine/tree/dev)\n - Optimized engine : draw call only when needed. So \"instant\" keys are not updated between keys.\n - animation callback optimization\n - check Garbage collector\n \nWIKI\n-----------\n The [wiki](https://github.com/loudoweb/SpriterHaxeEngine/wiki) provides more details on features and how it works.\n \nExamples\n------------\n - Please see this repo : https://github.com/loudoweb/Spriter-Example\n \nAdditional information\n------------\n - compatible with Spriter r6.1\n - With Tilelayer library, don't use openfl-bitfive for html5 target.\n \n \nKnown issues\n------------\n - Please use the best rendering method according to your target.\n \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Floudoweb%2Fspriterhaxeengine","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Floudoweb%2Fspriterhaxeengine","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Floudoweb%2Fspriterhaxeengine/lists"}