{"id":16026975,"url":"https://github.com/maxiy01/tstl-anim8","last_synced_at":"2026-04-28T08:06:01.158Z","repository":{"id":57381831,"uuid":"297296421","full_name":"maxiy01/tstl-anim8","owner":"maxiy01","description":"Declarations for anim8, a small animation library for LÖVE.","archived":false,"fork":false,"pushed_at":"2022-05-28T08:40:22.000Z","size":37,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-02T04:45:48.927Z","etag":null,"topics":["anim8","lua","tstl","typescript","typescript-to-lua"],"latest_commit_sha":null,"homepage":"","language":null,"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/maxiy01.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}},"created_at":"2020-09-21T09:49:23.000Z","updated_at":"2021-12-14T11:05:57.000Z","dependencies_parsed_at":"2022-09-13T11:31:07.649Z","dependency_job_id":null,"html_url":"https://github.com/maxiy01/tstl-anim8","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxiy01%2Ftstl-anim8","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxiy01%2Ftstl-anim8/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxiy01%2Ftstl-anim8/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxiy01%2Ftstl-anim8/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/maxiy01","download_url":"https://codeload.github.com/maxiy01/tstl-anim8/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247286077,"owners_count":20913918,"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":["anim8","lua","tstl","typescript","typescript-to-lua"],"created_at":"2024-10-08T20:04:30.316Z","updated_at":"2026-04-28T08:05:53.860Z","avatar_url":"https://github.com/maxiy01.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# TSTL anim8\n\nDeclarations for [anim8](https://github.com/kikito/anim8), a small animation library for LÖVE.\n\n\n| Command | Description |\n|-|-|\n| `yarn add -D tstl-anim8` | Install these declarations |\n| `yarn add kikito/anim8` | Install anim8 |\n\n\nUpon installation these declarations can be linked to a _tsconfig.json_ file.\n\n```json\n{\n    \"compilerOptions\": {\n        \"types\": [\n            \"tstl-anim8\"\n        ]\n    }\n}\n```\n\nAnd used within any _.ts_ file.\n\n```ts\nimport * as anim8 from \"anim8\"\n\nlet spritesheet = love.graphics.newImage('path/to/your/spritesheet');\nlet grid = anim8.newGrid(16,16,spritesheet.getWidth(),spritesheet.getHeight());\nlet frames = grid.getFrames(1,1, 2,1, 3,1);\nlet frame_duration = [0.5,0.5,0.5];\nlet animation = anim8.newAnimation(frames,frame_duration);\n\nlove.update = (dt: number) =\u003e {\n    animation.update(dt);\n}\n\nlove.draw = () =\u003e {\n    animation.draw(spritesheet, 100, 100);\n}\n```\n\nMake sure to append `\";./node_modules/?/?.lua\"` to your `package.path` in a _conf.ts_ file (this is run first) to assist where Lua looks for modules.\n\n```ts\npackage.path += \";./node_modules/?/?.lua\";\n```\n\nAlso you need to add `\"typescript-to-lua/language-extensions\"` to _tsconfig.json_ file.\n```json\n{\n    \"compilerOptions\": {\n        \"types\": [\n            \"typescript-to-lua/language-extensions\"\n        ]\n    }\n}\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaxiy01%2Ftstl-anim8","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmaxiy01%2Ftstl-anim8","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaxiy01%2Ftstl-anim8/lists"}