{"id":19415981,"url":"https://github.com/ondras/fastiles","last_synced_at":"2025-04-24T12:33:15.827Z","repository":{"id":52488548,"uuid":"308587334","full_name":"ondras/fastiles","owner":"ondras","description":"Ultra-fast bitmap font renderer","archived":false,"fork":false,"pushed_at":"2021-06-30T18:55:51.000Z","size":47,"stargazers_count":18,"open_issues_count":1,"forks_count":5,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-05-01T21:14:22.078Z","etag":null,"topics":["library","webgl"],"latest_commit_sha":null,"homepage":"https://observablehq.com/@ondras/fastiles","language":"TypeScript","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/ondras.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}},"created_at":"2020-10-30T09:48:19.000Z","updated_at":"2024-03-03T17:19:52.000Z","dependencies_parsed_at":"2022-09-22T05:33:50.192Z","dependency_job_id":null,"html_url":"https://github.com/ondras/fastiles","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/ondras%2Ffastiles","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ondras%2Ffastiles/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ondras%2Ffastiles/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ondras%2Ffastiles/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ondras","download_url":"https://codeload.github.com/ondras/fastiles/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223954748,"owners_count":17231187,"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":["library","webgl"],"created_at":"2024-11-10T12:45:09.436Z","updated_at":"2024-11-10T12:45:10.079Z","avatar_url":"https://github.com/ondras.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# fastiles\n\nLibrary for rendering colorized bitmap fonts. Very fast, suitable for applications where the whole scene needs frequent redrawing. Open source, released under the terms of the MIT license.\n\n## Features\n\n  - Handles bitmap fonts of square and non-square aspect ratios\n  - Supports up to 65536 glyphs\n  - Updates are batched via `requestAnimationFrame`\n  - Color palettes (foreground and background) up to 256 colors\n  - Written in TypeScript\n\n## Speed\n\n  - WebGL (WebGL 2, to be precise)\n  - No per-render memory allocations\n  - Only one GL draw call for the whole scene\n  - Minimized JS data transfer (data set only for [Provoking vertices](https://www.khronos.org/opengl/wiki/Primitive#Provoking_vertex))\n  - Thousands of tiles rendered at 60 fps\n\n## Palettes\n\nGlyphs rendered via *fastiles* are using indexed colors. Foreground and background are specified as indices to a current *palette*. A palette can hold up to 256 colors. There are several predefined palettes and you can create your own. Modifying palette values and switching palettes is very fast.\n\n## Show me the code\n\n```js\nimport { Scene, Palette } from \"./fastiles/fastiles.js\";\n\nlet options = {\n\ttileCount: [80, 25],     // tiles\n\ttileSize: [12, 12],\n\tfont: ...                // image or canvas\n}\nlet scene = new Scene(options)\ndocument.body.appendChild(scene.node)\n\n\n// basic drawing\nscene.draw(\n\t[0, 0], // position\n\t64,     // glyph index\n\t1,      // foreground color index\n\t0       // background color index\n)\n\n\n// palette change\nlet newPalette = Palette.xterm256()\nscene.palette = newPalette\n\n\n// adjusting existing palette\nnewPalette.set(1, \"orange\")\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fondras%2Ffastiles","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fondras%2Ffastiles","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fondras%2Ffastiles/lists"}