Skip to content

Commit

Permalink
updated license and contributing
Browse files Browse the repository at this point in the history
  • Loading branch information
liabru committed May 8, 2017
1 parent 295cffe commit d2af721
Show file tree
Hide file tree
Showing 7 changed files with 27 additions and 12 deletions.
16 changes: 12 additions & 4 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
### Building and Contributing
# Contributing

## License Agreement

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.

## Building

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

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

gulp dev

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.
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.

## Contributions

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.
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.

If you'd like to contribute but not sure what to work on, feel free to message me. Thanks!
If you'd like to contribute but not sure what to work on, feel free to get in touch.
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2014 Liam Brummitt
Copyright (c) Liam Brummitt and contributors.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
1 change: 1 addition & 0 deletions src/body/Body.js
Original file line number Diff line number Diff line change
Expand Up @@ -626,6 +626,7 @@ var Axes = require('../geometry/Axes');
* @return {}
*/
var _totalProperties = function(body) {
// from equations at:
// https://ecourses.ou.edu/cgi-bin/ebook.cgi?doc=&topic=st&chap_sec=07.2&page=theory
// http://output.to/sideway/default.asp?qno=121100087

Expand Down
6 changes: 4 additions & 2 deletions src/core/Common.js
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ module.exports = Common;
};

var _seededRandom = function() {
// https://gist.github.com/ngryman/3830489
// https://en.wikipedia.org/wiki/Linear_congruential_generator
Common._seed = (Common._seed * 9301 + 49297) % 233280;
return Common._seed / 233280;
};
Expand Down Expand Up @@ -411,7 +411,9 @@ module.exports = Common;
* @return {array} Partially ordered set of vertices in topological order.
*/
Common.topologicalSort = function(graph) {
// https://mgechev.github.io/javascript-algorithms/graphs_others_topological-sort.js.html
// https://github.com/mgechev/javascript-algorithms
// Copyright (c) Minko Gechev (MIT license)
// Modifications: tidy formatting and naming
var result = [],
visited = [],
temp = [];
Expand Down
3 changes: 3 additions & 0 deletions src/geometry/Svg.js
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,9 @@ var Bounds = require('../geometry/Bounds');

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

Expand Down
9 changes: 5 additions & 4 deletions src/geometry/Vertices.js
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ var Common = require('../core/Common');
j;

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

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

var upper = [],
lower = [],
Expand All @@ -411,7 +412,7 @@ var Common = require('../core/Common');
});

// build lower hull
for (i = 0; i < vertices.length; i++) {
for (i = 0; i < vertices.length; i += 1) {
vertex = vertices[i];

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

// build upper hull
for (i = vertices.length - 1; i >= 0; i--) {
for (i = vertices.length - 1; i >= 0; i -= 1) {
vertex = vertices[i];

while (upper.length >= 2
Expand Down
2 changes: 1 addition & 1 deletion src/module/license.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* The MIT License (MIT)
*
* Copyright (c) 2014 Liam Brummitt
* Copyright (c) Liam Brummitt and contributors.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
Expand Down

0 comments on commit d2af721

Please sign in to comment.