{"id":15546916,"url":"https://github.com/jafb321/game-life","last_synced_at":"2025-12-25T07:34:47.020Z","repository":{"id":40326546,"uuid":"389820106","full_name":"JAFB321/game-life","owner":"JAFB321","description":"Customizable Conway's \"Game of life\" cellular automat Library","archived":false,"fork":false,"pushed_at":"2025-01-02T08:39:15.000Z","size":870,"stargazers_count":14,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-21T06:58:40.532Z","etag":null,"topics":["canvas","game-of-life","npm-package","typescript"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/game-life","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/JAFB321.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,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-07-27T02:01:50.000Z","updated_at":"2025-04-09T10:19:01.000Z","dependencies_parsed_at":"2025-03-06T08:43:02.209Z","dependency_job_id":null,"html_url":"https://github.com/JAFB321/game-life","commit_stats":null,"previous_names":["jafb321/game-of-life"],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JAFB321%2Fgame-life","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JAFB321%2Fgame-life/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JAFB321%2Fgame-life/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JAFB321%2Fgame-life/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/JAFB321","download_url":"https://codeload.github.com/JAFB321/game-life/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250487955,"owners_count":21438690,"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":["canvas","game-of-life","npm-package","typescript"],"created_at":"2024-10-02T13:05:21.464Z","updated_at":"2025-12-25T07:34:46.909Z","avatar_url":"https://github.com/JAFB321.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv\u003e\n  \u003cp\u003e\n    \u003c!-- \u003cb\u003egame-life\u003c/b\u003e --\u003e\n  \u003c/p\u003e\n  \u003cp\u003e\n     \u003ci\u003eCustomizable Conway's \"Game of life\" cellular automat generator\u003c/i\u003e\n  \u003c/p\u003e\n  \u003cp\u003e\n\n[![NPM version](https://img.shields.io/npm/v/game-life?style=flat-square)](https://www.npmjs.com/package/game-life)\n[![Package size](https://img.shields.io/bundlephobia/min/game-life?style=flat-square)](https://www.npmjs.com/package/game-life)\n![npm](https://img.shields.io/npm/dt/game-life?style=flat-square)\n![GitHub](https://img.shields.io/github/license/jafb321/game-life?style=flat-square)\n![GitHub Repo stars](https://img.shields.io/github/stars/jafb321/game-life?style=social)\n[![Twitter](https://img.shields.io/twitter/follow/jafb321.svg?label=Follow\u0026style=social)](https://twitter.com/jafb321)\n\n  \u003c/p\u003e\n\u003c/div\u003e\n\n---\n\n#### Content\n\n- [Features](#features-)\n- [Install](#install-)\n- [Usage](#usage-)\n- [API](#api-)\n\n## Features ✨\n\n- Easy to use\n- Work with canvas element (cooming soon with DOM)\n- No dependencies\n- Scalable performance\n- Made with love \u003c3\n\n## Install 🐱‍💻\n\nThere are 2 ways to install it in your project:\n\n#### 1. Install npm package (ES6 Import)\n\n```bash\nnpm install game-life\n```\n\n#### 2. Or add Script CDN\n\n```html\n\u003cscript\n  crossorigin=\"anonymous\"\n  src=\"https://unpkg.com/game-life@1.2.0-b/umd/gamelife.min.js\"\n\u003e\u003c/script\u003e\n```\n\n## Usage 💡\n\nDepending on how you installed, there are two ways to use it:\n\n#### 1. ES6 Import\n\n```javascript\nimport GameLife from \"game-life\";\nconst canvas = document.querySelector(\"canvas\");\n\nconst game = GameLife(canvas);\n```\n\n#### 2. or with script CDN\n\n```javascript\nconst canvas = document.querySelector(\"canvas\");\n\nconst game = GameLife(canvas);\n```\n\n##### Result:\n\n![Game life dark demo](https://raw.githubusercontent.com/JAFB321/JAFB321/main/game-life-dark.gif)\n\n#### How to use\n\n- Drag to explore the board\n- Double click to spawn/kill cells\n- Mouse wheel to zoom in/out\n- Enter to start/pause evolution\n- +/- keys to speed up/down\n\n###### You can also pass a **default config** to the game:\n\n```javascript\nconst game = GameLife(canvas, {\n  graphics: {\n    board: { width: 1900, height: 800 },\n    colors: { background: \"#FFFFFF\", grid: \"#E0E0E0\" },\n    cells: { size: 20 },\n  },\n  game: { delay: 1000 },\n});\n```\n\n##### Result:\n\n![Game life white demo](https://raw.githubusercontent.com/JAFB321/JAFB321/main/game-life-white.gif)\n\n#### Manual actions\n\n```javascript\nconst game = GameLife(canvas);\n\ngame.bornCell({ x: 10, t: 10 }); // Spawn cell\ngame.killCell({ x: 10, y: 10 }); // Kill cell\ngame.startEvolution(); // Start\ngame.stopEvolution(); // Stop\ngame.speedUp(1.5); // Speed up 1.5x\ngame.speedDown(0.8); // Speed down 0.8x\ngame.graphics.setConfig({\n  // Change graphics config\n  colors: { background: \"#F0F0F0\", cell: \"#000000\" },\n});\n// and more\n```\n\n## API 👩‍💻\n\nCooming soon... 🚧\n\n---\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjafb321%2Fgame-life","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjafb321%2Fgame-life","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjafb321%2Fgame-life/lists"}