0
0
Fork 0
mirror of https://github.com/liabru/matter-js.git synced 2024-11-30 10:20:52 -05:00
Commit graph

541 commits

Author SHA1 Message Date
liabru
1e73cabcf8 changed deprecated comments to avoid confusion 2021-01-16 23:27:01 +00:00
liabru
882e07c1ba fix poly-decomp external require 2021-01-16 23:10:27 +00:00
liabru
57d8576fd1 add check for decomp removeDuplicatePoints feature 2021-01-12 23:55:00 +00:00
liabru
a9694e6b53 Squashed commit of the following:
commit 421e56d37d738c8a97dcd01fcee858de54954efc
Merge: 9c5325b 4eb61c0
Author: liabru <liabru@brm.io>
Date:   Tue Jan 12 23:33:43 2021 +0000

    Merge branch 'removeDuplicatePoints' of https://github.com/tumult/matter-js into tumult-removeDuplicatePoints

    # Conflicts:
    #	src/factory/Bodies.js

commit 4eb61c004d
Author: Jonathan Deutsch <jonathan@tumult.com>
Date:   Thu Jul 26 15:37:00 2018 -0700

    change removeDuplicatePoints precision to default in docs

commit 6c5d4065c2
Author: Jonathan Deutsch <jonathan@tumult.com>
Date:   Thu Jul 26 14:33:39 2018 -0700

    Add removeDuplicatePoints option from polygon-decomp 0.3.0 to Bodies.fromVertices()
2021-01-12 23:36:04 +00:00
liabru
207c2f3ccb merge branch 'master' into timing-improve 2020-12-31 17:29:37 +00:00
liabru
07927162fc add support for > and >= operators in plugin version ranges 2020-12-30 22:28:08 +00:00
liabru
d258411faa update default render theme 2020-12-08 23:45:34 +00:00
liabru
0af16455b9 fix decomp require 2020-11-24 22:32:28 +00:00
liabru
298e3e4671 fix lint 2020-03-11 23:56:55 +00:00
liabru
3117dfdaa7 change Body.applyForce for timing, add initial body.deltaTime 2020-03-11 23:50:41 +00:00
liabru
6f5af774ce fix issues with engine event.delta 2020-03-11 23:47:07 +00:00
liabru
8cfc234b5b Merge branch 'master' into timing-improve
* master: (32 commits)
  fix lint
  update dependencies
  Revert "Merge branch 'pr/526'"
  Revert "Merge branch 'pr/527'"
  changed alpha build configuration
  add window global, stub require and handle bad values in test tools
  added overlap metric to test tools
  fix path to build in test worker
  implemented threaded comparison testing
  fixed plugins in compare
  Added build comparison tools and tests
  Added config and test files to lint
  Set loose build version on dev server
  Added watch content base to dev server
  added timing to engine snapshot
  updated readme
  added tag push to release task
  updated readme
  removed yuidocjs dev dependency
  removed unused gulp release tasks
  ...

# Conflicts:
#	src/collision/Resolver.js
#	src/core/Engine.js
2020-03-11 00:52:12 +00:00
liabru
5a0079df1b fix lint 2020-03-10 23:18:25 +00:00
liabru
3216d7e986 Revert "Merge branch 'pr/526'"
This reverts commit 52f3734b3e, reversing
changes made to c04536f2c0.
2020-03-10 08:49:22 +00:00
liabru
d1f1c1907a Revert "Merge branch 'pr/527'"
This reverts commit 4df048da79, reversing
changes made to 52f3734b3e.
2020-03-10 08:48:42 +00:00
liabru
285d70df34 implemented threaded comparison testing 2020-01-01 14:39:21 +00:00
liabru
9ca21c1862 fix lint issues 2019-09-15 18:43:28 +01:00
liabru
3c32969da2 added Constraint.pointAWorld and Constraint.pointBWorld 2019-09-14 19:03:17 +01:00
liabru
94e9614436 fix decomp import in Bodies.fromVertices 2019-09-14 18:59:01 +01:00
liabru
9ef9d020c4 added check for window in Common.now 2019-09-14 18:57:00 +01:00
liabru
046013ee0b added webpack build script 2019-09-14 18:38:33 +01:00
liabru
7c6cda00f8 added clamping to position resolver damping 2019-09-01 16:57:16 +01:00
liabru
516494e3df Added substeps feature to Matter.Runner 2019-09-01 13:49:22 +01:00
liabru
db8b73f09d Added updateVelocity argument to Body.setPosition, Body.setAngle, Body.translate, Body.rotate
Added Body.setSpeed, Body.setAngularSpeed
Added Body.getSpeed, Body.getVelocity, Body.getAngularVelocity
Changed all velocity functions to be time independent
2019-09-01 13:26:24 +01:00
liabru
0784a5b5df Added readonly body.deltaTime
Added delta property to engine update event
Added delta argument to various internal functions
Changed timeScale argument to use delta instead on various internal functions
Fixed issues when using an engine update delta of 0
Improved time independence for friction, air friction, restitution, sleeping, collisions, constraints
Removed optional correction argument from Engine.update
Removed correction and timeScale from Body.update and Matter.Runner
2019-09-01 12:21:16 +01:00
liabru
2ec247b7af added Body.setCentre, closes #684, closes #461, closes #679 2018-11-18 09:24:20 +00:00
liabru
d57747785f fix issues with render pixel ratio, closes #686, closes #687 2018-11-17 23:43:24 +00:00
Omar Shehata
c486635242
Fix typo in docs 2018-10-27 14:33:47 -04:00
liabru
7894b4b44d Merge branch 'pr/553’
* pr/553:
  Optimized Events.trigger method when no event is emitted
2018-06-12 13:13:08 +01:00
liabru
0d51fd1efc Merge branch 'pr/528'
* pr/528:
  reverted change to Body.set method
  Optimized Body's hidden class
2018-06-12 12:58:35 +01:00
liabru
4df048da79 Merge branch 'pr/527'
* pr/527:
  Optimization of Resolver.solvePosition method
2018-06-12 12:51:47 +01:00
liabru
52f3734b3e Merge branch 'pr/526'
* pr/526:
  linted code
  Algorithm optimization of Pair methods create and update
2018-06-12 12:01:06 +01:00
liabru
c04536f2c0 Merge branch 'pr/522'
* pr/522:
  Fixed end collision triggering more than once
  removal of unnecessary variable activePairs
  fixed code style
  aglorithm optimization of Pairs.update method
2018-06-12 11:46:48 +01:00
liabru
db30d79501 fix docs for Vector.angle, closes #471 2018-06-11 19:32:00 +01:00
liabru
f7f77b4cf8 fix Composite.bounds global issue, closes #627, closes #544 2018-06-11 19:18:18 +01:00
liabru
0cf97f5c3c fixed require for external libraries, closes #629, closes #559, closes #593, closes #365, closes #629 2018-06-11 19:05:09 +01:00
liabru
511de5b494 added missing polyfill warning to Svg.pathToVertices 2018-06-11 18:55:27 +01:00
Griva
0b5ce1d77f Fixed constraint pointB documentation 2018-06-09 16:15:25 +02:00
Brice Chevalier
e60ebaccc0 reverted change to Body.set method 2018-03-24 16:50:18 +09:00
Brice Chevalier
7220435e35 Merge branch 'optim-pairs-update' into optim-pair-update 2018-03-24 16:41:17 +09:00
Brice Chevalier
4e04043fe0 Fixed end collision triggering more than once 2018-03-24 16:39:25 +09:00
liabru
ec38eebc1d fix Common.isElement on node, closes #535 2018-01-10 21:34:17 +00:00
Brice Chevalier
b17cb48dbe Optimized Events.trigger method when no event is emitted 2018-01-06 12:17:00 +09:00
liabru
64be5a5e3e moved all private functions to module namespaces 2017-11-26 21:59:06 +00:00
liabru
2dc7a0bf5e Merge branch 'pr/440'
* pr/440:
  Do not warn on missing render.element if the canvas is already parented (because it was passed in at construction).
2017-11-25 17:31:58 +00:00
liabru
6593a72e46 added Query.collides, closes #478 2017-11-25 17:19:55 +00:00
liabru
3307760e6e improved docs for constraints on compound bodies, closes #442 2017-11-25 15:34:33 +00:00
liabru
841bf975f1 added missing docs for Matter.World aliases 2017-11-25 14:59:42 +00:00
liabru
ece66e6f16 fix centroid for static compound bodies, closes #483 2017-11-25 14:52:41 +00:00
liabru
50a89d0217 fix Body.scale for compound bodies 2017-11-25 14:16:38 +00:00
liabru
f7d18779be fix inertia change in Body.setMass, closes #378 2017-11-25 14:11:53 +00:00
Brice Chevalier
b3220cf3e8 Optimized Body's hidden class 2017-11-25 00:32:46 +09:00
Brice Chevalier
2eab580b68 Optimization of Resolver.solvePosition method 2017-11-24 17:44:32 +09:00
Brice Chevalier
235cb2d8bc linted code 2017-11-24 10:54:52 +09:00
Brice Chevalier
6931276cab Algorithm optimization of Pair methods create and update 2017-11-24 10:41:18 +09:00
liabru
894c1efeee fix point argument of Body.scale, closes #428 2017-11-22 22:05:18 +00:00
liabru
3bceef4f7e fix Vertices.chamfer radius argument, closes #467 2017-11-22 21:42:08 +00:00
liabru
18a084574e fix Common.isElement, closes #501, closes #507, closes #459, closes #468, closes #517 2017-11-22 21:27:34 +00:00
liabru
9eae36f50d moved private Matter.Engine functions on to namespace, closes #523 2017-11-22 20:43:03 +00:00
Brice Chevalier
59708eff22 removal of unnecessary variable activePairs 2017-11-22 12:02:23 +09:00
Brice Chevalier
7813c782c7 fixed code style 2017-11-22 11:59:06 +09:00
Brice Chevalier
b44fcf3f82 aglorithm optimization of Pairs.update method 2017-11-22 11:43:58 +09:00
liabru
774d8bccff fix lint errors 2017-07-06 23:36:39 +01:00
liabru
56b0bb463f Merge branch 'constraint-fixes'
* constraint-fixes: (31 commits)
  tweaked Example.doublePendulum
  added Composite.bounds
  upgraded matter-wrap
  added Examples.ragdoll
  upgraded matter-tools
  fixed various constraints in examples
  improved spring and pin rendering
  update alpha build
  added Example.constraints
  added constraint.render.type and constraint.render.anchor
  update alpha build
  added constraint damping
  update alpha build
  changed lint rules
  added Example.doublePendulum
  added rotation point parameter to Body.rotate, closes #410
  fix constraint.angularStiffness
  fix soft body stiffness
  fixed Examples.compound constraint offset
  improved Example.chains using pin constraint
  ...
2017-07-06 23:03:05 +01:00
liabru
79ffcf891e added Composite.bounds 2017-07-06 21:51:23 +01:00
Andrew n marshall
a529ec9dcd Do not warn on missing render.element if the canvas is already parented (because it was passed in at construction). 2017-07-02 20:25:34 -07:00
liabru
ac67ef8e5c fixed various constraints in examples 2017-06-28 00:21:17 +01:00
liabru
837c43bdb5 improved spring and pin rendering 2017-06-28 00:20:36 +01:00
liabru
0952516e57 added constraint.render.type and constraint.render.anchor 2017-06-26 23:20:34 +01:00
liabru
44c4d1ff8d added constraint damping 2017-06-12 19:53:40 +01:00
liabru
71998a0056 improved position resolver 2017-05-09 01:13:59 +01:00
liabru
d2af721c49 updated license and contributing 2017-05-09 00:46:03 +01:00
liabru
295cffeacf refactored Common.isElement 2017-05-09 00:41:05 +01:00
liabru
d63b0c25c8 removed Common.shadeColor 2017-05-09 00:40:16 +01:00
liabru
2b76c4c10b fixed Common.now 2017-05-09 00:39:35 +01:00
liabru
749ed5066e added rotation point parameter to Body.rotate, closes #410 2017-05-04 00:31:56 +01:00
liabru
ab0283b5b3 fix constraint.angularStiffness 2017-05-03 22:05:38 +01:00
liabru
1bae2dee45 fix soft body stiffness 2017-05-03 21:42:41 +01:00
liabru
130e6b3f56 improved Example.car using pin constraint 2017-05-03 21:26:40 +01:00
liabru
f49d053e1f added second pass for constraint solving 2017-05-03 21:13:29 +01:00
liabru
a5bd6b2d55 change constraint solve order 2017-05-03 21:10:14 +01:00
liabru
a8d1950148 fixed constraint torque calculation 2017-05-02 23:50:01 +01:00
liabru
068fdc0f2a fixed constraint torque calculation 2017-04-29 21:17:09 +01:00
liabru
daf26af006 implemented constraint warming 2017-04-25 23:48:37 +01:00
liabru
26a60e4dcf fixed various problems with constraints 2017-04-25 23:47:49 +01:00
liabru
59d62be899 added optional output argument to Vector.rotate 2017-04-25 23:43:29 +01:00
liabru
0ce686d0c1 fix lint 2017-02-02 00:17:01 +00:00
liabru
b3533937d4 added body.plugin, composite.plugin, constraint.plugin, engine.plugin properties 2017-01-24 20:33:37 +00:00
liabru
719ad649fe changed default render styles 2017-01-19 23:36:19 +00:00
liabru
1a40f2754c improved demo and examples 2017-01-16 23:47:39 +00:00
liabru
c8e5d5c3b0 added Render.startViewTransform and Render.endViewTransform 2017-01-16 23:47:39 +00:00
liabru
47443b3362 added Render.lookAt 2017-01-16 23:47:39 +00:00
liabru
ffb128cd0d change Matter.MouseConstraint to use engine beforeUpdate event, closes #73 2017-01-15 16:08:06 +00:00
Liam
68382d62c3 Merge pull request #315 from codeclown/patch-1
fix issue when render.lineWidth = 0, closes #220
2017-01-15 15:16:25 +00:00
liabru
a815ce4d0a fix Body.setStatic(body, false), closes #187 2016-12-04 23:54:07 +00:00
liabru
c72a9d017f add poly-decamp require shim 2016-12-02 00:29:08 +00:00
liabru
5024364761 Merge branch 'master' of https://github.com/RobertHerhold/matter-js into RobertHerhold-master
# Conflicts:
#	src/factory/Bodies.js
2016-12-01 23:58:53 +00:00
liabru
dd83386e0f fix Render.grid 2016-11-28 00:42:56 +00:00
liabru
86c4a61279 fix v8 optimisation issues 2016-11-24 01:33:31 +00:00
Martti Laine
74de894ed9 Fixes #220 2016-11-12 13:31:50 +02:00
liabru
9856e3cd79 improve docs 2016-11-03 23:35:00 +00:00
liabru
50ad7ca4c0 added Matter.before, Matter.after, Common.chainPathBefore, Common.chainPathAfter, Common.get, Common.set 2016-11-03 00:48:40 +00:00
liabru
05d0961483 fixed various Matter.Plugin issues 2016-11-03 00:44:17 +00:00
liabru
0e5a4579b6 fixed Body.create with no options 2016-11-03 00:43:07 +00:00
liabru
6f8b705b1d update Matter.Plugin docs 2016-09-19 23:15:51 +01:00
Robert Herhold
3d8f88e979 Update to latest poly-decomp.js API 2016-09-13 12:40:39 -04:00
liabru
83ae546ad6 changed naming approach for prerelease versions 2016-09-03 23:25:07 +01:00
liabru
3883981097 added docs for Matter.Plugin with tweaks 2016-09-03 23:23:45 +01:00
liabru
51b7b1dea0 added plugin status logging 2016-08-04 00:54:31 +01:00
liabru
d4d64edaa1 improved logging 2016-08-04 00:14:10 +01:00
liabru
8da170f382 refactor plugin system 2016-08-03 01:04:45 +01:00
liabru
e84c537d29 added Matter.Plugin initial implementation 2016-07-31 18:32:03 +01:00
liabru
7c8f6ced5c fix requestAnimationFrame polyfill for Matter.Runner, closes #252 2016-06-26 20:38:06 +01:00
liabru
ba1913068f Merge branch 'master' of https://github.com/jackismissing/matter-js into jackismissing-master
# Conflicts:
#	src/render/RenderPixi.js
2016-06-25 18:42:40 +01:00
liabru
4972af847e fixed issue with Matter.RenderPixi not being cleared when bodies removed, closes #218 2016-06-25 18:23:12 +01:00
liabru
ad033f5255 added note in docs about vertices order 2016-06-25 18:02:06 +01:00
liabru
1340159451 fix Matter.Mouse when element does not have fixed dimensions, closes #73 2016-06-25 17:34:28 +01:00
liabru
f59e2202ad fix tests 2016-04-28 22:20:07 +01:00
liabru
e8c899aeec deprecated Matter.RenderPixi 2016-04-26 21:32:14 +01:00
liabru
a6b97cd4e3 deprecated Matter.RenderPixi 2016-04-26 21:17:00 +01:00
liabru
72f90b99dd decouple Matter.RenderPixi 2016-04-26 20:48:13 +01:00
liabru
de823ebb08 decouple Matter.Render from Matter.Engine 2016-04-26 20:18:44 +01:00
Nicolas Garnier
aec19aecbb RenderPixi.js - added missing dependencies
Bounds and Vector were missing from the requires
2016-04-25 12:40:47 +02:00
liabru
f36fe2c329 handle missing options in Engine.create 2016-04-19 11:19:03 +01:00
liabru
d373172c19 Merge branch 'master' of github.com:liabru/matter-js 2016-04-19 11:05:34 +01:00
Joshua Heiland
158c40425e Engine uses provided world; fixes issue #230 2016-04-18 12:56:50 -07:00
liabru
e2e7c0b10d fix Matter.Engine.create docs to show element param is optional 2016-04-18 00:22:09 +01:00
liabru
afd7531fe4 added readonly to docs for type property, closes #235 2016-04-18 00:17:05 +01:00
liabru
23a773ae88 fix issue with removed bodies causing collisions 2016-04-09 20:10:35 +01:00
liabru
f428d6be58 fix Body.scale for circles, closes #234 2016-04-07 19:50:07 +01:00
liabru
e1a52d59aa Merged sensors from Misiur-master 2016-04-05 23:54:40 +01:00
Liam
1944f6a34c Merge pull request #224 from brollb/223-bounds-ignored-in-renderer
Updated `hasBounds` default value. Fixes #223
2016-04-05 23:22:06 +01:00
Brian Broll
053ea76bc6 Updated hasBounds default value. Fixes #223
WIP #223 changed 'render' to 'options'
2016-04-05 14:54:26 -05:00
Liam
79fa57e3cd Merge pull request #232 from Rantanen/docs
Document World bounds and Grid bucket size.
2016-04-05 20:46:39 +01:00
Mikko Rantanen
5054c9717c Document World bounds and Grid bucket size.
Added jsdoc comments for the following properties:

- `world.bounds`
- `grid.bucketWidth`
- `grid.bucketHeight`
2016-04-02 13:49:43 +03:00
Mikko Rantanen
a20a9fbd1c Fix the out-of-bounds check in grid broadphase
`world.bounds` is a normal bounds object with min and max coordinates instead of height and width.
2016-04-02 13:11:26 +03:00
liabru
e7e8c2610e fix issue with Bodies.circle label option, closes #195 2016-02-07 16:22:20 +00:00
liabru
490d232f48 added default for delta parameter in Engine.update, closes #200 2016-02-07 16:06:54 +00:00
liabru
b4e875bf55 fix lint issue 2016-02-07 15:49:09 +00:00
liabru
dbdabcca65 allow passing of pixi objects to Matter.RenderPixi at creation, closes #193 2016-02-07 15:47:23 +00:00
liabru
99dd6c518a fixed rendering of compound bodies 2016-02-07 15:25:38 +00:00
liabru
aaffee3b72 fixed rendering of angle indicators 2016-02-07 15:24:58 +00:00
liabru
8ac06b227a fixes to body opacity rendering 2016-02-07 15:23:58 +00:00
liabru
adcb610f05 added docs for body.render.opacity 2016-02-07 15:21:53 +00:00
liabru
c99e6afb1c Merge branch 'master' of https://github.com/ma1069/matter-js into ma1069-master 2016-02-07 13:02:31 +00:00
liabru
8fcb89342e added SVGPathSeg polyfill, closes #196 2016-02-07 12:46:16 +00:00
MatteoAvalle
5b755a1a62 Adding the opacity attribute to be able to draw semi-transarent sprites
Just a really simple commit adding a tiny feature I think it could be useful
while, at the same time, it seems even too tiny to specifically build a
custom render just to include it.
2016-02-05 11:24:58 +01:00
Brian Broll
dd5e2602e9 Changed bounds checking MIN_VALUE to -MAX_VALUE. Fixes #202
WIP #202. Changing Number.MAX_VALUE to Infinity
2016-02-04 15:04:00 -06:00
liabru
a38b22721c change gravity scale to variable rather than a constant 2015-12-29 22:50:24 +00:00
Marcin Misiurski
28084b005a Change permeable name to sensors, add isSensor to Pair 2015-12-28 21:38:09 +01:00