mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-20 22:39:50 -05:00
Prebuilt module for commit 5a9f3dfb27
This commit is contained in:
parent
1111cb938d
commit
889d081827
6 changed files with 28 additions and 47 deletions
12
dist/docs/assets/js/paper.js
vendored
12
dist/docs/assets/js/paper.js
vendored
|
@ -9,7 +9,7 @@
|
|||
*
|
||||
* All rights reserved.
|
||||
*
|
||||
* Date: Mon Apr 4 23:38:37 2016 -0700
|
||||
* Date: Tue Apr 5 12:11:54 2016 -0700
|
||||
*
|
||||
***
|
||||
*
|
||||
|
@ -829,11 +829,6 @@ var PaperScope = Base.extend({
|
|||
delete PaperScope._scopes[this._id];
|
||||
},
|
||||
|
||||
resolvePath: function(url) {
|
||||
return url && this.agent.node && !/^[a-z]+:/i.test(url)
|
||||
? 'file://' + require('path').resolve(url) : url;
|
||||
},
|
||||
|
||||
statics: new function() {
|
||||
function handleAttribute(name) {
|
||||
name += 'Attribute';
|
||||
|
@ -5057,7 +5052,7 @@ var Raster = Item.extend({
|
|||
setSource: function(src) {
|
||||
var image = new window.Image(),
|
||||
crossOrigin = this._crossOrigin;
|
||||
image.src = paper.resolvePath(src);
|
||||
image.src = src;
|
||||
if (crossOrigin)
|
||||
image.crossOrigin = crossOrigin;
|
||||
this.setImage(image);
|
||||
|
@ -12743,8 +12738,7 @@ var Tool = PaperScopeItem.extend({
|
|||
var Http = {
|
||||
request: function(options) {
|
||||
var xhr = new window.XMLHttpRequest();
|
||||
xhr.open((options.method || 'get').toUpperCase(),
|
||||
paper.resolvePath(options.url),
|
||||
xhr.open((options.method || 'get').toUpperCase(), options.url,
|
||||
Base.pick(options.async, true));
|
||||
if (options.mimeType)
|
||||
xhr.overrideMimeType(options.mimeType);
|
||||
|
|
7
dist/node/window.js
vendored
7
dist/node/window.js
vendored
|
@ -18,10 +18,9 @@ var jsdom = require('jsdom');
|
|||
// Create our document and window objects through jsdom.
|
||||
/* global document:true, window:true */
|
||||
var document = jsdom.jsdom('<html><body></body></html>', {
|
||||
// Give the resulting document the same origins as the XMLHttpRequest
|
||||
// objects for local files, so files can be loaded locally without CORS.
|
||||
// TODO: Find a proper solution instead of this hack.
|
||||
url: 'file://',
|
||||
// Use the current working directory as the document's origin, so
|
||||
// requests to local files work correctly with CORS.
|
||||
url: 'file://' + process.cwd() + '/',
|
||||
features: {
|
||||
FetchExternalResources: ['img', 'script']
|
||||
}
|
||||
|
|
12
dist/paper-core.js
vendored
12
dist/paper-core.js
vendored
|
@ -9,7 +9,7 @@
|
|||
*
|
||||
* All rights reserved.
|
||||
*
|
||||
* Date: Mon Apr 4 23:38:37 2016 -0700
|
||||
* Date: Tue Apr 5 12:11:54 2016 -0700
|
||||
*
|
||||
***
|
||||
*
|
||||
|
@ -829,11 +829,6 @@ var PaperScope = Base.extend({
|
|||
delete PaperScope._scopes[this._id];
|
||||
},
|
||||
|
||||
resolvePath: function(url) {
|
||||
return url && this.agent.node && !/^[a-z]+:/i.test(url)
|
||||
? 'file://' + require('path').resolve(url) : url;
|
||||
},
|
||||
|
||||
statics: new function() {
|
||||
function handleAttribute(name) {
|
||||
name += 'Attribute';
|
||||
|
@ -5057,7 +5052,7 @@ var Raster = Item.extend({
|
|||
setSource: function(src) {
|
||||
var image = new window.Image(),
|
||||
crossOrigin = this._crossOrigin;
|
||||
image.src = paper.resolvePath(src);
|
||||
image.src = src;
|
||||
if (crossOrigin)
|
||||
image.crossOrigin = crossOrigin;
|
||||
this.setImage(image);
|
||||
|
@ -12743,8 +12738,7 @@ var Tool = PaperScopeItem.extend({
|
|||
var Http = {
|
||||
request: function(options) {
|
||||
var xhr = new window.XMLHttpRequest();
|
||||
xhr.open((options.method || 'get').toUpperCase(),
|
||||
paper.resolvePath(options.url),
|
||||
xhr.open((options.method || 'get').toUpperCase(), options.url,
|
||||
Base.pick(options.async, true));
|
||||
if (options.mimeType)
|
||||
xhr.overrideMimeType(options.mimeType);
|
||||
|
|
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
12
dist/paper-full.js
vendored
12
dist/paper-full.js
vendored
|
@ -9,7 +9,7 @@
|
|||
*
|
||||
* All rights reserved.
|
||||
*
|
||||
* Date: Mon Apr 4 23:38:37 2016 -0700
|
||||
* Date: Tue Apr 5 12:11:54 2016 -0700
|
||||
*
|
||||
***
|
||||
*
|
||||
|
@ -829,11 +829,6 @@ var PaperScope = Base.extend({
|
|||
delete PaperScope._scopes[this._id];
|
||||
},
|
||||
|
||||
resolvePath: function(url) {
|
||||
return url && this.agent.node && !/^[a-z]+:/i.test(url)
|
||||
? 'file://' + require('path').resolve(url) : url;
|
||||
},
|
||||
|
||||
statics: new function() {
|
||||
function handleAttribute(name) {
|
||||
name += 'Attribute';
|
||||
|
@ -5057,7 +5052,7 @@ var Raster = Item.extend({
|
|||
setSource: function(src) {
|
||||
var image = new window.Image(),
|
||||
crossOrigin = this._crossOrigin;
|
||||
image.src = paper.resolvePath(src);
|
||||
image.src = src;
|
||||
if (crossOrigin)
|
||||
image.crossOrigin = crossOrigin;
|
||||
this.setImage(image);
|
||||
|
@ -12743,8 +12738,7 @@ var Tool = PaperScopeItem.extend({
|
|||
var Http = {
|
||||
request: function(options) {
|
||||
var xhr = new window.XMLHttpRequest();
|
||||
xhr.open((options.method || 'get').toUpperCase(),
|
||||
paper.resolvePath(options.url),
|
||||
xhr.open((options.method || 'get').toUpperCase(), options.url,
|
||||
Base.pick(options.async, true));
|
||||
if (options.mimeType)
|
||||
xhr.overrideMimeType(options.mimeType);
|
||||
|
|
16
dist/paper-full.min.js
vendored
16
dist/paper-full.min.js
vendored
File diff suppressed because one or more lines are too long
Loading…
Reference in a new issue