{"_id":"@2003scape/rsc-world-map","_rev":"1-32a1e8113d876a3361fbd279ff521d42","name":"@2003scape/rsc-world-map","dist-tags":{"latest":"1.0.0"},"versions":{"1.0.0":{"name":"@2003scape/rsc-world-map","version":"1.0.0","description":"interactive world map for runescape classic","main":"./build/index.js","scripts":{"build-dev":"browserify -t brfs example.js | indexhtmlify > example.html","build":"browserify -t brfs -p tinyify ./src/index.js --standalone rsc-world-map > ./build/index.js","build-example":"browserify -t brfs -p tinyify example.js | indexhtmlify > example.html"},"repository":{"type":"git","url":"git+https://github.com/2003scape/rsc-world-map.git"},"keywords":["runescape","classic","rsc","world","map","landscape"],"author":{"name":"2003Scape Team"},"license":"AGPL-3.0+","bugs":{"url":"https://github.com/2003scape/rsc-world-map/issues"},"homepage":"https://github.com/2003scape/rsc-world-map#readme","devDependencies":{"browserify":"^17.0.0","tinyify":"^3.0.0","brfs":"^2.0.2"},"gitHead":"70f488a9e84df1991f12743101eefedaa5fcd8bc","_id":"@2003scape/rsc-world-map@1.0.0","_nodeVersion":"14.14.0","_npmVersion":"6.14.8","_npmUser":{"name":"misterhat","email":"misterhat144@gmail.com"},"maintainers":[{"name":"misterhat","email":"misterhat144@gmail.com"}],"dist":{"integrity":"sha512-dAfmCGYt6GLubQrwnjlUwlS+fA9zZBXtJLiurFmc1iCGGZB+S9Q04r0kVIVXHS0fYwhlLriUYgSGW/SwSBDqWg==","shasum":"fa3a370d9b7ad311162ebbc399bf50f461a0667c","tarball":"https://registry.npmjs.org/@2003scape/rsc-world-map/-/rsc-world-map-1.0.0.tgz","fileCount":72,"unpackedSize":3177970,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf/dklCRA9TVsSAnZWagAAsJMP/0/fiL0BQBrao3XV5XuW\njT9TvZ7OGQts63mkSXmF4MVO1I5eevUTSnmlHk0hRiIPmnDU865V273sQD3J\npZM6uUumGSC3HhSBkG+NugyLTsWNbdFcZcQXp6Yng98HWvrItLV0RiLG6nrO\nW7IbXipb7ZpPNDnwSVLUliU20N1qUEfsL1jglMS889uBO7+D2Bbrs6KUBF9d\nlG8wYoXObNW5PpUr22/Ow/Inzwn27PlrKCN5c+k42QRKiSbkpM1W1HSvLPXJ\nELTVaxMH+jG7v1CLxSoViH3r6IISFFBjk4VXnMnUUTvFRx2Hh1dgEiWxn16Z\n80RvAWBjkbt81PXc1nlvqCqXbG9xbVgLErSN9659p8uM18n9NXi5zNLRUXHn\nb0VxjB7/FVzRN39oBJvyMkQwAqMqj8xqd8SCZsNM5Xx7/wwgwWB3YuWcKULd\nLVXbROma9V3TVGXf8oqnfqMAPfHHtnL1Ty3t5nJsNnhthHhQM6gyWuB+qGzE\ncSU+EOfYoLleKZD2fY11e5S124W+HCrVlEwePkYNurZrVszfR6iD9sDiBx1E\nOmb9pu96NGJbsvmzBBI+Ii/LhdzHe2XCWCmhPuLgwrDnf3HT+bfAjxY1tdCg\n8qAuIgz7cHlaIE1I6dXjIR2VuUjgpFb7DreSN6Um/TEGx8iI/TJGM1ml1aex\nXa+z\r\n=s0ad\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCwXwNY1oKeBVpgiVQQ/IHitJCkiTuBEJsaRuUfrkGDsgIhAPCq7cA/PdN3qDPemJhaknt5ydlxWvQ2g9P3jxaSueB1"}]},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/rsc-world-map_1.0.0_1610471717290_0.5406959402106326"},"_hasShrinkwrap":false}},"time":{"created":"2021-01-12T17:15:17.086Z","1.0.0":"2021-01-12T17:15:17.549Z","modified":"2022-04-04T10:34:59.299Z"},"maintainers":[{"name":"misterhat","email":"misterhat144@gmail.com"}],"description":"interactive world map for runescape classic","homepage":"https://github.com/2003scape/rsc-world-map#readme","keywords":["runescape","classic","rsc","world","map","landscape"],"repository":{"type":"git","url":"git+https://github.com/2003scape/rsc-world-map.git"},"author":{"name":"2003Scape Team"},"bugs":{"url":"https://github.com/2003scape/rsc-world-map/issues"},"license":"AGPL-3.0+","readme":"# rsc-world-map\ninteractive world map for runescape classic.\n\n![](./doc/screenshot.png)\n\n*[Watch a video demonstration](https://www.youtube.com/watch?v=9F10vvMgC-o)*\n\nfeatures:\n* mobile and tablet support with touch controls (still WIP)\n* works with any *height x width* >= `300px x 300px`\n* four levels of zoom with crisp, pixelated landscape and anti-aliased text\n* overview box for quick navigation across ends of the map\n* go up and down plane levels to view dungeons and upstairs areas\n* search box with automatic suggestions\n* toggle labels, object and points of interest\n* native javascript with zero framework dependencies, just import and specify a\nblock container element\n* zero additional HTTP requests - everything packed inside the javascript\n\n## install\n\n    $ npm install @2003scape/rsc-world-map\n\n## usage\n```javascript\nconst WorldMap = require('@2003scape/rsc-world-map');\n\nconst container = document.createElement('div');\ncontainer.style.height = '300px';\ncontainer.style.width = '300px';\ncontainer.style.border = '1px solid #f0f';\n\nconst worldMap = new WorldMap({ container });\n\nworldMap.init().then(() => {\n    console.log('loaded');\n});\n\ndocument.body.style.background = '#000';\ndocument.body.appendChild(container);\n```\n\n## api\n\n### worldMap = new WorldMap({ container, labels?, points?, objects? })\ncreate a new worldMap instance.\n\n`container` is any block element.\n\nthe rest of the properties are optional, and defaulted to official runescape\nclassic entries (located in `./res`):\n\n`labels` are used for the text overlay on the map:\n\n```javascript\n{\n    \"text\": \"Kingdom of\\nKandarin\",\n    \"x\": 7705,\n    \"y\": 6821,\n    \"size\": 12,\n    \"align\": \"center\" || \"left\",\n    \"bold\": true, // optional\n    \"colour\": \"rgb(254, 165, 0)\" || \"#ff00ff\" || \"red\" // optional\n}\n```\n\n`points` are used for the point-of-interest symbols on the map. there's a list\nof point types in [`./res/key.json`](/res/key.json):\n\n```javascript\n{ \"type\": \"altar\", \"x\": 7253, \"y\": 7272 }\n```\n\nthe coordinates for points and labels are absolute.\n\n`objects` are used for the *+* symbols peppered over the map:\n\n```javascript\n{ \"id\": 0, \"x\": 345, \"y\": 538 }\n```\n\nthe coordinates for objects are in-game coordinates from\n[@2003scape/rsc-data](https://github.com/2003scape/rsc-data/blob/master/locations/objects.json)\n(note that `direction` is not needed here). trees (id 0) are coloured green\nwhile the rest are orange.\n\n### worldMap.init()\nload the images, attach the event handlers and populate the container element.\n\n## static map images\nto generate a static PNG of the world map, use the CLI tool in\n[@2003scape/rsc-landscape](https://github.com/2003scape/rsc-landscape#cli-usage)\n\nyou can also use this to generate the `plane-x.png` images in [`./res/`](/res/).\n\n## license\nCopyright (C) 2021  2003Scape Team\n\nThis program is free software: you can redistribute it and/or modify\nit under the terms of the GNU Affero General Public License as\npublished by the Free Software Foundation, either version 3 of the\nLicense, or (at your option) any later version.\n\nThis program is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\nGNU Affero General Public License for more details.\n\nYou should have received a copy of the GNU Affero General Public License\nalong with this program.  If not, see http://www.gnu.org/licenses/.\n","readmeFilename":"README.md"}