Skip to content

Commit fcda2d7

Browse files
committed
merging upstream changes
2 parents 5092151 + 24e3c31 commit fcda2d7

File tree

26 files changed

+675
-817
lines changed

26 files changed

+675
-817
lines changed

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ You can [download here](http://p5js.org/get-started) or use `lib/p5.js` for the
1515

1616
####[> Get Started](http://p5js.org/get-started)
1717
Create and run your first sketch!
18+
####[> p5.js overview](https://github.com/lmccart/p5.js/wiki/p5.js-overview)
19+
An overview of the main features and functionality of p5.js.
1820
####[> Reference](http://p5js.org/reference)
1921
The functionality supported by p5.js.
2022
####[> Learn](http://p5js.org/learn)
File renamed without changes.
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
var capture;
2+
3+
function setup() {
4+
createCanvas(390, 240);
5+
capture = createCapture(AUDIO);
6+
}
7+
8+
function draw() {
9+
background(255);
10+
11+
}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<head>
2+
<script language="javascript" type="text/javascript" src="../../../../lib/p5.js"></script>
3+
<script language="javascript" type="text/javascript" src="../../../../lib/addons/p5.dom.js"></script>
4+
<script language="javascript" type="text/javascript" src="sketch.js"></script>
5+
</head>
6+
7+
<body>
8+
<div id="test"></div>
9+
</body>
File renamed without changes.

lib/p5.js

Lines changed: 75 additions & 72 deletions
Large diffs are not rendered by default.

lib/p5.min.js

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

license.txt

Lines changed: 472 additions & 651 deletions
Large diffs are not rendered by default.

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"type": "git",
55
"url": "https://github.com/lmccart/p5.js.git"
66
},
7-
"version": "0.3.0",
7+
"version": "0.3.2",
88
"devDependencies": {
99
"almond": "~0.2.7",
1010
"amdclean": "~0.3.3",
@@ -22,8 +22,8 @@
2222
},
2323
"licenses": [
2424
{
25-
"type": "GPL",
26-
"url": "http://www.opensource.org/licenses/GPL-3.0"
25+
"type": "LGPL",
26+
"url": "https://www.gnu.org/licenses/lgpl-2.1.html"
2727
}
2828
],
2929
"dependencies": {

src/color/setting.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,9 @@ define(function (require) {
5252
if (arguments[0] instanceof p5.Image) {
5353
this.image(arguments[0], 0, 0, this.width, this.height);
5454
} else {
55-
var curFill = this.canvas.getContext('2d').fillStyle;
55+
var curFill = this.drawingContext.fillStyle;
5656
// create background rect
57-
var ctx = this.canvas.getContext('2d');
57+
var ctx = this.drawingContext;
5858
ctx.fillStyle = p5.Color.getColor.apply(this, arguments);
5959
ctx.fillRect(0, 0, this.width, this.height);
6060
// reset fill
@@ -78,7 +78,7 @@ define(function (require) {
7878
* </div>
7979
*/
8080
p5.prototype.clear = function() {
81-
this.canvas.getContext('2d').clearRect(0, 0, this.width, this.height);
81+
this.drawingContext.clearRect(0, 0, this.width, this.height);
8282
};
8383

8484
/**
@@ -179,7 +179,7 @@ define(function (require) {
179179
*/
180180
p5.prototype.fill = function() {
181181
this._setProperty('_doFill', true);
182-
var ctx = this.canvas.getContext('2d');
182+
var ctx = this.drawingContext;
183183
ctx.fillStyle = p5.Color.getColor.apply(this, arguments);
184184
};
185185

@@ -249,7 +249,7 @@ define(function (require) {
249249
*/
250250
p5.prototype.stroke = function() {
251251
this._setProperty('_doStroke', true);
252-
var ctx = this.canvas.getContext('2d');
252+
var ctx = this.drawingContext;
253253
ctx.strokeStyle = p5.Color.getColor.apply(this, arguments);
254254
};
255255

0 commit comments

Comments
 (0)