{"_id":"@c0repwn3r/rapier2d-node","_rev":"1-1984178ba9427abf48f8d3540ec9ca3a","name":"@c0repwn3r/rapier2d-node","dist-tags":{"latest":"0.7.6"},"versions":{"0.7.6":{"name":"@c0repwn3r/rapier2d-node","version":"0.7.6","main":"dist/rapier.js","types":"dist/rapier.d.ts","repository":{"type":"git","url":"git+ssh://git@github.com/c0repwn3r/rapier-node.git"},"author":{"name":"c0repwn3r","email":"core@coredoes.dev"},"license":"Apache 2.0","gitHead":"c6a350e917c94d710c4bd706c606a2fa401d093b","description":"A NodeJS compatibility package for https://rapier.rs JS bindings","bugs":{"url":"https://github.com/c0repwn3r/rapier-node/issues"},"homepage":"https://github.com/c0repwn3r/rapier-node#readme","_id":"@c0repwn3r/rapier2d-node@0.7.6","_nodeVersion":"17.3.0","_npmVersion":"8.4.1","dist":{"integrity":"sha512-ffV+9stInJj5Itk5Yaeg6oB4sPQJHaA4GampkON1EX5ieTGeki8V8RLiDQDxxzfZDlxn++mVqU396gfxJtrrCg==","shasum":"30e89b72a25f4bdc18ddb60aa23bbb1cfb360486","tarball":"https://registry.npmjs.org/@c0repwn3r/rapier2d-node/-/rapier2d-node-0.7.6.tgz","fileCount":135,"unpackedSize":1472071,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJiBz48CRA9TVsSAnZWagAAQqQQAJcZzp14Iavs61h2lnDw\nQRezJ6o0RNk5Z2HPW+cpDR8qyX0R6PrRb9sWDXLh1QljcgliME1P/g2Y8xWg\nqZQ1HfDkH1cWXUPN2v/hvrO0gS+OOu0CRzzWHAC5/CPt/TLYsA/GV6Mm15Sy\nJoG9zT9aNydjcr/DQjv59PCs8QFs7us5AAwHbLLTkRwXDq83gFpbBRPExOh8\nSS5xmnc/aM6nQYnujJFfYs46GV6je9ZfFKJmTNJOKillb7SctJEjDILsST4R\nAqFmdf6sgds20bTYv0dXn/YC3iS2V+6SeFXwpVh/CYDVCXuLqvKEQL4Ve7T0\n3+P+91tqTrhQzToPjiJazHchNYX+2uM1qtI94z+ubPSafDNNjFd+YPUimkTI\ntK4+hzT5+gdrmo+UCdFcCujr4BoFlTyGUcuO1J8XTg+lzafnwM5nZahTY1b3\nO7mwx8uFu4q4EXFOiK6S8ZjuogNqkzSdP0D/QTu+6LKXjP8lylIx4ic4a+WW\ngn/fDFYP/k5eoMqEv2+8w1Ul9tp3Q9unyvarWGflW21LbPe5rgaQjy5I/jAN\nFcyjGnvQStJljXpLvBSN3wWI6PuZrPgY/TehiFRL9jeRQYsS5I/CcmIz9Hk9\n7rlIrLBLC46F9qTJzW5SaRgXzjHFMwwoAb29jO7Eoo47b/R7LEEiiUDQIYmk\nSD9a\r\n=1A5+\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAXs7Rng483gnU8i8iAukRlREiDf/5T8ZZAK+1LPeNHpAiEAsFcTTSKhwxXgm9aztwEH1TMQYod7vaouO6T1VbusFdU="}]},"_npmUser":{"name":"c0repwn3r","email":"core@coredoes.dev"},"directories":{},"maintainers":[{"name":"c0repwn3r","email":"core@coredoes.dev"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/rapier2d-node_0.7.6_1644641852480_0.5975058974228835"},"_hasShrinkwrap":false}},"time":{"created":"2022-02-12T04:57:32.428Z","0.7.6":"2022-02-12T04:57:32.649Z","modified":"2022-04-04T21:24:01.475Z"},"maintainers":[{"name":"c0repwn3r","email":"core@coredoes.dev"}],"description":"A NodeJS compatibility package for https://rapier.rs JS bindings","homepage":"https://github.com/c0repwn3r/rapier-node#readme","repository":{"type":"git","url":"git+ssh://git@github.com/c0repwn3r/rapier-node.git"},"author":{"name":"c0repwn3r","email":"core@coredoes.dev"},"bugs":{"url":"https://github.com/c0repwn3r/rapier-node/issues"},"license":"Apache 2.0","readme":"# rapier2d-node\n\nA NodeJS compatibility package for https://rapier.rs JS bindings\n\nRapier doesn't ship a package currently that works in NodeJS out of the box. The goal of this repo is to publish packages for Rapier which you can just `require` and use on the latest version of Node.\n\n## Installing the package\n\nFor **3D**, `npm i -s rapier2d-node`.\n\nUsage:\n\n```js\nimport RAPIER from 'rapier2d-node'\n\nconst world = new RAPIER.World({ x: 0, y: 9.81 })\n```\n\nNo async import or `await RAPIER.init()` is required.\n\n## Building the packages\n\n1. Install Rust\n2. `cargo install wasm-pack`\n3. `npm install`\n4. `npm run build`\n\n## What this project does\n\n1. Builds with `wasm-pack --target nodejs` instead of `--target web` to produce Node-compatible WASM modules\n2. Injects missing globals into Node's global scope (no extra libs, just using Node core stuff):\n   a. `self`\n   b. `atob`\n   c. `performance.now`\n3. Removes binding definitions for the opposite dimensionality (removes 3d APIs for the 2d library and vice versa)\n4. Copies the TS bindings files from `rapier.js` alongside the WASM module output\n5. Compiles the TS to create the fully bound library with the same interface as the web versions\n\n## Testing\n\nI copied a simple test scene from https://github.com/AutomatonSystems/rapier-node to `test/test.js`. You can run `npm test` to execute the script; if you see positions logged and it completes successfully, the library has at least loaded and ran!\n\n## Attributions\n\nThis is a clone of https://github.com/a-type/rapier-node. The project seems unmaintained, but credit to a-type for his initial work on this. I will do my best to keep this project in sync with Rapier.js. If I'm behind a version, feel free to open an issue and I will get it updated.\n\nThe differences between `rapier-node` and `@a-type/rapier-node` are as follows:\n\n1. Update to the latest Rapier.js source `0.7.6`.\n2. Refactored the build chain to be more streamlined.\n3. Fixed typescript definition generation _weirdness_.\n4. Added README.md to published packages.\n5. Swapped out yarn for npm.","readmeFilename":"README.md"}