{"id":13633018,"url":"https://github.com/ivansergeev/gfxp","last_synced_at":"2026-02-20T18:34:13.804Z","repository":{"id":44931624,"uuid":"267327813","full_name":"ivansergeev/gfxp","owner":"ivansergeev","description":"GFXP is a useful lib \u0026 tool for working with patterns for Playdate console","archived":false,"fork":false,"pushed_at":"2024-07-05T10:51:05.000Z","size":1878,"stargazers_count":60,"open_issues_count":0,"forks_count":3,"subscribers_count":5,"default_branch":"master","last_synced_at":"2024-11-09T02:32:52.751Z","etag":null,"topics":["gfxp","gfxp-editor","gfxp-lib","lua","panic","pattern","pattern-lib","patterns","playdate"],"latest_commit_sha":null,"homepage":"https://dev.crankit.app/tools/gfxp/","language":"Lua","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/ivansergeev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"license.txt","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":"2020-05-27T13:32:58.000Z","updated_at":"2024-11-02T22:03:10.000Z","dependencies_parsed_at":"2024-04-16T11:52:53.270Z","dependency_job_id":"3bf9ca8e-bb82-4517-92b0-ae5cc3846ef3","html_url":"https://github.com/ivansergeev/gfxp","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/ivansergeev%2Fgfxp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ivansergeev%2Fgfxp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ivansergeev%2Fgfxp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ivansergeev%2Fgfxp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ivansergeev","download_url":"https://codeload.github.com/ivansergeev/gfxp/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249479043,"owners_count":21279184,"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":["gfxp","gfxp-editor","gfxp-lib","lua","panic","pattern","pattern-lib","patterns","playdate"],"created_at":"2024-08-01T23:00:24.588Z","updated_at":"2026-02-20T18:34:13.767Z","avatar_url":"https://github.com/ivansergeev.png","language":"Lua","funding_links":[],"categories":["Game Development"],"sub_categories":["Programming Frameworks \u0026 Languages"],"readme":"# GFXP\n\nGFXP is a small library with a collection of patterns for Panic Playdate console.\n\nOnline version: [GFXP Editor](https://dev.crankit.app/tools/gfxp/)\n\nPlaydate app: [GFXP Viewer](https://crankit.app/app/1008/gfxp-viewer/), developed by Foster Douglas.\n\nFor use in C SDK projects: [C library](https://gist.github.com/aschuhardt/ade117b95bb3f2ca99a608224165d4d4), by Addison Schuhardt.\n\nA GFXP helper class for use with PlaydateKit: [Swift class](https://gist.github.com/mgrider/22044c4f3b05116c8478f038062338c3), by Martin Grider.\n\n### Types of patterns that are included in the GFXP lib\n\n- Grayscale\n- Dots\n- Crosses\n- Vertical Lines\n- Horizontal Lines\n- Diagonal Lines\n- Waves\n- Grid\n- Bricks\n- Rects\n- Flakes\n- Decor\n- Noise\n- Emojis\n- Misc\n\n\n### Demo\n\nBuild project from `Source` folder and run `GFXP.pdx` on your Playdate console or in your Playdate Simulator.\n\n\n### Using GFXP lib\n\nBefore you begin, import `gfxp.lua` from `Source/lib` folder into the source folder of your project.\n\n```\nimport 'lib/gfxp'\n```\n\nIt is enough to do this once, for example in `main.lua`\n\n\n### Use cases GFXP lib\n\nThe library includes 136 ready-made patterns (w/o inverted versions). To use any of them, all you need is to indicate its name.\nIn any file with your code:\n\n###### Option 1:\nDeclare a local variable\n```\nlocal gfxp \u003cconst\u003e = GFXP\n```\nthen specify the name of the pattern\n```\ngfxp.set('gray')\n```\nor\n```\ngfxp.set('dot-1')\n```\nor the inverted version (with transformation), just add an `i` at the end, for example:\n```\ngfxp.set('dot-1i')\n```\nor a custom pattern table\n```\ngfxp.set({0x55, 0xAA, 0x55, 0xAA, 0x55, 0xAA, 0x55, 0xAA})\n```\nor with mask\n```\ngfxp.set({0x55, 0xAA, 0x55, 0xAA, 0x55, 0xAA, 0x55, 0xAA, 170, 85, 170, 85, 170, 85, 170, 85})\n```\n\n\nAvailable transformation flags for named patterns:\n\n`i` - Invert\n\n`r` - Random\n\n`t` - Transparency\n\n###### Option 2: set only\nDeclare a local variable\n```\nlocal gfxp \u003cconst\u003e = GFXP.set\n```\nthen specify the name of the pattern\n```\ngfxp('dot-1')\n```\nor a custom pattern table\n```\ngfxp({0x7F, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF})\n```\n\n###### Option 3: lib only\nDeclare a local variable\n```\nlocal gfxpLib \u003cconst\u003e = GFXP.lib\n```\nthen specify the name of the pattern\n```\nplaydate.graphics.setPattern(gfxpLib.gray)\n```\nor\n```\nplaydate.graphics.setPattern(gfxpLib['dot-1'])\n```\n\n\n### License\n\nThe MIT License (MIT)\n\n### Trademarks\n\n[Playdate](https://play.date/) is a trademark of [Panic](https://panic.com/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fivansergeev%2Fgfxp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fivansergeev%2Fgfxp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fivansergeev%2Fgfxp/lists"}