{"_id":"@c0repwn3r/rapier3d-node","_rev":"1-55b5a3859a217550e938d4314a3039b5","name":"@c0repwn3r/rapier3d-node","dist-tags":{"latest":"0.7.6"},"versions":{"0.7.6":{"name":"@c0repwn3r/rapier3d-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/rapier3d-node@0.7.6","_nodeVersion":"17.3.0","_npmVersion":"8.4.1","dist":{"integrity":"sha512-1io2iaHb7driVOWgTsbgLuFJWkD9FUWt0SQov0zjOOUOEA4ShpQyZie4QKKfLDtqZJ1O+gjgw3jpbaoPAjZMCw==","shasum":"ca91e97dd2a5404bf0369a2ff05c839d7db16d11","tarball":"https://registry.npmjs.org/@c0repwn3r/rapier3d-node/-/rapier3d-node-0.7.6.tgz","fileCount":135,"unpackedSize":1893339,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJiBz5ACRA9TVsSAnZWagAA6K4P/jcuM29YxpcRGG2JeJ5n\n/NJ8buxe9fMUpp9LonTVT8qIqYlBsmeAPzrvLgTYkiHQaI26qD5uTznAX+BI\nJJvIdcIag/H+s9n6shnecBmwI603Egc+7OQnCSA3LicecFez4BHKaQ6HkAFr\n7RV8VtSwHDCFAy84TfNsR9yPDJEISPuSpYhEpg3w8b/VK6lRPRd/a73cUXIT\nGSWPWGRB6CO61usN+HWjpFv2BRG8njgEi/Sklqnpwhseu6yLooo1cYE48mnn\nXQCFa1HLS8SuAsTE5ue7AMmboQXXOBeu8Z7k2p6T/jVW1FsrFgXLGrP61qX0\nkIaftKhqwYax93Wzdsp9woMXoxv5ZPlLWFvjwCNML48DhrQ23s0vE8TeOGJo\naHLi56e04i6grV/yjDXOrVCQ01OfkLCOEvuM/nz5FtlgF+f9zis/7u4TOvLP\nHeAZ0JZKyCnyZd2lFYtGh4lnCbyv433t0VNwvQm9mKLOZDJP6k8U4rPSTS0m\nDZ1x2tPAtGWjNkjqXdnN/yQh2na0FoUdqB+i+zG2jWveJXU7OUrsK9YK1faJ\nulXRaH6zsjgmFmq1caIcNHCYxGR3o5LoB/I+14Z6jDia7gGr4DXaOl0diYOB\njfZ0wVICWBdAtYYr5E6xY0tdm4E/0Org7PGukhZSd33q//5VGNFOsx6ypp98\n99TW\r\n=ve4C\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHQzSxIQoIlqqgXFoPxznAVBxTYI9iJzMLq7wRws1ULwAiEA/CkL4NbqzXKqtYi7ioifivGq//DZwijcfC3FfRAWWP4="}]},"_npmUser":{"name":"c0repwn3r","email":"core@coredoes.dev"},"directories":{},"maintainers":[{"name":"c0repwn3r","email":"core@coredoes.dev"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/rapier3d-node_0.7.6_1644641856725_0.1889371964234472"},"_hasShrinkwrap":false}},"time":{"created":"2022-02-12T04:57:36.665Z","0.7.6":"2022-02-12T04:57:36.887Z","modified":"2022-04-04T21:24:01.738Z"},"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":"# rapier3d-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 rapier3d-node`.\n\nUsage:\n\n```js\nimport RAPIER from 'rapier3d-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"}