{"id":13622557,"url":"https://github.com/brunoimbrizi/txt-shuffle","last_synced_at":"2025-04-07T13:07:54.242Z","repository":{"id":149988839,"uuid":"622560962","full_name":"brunoimbrizi/txt-shuffle","owner":"brunoimbrizi","description":"Customisable text shuffling animations.","archived":false,"fork":false,"pushed_at":"2023-10-16T15:46:45.000Z","size":210,"stargazers_count":179,"open_issues_count":0,"forks_count":6,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-31T11:05:22.775Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/brunoimbrizi.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":"2023-04-02T13:34:48.000Z","updated_at":"2025-02-07T09:09:14.000Z","dependencies_parsed_at":"2024-01-14T06:03:58.504Z","dependency_job_id":"5a5808e7-421f-49c7-b65d-e10a8e321ac9","html_url":"https://github.com/brunoimbrizi/txt-shuffle","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/brunoimbrizi%2Ftxt-shuffle","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brunoimbrizi%2Ftxt-shuffle/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brunoimbrizi%2Ftxt-shuffle/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brunoimbrizi%2Ftxt-shuffle/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/brunoimbrizi","download_url":"https://codeload.github.com/brunoimbrizi/txt-shuffle/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247657281,"owners_count":20974345,"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":[],"created_at":"2024-08-01T21:01:21.061Z","updated_at":"2025-04-07T13:07:54.223Z","avatar_url":"https://github.com/brunoimbrizi.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"txt-shuffle\n===========\n\nCustomisable text shuffling animations.\n\n[![txt-shuffle-demo](https://user-images.githubusercontent.com/880280/229361502-c8c1bf0a-8da8-4d1d-ab3a-b3fde4cacae7.gif)](https://brunoimbrizi.github.io/txt-shuffle/demo/animations)\n\n\n## Install\n```\nnpm install txt-shuffle\n```\n\n## Example\n```js\nconst { shuffle } = require('txt-shuffle');\n\nshuffle({ text: 'Hello world', fps: 5, onUpdate: (output) =\u003e {\n  console.log(output);\n} });\n```\nOutput:\n\n```\nkE}3 7\nHep|\u003e |dJ \nHello UAo_\nHello worlz\nHello world\n```\n\n## Demo\n\n- [Demo: Animations](https://brunoimbrizi.github.io/txt-shuffle/demo/animations)\n- [Demo: Multiline (Canvas)](https://brunoimbrizi.github.io/txt-shuffle/demo/multiline)\n\n## API\n\n#### `shuffle(options)`\nStarts a text shuffle animation in two tiers.\nFirst shuffling through random characters and then resolving into the target text.\n\n- `options`\n\t- `text` (default `''`) text string\n\t- `duration` (default `1`) duration of shuffle/resolve animation in seconds\n\t- `delay` (default `0`) delay to start shuffling\n\t- `delayResolve` (default `0.2`) delay to start resolving\n\t- `fps` (default `60`) framerate\n\t- `glyphs` (see below) glyphs to use in the shuffle animation\n\t- `animation` (default `show`) possible values: `show`, `hide`, `stay`\n\t- `direction` (default `right`) possible values: `left`, `right`, `random`\n\t- `onUpdate` callback function, returns the output string\n\t- `onComplete` callback function, returns the output string\n\n`glyphs` default \n```\n !#$\u0026%()*+0123456789:;\u003c=\u003e?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[]^_`abcdefghijklmnopqrstuüvwxyz{|}~\n```\n\n## License\n\nMIT, see [LICENSE](LICENSE) for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrunoimbrizi%2Ftxt-shuffle","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbrunoimbrizi%2Ftxt-shuffle","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrunoimbrizi%2Ftxt-shuffle/lists"}