mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-20 22:39:50 -05:00
Prebuilt module for commit dacfce0498
This commit is contained in:
parent
d4ef5cec4f
commit
4ec8440517
7 changed files with 175 additions and 78 deletions
66
dist/docs/assets/js/paper.js
vendored
66
dist/docs/assets/js/paper.js
vendored
|
@ -9,7 +9,7 @@
|
|||
*
|
||||
* All rights reserved.
|
||||
*
|
||||
* Date: Sat Dec 14 20:32:00 2019 +0100
|
||||
* Date: Sun Dec 15 14:34:46 2019 +0100
|
||||
*
|
||||
***
|
||||
*
|
||||
|
@ -378,26 +378,52 @@ statics: {
|
|||
|
||||
readNamed: function(list, name, start, options, amount) {
|
||||
var value = this.getNamed(list, name),
|
||||
hasObject = value !== undefined;
|
||||
if (hasObject) {
|
||||
hasValue = value !== undefined;
|
||||
if (hasValue) {
|
||||
var filtered = list.__filtered;
|
||||
if (!filtered) {
|
||||
filtered = list.__filtered = Base.create(list[0]);
|
||||
filtered.__unfiltered = list[0];
|
||||
var source = this.getSource(list);
|
||||
filtered = list.__filtered = Base.create(source);
|
||||
filtered.__unfiltered = source;
|
||||
}
|
||||
filtered[name] = undefined;
|
||||
}
|
||||
var l = hasObject ? [value] : list,
|
||||
res = this.read(l, start, options, amount);
|
||||
return res;
|
||||
return this.read(hasValue ? [value] : list, start, options, amount);
|
||||
},
|
||||
|
||||
readSupported: function(list, dest) {
|
||||
var source = this.getSource(list),
|
||||
that = this,
|
||||
read = false;
|
||||
if (source) {
|
||||
Object.keys(source).forEach(function(key) {
|
||||
if (key in dest) {
|
||||
var value = that.readNamed(list, key);
|
||||
if (value !== undefined) {
|
||||
dest[key] = value;
|
||||
}
|
||||
read = true;
|
||||
}
|
||||
});
|
||||
}
|
||||
return read;
|
||||
},
|
||||
|
||||
getSource: function(list) {
|
||||
var source = list.__source;
|
||||
if (source === undefined) {
|
||||
var arg = list.length === 1 && list[0];
|
||||
source = list.__source = arg && Base.isPlainObject(arg)
|
||||
? arg : null;
|
||||
}
|
||||
return source;
|
||||
},
|
||||
|
||||
getNamed: function(list, name) {
|
||||
var arg = list[0];
|
||||
if (list._hasObject === undefined)
|
||||
list._hasObject = list.length === 1 && Base.isPlainObject(arg);
|
||||
if (list._hasObject)
|
||||
return name ? arg[name] : list.__filtered || arg;
|
||||
var source = this.getSource(list);
|
||||
if (source) {
|
||||
return name ? source[name] : list.__filtered || source;
|
||||
}
|
||||
},
|
||||
|
||||
hasNamed: function(list, name) {
|
||||
|
@ -1897,8 +1923,9 @@ var Rectangle = Base.extend({
|
|||
read = 1;
|
||||
} else if (arg0.from === undefined && arg0.to === undefined) {
|
||||
this._set(0, 0, 0, 0);
|
||||
Base.filter(this, arg0);
|
||||
read = 1;
|
||||
if (Base.readSupported(arguments, this)) {
|
||||
read = 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (read === undefined) {
|
||||
|
@ -1928,10 +1955,10 @@ var Rectangle = Base.extend({
|
|||
}
|
||||
this._set(x, y, width, height);
|
||||
read = arguments.__index;
|
||||
var filtered = arguments.__filtered;
|
||||
if (filtered)
|
||||
this.__filtered = filtered;
|
||||
}
|
||||
var filtered = arguments.__filtered;
|
||||
if (filtered)
|
||||
this.__filtered = filtered;
|
||||
if (this.__read)
|
||||
this.__read = read;
|
||||
return this;
|
||||
|
@ -5237,10 +5264,11 @@ new function() {
|
|||
|
||||
statics: new function() {
|
||||
function createShape(type, point, size, radius, args) {
|
||||
var item = new Shape(Base.getNamed(args), point);
|
||||
var item = Base.create(Shape.prototype);
|
||||
item._type = type;
|
||||
item._size = size;
|
||||
item._radius = radius;
|
||||
item._initialize(Base.getNamed(args), point);
|
||||
return item;
|
||||
}
|
||||
|
||||
|
|
66
dist/paper-core.js
vendored
66
dist/paper-core.js
vendored
|
@ -9,7 +9,7 @@
|
|||
*
|
||||
* All rights reserved.
|
||||
*
|
||||
* Date: Sat Dec 14 20:32:00 2019 +0100
|
||||
* Date: Sun Dec 15 14:34:46 2019 +0100
|
||||
*
|
||||
***
|
||||
*
|
||||
|
@ -378,26 +378,52 @@ statics: {
|
|||
|
||||
readNamed: function(list, name, start, options, amount) {
|
||||
var value = this.getNamed(list, name),
|
||||
hasObject = value !== undefined;
|
||||
if (hasObject) {
|
||||
hasValue = value !== undefined;
|
||||
if (hasValue) {
|
||||
var filtered = list.__filtered;
|
||||
if (!filtered) {
|
||||
filtered = list.__filtered = Base.create(list[0]);
|
||||
filtered.__unfiltered = list[0];
|
||||
var source = this.getSource(list);
|
||||
filtered = list.__filtered = Base.create(source);
|
||||
filtered.__unfiltered = source;
|
||||
}
|
||||
filtered[name] = undefined;
|
||||
}
|
||||
var l = hasObject ? [value] : list,
|
||||
res = this.read(l, start, options, amount);
|
||||
return res;
|
||||
return this.read(hasValue ? [value] : list, start, options, amount);
|
||||
},
|
||||
|
||||
readSupported: function(list, dest) {
|
||||
var source = this.getSource(list),
|
||||
that = this,
|
||||
read = false;
|
||||
if (source) {
|
||||
Object.keys(source).forEach(function(key) {
|
||||
if (key in dest) {
|
||||
var value = that.readNamed(list, key);
|
||||
if (value !== undefined) {
|
||||
dest[key] = value;
|
||||
}
|
||||
read = true;
|
||||
}
|
||||
});
|
||||
}
|
||||
return read;
|
||||
},
|
||||
|
||||
getSource: function(list) {
|
||||
var source = list.__source;
|
||||
if (source === undefined) {
|
||||
var arg = list.length === 1 && list[0];
|
||||
source = list.__source = arg && Base.isPlainObject(arg)
|
||||
? arg : null;
|
||||
}
|
||||
return source;
|
||||
},
|
||||
|
||||
getNamed: function(list, name) {
|
||||
var arg = list[0];
|
||||
if (list._hasObject === undefined)
|
||||
list._hasObject = list.length === 1 && Base.isPlainObject(arg);
|
||||
if (list._hasObject)
|
||||
return name ? arg[name] : list.__filtered || arg;
|
||||
var source = this.getSource(list);
|
||||
if (source) {
|
||||
return name ? source[name] : list.__filtered || source;
|
||||
}
|
||||
},
|
||||
|
||||
hasNamed: function(list, name) {
|
||||
|
@ -1894,8 +1920,9 @@ var Rectangle = Base.extend({
|
|||
read = 1;
|
||||
} else if (arg0.from === undefined && arg0.to === undefined) {
|
||||
this._set(0, 0, 0, 0);
|
||||
Base.filter(this, arg0);
|
||||
read = 1;
|
||||
if (Base.readSupported(arguments, this)) {
|
||||
read = 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (read === undefined) {
|
||||
|
@ -1925,10 +1952,10 @@ var Rectangle = Base.extend({
|
|||
}
|
||||
this._set(x, y, width, height);
|
||||
read = arguments.__index;
|
||||
var filtered = arguments.__filtered;
|
||||
if (filtered)
|
||||
this.__filtered = filtered;
|
||||
}
|
||||
var filtered = arguments.__filtered;
|
||||
if (filtered)
|
||||
this.__filtered = filtered;
|
||||
if (this.__read)
|
||||
this.__read = read;
|
||||
return this;
|
||||
|
@ -5234,10 +5261,11 @@ new function() {
|
|||
|
||||
statics: new function() {
|
||||
function createShape(type, point, size, radius, args) {
|
||||
var item = new Shape(Base.getNamed(args), point);
|
||||
var item = Base.create(Shape.prototype);
|
||||
item._type = type;
|
||||
item._size = size;
|
||||
item._radius = radius;
|
||||
item._initialize(Base.getNamed(args), point);
|
||||
return item;
|
||||
}
|
||||
|
||||
|
|
16
dist/paper-core.min.js
vendored
16
dist/paper-core.min.js
vendored
File diff suppressed because one or more lines are too long
66
dist/paper-full.js
vendored
66
dist/paper-full.js
vendored
|
@ -9,7 +9,7 @@
|
|||
*
|
||||
* All rights reserved.
|
||||
*
|
||||
* Date: Sat Dec 14 20:32:00 2019 +0100
|
||||
* Date: Sun Dec 15 14:34:46 2019 +0100
|
||||
*
|
||||
***
|
||||
*
|
||||
|
@ -378,26 +378,52 @@ statics: {
|
|||
|
||||
readNamed: function(list, name, start, options, amount) {
|
||||
var value = this.getNamed(list, name),
|
||||
hasObject = value !== undefined;
|
||||
if (hasObject) {
|
||||
hasValue = value !== undefined;
|
||||
if (hasValue) {
|
||||
var filtered = list.__filtered;
|
||||
if (!filtered) {
|
||||
filtered = list.__filtered = Base.create(list[0]);
|
||||
filtered.__unfiltered = list[0];
|
||||
var source = this.getSource(list);
|
||||
filtered = list.__filtered = Base.create(source);
|
||||
filtered.__unfiltered = source;
|
||||
}
|
||||
filtered[name] = undefined;
|
||||
}
|
||||
var l = hasObject ? [value] : list,
|
||||
res = this.read(l, start, options, amount);
|
||||
return res;
|
||||
return this.read(hasValue ? [value] : list, start, options, amount);
|
||||
},
|
||||
|
||||
readSupported: function(list, dest) {
|
||||
var source = this.getSource(list),
|
||||
that = this,
|
||||
read = false;
|
||||
if (source) {
|
||||
Object.keys(source).forEach(function(key) {
|
||||
if (key in dest) {
|
||||
var value = that.readNamed(list, key);
|
||||
if (value !== undefined) {
|
||||
dest[key] = value;
|
||||
}
|
||||
read = true;
|
||||
}
|
||||
});
|
||||
}
|
||||
return read;
|
||||
},
|
||||
|
||||
getSource: function(list) {
|
||||
var source = list.__source;
|
||||
if (source === undefined) {
|
||||
var arg = list.length === 1 && list[0];
|
||||
source = list.__source = arg && Base.isPlainObject(arg)
|
||||
? arg : null;
|
||||
}
|
||||
return source;
|
||||
},
|
||||
|
||||
getNamed: function(list, name) {
|
||||
var arg = list[0];
|
||||
if (list._hasObject === undefined)
|
||||
list._hasObject = list.length === 1 && Base.isPlainObject(arg);
|
||||
if (list._hasObject)
|
||||
return name ? arg[name] : list.__filtered || arg;
|
||||
var source = this.getSource(list);
|
||||
if (source) {
|
||||
return name ? source[name] : list.__filtered || source;
|
||||
}
|
||||
},
|
||||
|
||||
hasNamed: function(list, name) {
|
||||
|
@ -1897,8 +1923,9 @@ var Rectangle = Base.extend({
|
|||
read = 1;
|
||||
} else if (arg0.from === undefined && arg0.to === undefined) {
|
||||
this._set(0, 0, 0, 0);
|
||||
Base.filter(this, arg0);
|
||||
read = 1;
|
||||
if (Base.readSupported(arguments, this)) {
|
||||
read = 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (read === undefined) {
|
||||
|
@ -1928,10 +1955,10 @@ var Rectangle = Base.extend({
|
|||
}
|
||||
this._set(x, y, width, height);
|
||||
read = arguments.__index;
|
||||
var filtered = arguments.__filtered;
|
||||
if (filtered)
|
||||
this.__filtered = filtered;
|
||||
}
|
||||
var filtered = arguments.__filtered;
|
||||
if (filtered)
|
||||
this.__filtered = filtered;
|
||||
if (this.__read)
|
||||
this.__read = read;
|
||||
return this;
|
||||
|
@ -5237,10 +5264,11 @@ new function() {
|
|||
|
||||
statics: new function() {
|
||||
function createShape(type, point, size, radius, args) {
|
||||
var item = new Shape(Base.getNamed(args), point);
|
||||
var item = Base.create(Shape.prototype);
|
||||
item._type = type;
|
||||
item._size = size;
|
||||
item._radius = radius;
|
||||
item._initialize(Base.getNamed(args), point);
|
||||
return item;
|
||||
}
|
||||
|
||||
|
|
18
dist/paper-full.min.js
vendored
18
dist/paper-full.min.js
vendored
File diff suppressed because one or more lines are too long
2
dist/paper.d.ts
vendored
2
dist/paper.d.ts
vendored
|
@ -9,7 +9,7 @@
|
|||
*
|
||||
* All rights reserved.
|
||||
*
|
||||
* Date: Sat Dec 14 20:32:00 2019 +0100
|
||||
* Date: Sun Dec 15 14:34:46 2019 +0100
|
||||
*
|
||||
* This is an auto-generated type definition.
|
||||
*/
|
||||
|
|
19
package-lock.json
generated
19
package-lock.json
generated
|
@ -649,9 +649,9 @@
|
|||
}
|
||||
},
|
||||
"canvas": {
|
||||
"version": "2.6.0",
|
||||
"resolved": "https://registry.npmjs.org/canvas/-/canvas-2.6.0.tgz",
|
||||
"integrity": "sha512-bEO9f1ThmbknLPxCa8Es7obPlN9W3stB1bo7njlhOFKIdUTldeTqXCh9YclCPAi2pSQs84XA0jq/QEZXSzgyMw==",
|
||||
"version": "2.6.1",
|
||||
"resolved": "https://registry.npmjs.org/canvas/-/canvas-2.6.1.tgz",
|
||||
"integrity": "sha512-S98rKsPcuhfTcYbtF53UIJhcbgIAK533d1kJKMwsMwAIFgfd58MOyxRud3kktlzWiEkFliaJtvyZCBtud/XVEA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"nan": "^2.14.0",
|
||||
|
@ -5181,6 +5181,19 @@
|
|||
"dev": true,
|
||||
"requires": {
|
||||
"canvas": "2.6.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"canvas": {
|
||||
"version": "2.6.0",
|
||||
"resolved": "https://registry.npmjs.org/canvas/-/canvas-2.6.0.tgz",
|
||||
"integrity": "sha512-bEO9f1ThmbknLPxCa8Es7obPlN9W3stB1bo7njlhOFKIdUTldeTqXCh9YclCPAi2pSQs84XA0jq/QEZXSzgyMw==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"nan": "^2.14.0",
|
||||
"node-pre-gyp": "^0.11.0",
|
||||
"simple-get": "^3.0.3"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"resolve": {
|
||||
|
|
Loading…
Reference in a new issue