{"_id":"@aperture-engine/physics-rapier","_rev":"3-98a188cd5460e394196fdd56e6213560","name":"@aperture-engine/physics-rapier","dist-tags":{"latest":"0.3.0"},"versions":{"0.1.0":{"name":"@aperture-engine/physics-rapier","version":"0.1.0","keywords":["aperture","physics","rapier","ecs","webgpu","game-engine","typescript"],"author":{"name":"Felix Zhang"},"license":"MIT","_id":"@aperture-engine/physics-rapier@0.1.0","maintainers":[{"name":"felixtrz","email":"felixtrz96@gmail.com"}],"homepage":"https://github.com/felixtrz/aperture/tree/main/packages/physics-rapier#readme","bugs":{"url":"https://github.com/felixtrz/aperture/issues"},"dist":{"shasum":"5031e9d04c96fd60819ef5fabc66b8c0f8f8cf95","tarball":"https://registry.npmjs.org/@aperture-engine/physics-rapier/-/physics-rapier-0.1.0.tgz","fileCount":55,"integrity":"sha512-UtwZg8Bdr1CQJd8NFE5x213zNf9XVxq0/ZKRMgivCfMkviC6/GxzsvQZ7H5AKiU187izZ6HQNRrWD6R4Gx9/fg==","signatures":[{"sig":"MEUCIDlKGLJjyjWdFzo5QR4Bd3PwbwUjrzOHA8hDW0MaEeQ2AiEAgXaYftRzGQ6X92YZYEq3DwuJywsKrt64BpnrvAJbjEE=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":242744},"main":"./dist/index.js","type":"module","_from":"file:aperture-engine-physics-rapier-0.1.0.tgz","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"scripts":{"build":"tsc -p tsconfig.json","typecheck":"tsc --noEmit -p tsconfig.json"},"_npmUser":{"name":"felixtrz","email":"felixtrz96@gmail.com"},"_resolved":"/private/var/folders/xc/nttyc9pj3xngmbjsfbgdbddc0000gn/T/3eb2cc559adc6051e1521914160cd4c9/aperture-engine-physics-rapier-0.1.0.tgz","_integrity":"sha512-UtwZg8Bdr1CQJd8NFE5x213zNf9XVxq0/ZKRMgivCfMkviC6/GxzsvQZ7H5AKiU187izZ6HQNRrWD6R4Gx9/fg==","repository":{"url":"git+https://github.com/felixtrz/aperture.git","type":"git","directory":"packages/physics-rapier"},"_npmVersion":"11.12.1","description":"Rapier-backed same-worker physics backend for the aperture WebGPU game engine.","directories":{},"sideEffects":false,"_nodeVersion":"26.0.0","dependencies":{"@aperture-engine/physics":"^0.1.0","@dimforge/rapier3d-compat":"0.19.3"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/physics-rapier_0.1.0_1782151618754_0.1786581965933376","host":"s3://npm-registry-packages-npm-production"}},"0.2.0":{"name":"@aperture-engine/physics-rapier","version":"0.2.0","keywords":["aperture","physics","rapier","ecs","webgpu","game-engine","typescript"],"author":{"name":"Felix Zhang"},"license":"MIT","_id":"@aperture-engine/physics-rapier@0.2.0","maintainers":[{"name":"felixtrz","email":"felixtrz96@gmail.com"}],"homepage":"https://github.com/felixtrz/aperture/tree/main/packages/physics-rapier#readme","bugs":{"url":"https://github.com/felixtrz/aperture/issues"},"dist":{"shasum":"8ba7d1634a8227e0000b6658d2c2b0e762a47028","tarball":"https://registry.npmjs.org/@aperture-engine/physics-rapier/-/physics-rapier-0.2.0.tgz","fileCount":55,"integrity":"sha512-1J5+dp+IKkgFiHFo9XC1rmr/mXSOfqHC5SNUCeMum9kU8IsPSHEv2qFZ6p7pYb2nqkWizrYHqvKDzljaVq+rJA==","signatures":[{"sig":"MEUCICxk3P9bTUj9RU57O6VBoDAnEv20HkLK1g7zxwy7Blv0AiEAz2p5iIyoF39Q5bTLw+++cblP1Lu3ivgiJchF7e8znKY=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":242744},"main":"./dist/index.js","type":"module","_from":"file:aperture-engine-physics-rapier-0.2.0.tgz","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"scripts":{"build":"tsc -p tsconfig.json","typecheck":"tsc --noEmit -p tsconfig.json"},"_npmUser":{"name":"felixtrz","email":"felixtrz96@gmail.com"},"_resolved":"/private/var/folders/xc/nttyc9pj3xngmbjsfbgdbddc0000gn/T/e7211d065e2b17949ab7dcd52afc634d/aperture-engine-physics-rapier-0.2.0.tgz","_integrity":"sha512-1J5+dp+IKkgFiHFo9XC1rmr/mXSOfqHC5SNUCeMum9kU8IsPSHEv2qFZ6p7pYb2nqkWizrYHqvKDzljaVq+rJA==","repository":{"url":"git+https://github.com/felixtrz/aperture.git","type":"git","directory":"packages/physics-rapier"},"_npmVersion":"11.12.1","description":"Rapier-backed same-worker physics backend for the aperture WebGPU game engine.","directories":{},"sideEffects":false,"_nodeVersion":"26.0.0","dependencies":{"@aperture-engine/physics":"^0.2.0","@dimforge/rapier3d-compat":"0.19.3"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/physics-rapier_0.2.0_1782246149024_0.9875672277443364","host":"s3://npm-registry-packages-npm-production"}},"0.3.0":{"name":"@aperture-engine/physics-rapier","version":"0.3.0","description":"Rapier-backed same-worker physics backend for the aperture WebGPU game engine.","author":{"name":"Felix Zhang"},"repository":{"type":"git","url":"git+https://github.com/felixtrz/aperture.git","directory":"packages/physics-rapier"},"homepage":"https://github.com/felixtrz/aperture/tree/main/packages/physics-rapier#readme","bugs":{"url":"https://github.com/felixtrz/aperture/issues"},"keywords":["aperture","physics","rapier","ecs","webgpu","game-engine","typescript"],"type":"module","license":"MIT","sideEffects":false,"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./package.json":"./package.json"},"main":"./dist/index.js","types":"./dist/index.d.ts","publishConfig":{"access":"public"},"dependencies":{"@dimforge/rapier3d-compat":"0.19.3","@aperture-engine/physics":"^0.3.0"},"scripts":{"build":"tsc -p tsconfig.json","typecheck":"tsc --noEmit -p tsconfig.json"},"_id":"@aperture-engine/physics-rapier@0.3.0","_integrity":"sha512-mxxZ1YOGBuSGZir7DiJ0K+f5VVxxMDo/aIW56Tp/Rs/QuecxokLSwihxSuEFFFPd59C3NoSiokmT1S1CSro2iA==","_resolved":"/private/var/folders/xc/nttyc9pj3xngmbjsfbgdbddc0000gn/T/6b9055658ddc825da3a949b144929cba/aperture-engine-physics-rapier-0.3.0.tgz","_from":"file:aperture-engine-physics-rapier-0.3.0.tgz","_nodeVersion":"26.0.0","_npmVersion":"11.12.1","dist":{"integrity":"sha512-mxxZ1YOGBuSGZir7DiJ0K+f5VVxxMDo/aIW56Tp/Rs/QuecxokLSwihxSuEFFFPd59C3NoSiokmT1S1CSro2iA==","shasum":"0529a4a4a7ef8264b209a8736792886f920544fa","tarball":"https://registry.npmjs.org/@aperture-engine/physics-rapier/-/physics-rapier-0.3.0.tgz","fileCount":59,"unpackedSize":246195,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQDCUbt6FanA+wHgGUc4Nr+OBOE2gIb+w1WkY4Mu1Wiz6wIgZC1tjdcC9YgmASXUlXkR8aH79CHr7y8Lie9aQV265+8="}]},"_npmUser":{"name":"felixtrz","email":"felixtrz96@gmail.com"},"directories":{},"maintainers":[{"name":"felixtrz","email":"felixtrz96@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/physics-rapier_0.3.0_1783122752011_0.6229752070688592"},"_hasShrinkwrap":false}},"time":{"created":"2026-06-22T18:06:58.520Z","modified":"2026-07-03T23:52:32.308Z","0.1.0":"2026-06-22T18:06:58.918Z","0.2.0":"2026-06-23T20:22:29.205Z","0.3.0":"2026-07-03T23:52:32.155Z"},"bugs":{"url":"https://github.com/felixtrz/aperture/issues"},"author":{"name":"Felix Zhang"},"license":"MIT","homepage":"https://github.com/felixtrz/aperture/tree/main/packages/physics-rapier#readme","keywords":["aperture","physics","rapier","ecs","webgpu","game-engine","typescript"],"repository":{"type":"git","url":"git+https://github.com/felixtrz/aperture.git","directory":"packages/physics-rapier"},"description":"Rapier-backed same-worker physics backend for the aperture WebGPU game engine.","maintainers":[{"name":"felixtrz","email":"felixtrz96@gmail.com"}],"readme":"# @aperture-engine/physics-rapier\n\nRapier-backed physics backend for the [aperture](https://github.com/felixtrz/aperture) WebGPU game engine.\n\n## Install\n\n```sh\npnpm add @aperture-engine/physics-rapier\n```\n\nThis package is part of the aperture engine and is normally used together with the other `@aperture-engine/*` packages — in particular `@aperture-engine/physics`, which defines the backend-neutral physics contracts, components, and fixed-step scheduling that this backend plugs into. It bundles `@dimforge/rapier3d-compat` as the underlying simulation library.\n\n## What it does\n\n`@aperture-engine/physics-rapier` provides a same-worker `PhysicsBackend` implementation built on [Rapier](https://rapier.rs/). It consumes the command buffers produced by `@aperture-engine/physics`, drives a Rapier `World` through fixed-step simulation, and writes body transforms and collision events back out. Beyond stepping, it implements the full backend query surface: raycasts, shape overlaps, shape casts, point projection, kinematic character movement, sleep/wake control, and debug-geometry generation.\n\n## Usage\n\n```ts\nimport { createRapierPhysicsBackend } from \"@aperture-engine/physics-rapier\";\n\n// Returns a PhysicsBackend (the contract defined in @aperture-engine/physics).\nconst backend = createRapierPhysicsBackend({\n  gravity: [0, -9.81, 0],\n});\n\n// Load Rapier's wasm and create the simulation world.\nawait backend.init();\n\n// Each fixed tick: apply commands, advance the world, read results back.\nbackend.sync(commandBuffer); // PhysicsCommandBuffer from @aperture-engine/physics\nbackend.step(1 / 60, fixedStepIndex);\nbackend.readResults(resultBuffer);\n\n// Queries are available once the world exists, e.g.:\nconst hit = backend.raycastFirst({ origin: [0, 5, 0], direction: [0, -1, 0] });\n\nbackend.dispose();\n```\n\n`createRapierPhysicsBackend` accepts `RapierPhysicsBackendOptions` (`gravity`, `execution`, `colliderGeometryProvider`); the same options can also be supplied to `init`.\n\n## Exports\n\n| Subpath                           | Contents                                                                |\n| --------------------------------- | ----------------------------------------------------------------------- |\n| `@aperture-engine/physics-rapier` | `createRapierPhysicsBackend` and the `RapierPhysicsBackendOptions` type |\n\n## License\n\nPart of the [aperture](https://github.com/felixtrz/aperture) monorepo. MIT licensed.\n","readmeFilename":"README.md"}