{"_id":"@01/ammo.js","_rev":"3-7e2944152e85f491c06146a680fef7d2","name":"@01/ammo.js","dist-tags":{"latest":"0.0.2-3"},"versions":{"0.0.2":{"name":"@01/ammo.js","version":"0.0.2","description":"Direct port of the Bullet physics engine to JavaScript using Emscripten","main":"builds/ammo.js","repository":{"type":"git","url":"git://github.com/kripken/ammo.js.git"},"author":{"name":"Alon Zakai","email":"alonzakai@gmail.com"},"bugs":{"url":"https://github.com/kripken/ammo.js/issues"},"homepage":"https://github.com/kripken/ammo.js","contributors":[{"name":"The following authors have all licensed their contributions to ammo.js"},{"name":"under the licensing terms detailed in LICENSE."},{"name":"* Alon Zakai","email":"alonzakai@gmail.com","url":"copyright owned by Mozilla Foundation"}],"gitHead":"aab297a4164779c3a9d8dc8d9da26958de3cb778","_id":"@01/ammo.js@0.0.2","_nodeVersion":"12.14.1","_npmVersion":"6.13.4","dist":{"integrity":"sha512-XzTUTZodAamNqVNoDQvGosOdbptTvP40WydKuugfD+y70WXW+1pMjpZ930B47mqv5gKCzUT2U9x6MpOYbzBiIQ==","shasum":"98fdab87f3a99ba1cc5acdf0379401561538edc8","tarball":"https://registry.npmjs.org/@01/ammo.js/-/ammo.js-0.0.2.tgz","fileCount":6,"unpackedSize":2771275,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeikoACRA9TVsSAnZWagAAp94P/0107UgH57fdcIhiVkiu\nXUmeGIZrMMp8IfNBrNFcd5aXNHs8kn9kV/VDIolmcbLimnLFkdlHXh97xyB9\nWv3ieK2UKqvLnylyjYZUlSnQQk249CINkEQTwpCACpOhFOortKrVzKUu6Dg5\nTZfObwjsB4jQvo2Y+3kNmBdE8HPbu9VjCSP/KpkbKmuOPAJ0nNDVQAYlzFmG\nqyULAxFyS2oQ1rG2G22ctmbH4kOm+LW+wsilLwpjwUBN5Z5i+SWEJPl7jXNu\nyaPlyz8+cXRRCbJolaJqnEbio+FXJO7W0SyMhYOMPehCIMQpsGhyoHfxlPZO\ndjedvF8CK3BCZc57ATq/EDRqYJTkpfX1rif3BdVTLgJevGD+WY3Ns/VDRh2e\nB24x6i8bhgIiJGL4o76JTmtnKhz9lArU4iSpnYbQVUUR7S79za1eyUtUlRX1\nFmBy95ri+aZ8kROjtVJ8wWdW93ayIPuAC7+jJgbW049WztYMB69Bk+nj8LLj\nn+T/UUpRXMk0G9ro4pnB5WPdn6xTi/MazbdDfyBKonNeNtwp9AVJUEK77BSe\nlXJg+0TrSGcf/iLJGiQz8DhKBW4cdN+yr3afcccB69sw0/q2+mgOOVdRdYLf\n28V9UWEPvHlC039WiuvlI0PixLaRHciIN9LymyRjabJhXz6iI8EKkUeu20nt\n/u6n\r\n=F7wf\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD7HrJPkKjP9ykDGe/52GXwXxLARIrlqvLo03ouWIvc3wIhAJROZWEp/+gxSV6WFhtro+71DM5u0m7pbdvmujeaLG63"}]},"maintainers":[{"name":"01","email":"01@01alchemist.com"}],"_npmUser":{"name":"01","email":"01@01alchemist.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ammo.js_0.0.2_1586121216443_0.9159190541163096"},"_hasShrinkwrap":false},"0.0.2-2":{"name":"@01/ammo.js","version":"0.0.2-2","description":"Direct port of the Bullet physics engine to JavaScript using Emscripten","main":"builds/ammo.js","repository":{"type":"git","url":"git://github.com/kripken/ammo.js.git"},"author":{"name":"Alon Zakai","email":"alonzakai@gmail.com"},"bugs":{"url":"https://github.com/kripken/ammo.js/issues"},"homepage":"https://github.com/kripken/ammo.js","contributors":[{"name":"The following authors have all licensed their contributions to ammo.js"},{"name":"under the licensing terms detailed in LICENSE."},{"name":"* Alon Zakai","email":"alonzakai@gmail.com","url":"copyright owned by Mozilla Foundation"}],"gitHead":"4aec847448ae302f7e1899bfefdfc018eacc20d4","_id":"@01/ammo.js@0.0.2-2","_nodeVersion":"12.14.1","_npmVersion":"6.13.4","dist":{"integrity":"sha512-BVI5Fs3+uV3/JGTecpwheZtssFdgjai9sIR0AyVAQHuzfzlFpiD3ttnaNs/WRRWzPXwGcw8cryRhe7MYrrAT4Q==","shasum":"56492f0717a590dfdffa8831b8ea8eda38158364","tarball":"https://registry.npmjs.org/@01/ammo.js/-/ammo.js-0.0.2-2.tgz","fileCount":1375,"unpackedSize":34166607,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJemTkrCRA9TVsSAnZWagAA508P/2qAd4BiYKwt9KFFPTLq\nMW+zPmR8P1ziG4dt9ppb4A5VQLu/ymbo6SS/0tjO39W7pB0+Ts5QCFq8bJjS\n/JFB6tlx3LUqy+q/WCf/JV6F8AiYDyBZJ2Ec2AVHzMIuPwyBOOhbDFbr9pyY\nqaV06lh3PISiiHrixjAP2OdaoSfMVii+6is1wT5AflL76nMa0hRkibCmDy/R\nBNc4keiNSBrgjmCY4igbuYaUV/ZZ84n4IUuW5K0Cu944yQt2yvVIC9qsavig\n8qge4qhIrsyaV96hmAgH8R/COaV2NiSsMP2HnwT6mIAfhE03MCvnzXm/qVVA\nSgo4BPi3hDXfVfSqmdshE3TaToVH1ad+5yi6dJsBI2QuEWx6sEoRmcYH4USP\nMn9ssOSPjoiqvtcrLrKBNKFbMvZmP6xJmNCAN4p2nYsTMqJ4IyokE8/YDzhn\nmaRwym4kCDTbTK2N/K2bFQYGWcHwgNL9iXNKxz9O7d7Rz+ccyJ+yZaYhvegC\nSBr5bUBkKfRUPnhyBQmoS9f7OLpDfiR7wtub+TB7ALcVI5VJozyZ08XfMIro\nq4bOZKz04ltrzaI6hANJh+qj+bAQio8m4Uu/jOJADgYvu/QAhxsa/dsg0/T5\nZmD46GKUUUci2qWWh0ndJWp+nA4f7yyMuIPWwHTx40EFv5WuP//FC2Vt0U80\nyoRI\r\n=Duub\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHTHxakUTAbZtPFKZCP8uAnJvnN7C/3FEMb0E/5hmZJ8AiEAiuvklD7Yn38EOSIaoA0tIUJVN8z4Oe+gBdNP4JmV+T0="}]},"maintainers":[{"name":"01","email":"01@01alchemist.com"}],"_npmUser":{"name":"01","email":"01@01alchemist.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ammo.js_0.0.2-2_1587099946189_0.5602576272758346"},"_hasShrinkwrap":false},"0.0.2-3":{"name":"@01/ammo.js","version":"0.0.2-3","description":"Direct port of the Bullet physics engine to JavaScript using Emscripten","main":"builds/ammo.js","repository":{"type":"git","url":"git://github.com/kripken/ammo.js.git"},"author":{"name":"Alon Zakai","email":"alonzakai@gmail.com"},"bugs":{"url":"https://github.com/kripken/ammo.js/issues"},"homepage":"https://github.com/kripken/ammo.js","contributors":[{"name":"The following authors have all licensed their contributions to ammo.js"},{"name":"under the licensing terms detailed in LICENSE."},{"name":"* Alon Zakai","email":"alonzakai@gmail.com","url":"copyright owned by Mozilla Foundation"}],"gitHead":"4aec847448ae302f7e1899bfefdfc018eacc20d4","_id":"@01/ammo.js@0.0.2-3","_nodeVersion":"12.14.1","_npmVersion":"6.13.4","dist":{"integrity":"sha512-rlWvkQ/4PU+R8WiI+oJdvDNgCinnENF0qzg5mKF6xa3vW0sDqKWZ2UWFoFQYBwMmRNVpyKUbNrbx2jA5zcvqLw==","shasum":"ca293bd45a2ef009ae45c47fd6de22a981395881","tarball":"https://registry.npmjs.org/@01/ammo.js/-/ammo.js-0.0.2-3.tgz","fileCount":6,"unpackedSize":2954788,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJemTlSCRA9TVsSAnZWagAAA3gQAJ25RViIfgBrGXUBpKSD\n2I9fKDkZQkTfWvajs63jcuGjBkk9j0wPkAoc+gKZf2dp7Bb4tkH9pr3qVYxJ\npVXjnBjPlkW0yXM7m+5Nc2kCasd4oPUswB4wkoh5KP7X5OFUMrnBWed92o2A\nm4BOWsVDllOw/JJNVqjOpEGuzXgQqc680Nv+AE0bAL+0EjctcexfHbAdQZgJ\nmRMCIRV7vPg6788b90jc66YUuttZfSCLMlvuevCPZkNezJvXhoQrtEGtYPXk\n7TUnQ9dSKaj0t/VC5gQT/6CpNuif5voiHLhoVzzQUl4Wd9xRDFhngk/SYF1m\nWUkAD+cyz0Qx8MWE72kSwF7K4L7AeJzz3Qms/oppi8VdOq08/6BFVF/UnmqX\nq6ODjvXEm8RWildCV9jJ/RW2dqZ20LCdzQaF0Xv16g6ErFn/1tm2MX7Nm/vz\nsbS2239kZ7QL/3+vav3WVSGbAEwG2YdFmUDNcatEmNAVTV7cZAUotjwLP0+3\nPMKPDWtK7FGlnsw8zI/3UodClSecDyb7gdzJVf9TcAB11UsUa0TzL6LNsICa\nsKv4WQ8o+FZ4USDj/4YysCjSXDg8XtYXW0VL65TPfkUwv5CQgg6B/Cpu1+2v\npjw4yBOQvIB+bIhdd9UHK9ss7f/+KI9sakSzceaPtOXSoT1ZJxLvTorraZm5\ndx1h\r\n=8nVg\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCaCdpcuOj8HkRD/YVs22S4AKBIZhyNCuEOioTQSLYcMQIgdW4BnX8N2gI3XNVl6rTwJduMn5NS7OOEd1a/zilrBwc="}]},"maintainers":[{"name":"01","email":"01@01alchemist.com"}],"_npmUser":{"name":"01","email":"01@01alchemist.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ammo.js_0.0.2-3_1587099986229_0.38392785812614516"},"_hasShrinkwrap":false}},"time":{"created":"2020-04-05T21:13:36.196Z","0.0.2":"2020-04-05T21:13:36.589Z","modified":"2022-04-04T10:25:41.151Z","0.0.2-2":"2020-04-17T05:05:46.650Z","0.0.2-3":"2020-04-17T05:06:26.464Z"},"maintainers":[{"name":"01","email":"01@01alchemist.com"}],"description":"Direct port of the Bullet physics engine to JavaScript using Emscripten","homepage":"https://github.com/kripken/ammo.js","repository":{"type":"git","url":"git://github.com/kripken/ammo.js.git"},"contributors":[{"name":"The following authors have all licensed their contributions to ammo.js"},{"name":"under the licensing terms detailed in LICENSE."},{"name":"* Alon Zakai","email":"alonzakai@gmail.com","url":"copyright owned by Mozilla Foundation"}],"author":{"name":"Alon Zakai","email":"alonzakai@gmail.com"},"bugs":{"url":"https://github.com/kripken/ammo.js/issues"},"readme":"ammo.js\n=======\n\n\n# Demos\n\n * [Cubes](http://kripken.github.com/ammo.js/examples/webgl_demo/ammo.html)\n * [Cubes (WebAssembly)](http://kripken.github.com/ammo.js/examples/webgl_demo/ammo.wasm.html)\n * [SoftBody-Rope](http://kripken.github.com/ammo.js/examples/webgl_demo_softbody_rope/index.html)\n * [SoftBody-Cloth](http://kripken.github.com/ammo.js/examples/webgl_demo_softbody_cloth/index.html)\n * [SoftBody-Volume](http://kripken.github.com/ammo.js/examples/webgl_demo_softbody_volume/index.html)\n * [Heightmap](http://kripken.github.com/ammo.js/examples/webgl_demo_terrain/index.html)\n * [Vehicle](http://kripken.github.io/ammo.js/examples/webgl_demo_vehicle/index.html)\n\n# Overview\n\n**Example code to give you an idea of the API**:\n\n * https://github.com/kripken/ammo.js/blob/master/examples/webgl_demo/worker.js#L6 which interacts with https://github.com/kripken/ammo.js/blob/master/examples/webgl_demo/ammo.html#L14\n\nammo.js is a direct port of the [Bullet physics\nengine](http://bulletphysics.org/) to JavaScript, using Emscripten. The source\ncode is translated directly to JavaScript, without human rewriting, so\nfunctionality should be identical to the original Bullet.\n\n**Note: ammo.js has just been updated to a new porting approach. If you find\nsome part of the Bullet API that is not supported that you need, please see\nhttps://github.com/kripken/ammo.js/issues/60**\n\n'ammo' stands for \"Avoided Making My Own js physics engine by compiling bullet\nfrom C++\" ;)\n\nammo.js is zlib licensed, just like Bullet.\n\nDiscussion takes place on IRC at #emscripten on Mozilla's server\n(irc.mozilla.org)\n\n\nInstructions\n------------\n\n`builds/ammo.js` contains a prebuilt version of ammo.js. This is probably what you want.\n\nYou can also build ammo.js yourself, as follows:\n\n * Get Emscripten\n\n      http://emscripten.org\n\n   and set it up. See\n\n      http://kripken.github.io/emscripten-site/docs/getting_started/\n\n * Run the build script,\n\n      `python make.py`\n\n   which should generate builds/ammo.js.\n\n * Optionally, run the automatic tests,\n\n      `python test.py`\n\n\nUsage\n-----\n\nThe most straightforward thing is if you want to write your code in C++, and\nrun that on the web. If so, then you can build your C++ code with emscripten\nnormally and either build and link Bullet using\n\nhttps://emscripten.org/docs/compiling/Building-Projects.html\n\nor you can use Bullet directly from emscripten-ports, with `-s USE_BULLET=1`.\nIn both cases, you don't need ammo.js, just plain Bullet.\n\nIf, on the other hand, you want to write code in JavaScript, you can use the\nautogenerated binding code in ammo.js. A complete example appears in\n\n  `examples/hello_world.js`\n\nThat is HelloWorld.cpp from Bullet, translated to JavaScript. Other examples\nin that directory might be useful as well. In particular see the WebGL\ndemo code in\n\n  `examples/webgl_demo/ammo.html`\n\n\nBindings API\n============\n\nammo.js autogenerates its API from the Bullet source code, so it should\nbe basically identical. There are however some differences and things\nto be aware of:\n\n  * See https://github.com/kripken/emscripten/wiki/WebIDL-Binder\n    for a description of the bindings tool we use here, which includes\n    instructions for how to use the wrapped objects.\n\n  * All ammo.js elements should be accessed through `Ammo.*`. For example,\n    `Ammo.btVector3`, etc., as you can see in the example code.\n\n  * Member variables of structs and classes can be accessed through\n    setter and getter functions, that are prefixed with `|get_|` or `|set_|`.\n    For example,\n\n      `rayCallback.get_m_rayToWorld()`\n\n    will get `m_rayToWorld` from say a `ClosestRayResultCallback`. Native\n    JavaScript getters and setters could give a slightly nicer API here,\n    however their performance is potentially problematic.\n\n  * Functions returning or getting `float&` or `btScalar&` are converted to\n    float. The reason is that `float&` is basically `float*` with nicer syntax\n    in C++, but from JavaScript you would need to write to the heap every\n    time you call such a function, making usage very ugly. With this change,\n    you can do `|new btVector3(5, 6, 7)|` and it will work as expected. If\n    you find a case where you need the float& method, please file an issue.\n\n  * Not all classes are exposed, as only what is described in ammo.idl is\n    wrapped. Please submit pull requests with extra stuff that you need\n    and add.\n\n  * There is experimental support for binding operator functions. The following\n    might work:\n\n    | Operator  | Name in JS |\n    |-----------|------------|\n    | `=`       | `op_set`   |\n    | `+`       | `op_add`   |\n    | `-`       | `op_sub`   |\n    | `*`       | `op_mul`   |\n    | `/`       | `op_div`   |\n    | `[]`      | `op_get`   |\n    | `==`      | `op_eq`    |\n\n\nReducing Build Size\n===============\n\nThe size of the ammo.js builds can be reduced in several ways:\n\n  * Removing uneeded interfaces from ammo.idl. Some good examples of this are `btIDebugDraw` and `DebugDrawer`, which are both only needed if visual debug rendering is desired.\n\n  * Removing methods from the `-s EXPORTED_RUNTIME_METHODS=[]` argument in make.py. For example, `UTF8ToString` is only needed if printable error messages are desired from `DebugDrawer`.\n\n\nTroubleshooting\n===============\n\n  * It's easy to forget to write |new| when creating an object, for\n    example\n\n      `var vec = Ammo.btVector3(1,2,3); // This is wrong! Need 'new'!`\n\n    This can lead to error messages like the following:\n\n      `Cannot read property 'a' of undefined`\n      `Cannot read property 'ptr' of undefined`\n\n    This is an annoying aspect of JavaScript, sadly.\n\n\nReporting Issues\n================\n\nIf you find a bug in ammo.js and file an issue, please include a script\nthat reproduces the problem. That way it is easier to debug, and we can\nthen include that script in our automatic tests.\n\n\nRelease Process\n===============\n\nPushing a new build in `builds/ammo.js` should be done only after the\nfollowing steps:\n\n  * Build using  python make.py closure       which generates the asm.js\n    build, and   python make.py closure wasm  which generates the wasm\n    build.\n\n  * Make sure it passes all automatic tests using\n    python test.py (build-name)  Note that it uses SpiderMonkey\n    by default, and SPIDERMONKEY_ENGINE is defined in ~/.emscripten,\n    see the script contents for details.\n\n  * Run the WebGL demo in examples/webgl_demo and make sure it looks\n    ok, using something like  firefox examples/webgl_demo/ammo.html\n    (chrome will need a webserver as it doesn't like file:// urls)\n\n\nUpstream Version\n================\n\nBullet 2.82 patched with [raycast fix from 2.83](https://github.com/bulletphysics/bullet3/commit/7151865c16ba996996206e1fd7869cbb1e7edd8d)\n","readmeFilename":"README.markdown"}