mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-03-13 16:33:28 -04:00
Prebuilt module for commit 28dec90a88
This commit is contained in:
parent
d76e7393bf
commit
b2aef080ed
6 changed files with 32 additions and 77 deletions
27
dist/docs/assets/js/paper.js
vendored
27
dist/docs/assets/js/paper.js
vendored
|
@ -9,7 +9,7 @@
|
|||
*
|
||||
* All rights reserved.
|
||||
*
|
||||
* Date: Wed Oct 3 18:37:30 2018 +0200
|
||||
* Date: Wed Oct 3 19:03:04 2018 +0200
|
||||
*
|
||||
***
|
||||
*
|
||||
|
@ -5055,6 +5055,7 @@ var Raster = Item.extend({
|
|||
source: null
|
||||
},
|
||||
_prioritize: ['crossOrigin'],
|
||||
_smoothing: true,
|
||||
|
||||
initialize: function Raster(object, position) {
|
||||
if (!this._initialize(object,
|
||||
|
@ -5071,10 +5072,6 @@ var Raster = Item.extend({
|
|||
this._size = new Size();
|
||||
this._loaded = false;
|
||||
}
|
||||
if (this._smoothing === undefined)
|
||||
{
|
||||
this._smoothing = true;
|
||||
}
|
||||
},
|
||||
|
||||
_equals: function(item) {
|
||||
|
@ -5266,6 +5263,7 @@ var Raster = Item.extend({
|
|||
|
||||
setSmoothing: function(smoothing) {
|
||||
this._smoothing = smoothing;
|
||||
this._changed(129);
|
||||
},
|
||||
|
||||
getElement: function() {
|
||||
|
@ -5426,7 +5424,9 @@ var Raster = Item.extend({
|
|||
if (element) {
|
||||
ctx.globalAlpha = this._opacity;
|
||||
|
||||
this._setContextSmoothing(ctx, this._smoothing);
|
||||
DomElement.setPrefixed(
|
||||
ctx, 'imageSmoothingEnabled', this._smoothing
|
||||
);
|
||||
|
||||
ctx.drawImage(element,
|
||||
-this._size.width / 2, -this._size.height / 2);
|
||||
|
@ -5435,21 +5435,6 @@ var Raster = Item.extend({
|
|||
|
||||
_canComposite: function() {
|
||||
return true;
|
||||
},
|
||||
|
||||
_setContextSmoothing: function(ctx, value) {
|
||||
var keys = [
|
||||
'imageSmoothingEnabled',
|
||||
'mozImageSmoothingEnabled',
|
||||
'webkitImageSmoothingEnabled',
|
||||
'msImageSmoothingEnabled'
|
||||
];
|
||||
for (var i=0; i<keys.length; i++) {
|
||||
if (keys[i] in ctx) {
|
||||
ctx[keys[i]] = value;
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
|
2
dist/docs/classes/Raster.html
vendored
2
dist/docs/classes/Raster.html
vendored
|
@ -466,7 +466,7 @@ console.log(view.element.toDataURL('image/png').substring(0, 32));
|
|||
<div class="member-description hidden">
|
||||
|
||||
<div class="member-text">
|
||||
<p>Specifies if the raster should be smoothed when scaled up or if pixels should be visible.</p>
|
||||
<p>Specifies if the raster should be smoothed when scaled up or if the pixels should be scaled up by repeating the nearest neighboring pixels.</p>
|
||||
|
||||
|
||||
|
||||
|
|
27
dist/paper-core.js
vendored
27
dist/paper-core.js
vendored
|
@ -9,7 +9,7 @@
|
|||
*
|
||||
* All rights reserved.
|
||||
*
|
||||
* Date: Wed Oct 3 18:37:30 2018 +0200
|
||||
* Date: Wed Oct 3 19:03:04 2018 +0200
|
||||
*
|
||||
***
|
||||
*
|
||||
|
@ -5055,6 +5055,7 @@ var Raster = Item.extend({
|
|||
source: null
|
||||
},
|
||||
_prioritize: ['crossOrigin'],
|
||||
_smoothing: true,
|
||||
|
||||
initialize: function Raster(object, position) {
|
||||
if (!this._initialize(object,
|
||||
|
@ -5071,10 +5072,6 @@ var Raster = Item.extend({
|
|||
this._size = new Size();
|
||||
this._loaded = false;
|
||||
}
|
||||
if (this._smoothing === undefined)
|
||||
{
|
||||
this._smoothing = true;
|
||||
}
|
||||
},
|
||||
|
||||
_equals: function(item) {
|
||||
|
@ -5266,6 +5263,7 @@ var Raster = Item.extend({
|
|||
|
||||
setSmoothing: function(smoothing) {
|
||||
this._smoothing = smoothing;
|
||||
this._changed(129);
|
||||
},
|
||||
|
||||
getElement: function() {
|
||||
|
@ -5426,7 +5424,9 @@ var Raster = Item.extend({
|
|||
if (element) {
|
||||
ctx.globalAlpha = this._opacity;
|
||||
|
||||
this._setContextSmoothing(ctx, this._smoothing);
|
||||
DomElement.setPrefixed(
|
||||
ctx, 'imageSmoothingEnabled', this._smoothing
|
||||
);
|
||||
|
||||
ctx.drawImage(element,
|
||||
-this._size.width / 2, -this._size.height / 2);
|
||||
|
@ -5435,21 +5435,6 @@ var Raster = Item.extend({
|
|||
|
||||
_canComposite: function() {
|
||||
return true;
|
||||
},
|
||||
|
||||
_setContextSmoothing: function(ctx, value) {
|
||||
var keys = [
|
||||
'imageSmoothingEnabled',
|
||||
'mozImageSmoothingEnabled',
|
||||
'webkitImageSmoothingEnabled',
|
||||
'msImageSmoothingEnabled'
|
||||
];
|
||||
for (var i=0; i<keys.length; i++) {
|
||||
if (keys[i] in ctx) {
|
||||
ctx[keys[i]] = value;
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
|
12
dist/paper-core.min.js
vendored
12
dist/paper-core.min.js
vendored
File diff suppressed because one or more lines are too long
27
dist/paper-full.js
vendored
27
dist/paper-full.js
vendored
|
@ -9,7 +9,7 @@
|
|||
*
|
||||
* All rights reserved.
|
||||
*
|
||||
* Date: Wed Oct 3 18:37:30 2018 +0200
|
||||
* Date: Wed Oct 3 19:03:04 2018 +0200
|
||||
*
|
||||
***
|
||||
*
|
||||
|
@ -5055,6 +5055,7 @@ var Raster = Item.extend({
|
|||
source: null
|
||||
},
|
||||
_prioritize: ['crossOrigin'],
|
||||
_smoothing: true,
|
||||
|
||||
initialize: function Raster(object, position) {
|
||||
if (!this._initialize(object,
|
||||
|
@ -5071,10 +5072,6 @@ var Raster = Item.extend({
|
|||
this._size = new Size();
|
||||
this._loaded = false;
|
||||
}
|
||||
if (this._smoothing === undefined)
|
||||
{
|
||||
this._smoothing = true;
|
||||
}
|
||||
},
|
||||
|
||||
_equals: function(item) {
|
||||
|
@ -5266,6 +5263,7 @@ var Raster = Item.extend({
|
|||
|
||||
setSmoothing: function(smoothing) {
|
||||
this._smoothing = smoothing;
|
||||
this._changed(129);
|
||||
},
|
||||
|
||||
getElement: function() {
|
||||
|
@ -5426,7 +5424,9 @@ var Raster = Item.extend({
|
|||
if (element) {
|
||||
ctx.globalAlpha = this._opacity;
|
||||
|
||||
this._setContextSmoothing(ctx, this._smoothing);
|
||||
DomElement.setPrefixed(
|
||||
ctx, 'imageSmoothingEnabled', this._smoothing
|
||||
);
|
||||
|
||||
ctx.drawImage(element,
|
||||
-this._size.width / 2, -this._size.height / 2);
|
||||
|
@ -5435,21 +5435,6 @@ var Raster = Item.extend({
|
|||
|
||||
_canComposite: function() {
|
||||
return true;
|
||||
},
|
||||
|
||||
_setContextSmoothing: function(ctx, value) {
|
||||
var keys = [
|
||||
'imageSmoothingEnabled',
|
||||
'mozImageSmoothingEnabled',
|
||||
'webkitImageSmoothingEnabled',
|
||||
'msImageSmoothingEnabled'
|
||||
];
|
||||
for (var i=0; i<keys.length; i++) {
|
||||
if (keys[i] in ctx) {
|
||||
ctx[keys[i]] = value;
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
|
14
dist/paper-full.min.js
vendored
14
dist/paper-full.min.js
vendored
File diff suppressed because one or more lines are too long
Loading…
Reference in a new issue