{"_id":"@amatiasq/geometry","_rev":"6-f4bfc9167ad6f2ed8890c4e42c6a6fbf","name":"@amatiasq/geometry","dist-tags":{"latest":"0.3.1"},"versions":{"0.1.0":{"name":"@amatiasq/geometry","version":"0.1.0","keywords":["geometry","rectangle","circle","vector"],"author":{"name":"A. Matías Quezada","email":"amatiasq@gmail.com"},"license":"MIT","_id":"@amatiasq/geometry@0.1.0","maintainers":[{"name":"amatiasq","email":"amatiasq@gmail.com"}],"homepage":"https://github.com/amatiasq/npm-libraries#readme","bugs":{"url":"https://github.com/amatiasq/npm-libraries/issues"},"dist":{"shasum":"5b317ee1b7ff3d65f7e79fdde736238bee0062a2","tarball":"https://registry.npmjs.org/@amatiasq/geometry/-/geometry-0.1.0.tgz","fileCount":12,"integrity":"sha512-15EYmZz+ipARZukm9k4pbWqx2KBCoSkPWI/6KlvukB7wPpI+mukvghgT7euGPzhem7fyZPJtSoiZ8w92TxT/mA==","signatures":[{"sig":"MEUCIQDqxIqx3zfn4mSycSVb+QnAc+mFSa2jNvj3mAIh0iHYAwIgUDJgYw3H0pzB1yEEHlmOjiF5X3lmSoAKHtpLZDEl0k4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":25601,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJckECXCRA9TVsSAnZWagAADaAP/jiQ4TnnG0ex7W22KhoD\nDiSH/ZTthDNR6C7Ov0CYrXqThlhLFZroq48KL/ygUgwxPr4Kcok2AiAxZ2gZ\njky/TcvRL775EjJHpOLLf/P+FUUPSkRID2O+qYBsqHMZCTksNdvA/mpXh5lt\n8r3zfdYob/jpnhefifaQWYggBAyVyMOciHdQwbMCj5rNjlQ4pedWbHhZMtPl\nt3nBVU4fxSidUp3NKbempfobe0qWAO9vhqkSrk1Xi5UOtWvDsyyhXzq4/JyV\n5sMGEez2MRDWMPDDth54Ihad8xZVM6qsU2krrfc8Xf6GKiuHz+qXnkGzDW4L\ncvX+ID63LwfWN1V+jQhVoLK5l0K2pw0oTDwxXB2ymRy7tzIkYIpB/MSYTNs4\nY/57jJRMqIxCSZOUXVYLoTmjPsxkensk+iTbBEXdP1MMpi/kvbyY5OHU53Bs\nkSkTd+2W4PTSv2RYFkzlN8dnHnR+ycQ8PlHlHySnskmvf9lg6PyuHIX6VHQ2\n3MPd3lw8z51F3uH/xzogn8tkIkBIG57sJkUcAJghbO9tB8ePqxjm1z3nVvs7\nWNb7Nkx4oTetV6z0Kl4y7eS+g/IuNjQPMeusbDxJE5YamlDPGl9ffnn5Xf8F\n7Modc2dyIQi9ESxQSTprFfM3wHmN7oBWWcbpSIZhkxzNKmrRbtgBplPM4prP\ndvtC\r\n=an32\r\n-----END PGP SIGNATURE-----\r\n"},"main":"es5/index.js","esnext":"es2018/index.js","private":false,"scripts":{"t":"jest --watch","tsc":"tsc","test":"jest","clear":"rm -r .cache dist es5 es2018 || exit 0","start":"parcel demo/index.html","compile":"npm run compile:es5 && npm run compile:es2018","compile:es5":"tsc --build tsconfig.es5.json","compile:es2018":"tsc --build tsconfig.json"},"_npmUser":{"name":"amatiasq","email":"amatiasq@gmail.com"},"prettier":{"singleQuote":true,"trailingComma":"all"},"importSort":{".ts":{"style":"module-compact","parser":"typescript"}},"repository":{"url":"git+https://github.com/amatiasq/npm-libraries.git","type":"git"},"_npmVersion":"6.4.1","description":"Geometry utilities","directories":{"src":"src","test":"__tests__"},"main.esnext":"es2018/index.js","_nodeVersion":"10.15.2","browserslist":["last 1 Chrome version"],"dependencies":{"@amatiasq/util":"^0.1.0"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/geometry_0.1.0_1552957590696_0.16164690670366144","host":"s3://npm-registry-packages"}},"0.2.0":{"name":"@amatiasq/geometry","version":"0.2.0","author":"A. Matías Quezada <amatiasq@gmail.com>","license":"MIT","_id":"@amatiasq/geometry@0.2.0","maintainers":[{"name":"amatiasq","email":"amatiasq@gmail.com"}],"dist":{"shasum":"ca4fb304f86a409fee04e8e6fe9a2fb5fa9a7d90","tarball":"https://registry.npmjs.org/@amatiasq/geometry/-/geometry-0.2.0.tgz","fileCount":40,"integrity":"sha512-9T//drrwiNdl9QL4+HI67yJ88ODo9nuhnLnK6OlLUHOCrCgLkUTlutQEd9eTLVsfsGt/7vCXLkhIjUTxCBMYZw==","signatures":[{"sig":"MEQCIH2rGKnk58ZZt7/E3xO1eVjd+u2guATtMbAOvWdH2GoHAiAna5mbQ9Gt/ql0IKXZnCoVQU3UtS3mya56k/hbGm4vGw==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":69620},"type":"module","shasum":"ca4fb304f86a409fee04e8e6fe9a2fb5fa9a7d90","exports":{".":{"bun":"./src/index.ts","types":"./dist/index.d.ts","default":"./dist/index.js"}},"scripts":{"test":"vitest run","build":"tsc","typecheck":"tsc --noEmit"},"_npmUser":{"name":"amatiasq","email":"amatiasq@gmail.com"},"_integrity":"sha512-9T//drrwiNdl9QL4+HI67yJ88ODo9nuhnLnK6OlLUHOCrCgLkUTlutQEd9eTLVsfsGt/7vCXLkhIjUTxCBMYZw==","_npmVersion":"10.8.3","directories":{},"_nodeVersion":"24.3.0","dependencies":{"@amatiasq/util":"0.2.0"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/geometry_0.2.0_1785433868058_0.8788478106913764","host":"s3://npm-registry-packages-npm-production"}},"0.2.1":{"name":"@amatiasq/geometry","version":"0.2.1","author":"A. Matías Quezada <amatiasq@gmail.com>","license":"MIT","_id":"@amatiasq/geometry@0.2.1","maintainers":[{"name":"amatiasq","email":"amatiasq@gmail.com"}],"dist":{"shasum":"429a5ac3d38a6f7c6dbbf905cf86214d69f96066","tarball":"https://registry.npmjs.org/@amatiasq/geometry/-/geometry-0.2.1.tgz","fileCount":40,"integrity":"sha512-cxUgNfFMykBSgLF1XBUvetG70czXsiCtmAzah5u/uTSiht6WtIL3E3PLPEPOxWMH1ajKumgRMQtj5TOrjJpBOg==","signatures":[{"sig":"MEUCICOUCNPeAKcdHjvZNMfzbo4Cm1nWAdBzK3PvRh0mavw7AiEA9IUDt0iMRCSEwK5570sDb8/MRxIF1Mu0XwfmWLDF0pU=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":69621},"type":"module","shasum":"429a5ac3d38a6f7c6dbbf905cf86214d69f96066","exports":{".":{"bun":"./src/index.ts","types":"./dist/index.d.ts","default":"./dist/index.js"}},"scripts":{"test":"vitest run","build":"tsc","typecheck":"tsc --noEmit"},"_npmUser":{"name":"amatiasq","email":"amatiasq@gmail.com"},"_integrity":"sha512-cxUgNfFMykBSgLF1XBUvetG70czXsiCtmAzah5u/uTSiht6WtIL3E3PLPEPOxWMH1ajKumgRMQtj5TOrjJpBOg==","_npmVersion":"10.8.3","directories":{},"_nodeVersion":"24.3.0","dependencies":{"@amatiasq/util":"^0.2.0"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/geometry_0.2.1_1785434779185_0.11154210498162698","host":"s3://npm-registry-packages-npm-production"}},"0.3.0":{"name":"@amatiasq/geometry","version":"0.3.0","author":{"name":"A. Matías Quezada","email":"amatiasq@gmail.com"},"license":"MIT","_id":"@amatiasq/geometry@0.3.0","maintainers":[{"name":"amatiasq","email":"amatiasq@gmail.com"}],"dist":{"shasum":"333807231c8a071bde704889520805113173cbe6","tarball":"https://registry.npmjs.org/@amatiasq/geometry/-/geometry-0.3.0.tgz","fileCount":40,"integrity":"sha512-D8VkWwBGScbIcU0ltI3UOOGafCSrK5Ejki7eteXDM4sYJ3E/VcZ+YIKkuN/j0og/iXcHdpJpBaI1jj1Jk23ANQ==","signatures":[{"sig":"MEUCIGD06PAB/ldOrymHl8TlG1yzO39Kn8DOwe8kLjrpTKu4AiEAsWpcwMQGns9fQHjLk/GoTbEqOewDwYGgPWOTKxCf2Pc=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":77311},"type":"module","exports":{".":{"bun":"./src/index.ts","types":"./dist/index.d.ts","default":"./dist/index.js"}},"gitHead":"1cabc4cb25567f951b34c7a439e3aa7aaaf02acd","scripts":{"test":"vitest run","build":"tsc","typecheck":"tsc --noEmit"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:f2072318-f52b-4e24-9dd9-15a0aed8ed7d"}},"_npmVersion":"11.19.0","description":"Please don't use this. I made it just for me and it's not good :P","directories":{},"_nodeVersion":"24.18.0","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/geometry_0.3.0_1785870419303_0.7566140004653192","host":"s3://npm-registry-packages-npm-production"}},"0.3.1":{"name":"@amatiasq/geometry","version":"0.3.1","author":{"name":"A. Matías Quezada","email":"amatiasq@gmail.com"},"license":"MIT","type":"module","exports":{".":{"bun":"./src/index.ts","types":"./dist/index.d.ts","default":"./dist/index.js"}},"scripts":{"build":"tsc","typecheck":"tsc --noEmit","test":"vitest run"},"gitHead":"84a1a8f8dc0d0015ba3d69c81e99c8ab9abb1d04","_id":"@amatiasq/geometry@0.3.1","description":"2D primitives for games: an immutable `Vector`, and `Rectangle` / `SquaredCircle` — mutable shapes you read and write through any of their measurements (centre, size, half size or edges) with the rest kept consistent. Nothing is derived on read, so readin","_nodeVersion":"24.19.0","_npmVersion":"11.19.1","dist":{"integrity":"sha512-nHceA4JyccZcLfXeFsXwbs8QHh1aZqbUsfeVYQJUeVssBXL+QgLfHKQLAll31BBaXpSH2DsJbuQ7qjxk+5tq1g==","shasum":"4b705b0cce5fb6ea5d714e280d2d022e3bd10450","tarball":"https://registry.npmjs.org/@amatiasq/geometry/-/geometry-0.3.1.tgz","fileCount":41,"unpackedSize":77954,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQDYHQmpqN7Iv8LVd5EmuiNL913ceJJZ1JrxrU/94zpWQAIhAI5AZwUUXob/tcApM1rK9zk6D7YAtrhaaJOcR5eslE7D"}]},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:f2072318-f52b-4e24-9dd9-15a0aed8ed7d"}},"directories":{},"maintainers":[{"name":"amatiasq","email":"amatiasq@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/geometry_0.3.1_1788082319432_0.6932870467288008"},"_hasShrinkwrap":false}},"time":{"created":"2019-03-19T01:06:30.508Z","modified":"2026-08-30T09:31:59.738Z","0.1.0":"2019-03-19T01:06:30.868Z","0.2.0":"2026-07-30T17:51:08.225Z","0.2.1":"2026-07-30T18:06:19.343Z","0.3.0":"2026-08-04T19:06:59.455Z","0.3.1":"2026-08-30T09:31:59.579Z"},"author":{"name":"A. Matías Quezada","email":"amatiasq@gmail.com"},"license":"MIT","description":"2D primitives for games: an immutable `Vector`, and `Rectangle` / `SquaredCircle` — mutable shapes you read and write through any of their measurements (centre, size, half size or edges) with the rest kept consistent. Nothing is derived on read, so readin","maintainers":[{"name":"amatiasq","email":"amatiasq@gmail.com"}],"readme":"# @amatiasq/geometry\n\n2D primitives for games: an immutable `Vector`, and `Rectangle` /\n`SquaredCircle` — mutable shapes you read and write through any of their\nmeasurements (centre, size, half size or edges) with the rest kept consistent.\nNothing is derived on read, so reading in a game loop is free.\n\n**It exists to serve [`@amatiasq/quadtree`](https://npmjs.com/package/@amatiasq/quadtree)\nand my own toys.** Pre-1.0, and the API changes without ceremony; if you need\ngeometry in something that matters, use something else.\n\n```sh\nnpm i --save @amatiasq/geometry\n```\n\n## Usage\n\n```ts\nimport { ContactOptions, Rectangle, Vector } from '@amatiasq/geometry';\n\nconst box = Rectangle.fromXY(0, 0, 100, 50);\nbox.width = 200; // resizes around the centre\nbox.left = 10; // MOVES the rectangle — edge setters never resize\n\nbox.contains(other, ContactOptions.INCLUDE_BORDERS);\nbox.collides(other);\n\nVector.of(3, 4).magnitude; // 5 — vectors are immutable, every operation returns a new one\n```\n\n`SquaredCircle` is a circle that also answers every rectangle question, its\nbounding box being the square around it: `width` *is* the diameter and\n`halfWidth` *is* the radius, so writing either resizes the circle.\n","readmeFilename":"README.md"}