Compare commits

...

5 Commits
master ... v0.3

Author SHA1 Message Date
Ali Shakiba
2368ec4f80 clean up deps 2021-05-11 16:25:53 -07:00
Ali Shakiba
47de66f03d update readme 2021-05-07 17:04:11 -07:00
Ali Shakiba
bc777d24fd update readme 2021-05-07 15:38:16 -07:00
Ali Shakiba
fab9ed3c5f v0.3.29 2021-04-30 15:42:31 -07:00
James Peach
af62e2d681 index.d.ts: export top level Settings declaration
This was causing issues when using the 0.3.x branch in a typescript context

```
../planck.js/lib/index.d.ts:539:1 - error TS1046: Top-level declarations in \
.d.ts files must start with either a 'declare' or 'export' modifier.

539 let Settings: {
    ~~~
```
2021-04-30 15:41:21 -07:00
16 changed files with 11504 additions and 1931 deletions

View File

@ -12,7 +12,7 @@ Planck.js is JavaScript rewrite of Box2D physics engine for cross-platform HTML5
## Documentation
- [Documentations Wiki](https://github.com/shakiba/planck.js/wiki/) - This is the best place to start, and find other resources
- [Documentation Wiki](https://github.com/shakiba/planck.js/wiki/) - This is the best place to start, and find other resources
- [Examples](https://piqnt.com/planck.js/) - Online examples with editable code
@ -40,47 +40,55 @@ Planck.js public API closely follows Box2D API, with the following differences:
`'begin-contact'`, `'end-contact'`, `'pre-solve'`, `'post-solve'`, `'remove-joint'`, `'remove-fixture'`, `'remove-body'`
## Projects
#### Games
- [Astray 2](https://wwwtyro.github.io/astray-2/) ([source](https://github.com/wwwtyro/astray-2)) by Rye Terrell
- [I have to flap](https://ihavetoflap.web.app/) by Elias Ku
- [Hoverator](https://vgel.me/hoverator/) by Jonathon Vogel
- [Acolyte Fight](https://acolytefight.io/)
- [Comeback](http://romainclement.eu/Comeback/) by Romain Clément
- [Nitro Clash](http://nitroclash.io/)
- [Space Rage 2](https://space-rage-2-bad-prospects-dev.netlify.app/) by Hendrik Mans
- Air Hockey ([source](https://github.com/Steveeeie/webgl-air-hockey-server)) by Steve Meredith
- [Coined](https://coined--parameterized.repl.co/) ([source](https://repl.it/talk/challenge/Coined/13314))
- [Zzzone!](https://www.engehausen.de/jan/zzz.html) ([source](https://github.com/smurf667/zzzone)) by Jan Engehausen
#### Other Projects
- [Fall / Fill](https://twitter.com/jezzamonn/status/1246212104593403905) by Jez Swanson
- [1000 Unique Postcards](https://twitter.com/andreasgysin/status/956131218386509824) by Andreas Gysin
- [Flag in the Wind](https://codepen.io/unframework/pen/OrOMBg) by Nick Matantsev
- [Handle](https://twitter.com/marurur/status/1240141036606947329) by Ichiro Maruta
- [Q-Learning Ragdoll](https://codepen.io/mikkokam/pen/EGEjYe) by Mikko Kämäräinen
- [Dynamic Convex Hull](https://codepen.io/bozheng-stokes/pen/abormNX) by Bo Zheng
- [Chaotic Water Wheel](https://john-hearn.info/articles/simulate-chaotic-water-wheel-with-planck) by John Hearn
- [Walking EA](https://matsemann.github.io/walkingea/) by Mats Krüger Svensson
- [Neuroevolution Bots](https://twitter.com/mishig25/status/1077672181503590400) by Mishig Davaadorj
#### Game Development
- [Space](https://piqnt.com/space/)
- [Modd.io](https://www.modd.io/)
## Install
#### CDN
### v0.3 (stable release)
Planck.js is [available on jsDelivr](https://www.jsdelivr.com/package/npm/planck-js).
Package name for v0.3 is `planck-js`.
##### CDN
#### NPM
The library is available on [jsDelivr](https://www.jsdelivr.com/package/npm/planck-js).
npm install planck-js --save
##### NPM
Install NPM package.
```sh
npm install planck-js --save
```
Use core library.
```js
const planck = require('planck-js');
```
##### Testbed
Use CDN in a web page.
```html
<html><body>
<script src="//cdn.jsdelivr.net/npm/planck-js@latest/dist/planck-with-testbed.min.js"></script>
<script>
planck.testbed(function(testbed) {
// Your testbed code
});
</script>
</body></html>
```
Use NPM package in Node.
```js
const planck = require('planck-js/dist/planck-with-testbed');
planck.testbed(function() {
// ...
});
```
### v1.0 (alpha)
Staring from v1.0 package name is changed to `planck`.
To install v1.0 see [master branch](https://github.com/shakiba/planck.js/#install).
## Credits

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

738
dist/planck.js vendored

File diff suppressed because it is too large Load Diff

2
dist/planck.js.map vendored

File diff suppressed because one or more lines are too long

4
dist/planck.min.js vendored

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

2
lib/index.d.ts vendored
View File

@ -536,7 +536,7 @@ export class World {
/**
* Tuning constants based on meters-kilograms-seconds (MKS) units.
*/
let Settings: {
export let Settings: {
// Collision
/**
* The maximum number of contact points between two convex shapes. Do not change

9958
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -1,6 +1,6 @@
{
"name": "planck-js",
"version": "0.3.28",
"version": "0.3.31",
"description": "2D JavaScript physics engine for cross-platform HTML5 game development",
"homepage": "http://shakiba.me/planck.js",
"keywords": [
@ -25,19 +25,19 @@
"Ali Shakiba (http://shakiba.me/planck.js)",
"Erin Catto (http://box2d.org/)"
],
"dependencies": {
"stage-js": "^0.9.4"
},
"devDependencies": {
"ajv": "^6.10.2",
"chai": "^4.2.0",
"closure-webpack-plugin": "^2.3.0",
"dtslint": "^3.6.9",
"express": "^4.17.1",
"handlebars": "^4.7.6",
"mocha": "^6.2.3",
"nodemon": "^1.19.1",
"nyc": "^15.1.0",
"serve-index": "^1.9.1",
"sinon": "^9.0.2",
"stage-js": "^0.8.11",
"tslint": "^5.17.0",
"typedoc": "^0.17.8",
"typedoc-plugin-markdown": "^2.3.1",
@ -54,6 +54,5 @@
"watch": "webpack --watch",
"testbed": "nodemon testbed/server.js",
"typedoc": "typedoc --options typedoc.json"
},
"dependencies": {}
}
}