Skip to content

Commit f45fc59

Browse files
committed
Release 0.8.0
1 parent 7cae797 commit f45fc59

File tree

5 files changed

+15
-27
lines changed

5 files changed

+15
-27
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
# Changelog
22

3+
## 0.8.0 (Sept 7, 2019)
4+
5+
- Combine consecutive duplicate points in polygons to remove zero-length edges. (Fixes #55)
6+
- Add the ability to set an offset for circles - thanks [funnisimo](https://github.com/funnisimo)!
7+
38
## 0.7.1 (May 23, 2018)
49

510
- Check explicitly for `undefined` `y` param when scaling vectors. (Fixes #52)

README.md

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ It also supports checking whether a point is inside a circle or polygon.
1616

1717
It's released under the [MIT](http://en.wikipedia.org/wiki/MIT_License) license.
1818

19-
Current version: `0.7.1`. [Annotated source code](http://jriecken.github.io/sat-js/docs/SAT.html) is available.
19+
Current version: `0.8.0`.
2020

2121
Nicely compresses with the [Google Closure Compiler](https://developers.google.com/closure/compiler/) in **Advanced** mode to about 6KB (2KB gzipped)
2222

@@ -90,7 +90,9 @@ var p = new SAT.Polygon(new SAT.Vector(), [
9090

9191
Note: The points are counter-clockwise *with respect to the coordinate system*. If you directly draw the points on a screen that has the origin at the top-left corner it will _appear_ visually that the points are being specified clockwise. This is just because of the inversion of the Y-axis when being displayed.
9292

93-
You can create a line segment by creating a `Polygon` that contains only 2 ppoints.
93+
You can create a line segment by creating a `Polygon` that contains only 2 points.
94+
95+
Any identical consecutive points will be combined. (this can happen if you convert a `Box` with zero width or height into a `Polygon`)
9496

9597
It has the following properties:
9698

@@ -298,16 +300,13 @@ SAT.pointInPolygon(new V(0,0), triangle); // false
298300
SAT.pointInPolygon(new V(35, 5), triangle); // true
299301
SAT.pointInCircle(new V(0,0), circle); // false
300302
SAT.pointInCircle(new V(110,110), circle); // true
301-
302303
```
303304

304-
Tests
305-
-----
305+
## Tests
306306

307307
To run the tests from your console:
308308

309309
```
310-
mocha
310+
npm install
311+
npm run test
311312
```
312-
313-
To install `mocha` you will need to have run `npm install` after cloning the repo.

SAT.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
// Version 0.7.1 - Copyright 2012 - 2018 - Jim Riecken <jimr@jimr.ca>
1+
// Version 0.8.0 - Copyright 2012 - 2018 - Jim Riecken <jimr@jimr.ca>
22
//
33
// Released under the MIT License - https://github.com/jriecken/sat-js
44
//
55
// A simple library for determining intersections of circles and
66
// polygons using the Separating Axis Theorem.
7-
/** @preserve SAT.js - Version 0.7.1 - Copyright 2012 - 2018 - Jim Riecken <jimr@jimr.ca> - released under the MIT License. https://github.com/jriecken/sat-js */
7+
/** @preserve SAT.js - Version 0.8.0 - Copyright 2012 - 2018 - Jim Riecken <jimr@jimr.ca> - released under the MIT License. https://github.com/jriecken/sat-js */
88

99
/*global define: false, module: false*/
1010
/*jshint shadow:true, sub:true, forin:true, noarg:true, noempty:true,

SAT.min.js

Lines changed: 0 additions & 16 deletions
This file was deleted.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "sat",
33
"description": "Library for performing 2D collision detection",
4-
"version": "0.7.1",
4+
"version": "0.8.0",
55
"author": "Jim Riecken <jriecken@gmail.com>",
66
"keywords": [
77
"collision detection",

0 commit comments

Comments
 (0)