{"id":16847472,"url":"https://github.com/fabiosantoscode/game-ticker","last_synced_at":"2025-07-29T11:09:55.684Z","repository":{"id":57244232,"uuid":"150009409","full_name":"fabiosantoscode/game-ticker","owner":"fabiosantoscode","description":"Implements a game loop where you can register update and render functions, to be supplied with time delatas and other information.","archived":false,"fork":false,"pushed_at":"2018-09-24T17:30:47.000Z","size":4,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-02T22:41:49.553Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/fabiosantoscode.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":"2018-09-23T17:41:56.000Z","updated_at":"2018-09-24T17:30:48.000Z","dependencies_parsed_at":"2022-09-01T06:11:48.853Z","dependency_job_id":null,"html_url":"https://github.com/fabiosantoscode/game-ticker","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/fabiosantoscode/game-ticker","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fabiosantoscode%2Fgame-ticker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fabiosantoscode%2Fgame-ticker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fabiosantoscode%2Fgame-ticker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fabiosantoscode%2Fgame-ticker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fabiosantoscode","download_url":"https://codeload.github.com/fabiosantoscode/game-ticker/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fabiosantoscode%2Fgame-ticker/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267677352,"owners_count":24126313,"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","status":"online","status_checked_at":"2025-07-29T02:00:12.549Z","response_time":2574,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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-10-13T13:08:04.803Z","updated_at":"2025-07-29T11:09:55.654Z","avatar_url":"https://github.com/fabiosantoscode.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# game-ticker\nImplements a game loop where you can register update and render functions, to be supplied with time delatas and other information.\n\n## const end = require('game-ticker')({ update: () =\u003e {...}, render: () =\u003e {...}, updatesPerSecond, maxFPS})\nStarts the game ticker. Returns a function to end it.\n\nTakes the following options:\n\n - `update`: The function to call every (1000 / updatesPerSecond) milliseconds\n - `render`: The function to call after requestAnimationFrame\n - `updatesPerSecond`: The number of desired updates per second\n - `maxFPS`: The maximum allowed FPS\n\nExample:\n\n```javascript\nconst gameTicker = require('game-ticker')\n\nconst end = gameTicker({\n    update(timeInfo, dt) {\n        // do stuff with dt\n    },\n    render(timeInfo, intoNextUpdate) {\n        // do stuff with current state and intoNextUpdate for interpolation\n    },\n    updatesPerSecond: 12,\n    maxFPS: 30\n})\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffabiosantoscode%2Fgame-ticker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffabiosantoscode%2Fgame-ticker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffabiosantoscode%2Fgame-ticker/lists"}