mirror of
https://github.com/liabru/matter-js.git
synced 2025-01-10 15:50:44 -05:00
release 0.15.0 (#946)
This commit is contained in:
parent
ac3da073ed
commit
7288532988
7 changed files with 7255 additions and 6809 deletions
54
CHANGELOG.md
54
CHANGELOG.md
|
@ -1,3 +1,57 @@
|
|||
## 0.15.0 (2020-12-24)
|
||||
|
||||
* add window global, stub require and handle bad values in test tools ([497ac80](https://github.com/liabru/matter-js/commit/497ac80))
|
||||
* added Body.setCentre, closes #684, closes #461, closes #679 ([2ec247b](https://github.com/liabru/matter-js/commit/2ec247b)), closes [#684](https://github.com/liabru/matter-js/issues/684) [#461](https://github.com/liabru/matter-js/issues/461) [#679](https://github.com/liabru/matter-js/issues/679)
|
||||
* added browser tests ([ceb7cd5](https://github.com/liabru/matter-js/commit/ceb7cd5))
|
||||
* Added build comparison tools and tests ([b7c938a](https://github.com/liabru/matter-js/commit/b7c938a))
|
||||
* added check for window in Common.now ([9ef9d02](https://github.com/liabru/matter-js/commit/9ef9d02))
|
||||
* added comparison output file option to test tools ([45aae25](https://github.com/liabru/matter-js/commit/45aae25))
|
||||
* Added config and test files to lint ([21e4ea6](https://github.com/liabru/matter-js/commit/21e4ea6))
|
||||
* added Constraint.pointAWorld and Constraint.pointBWorld ([3c32969](https://github.com/liabru/matter-js/commit/3c32969))
|
||||
* added examples to dev server bundle and commit built examples ([fe80478](https://github.com/liabru/matter-js/commit/fe80478))
|
||||
* added module export to examples ([f9ea799](https://github.com/liabru/matter-js/commit/f9ea799))
|
||||
* added overlap metric to test tools ([3fd674d](https://github.com/liabru/matter-js/commit/3fd674d))
|
||||
* added release scripts ([341c247](https://github.com/liabru/matter-js/commit/341c247))
|
||||
* added tag push to release task ([060283b](https://github.com/liabru/matter-js/commit/060283b))
|
||||
* added timing to engine snapshot ([e0cdbb8](https://github.com/liabru/matter-js/commit/e0cdbb8))
|
||||
* Added watch content base to dev server ([f471d4e](https://github.com/liabru/matter-js/commit/f471d4e))
|
||||
* added webpack build script ([046013e](https://github.com/liabru/matter-js/commit/046013e))
|
||||
* changed alpha build configuration ([182c84a](https://github.com/liabru/matter-js/commit/182c84a))
|
||||
* changed demo to auto populate examples with sourceLink and init ([5b0d34b](https://github.com/liabru/matter-js/commit/5b0d34b))
|
||||
* changed demo to serve without sub-directory ([823bbc0](https://github.com/liabru/matter-js/commit/823bbc0))
|
||||
* changed docs build config ([864452d](https://github.com/liabru/matter-js/commit/864452d))
|
||||
* changed example tests to use jest ([104d319](https://github.com/liabru/matter-js/commit/104d319))
|
||||
* fix decomp import in Bodies.fromVertices ([94e9614](https://github.com/liabru/matter-js/commit/94e9614))
|
||||
* fix decomp require ([0af1645](https://github.com/liabru/matter-js/commit/0af1645))
|
||||
* fix issues with render pixel ratio, closes #686, closes #687 ([d577477](https://github.com/liabru/matter-js/commit/d577477)), closes [#686](https://github.com/liabru/matter-js/issues/686) [#687](https://github.com/liabru/matter-js/issues/687)
|
||||
* fix lint ([5a0079d](https://github.com/liabru/matter-js/commit/5a0079d))
|
||||
* fix lint issues ([9ca21c1](https://github.com/liabru/matter-js/commit/9ca21c1))
|
||||
* fix path to build in test worker ([fcdb4fa](https://github.com/liabru/matter-js/commit/fcdb4fa))
|
||||
* fix preversion script ([c368c14](https://github.com/liabru/matter-js/commit/c368c14))
|
||||
* fix terrain example module export ([4a967ec](https://github.com/liabru/matter-js/commit/4a967ec))
|
||||
* Fix typo in docs ([c486635](https://github.com/liabru/matter-js/commit/c486635))
|
||||
* fixed plugins in compare ([82bb415](https://github.com/liabru/matter-js/commit/82bb415))
|
||||
* implemented threaded comparison testing ([285d70d](https://github.com/liabru/matter-js/commit/285d70d))
|
||||
* Optimized Body's hidden class ([b3220cf](https://github.com/liabru/matter-js/commit/b3220cf))
|
||||
* Optimized Events.trigger method when no event is emitted ([b17cb48](https://github.com/liabru/matter-js/commit/b17cb48))
|
||||
* remove gulp ([6a28090](https://github.com/liabru/matter-js/commit/6a28090))
|
||||
* remove old demo libs ([13c7eb5](https://github.com/liabru/matter-js/commit/13c7eb5))
|
||||
* removed unused gulp release tasks ([e5a7311](https://github.com/liabru/matter-js/commit/e5a7311))
|
||||
* removed yuidocjs dev dependency ([ee848d2](https://github.com/liabru/matter-js/commit/ee848d2))
|
||||
* Set loose build version on dev server ([1fcf292](https://github.com/liabru/matter-js/commit/1fcf292))
|
||||
* update build script ([90abab6](https://github.com/liabru/matter-js/commit/90abab6))
|
||||
* update default render theme ([d258411](https://github.com/liabru/matter-js/commit/d258411))
|
||||
* update demo and example render styles ([6dd5ec5](https://github.com/liabru/matter-js/commit/6dd5ec5))
|
||||
* update dependencies ([e1e058c](https://github.com/liabru/matter-js/commit/e1e058c)) ([5f5b8a1](https://github.com/liabru/matter-js/commit/5f5b8a1))
|
||||
* update examples build config and scripts ([69afb11](https://github.com/liabru/matter-js/commit/69afb11))
|
||||
* update package lock ([ac3da07](https://github.com/liabru/matter-js/commit/ac3da07))
|
||||
* updated build scripts ([6b698ea](https://github.com/liabru/matter-js/commit/6b698ea))
|
||||
* updated ci ([288b9cd](https://github.com/liabru/matter-js/commit/288b9cd))
|
||||
* updated docs ([50cf171](https://github.com/liabru/matter-js/commit/50cf171))
|
||||
* updated readme ([ea5c012](https://github.com/liabru/matter-js/commit/ea5c012)) ([61b1963](https://github.com/liabru/matter-js/commit/61b1963))
|
||||
|
||||
|
||||
|
||||
<a name="0.14.2"></a>
|
||||
## <small>0.14.2 (2018-06-11)</small>
|
||||
|
||||
|
|
42
RELEASE.md
Normal file
42
RELEASE.md
Normal file
|
@ -0,0 +1,42 @@
|
|||
## ▲.● matter.js `0.15.0`
|
||||
|
||||
Release notes for `0.15.0`. See the release [readme](https://github.com/liabru/matter-js/blob/0.15.0/README.md) for further information.
|
||||
|
||||
### Highlights ✺
|
||||
|
||||
- __Optimised performance up to ~30% boost vs. `0.14.2`__ ([#528](https://github.com/liabru/matter-js/pull/528)) ([#522](https://github.com/liabru/matter-js/pull/522)) ([#553](https://github.com/liabru/matter-js/pull/553))
|
||||
- Added `Body.setCentre` ([2ec247b](https://github.com/liabru/matter-js/commit/2ec247b))
|
||||
- Added `Constraint.pointAWorld` and `Constraint.pointBWorld` ([3c32969](https://github.com/liabru/matter-js/commit/3c32969))
|
||||
- Changed default colour scheme ([d258411](https://github.com/liabru/matter-js/commit/d258411)) ([6dd5ec5](https://github.com/liabru/matter-js/commit/6dd5ec5))
|
||||
- Fixed issues with decomp require ([0af1645](https://github.com/liabru/matter-js/commit/0af1645))
|
||||
- Fixed issues with render pixel ratio ([d577477](https://github.com/liabru/matter-js/commit/d577477))
|
||||
|
||||
### Changes ✲
|
||||
|
||||
See the release [compare page](https://github.com/liabru/matter-js/compare/0.14.2...0.15.0) and the [changelog](https://github.com/liabru/matter-js/blob/0.15.0/CHANGELOG.md) for a detailed list of all changes.
|
||||
|
||||
### Comparison ⎄
|
||||
|
||||
Differences in behaviour, quality and performance against the previous release `0.14.2`. For more information see [comparison method](https://github.com/liabru/matter-js/pull/794).
|
||||
|
||||
```ocaml
|
||||
Output comparison of 41 examples against matter-js@0.14.2 build on last run
|
||||
|
||||
Similarity 100% Performance +33.6% Overlap +0.00%
|
||||
|
||||
airFriction · · avalanche · · ballPool · · bridge · · broadphase · · car · ·
|
||||
catapult · · chains · · circleStack · · cloth · · collisionFiltering · ·
|
||||
compositeManipulation · · compound · · compoundStack · · concave · · constraints · ·
|
||||
doublePendulum · · events · · friction · · gravity · · gyro · ·
|
||||
manipulation · · mixed · · newtonsCradle · · pyramid · · ragdoll · ·
|
||||
raycasting · · restitution · · rounded · · sensors · · sleeping · ·
|
||||
slingshot · · softBody · · sprites · · stack · · staticFriction · ·
|
||||
stress · · stress2 · · timescale · · views · · wreckingBall · ·
|
||||
|
||||
where · no change ● extrinsics changed ◆ intrinsics changed
|
||||
|
||||
```
|
||||
|
||||
### Contributors ♥︎
|
||||
|
||||
Many thanks to the [contributors](https://github.com/liabru/matter-js/compare/0.14.2...0.15.0) of this release, [past contributors](https://github.com/liabru/matter-js/graphs/contributors) as well those involved in the [community](https://github.com/liabru/matter-js/issues) for your input and support.
|
13712
build/matter.js
13712
build/matter.js
File diff suppressed because it is too large
Load diff
96
build/matter.min.js
vendored
96
build/matter.min.js
vendored
File diff suppressed because one or more lines are too long
|
@ -1,5 +1,5 @@
|
|||
/*!
|
||||
* matter-js-examples 0.14.2 by @liabru 2020-12-05
|
||||
* matter-js-examples 0.15.0 by @liabru 2020-12-26
|
||||
* http://brm.io/matter-js/
|
||||
* License MIT
|
||||
*
|
||||
|
@ -312,9 +312,9 @@ Example.avalanche = function() {
|
|||
World.add(world, stack);
|
||||
|
||||
World.add(world, [
|
||||
Bodies.rectangle(200, 150, 700, 20, { isStatic: true, angle: Math.PI * 0.06 }),
|
||||
Bodies.rectangle(500, 350, 700, 20, { isStatic: true, angle: -Math.PI * 0.06 }),
|
||||
Bodies.rectangle(340, 580, 700, 20, { isStatic: true, angle: Math.PI * 0.04 })
|
||||
Bodies.rectangle(200, 150, 700, 20, { isStatic: true, angle: Math.PI * 0.06, render: { fillStyle: '#060a19' } }),
|
||||
Bodies.rectangle(500, 350, 700, 20, { isStatic: true, angle: -Math.PI * 0.06, render: { fillStyle: '#060a19' } }),
|
||||
Bodies.rectangle(340, 580, 700, 20, { isStatic: true, angle: Math.PI * 0.04, render: { fillStyle: '#060a19' } })
|
||||
]);
|
||||
|
||||
// add mouse control
|
||||
|
@ -407,7 +407,7 @@ Example.ballPool = function() {
|
|||
|
||||
// add bodies
|
||||
World.add(world, [
|
||||
Bodies.rectangle(400, 600, 1200, 50.5, { isStatic: true })
|
||||
Bodies.rectangle(400, 600, 1200, 50.5, { isStatic: true, render: { fillStyle: '#060a19' } })
|
||||
]);
|
||||
|
||||
var stack = Composites.stack(100, 0, 10, 8, 10, 10, function(x, y) {
|
||||
|
@ -521,7 +521,7 @@ Example.bridge = function() {
|
|||
density: 0.005,
|
||||
frictionAir: 0.05,
|
||||
render: {
|
||||
fillStyle: '#575375'
|
||||
fillStyle: '#060a19'
|
||||
}
|
||||
});
|
||||
});
|
||||
|
@ -764,9 +764,9 @@ Example.car = function() {
|
|||
World.add(world, Composites.car(350, 300, 150 * scale, 30 * scale, 30 * scale));
|
||||
|
||||
World.add(world, [
|
||||
Bodies.rectangle(200, 150, 400, 20, { isStatic: true, angle: Math.PI * 0.06 }),
|
||||
Bodies.rectangle(500, 350, 650, 20, { isStatic: true, angle: -Math.PI * 0.06 }),
|
||||
Bodies.rectangle(300, 560, 600, 20, { isStatic: true, angle: Math.PI * 0.04 })
|
||||
Bodies.rectangle(200, 150, 400, 20, { isStatic: true, angle: Math.PI * 0.06, render: { fillStyle: '#060a19' }}),
|
||||
Bodies.rectangle(500, 350, 650, 20, { isStatic: true, angle: -Math.PI * 0.06, render: { fillStyle: '#060a19' }}),
|
||||
Bodies.rectangle(300, 560, 600, 20, { isStatic: true, angle: Math.PI * 0.04, render: { fillStyle: '#060a19' }})
|
||||
]);
|
||||
|
||||
// add mouse control
|
||||
|
@ -863,9 +863,9 @@ Example.catapult = function() {
|
|||
World.add(world, [
|
||||
stack,
|
||||
catapult,
|
||||
Bodies.rectangle(400, 600, 800, 50.5, { isStatic: true }),
|
||||
Bodies.rectangle(250, 555, 20, 50, { isStatic: true }),
|
||||
Bodies.rectangle(400, 535, 20, 80, { isStatic: true, collisionFilter: { group: group } }),
|
||||
Bodies.rectangle(400, 600, 800, 50.5, { isStatic: true, render: { fillStyle: '#060a19' } }),
|
||||
Bodies.rectangle(250, 555, 20, 50, { isStatic: true, render: { fillStyle: '#060a19' } }),
|
||||
Bodies.rectangle(400, 535, 20, 80, { isStatic: true, collisionFilter: { group: group }, render: { fillStyle: '#060a19' } }),
|
||||
Bodies.circle(560, 100, 50, { density: 0.005 }),
|
||||
Constraint.create({
|
||||
bodyA: catapult,
|
||||
|
@ -1187,8 +1187,8 @@ Example.cloth = function() {
|
|||
|
||||
World.add(world, [
|
||||
cloth,
|
||||
Bodies.circle(300, 500, 80, { isStatic: true }),
|
||||
Bodies.rectangle(500, 480, 80, 80, { isStatic: true }),
|
||||
Bodies.circle(300, 500, 80, { isStatic: true, render: { fillStyle: '#060a19' }}),
|
||||
Bodies.rectangle(500, 480, 80, 80, { isStatic: true, render: { fillStyle: '#060a19' }}),
|
||||
Bodies.rectangle(400, 609, 800, 50, { isStatic: true })
|
||||
]);
|
||||
|
||||
|
@ -1261,8 +1261,7 @@ Example.collisionFiltering = function() {
|
|||
options: {
|
||||
width: 800,
|
||||
height: 600,
|
||||
wireframes: false,
|
||||
background: '#111'
|
||||
wireframes: false
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -1278,9 +1277,9 @@ Example.collisionFiltering = function() {
|
|||
greenCategory = 0x0004,
|
||||
blueCategory = 0x0008;
|
||||
|
||||
var redColor = '#C44D58',
|
||||
blueColor = '#4ECDC4',
|
||||
greenColor = '#C7F464';
|
||||
var colorA = '#f55a3c',
|
||||
colorB = '#063e7b',
|
||||
colorC = '#f5d259';
|
||||
|
||||
// add floor
|
||||
World.add(world, Bodies.rectangle(400, 600, 900, 50, {
|
||||
|
@ -1295,14 +1294,14 @@ Example.collisionFiltering = function() {
|
|||
World.add(world,
|
||||
Composites.stack(275, 100, 5, 9, 10, 10, function(x, y, column, row) {
|
||||
var category = redCategory,
|
||||
color = redColor;
|
||||
color = colorA;
|
||||
|
||||
if (row > 5) {
|
||||
category = blueCategory;
|
||||
color = blueColor;
|
||||
color = colorB;
|
||||
} else if (row > 2) {
|
||||
category = greenCategory;
|
||||
color = greenColor;
|
||||
color = colorC;
|
||||
}
|
||||
|
||||
return Bodies.circle(x, y, 20, {
|
||||
|
@ -1325,7 +1324,7 @@ Example.collisionFiltering = function() {
|
|||
mask: defaultCategory | greenCategory
|
||||
},
|
||||
render: {
|
||||
fillStyle: greenColor
|
||||
fillStyle: colorC
|
||||
}
|
||||
})
|
||||
);
|
||||
|
@ -1337,7 +1336,7 @@ Example.collisionFiltering = function() {
|
|||
mask: defaultCategory | redCategory
|
||||
},
|
||||
render: {
|
||||
fillStyle: redColor
|
||||
fillStyle: colorA
|
||||
}
|
||||
})
|
||||
);
|
||||
|
@ -1349,7 +1348,7 @@ Example.collisionFiltering = function() {
|
|||
mask: defaultCategory | blueCategory
|
||||
},
|
||||
render: {
|
||||
fillStyle: blueColor
|
||||
fillStyle: colorB
|
||||
}
|
||||
})
|
||||
);
|
||||
|
@ -1782,7 +1781,7 @@ Example.concave = function() {
|
|||
horseShoe = Vertices.fromPath('35 7 19 17 14 38 14 58 25 79 45 85 65 84 65 66 46 67 34 59 30 44 33 29 45 23 66 23 66 7 53 7');
|
||||
|
||||
var stack = Composites.stack(50, 50, 6, 4, 10, 10, function(x, y) {
|
||||
var color = Common.choose(['#556270', '#4ECDC4', '#C7F464', '#FF6B6B', '#C44D58']);
|
||||
var color = Common.choose(['#f19648', '#f5d259', '#f55a3c', '#063e7b', '#ececd1']);
|
||||
return Bodies.fromVertices(x, y, Common.choose([arrow, chevron, star, horseShoe]), {
|
||||
render: {
|
||||
fillStyle: color,
|
||||
|
@ -2055,8 +2054,7 @@ Example.doublePendulum = function() {
|
|||
options: {
|
||||
width: 800,
|
||||
height: 600,
|
||||
wireframes: false,
|
||||
background: '#0f0f13'
|
||||
wireframes: false
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -2083,9 +2081,6 @@ Example.doublePendulum = function() {
|
|||
});
|
||||
});
|
||||
|
||||
pendulum.bodies[0].render.strokeStyle = '#4a485b';
|
||||
pendulum.bodies[1].render.strokeStyle = '#4a485b';
|
||||
|
||||
world.gravity.scale = 0.002;
|
||||
|
||||
Composites.chain(pendulum, 0.45, 0, -0.45, 0, {
|
||||
|
@ -2419,17 +2414,17 @@ Example.friction = function() {
|
|||
]);
|
||||
|
||||
World.add(world, [
|
||||
Bodies.rectangle(300, 180, 700, 20, { isStatic: true, angle: Math.PI * 0.06 }),
|
||||
Bodies.rectangle(300, 180, 700, 20, { isStatic: true, angle: Math.PI * 0.06, render: { fillStyle: '#060a19' } }),
|
||||
Bodies.rectangle(300, 70, 40, 40, { friction: 0.001 })
|
||||
]);
|
||||
|
||||
World.add(world, [
|
||||
Bodies.rectangle(300, 350, 700, 20, { isStatic: true, angle: Math.PI * 0.06 }),
|
||||
Bodies.rectangle(300, 350, 700, 20, { isStatic: true, angle: Math.PI * 0.06, render: { fillStyle: '#060a19' } }),
|
||||
Bodies.rectangle(300, 250, 40, 40, { friction: 0.0005 })
|
||||
]);
|
||||
|
||||
World.add(world, [
|
||||
Bodies.rectangle(300, 520, 700, 20, { isStatic: true, angle: Math.PI * 0.06 }),
|
||||
Bodies.rectangle(300, 520, 700, 20, { isStatic: true, angle: Math.PI * 0.06, render: { fillStyle: '#060a19' } }),
|
||||
Bodies.rectangle(300, 430, 40, 40, { friction: 0 })
|
||||
]);
|
||||
|
||||
|
@ -2760,15 +2755,15 @@ Example.manipulation = function() {
|
|||
Runner.run(runner, engine);
|
||||
|
||||
// add bodies
|
||||
var bodyA = Bodies.rectangle(100, 200, 50, 50, { isStatic: true }),
|
||||
var bodyA = Bodies.rectangle(100, 200, 50, 50, { isStatic: true, render: { fillStyle: '#060a19' } }),
|
||||
bodyB = Bodies.rectangle(200, 200, 50, 50),
|
||||
bodyC = Bodies.rectangle(300, 200, 50, 50),
|
||||
bodyD = Bodies.rectangle(400, 200, 50, 50),
|
||||
bodyE = Bodies.rectangle(550, 200, 50, 50),
|
||||
bodyF = Bodies.rectangle(700, 200, 50, 50),
|
||||
bodyG = Bodies.circle(400, 100, 25),
|
||||
partA = Bodies.rectangle(600, 200, 120, 50),
|
||||
partB = Bodies.rectangle(660, 200, 50, 190),
|
||||
bodyG = Bodies.circle(400, 100, 25, { render: { fillStyle: '#060a19' } }),
|
||||
partA = Bodies.rectangle(600, 200, 120, 50, { render: { fillStyle: '#060a19' } }),
|
||||
partB = Bodies.rectangle(660, 200, 50, 190, { render: { fillStyle: '#060a19' } }),
|
||||
compound = Body.create({
|
||||
parts: [partA, partB],
|
||||
isStatic: true
|
||||
|
@ -3103,8 +3098,7 @@ Example.ragdoll = function() {
|
|||
options: {
|
||||
width: 800,
|
||||
height: 600,
|
||||
showAngleIndicator: true,
|
||||
background: '#0f0f13'
|
||||
showAngleIndicator: true
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -3121,7 +3115,9 @@ Example.ragdoll = function() {
|
|||
return Bodies.rectangle(x - 50, y + column * 50, 100, 1000, {
|
||||
isStatic: true,
|
||||
render: {
|
||||
fillStyle: '#222'
|
||||
fillStyle: '#060a19',
|
||||
strokeStyle: '#ffffff',
|
||||
lineWidth: 1
|
||||
}
|
||||
});
|
||||
});
|
||||
|
@ -3131,7 +3127,7 @@ Example.ragdoll = function() {
|
|||
var sides = Math.round(Common.random(1, 8)),
|
||||
options = {
|
||||
render: {
|
||||
fillStyle: Common.choose(['#006BA6', '#0496FF', '#D81159', '#8F2D56'])
|
||||
fillStyle: Common.choose(['#f19648', '#f5d259', '#f55a3c', '#063e7b', '#ececd1'])
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -4054,8 +4050,7 @@ Example.sensors = function() {
|
|||
options: {
|
||||
width: 800,
|
||||
height: 600,
|
||||
wireframes: false,
|
||||
background: '#111'
|
||||
wireframes: false
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -4066,14 +4061,14 @@ Example.sensors = function() {
|
|||
Runner.run(runner, engine);
|
||||
|
||||
// add bodies
|
||||
var redColor = '#C44D58',
|
||||
greenColor = '#C7F464';
|
||||
var colorA = '#f55a3c',
|
||||
colorB = '#f5d259';
|
||||
|
||||
var collider = Bodies.rectangle(400, 300, 500, 50, {
|
||||
isSensor: true,
|
||||
isStatic: true,
|
||||
render: {
|
||||
strokeStyle: redColor,
|
||||
strokeStyle: colorA,
|
||||
fillStyle: 'transparent',
|
||||
lineWidth: 1
|
||||
}
|
||||
|
@ -4081,11 +4076,11 @@ Example.sensors = function() {
|
|||
|
||||
World.add(world, [
|
||||
collider,
|
||||
Bodies.rectangle(400, 620, 800, 50, {
|
||||
Bodies.rectangle(400, 600, 800, 50, {
|
||||
isStatic: true,
|
||||
render: {
|
||||
fillStyle: 'transparent',
|
||||
lineWidth: 1
|
||||
fillStyle: '#060a19',
|
||||
lineWidth: 0
|
||||
}
|
||||
})
|
||||
]);
|
||||
|
@ -4093,7 +4088,7 @@ Example.sensors = function() {
|
|||
World.add(world,
|
||||
Bodies.circle(400, 40, 30, {
|
||||
render: {
|
||||
strokeStyle: greenColor,
|
||||
strokeStyle: colorB,
|
||||
fillStyle: 'transparent',
|
||||
lineWidth: 1
|
||||
}
|
||||
|
@ -4107,9 +4102,9 @@ Example.sensors = function() {
|
|||
var pair = pairs[i];
|
||||
|
||||
if (pair.bodyA === collider) {
|
||||
pair.bodyB.render.strokeStyle = redColor;
|
||||
pair.bodyB.render.strokeStyle = colorA;
|
||||
} else if (pair.bodyB === collider) {
|
||||
pair.bodyA.render.strokeStyle = redColor;
|
||||
pair.bodyA.render.strokeStyle = colorA;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
@ -4121,9 +4116,9 @@ Example.sensors = function() {
|
|||
var pair = pairs[i];
|
||||
|
||||
if (pair.bodyA === collider) {
|
||||
pair.bodyB.render.strokeStyle = greenColor;
|
||||
pair.bodyB.render.strokeStyle = colorB;
|
||||
} else if (pair.bodyB === collider) {
|
||||
pair.bodyA.render.strokeStyle = greenColor;
|
||||
pair.bodyA.render.strokeStyle = colorB;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
@ -4322,7 +4317,7 @@ Example.slingshot = function() {
|
|||
Runner.run(runner, engine);
|
||||
|
||||
// add bodies
|
||||
var ground = Bodies.rectangle(395, 600, 815, 50, { isStatic: true }),
|
||||
var ground = Bodies.rectangle(395, 600, 815, 50, { isStatic: true, render: { fillStyle: '#060a19' } }),
|
||||
rockOptions = { density: 0.004 },
|
||||
rock = Bodies.polygon(170, 450, 8, 20, rockOptions),
|
||||
anchor = { x: 170, y: 450 },
|
||||
|
@ -4336,7 +4331,7 @@ Example.slingshot = function() {
|
|||
return Bodies.rectangle(x, y, 25, 40);
|
||||
});
|
||||
|
||||
var ground2 = Bodies.rectangle(610, 250, 200, 20, { isStatic: true });
|
||||
var ground2 = Bodies.rectangle(610, 250, 200, 20, { isStatic: true, render: { fillStyle: '#060a19' } });
|
||||
|
||||
var pyramid2 = Composites.pyramid(550, 0, 5, 10, 0, 0, function(x, y) {
|
||||
return Bodies.rectangle(x, y, 25, 40);
|
||||
|
@ -4515,7 +4510,6 @@ Example.sprites = function() {
|
|||
options: {
|
||||
width: 800,
|
||||
height: 600,
|
||||
background: '#0f0f13',
|
||||
showAngleIndicator: false,
|
||||
wireframes: false
|
||||
}
|
||||
|
@ -4741,7 +4735,7 @@ Example.staticFriction = function() {
|
|||
Runner.run(runner, engine);
|
||||
|
||||
// add bodies
|
||||
var body = Bodies.rectangle(400, 500, 200, 60, { isStatic: true, chamfer: 10 }),
|
||||
var body = Bodies.rectangle(400, 500, 200, 60, { isStatic: true, chamfer: 10, render: { fillStyle: '#060a19' } }),
|
||||
size = 50,
|
||||
counter = -1;
|
||||
|
||||
|
@ -5046,7 +5040,7 @@ Example.svg = function() {
|
|||
(function(i) {
|
||||
$.get('./svg/' + svgs[i] + '.svg').done(function(data) {
|
||||
var vertexSets = [],
|
||||
color = Common.choose(['#556270', '#4ECDC4', '#C7F464', '#FF6B6B', '#C44D58']);
|
||||
color = Common.choose(['#f19648', '#f5d259', '#f55a3c', '#063e7b', '#ececd1']);
|
||||
|
||||
$(data).find('path').each(function(i, path) {
|
||||
var points = Svg.pathToVertices(path, 30);
|
||||
|
@ -5066,7 +5060,7 @@ Example.svg = function() {
|
|||
|
||||
$.get('./svg/svg.svg').done(function(data) {
|
||||
var vertexSets = [],
|
||||
color = Common.choose(['#556270', '#4ECDC4', '#C7F464', '#FF6B6B', '#C44D58']);
|
||||
color = Common.choose(['#f19648', '#f5d259', '#f55a3c', '#063e7b', '#ececd1']);
|
||||
|
||||
$(data).find('path').each(function(i, path) {
|
||||
vertexSets.push(Svg.pathToVertices(path, 30));
|
||||
|
@ -5182,8 +5176,8 @@ Example.terrain = function() {
|
|||
terrain = Bodies.fromVertices(400, 350, vertexSets, {
|
||||
isStatic: true,
|
||||
render: {
|
||||
fillStyle: '#2e2b44',
|
||||
strokeStyle: '#2e2b44',
|
||||
fillStyle: '#060a19',
|
||||
strokeStyle: '#060a19',
|
||||
lineWidth: 1
|
||||
}
|
||||
}, true);
|
||||
|
|
2
package-lock.json
generated
2
package-lock.json
generated
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "matter-js",
|
||||
"version": "0.14.2",
|
||||
"version": "0.15.0",
|
||||
"lockfileVersion": 1,
|
||||
"requires": true,
|
||||
"dependencies": {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "matter-js",
|
||||
"version": "0.14.2",
|
||||
"version": "0.15.0",
|
||||
"license": "MIT",
|
||||
"homepage": "http://brm.io/matter-js/",
|
||||
"author": "Liam Brummitt <liam@brm.io> (http://brm.io/)",
|
||||
|
|
Loading…
Reference in a new issue