{"id":25940720,"url":"https://github.com/2003scape/rsc-sprite-generator","last_synced_at":"2025-06-25T08:35:47.830Z","repository":{"id":47382427,"uuid":"214883301","full_name":"2003scape/rsc-sprite-generator","owner":"2003scape","description":"generate entity sprites for NPCs/players for runescape classic","archived":false,"fork":false,"pushed_at":"2021-09-02T00:26:33.000Z","size":1052,"stargazers_count":6,"open_issues_count":2,"forks_count":5,"subscribers_count":3,"default_branch":"master","last_synced_at":"2023-03-03T11:24:40.897Z","etag":null,"topics":["rsc","runescape","sprites"],"latest_commit_sha":null,"homepage":"","language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/2003scape.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":"2019-10-13T19:46:50.000Z","updated_at":"2022-08-21T23:08:40.000Z","dependencies_parsed_at":"2022-08-22T22:31:52.440Z","dependency_job_id":null,"html_url":"https://github.com/2003scape/rsc-sprite-generator","commit_stats":null,"previous_names":[],"tags_count":null,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/2003scape%2Frsc-sprite-generator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/2003scape%2Frsc-sprite-generator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/2003scape%2Frsc-sprite-generator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/2003scape%2Frsc-sprite-generator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/2003scape","download_url":"https://codeload.github.com/2003scape/rsc-sprite-generator/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241787669,"owners_count":20020136,"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":["rsc","runescape","sprites"],"created_at":"2025-03-04T05:18:38.660Z","updated_at":"2025-03-04T05:18:39.232Z","avatar_url":"https://github.com/2003scape.png","language":"HTML","readme":"# rsc-sprite-generator\n![](./doc/avatar-1.png?raw=true) ![](./doc/avatar-2.png?raw=true) \n![](./doc/avatar-3.png?raw=true) ![](./doc/avatar-4.png?raw=true) \n![](./doc/avatar-5.png?raw=true) \n\ngenerate entity sprites used for NPCs and players in runescape classic.\n\n## install\n\n    $ npm install rsc-sprite-generator\n\n## usage (browser or server)\n\n```javascript\nconst fs = require('fs').promises;\nconst spriteGenerator = require('rsc-sprite-generator');\n\nconst HEADS = [0, 3, 5, 6, 7];\n\n(async () =\u003e {\n    try {\n        const avatar = await spriteGenerator.player({\n            angle: Math.floor(Math.random() * (14 + 3)),\n            head: HEADS[Math.floor(Math.random() * HEADS.length)],\n            body: Math.random() \u003e= 0.5 ? 4 : 1,\n            colours: { \n                hair: Math.floor(Math.random() * 10),\n                top: Math.floor(Math.random() * 15), \n                legs: Math.floor(Math.random() * 15), \n                skin: Math.floor(Math.random() * 4)\n            },\n            wielding: [81]\n        });\n\n        if (typeof window !== 'undefined') {\n            document.body.appendChild(avatar);\n        } else {\n            await fs.writeFile('./avatar.png', avatar.toBuffer());\n        }\n    } catch (e) {\n        console.error(e);\n    }\n})();\n```\n\n## license\nCopyright 2019  2003Scape Team\n\nThis program is free software: you can redistribute it and/or modify it under\nthe terms of the GNU Affero General Public License as published by the\nFree Software Foundation, either version 3 of the License, or (at your option)\nany later version.\n\nThis program is distributed in the hope that it will be useful, but WITHOUT ANY\nWARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A\nPARTICULAR PURPOSE. See the GNU Affero General Public License for more details.\n\nYou should have received a copy of the GNU Affero General Public License along\nwith this program. If not, see http://www.gnu.org/licenses/.","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F2003scape%2Frsc-sprite-generator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F2003scape%2Frsc-sprite-generator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F2003scape%2Frsc-sprite-generator/lists"}