Skip to content

Commit 0e0404e

Browse files
author
lauren mccarthy
committed
fixing bug with blendmode
1 parent abd3ba0 commit 0e0404e

File tree

3 files changed

+9
-7
lines changed

3 files changed

+9
-7
lines changed

lib/p5.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/*! p5.js v0.3.6 September 16, 2014 */
1+
/*! p5.js v0.3.6 September 18, 2014 */
22
var shim = function (require) {
33
window.requestDraw = function () {
44
return window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || window.oRequestAnimationFrame || window.msRequestAnimationFrame || function (callback, element) {
@@ -584,6 +584,7 @@ var p5Graphics = function (require, core, constants) {
584584
this.drawingContext.fillStyle = '#FFFFFF';
585585
this.drawingContext.strokeStyle = '#000000';
586586
this.drawingContext.lineCap = constants.ROUND;
587+
this.drawingContext.font = 'normal 12px sans-serif';
587588
};
588589
p5.Graphics.prototype = Object.create(p5.Element.prototype);
589590
p5.Graphics.prototype.resize = function (w, h) {
@@ -3977,7 +3978,7 @@ var renderingrendering = function (require, core, constants) {
39773978
return pg;
39783979
};
39793980
p5.prototype.blendMode = function (mode) {
3980-
if (mode === constants.BLEND || mode === constants.DARKEST || mode === constants.LIGHTEST || mode === constants.DIFFERENCE || mode === constants.MULTIPLY || mode === constants.EXCLUSION || mode === constants.SCREEN || mode === constants.REPLACE || mode === constants.OVERLAY || mode === constants.HARD_LIGHT || mode === constants.SOFT_LIGHT || mode === constants.DODGE || mode === constants.BURN) {
3981+
if (mode === constants.BLEND || mode === constants.DARKEST || mode === constants.LIGHTEST || mode === constants.DIFFERENCE || mode === constants.MULTIPLY || mode === constants.EXCLUSION || mode === constants.SCREEN || mode === constants.REPLACE || mode === constants.OVERLAY || mode === constants.HARD_LIGHT || mode === constants.SOFT_LIGHT || mode === constants.DODGE || mode === constants.BURN || mode === constants.ADDITIVE || mode === constants.NORMAL) {
39813982
this.drawingContext.globalCompositeOperation = mode;
39823983
} else {
39833984
throw new Error('Mode ' + mode + ' not recognized.');

0 commit comments

Comments
 (0)