Skip to content

Commit d2af721

Browse files
committed
updated license and contributing
1 parent 295cffe commit d2af721

File tree

7 files changed

+27
-12
lines changed

7 files changed

+27
-12
lines changed

Diff for: CONTRIBUTING.md

+12-4
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,10 @@
1-
### Building and Contributing
1+
# Contributing
2+
3+
## License Agreement
4+
5+
When providing any contributions, you must agree and be legally entitled to provide them for use and distribution in the project under the same terms as the [license](https://github.com/liabru/matter-js/blob/master/LICENSE), otherwise they can not be accepted.
6+
7+
## Building
28

39
To build you must first install [node.js](http://nodejs.org/) and [gulp](http://gulpjs.com/), then run
410

@@ -8,8 +14,10 @@ This will install the required build dependencies, then run
814

915
gulp dev
1016

11-
which is a task that builds the `matter-dev.js` file, spawns a `connect` and `watch` server, then opens `demo/dev.html` in your browser. Any changes you make to the source will automatically rebuild `matter-dev.js` and reload your browser for quick and easy testing.
17+
which is a task that builds the `matter-dev.js` file, spawns a development server and opens `http://localhost:8000/demo/index.html` in your browser. Any changes you make to the source will automatically rebuild `matter-dev.js` and reload your browser.
18+
19+
## Contributions
1220

13-
Contributions are welcome, please ensure they follow the same style and architecture as the rest of the code. You should run `gulp test` to ensure `eslint` gives no errors. Please do not include any changes to the files in the `build` directory.
21+
Contributions by pull request are welcome! Please ensure they follow the same style and architecture as the rest of the code. You should run `gulp test` and ensure there are no reported errors. Please do not include any changes to the files in the `build` directory. All contributors must agree to the license agreement described at the beginning of this document.
1422

15-
If you'd like to contribute but not sure what to work on, feel free to message me. Thanks!
23+
If you'd like to contribute but not sure what to work on, feel free to get in touch.

Diff for: LICENSE

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
The MIT License (MIT)
22

3-
Copyright (c) 2014 Liam Brummitt
3+
Copyright (c) Liam Brummitt and contributors.
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

Diff for: src/body/Body.js

+1
Original file line numberDiff line numberDiff line change
@@ -626,6 +626,7 @@ var Axes = require('../geometry/Axes');
626626
* @return {}
627627
*/
628628
var _totalProperties = function(body) {
629+
// from equations at:
629630
// https://ecourses.ou.edu/cgi-bin/ebook.cgi?doc=&topic=st&chap_sec=07.2&page=theory
630631
// http://output.to/sideway/default.asp?qno=121100087
631632

Diff for: src/core/Common.js

+4-2
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,7 @@ module.exports = Common;
279279
};
280280

281281
var _seededRandom = function() {
282-
// https://gist.github.com/ngryman/3830489
282+
// https://en.wikipedia.org/wiki/Linear_congruential_generator
283283
Common._seed = (Common._seed * 9301 + 49297) % 233280;
284284
return Common._seed / 233280;
285285
};
@@ -411,7 +411,9 @@ module.exports = Common;
411411
* @return {array} Partially ordered set of vertices in topological order.
412412
*/
413413
Common.topologicalSort = function(graph) {
414-
// https://mgechev.github.io/javascript-algorithms/graphs_others_topological-sort.js.html
414+
// https://github.com/mgechev/javascript-algorithms
415+
// Copyright (c) Minko Gechev (MIT license)
416+
// Modifications: tidy formatting and naming
415417
var result = [],
416418
visited = [],
417419
temp = [];

Diff for: src/geometry/Svg.js

+3
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,9 @@ var Bounds = require('../geometry/Bounds');
151151

152152
var _svgPathToAbsolute = function(path) {
153153
// http://phrogz.net/convert-svg-path-to-all-absolute-commands
154+
// Copyright (c) Gavin Kistner
155+
// http://phrogz.net/js/_ReuseLicense.txt
156+
// Modifications: tidy formatting and naming
154157
var x0, y0, x1, y1, x2, y2, segs = path.pathSegList,
155158
x = 0, y = 0, len = segs.numberOfItems;
156159

Diff for: src/geometry/Vertices.js

+5-4
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ var Common = require('../core/Common');
150150
j;
151151

152152
// find the polygon's moment of inertia, using second moment of area
153-
// http://www.physicsforums.com/showthread.php?t=25293
153+
// from equations at http://www.physicsforums.com/showthread.php?t=25293
154154
for (var n = 0; n < v.length; n++) {
155155
j = (n + 1) % v.length;
156156
cross = Math.abs(Vector.cross(v[j], v[n]));
@@ -354,6 +354,7 @@ var Common = require('../core/Common');
354354
*/
355355
Vertices.isConvex = function(vertices) {
356356
// http://paulbourke.net/geometry/polygonmesh/
357+
// Copyright (c) Paul Bourke (use permitted)
357358

358359
var flag = 0,
359360
n = vertices.length,
@@ -396,7 +397,7 @@ var Common = require('../core/Common');
396397
* @return [vertex] vertices
397398
*/
398399
Vertices.hull = function(vertices) {
399-
// http://en.wikibooks.org/wiki/Algorithm_Implementation/Geometry/Convex_hull/Monotone_chain
400+
// http://geomalgorithms.com/a10-_hull-1.html
400401

401402
var upper = [],
402403
lower = [],
@@ -411,7 +412,7 @@ var Common = require('../core/Common');
411412
});
412413

413414
// build lower hull
414-
for (i = 0; i < vertices.length; i++) {
415+
for (i = 0; i < vertices.length; i += 1) {
415416
vertex = vertices[i];
416417

417418
while (lower.length >= 2
@@ -423,7 +424,7 @@ var Common = require('../core/Common');
423424
}
424425

425426
// build upper hull
426-
for (i = vertices.length - 1; i >= 0; i--) {
427+
for (i = vertices.length - 1; i >= 0; i -= 1) {
427428
vertex = vertices[i];
428429

429430
while (upper.length >= 2

Diff for: src/module/license.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/**
22
* The MIT License (MIT)
33
*
4-
* Copyright (c) 2014 Liam Brummitt
4+
* Copyright (c) Liam Brummitt and contributors.
55
*
66
* Permission is hereby granted, free of charge, to any person obtaining a copy
77
* of this software and associated documentation files (the "Software"), to deal

0 commit comments

Comments
 (0)