{"id":25940724,"url":"https://github.com/2003scape/rsc-sprites","last_synced_at":"2025-10-12T14:41:12.890Z","repository":{"id":44685745,"uuid":"263097284","full_name":"2003scape/rsc-sprites","owner":"2003scape","description":"🖼️ (de)serialize runescape classic entity, ui and texture images","archived":false,"fork":false,"pushed_at":"2022-11-14T23:34:28.000Z","size":581,"stargazers_count":5,"open_issues_count":2,"forks_count":4,"subscribers_count":3,"default_branch":"master","last_synced_at":"2023-03-03T11:24:40.725Z","etag":null,"topics":["bzip2","item","javascript-game","npc","png","rsc","runescape","sprites"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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":"COPYING","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-05-11T16:27:17.000Z","updated_at":"2022-10-10T22:36:17.000Z","dependencies_parsed_at":"2023-01-21T16:45:20.201Z","dependency_job_id":null,"html_url":"https://github.com/2003scape/rsc-sprites","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-sprites","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/2003scape%2Frsc-sprites/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/2003scape%2Frsc-sprites/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/2003scape%2Frsc-sprites/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/2003scape","download_url":"https://codeload.github.com/2003scape/rsc-sprites/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241787682,"owners_count":20020139,"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":["bzip2","item","javascript-game","npc","png","rsc","runescape","sprites"],"created_at":"2025-03-04T05:18:39.959Z","updated_at":"2025-10-12T14:41:12.801Z","avatar_url":"https://github.com/2003scape.png","language":"JavaScript","readme":"# rsc-sprites\n(de)serialize runescape classic entity, ui and texture images.\n\nIMAGE COLLAGE\n\n## install\n\n    $ npm install @2003scape/rsc-sprites\n\n## example\n```javascript\n```\n\n## api\n### entitySprites = new EntitySprites({ animations })\ncreate a new entity sprite (de)serializer (for entity jag and mem files). these\nare collections of frames for monster, character and equipment graphics.\n\n### entitySprites.loadJag(buffer)\n### entitySprites.loadMem(buffer)\nprepare `.jag` and `.mem` buffers to be parsed. any sprites loaded with\n`entitySprites.loadMem` will have `sprite.members = true`.\n\n### entitySprites.parseArchives()\npopulate `entitySprites.sprites` with frames of\n[canvas](https://github.com/Automattic/node-canvas) objects.\n\n### entitySprites.getAnimationSprite(id, overlay?, skinColour?)\n\n### entitySprites.toJag()\n### entitySprites.toMem()\nreturn an entities jag/mem archive.\n\n### mediaSprites = new MediaSprites({ items, projectileSprite }, ui?)\ncreate a new media sprite (de)serializer. these are images of interface items\n(buttons, arrows) and inventory items. `ui` specifies the filenames, sprite\noffsets and amounts for interface sprites\n[hard-coded into the client](\nhttps://github.com/2003scape/rsc-client/blob/master/src/mudclient.js#L4350):\n\n```javascript\n    // refers to \"splat.dat\"\n    splat: {\n        offset: 11,\n        sprites: 3\n    },\n    // etc.\n```\n\nthis defaults to the interface sprites found in `media58.jag` for\nmudclient204 (`./res/media-offsets.json`).\n\n### mediaSprites.loadArchive(buffer)\nload and prepare a media jag archive buffer.\n\n### mediaSprites.getSpriteById(id)\nget a media sprite canvas by the id used in the client.\n\n### mediaSprites.getSpriteByItemId(itemId)\nget a colourized item sprite canvas based on its id (index in `config.items`).\n\n## license\nCopyright 2020  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/.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F2003scape%2Frsc-sprites","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F2003scape%2Frsc-sprites","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F2003scape%2Frsc-sprites/lists"}