|
1 |
| -/*! p5.js v0.4.5 June 23, 2015 */ |
| 1 | +/*! p5.js v0.4.6 June 24, 2015 */ |
2 | 2 | (function (root, factory) {
|
3 | 3 | if (typeof define === 'function' && define.amd)
|
4 | 4 | define('p5', [], function () { return (root.returnExportsGlobal = factory());});
|
@@ -2517,13 +2517,27 @@ amdclean['core_p5Renderer2D'] = function (require, core_core, core_canvas, core_
|
2517 | 2517 | return this;
|
2518 | 2518 | };
|
2519 | 2519 | p5.Renderer2D.prototype.noSmooth = function () {
|
2520 |
| - this.drawingContext.mozImageSmoothingEnabled = false; |
2521 |
| - this.drawingContext.webkitImageSmoothingEnabled = false; |
| 2520 | + if ('imageSmoothingEnabled' in this.drawingContext) { |
| 2521 | + this.drawingContext.imageSmoothingEnabled = false; |
| 2522 | + } else if ('mozImageSmoothingEnabled' in this.drawingContext) { |
| 2523 | + this.drawingContext.mozImageSmoothingEnabled = false; |
| 2524 | + } else if ('webkitImageSmoothingEnabled' in this.drawingContext) { |
| 2525 | + this.drawingContext.webkitImageSmoothingEnabled = false; |
| 2526 | + } else if ('msImageSmoothingEnabled' in this.drawingContext) { |
| 2527 | + this.drawingContext.msImageSmoothingEnabled = false; |
| 2528 | + } |
2522 | 2529 | return this;
|
2523 | 2530 | };
|
2524 | 2531 | p5.Renderer2D.prototype.smooth = function () {
|
2525 |
| - this.drawingContext.mozImageSmoothingEnabled = true; |
2526 |
| - this.drawingContext.webkitImageSmoothingEnabled = true; |
| 2532 | + if ('imageSmoothingEnabled' in this.drawingContext) { |
| 2533 | + this.drawingContext.imageSmoothingEnabled = true; |
| 2534 | + } else if ('mozImageSmoothingEnabled' in this.drawingContext) { |
| 2535 | + this.drawingContext.mozImageSmoothingEnabled = true; |
| 2536 | + } else if ('webkitImageSmoothingEnabled' in this.drawingContext) { |
| 2537 | + this.drawingContext.webkitImageSmoothingEnabled = true; |
| 2538 | + } else if ('msImageSmoothingEnabled' in this.drawingContext) { |
| 2539 | + this.drawingContext.msImageSmoothingEnabled = true; |
| 2540 | + } |
2527 | 2541 | return this;
|
2528 | 2542 | };
|
2529 | 2543 | p5.Renderer2D.prototype.strokeCap = function (cap) {
|
|
0 commit comments