{"_id":"2d-bounding-box","_rev":"1-aca1f5e932730b956eeb0cac1a51d332","name":"2d-bounding-box","dist-tags":{"latest":"0.0.1"},"versions":{"0.0.1":{"name":"2d-bounding-box","version":"0.0.1","description":"A simple 2d bounding box class. Intersections collisions, for use in 2d games","main":"index.js","repository":{"type":"git","url":"git+https://github.com/tschallacka/npm-2d-bounding-box.git"},"scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"keywords":["2d","bounding","box","bb","aabb"],"author":{"name":"Tschallacka"},"license":"MIT","devDependencies":{"@babel/core":"^7.9.0","@babel/plugin-transform-arrow-functions":"^7.8.3","@babel/preset-env":"^7.9.0","autoprefixer":"^9.7.5","babelify":"^10.0.0","browserify":"^16.5.0","cssnano":"^4.1.10","gulp":"^4.0.2","gulp-clean-css":"^4.3.0","gulp-less":"^4.0.1","gulp-postcss":"^8.0.0","gulp-rename":"^2.0.0","gulp-sourcemaps":"^2.6.5","gulp-strip-css-comments":"^2.0.0","gulp-uglify":"^3.0.2","vinyl-buffer":"^1.0.1","vinyl-source-stream":"^2.0.0"},"gitHead":"1f4ca99976cbce1f91307d5e91e42b2c46f31350","bugs":{"url":"https://github.com/tschallacka/npm-2d-bounding-box/issues"},"homepage":"https://github.com/tschallacka/npm-2d-bounding-box#readme","_id":"2d-bounding-box@0.0.1","_nodeVersion":"10.16.2","_npmVersion":"6.9.0","dist":{"integrity":"sha512-xmBQvPHCVD9iSu0zvpc42pezNr0CMwnO7N/IWkJa12pT8J6wBdYqaXU5tem+U/YTXu/lWJwJE2hMbOdiZ0XC9g==","shasum":"2ffeac2964df17778def389fede3b664c489260d","tarball":"https://registry.npmjs.org/2d-bounding-box/-/2d-bounding-box-0.0.1.tgz","fileCount":11,"unpackedSize":34745,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJefTHQCRA9TVsSAnZWagAA1fQP/R0A4jKhDIdBUu1e2FAq\nfMAMywzDKhIeij2eXPDhz1GDKD3JWtlBr7rQBf1b4pZJ4M0ytfvg38glQQXm\nRiFMBwM9GG3XhHHdmkvUhFiCPOm+qUypEio0Opleca3SIWGrV3mUkEUUQ3um\n+4ruz8K4uN5S4zC+Ktk9v2hib1FRGieBmFEChkB5iwfqY5IdXZhktoObtNYY\nhTrcxDLo7o/VwH0Ngami4cNzbquwz04L0vF+9AMYs0SKOumvks5+5k+MxTmU\nFLDPRV/BAst1jpawcX2cK3gq3JptNcxegvTWIUYXxa8/NM5I6ugfKBozBq9s\neVLJBA6tSkbrLnoHJ4iU7L76UMZJn712C8kI/30f/Jq+7m2irKKODifa2iFA\nzo/QLrFY45kIAijolUkO5XODGnohNqeZ5eJNW0AqC2iT199kVSS+WSglelAl\nUDZ4buh/2Vu5Mrq13N9mGIRN3DcMdLo/lc40/kBLrZ1gG+tnSx+2Ed7PxmeA\nDjYCHhkzqd6cZ/46KfNSQj0UfysFhvp6GDXItJcBMb9m1+YdyJ24XNieW4yw\nDr51hK9Szv6+kEQHb9SlhG1e6uhLL4ErAWuD9JQOadKtj1YXGlpRa800w8qH\n0BLZz/Yu4MTC2KvYQdOF1jID/pkgX7MKHLlJCbA1Ja9mFw04wnQaZG+sFVPD\n4hqx\r\n=7Sfp\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGCqm1SX9t3ioPWPosZ/HBF9hFwRB72VLCg9t00o5/MKAiEAhcWogaOHR+9m4FzBVeFXEDdi1M7BPjnYzB+6AYX0upc="}]},"maintainers":[{"name":"tschallacka","email":"tschallacka@outlook.com"}],"_npmUser":{"name":"tschallacka","email":"tschallacka@outlook.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/2d-bounding-box_0.0.1_1585263055763_0.6756638402936921"},"_hasShrinkwrap":false}},"time":{"created":"2020-03-26T22:50:55.763Z","0.0.1":"2020-03-26T22:50:55.946Z","modified":"2022-04-04T10:18:52.695Z"},"maintainers":[{"name":"tschallacka","email":"tschallacka@outlook.com"}],"description":"A simple 2d bounding box class. Intersections collisions, for use in 2d games","homepage":"https://github.com/tschallacka/npm-2d-bounding-box#readme","keywords":["2d","bounding","box","bb","aabb"],"repository":{"type":"git","url":"git+https://github.com/tschallacka/npm-2d-bounding-box.git"},"author":{"name":"Tschallacka"},"bugs":{"url":"https://github.com/tschallacka/npm-2d-bounding-box/issues"},"license":"MIT","readme":"### simple 2d bounding box library\n\nNote, this is still in alpha and may contain lots and lots of bugs.\nPlease make an issue if you encounter a bug.\n\nTo use it:\n\n```javascript\nlet BoundingBox = require('2d-bounding-box');\n\nlet bb_create = new BoundingBox( min_x, min_y, max_x, max_y, [origin_type]);\n```\n\nSometimes you already have an entity with a certain width and height, and you wish\nto create a bounding box based on the dimensions of this creature without having to\ncalculate the correct positions yourself.\n\nImportant is for these calculations that you define where the origin of your \nentity is. Is it smack in the middle of the entity that decides the position \nor anywhere around the entity, bottom left for example. \n\n```javascript\nlet bb_from_entity = BoundingBox.create( origin_type, position_x, position_y, width, height);\n```\n\nFor the origin type there are 9 possible options:\n\n```javascript\nBoundingBox.ORIGIN_CENTER;\nBoundingBox.ORIGIN_LEFT_BOTTOM;\nBoundingBox.ORIGIN_RIGHT_BOTTOM;\nBoundingBox.ORIGIN_CENTER_BOTTOM;\nBoundingBox.ORIGIN_LEFT_CENTER;\nBoundingBox.ORIGIN_LEFT_TOP;\nBoundingBox.ORIGIN_CENTER_TOP;\nBoundingBox.ORIGIN_RIGHT_TOP;\nBoundingBox.ORIGIN_RIGHT_CENTER;\n```\n\nIf you need more options, you will have to calculate the offsets yourself and\ninstantiate the bounding box via the `new BoundingBox(...)` method.\n\nPlease see the [demo_basic_bb.html](demo/demo_basic_bb.html) file in the demo directory for examples.\n\nIf you wish to fiddle with the [demo_basic.js](demo/js/demo_basic.js) file recompile it with\n`gulp less browserify` before refreshing the demo_basic_bb.html file. \n","readmeFilename":"README.md"}