Paper.js library CDN?

1,402 views
Skip to first unread message

Chocky

unread,
Aug 9, 2014, 12:00:31 PM8/9/14
to pap...@googlegroups.com
Hi, I was looking for a CDN that hosts the latest build of paper.js, so I could use it in online code editing suites eg JS Bin, JS Fiddle etc.

I couldn't see a link on the main site, and I'm not sure if it's possible to hotlink things on GitHub?

JS Bin has 0.9.12 available in its libraries dropdown but I want to use the latest build.

Thanks a lot if you can point me towards a link.

彭嘉颖

unread,
Aug 9, 2014, 12:08:39 PM8/9/14
to pap...@googlegroups.com
http://cdnjs.cloudflare.com/ajax/libs/paper.js/0.9.18/paper-full.min.js

在 2014年8月9日星期六UTC-4下午12时00分31秒,Chocky写道:

Chocky

unread,
Aug 9, 2014, 2:22:14 PM8/9/14
to pap...@googlegroups.com
Nice one, thanks a lot!!
Message has been deleted

Jürg Lehni

unread,
Oct 30, 2016, 5:17:11 PM10/30/16
to pap...@googlegroups.com
Try this:


We don't maintain a CDN ourselves, but this appears to be up to date. Not sure if it's doing this automatically through NPM or not...

J

On Oct 30, 2016, at 00:47 , Christopher <crestchr...@gmail.com> wrote:

Hi, this CDN is not working ?

On Saturday, August 9, 2014 at 2:22:14 PM UTC-4, Chocky wrote:
Nice one, thanks a lot!!

--
You received this message because you are subscribed to the Google Groups "Paper.js" group.
To unsubscribe from this group and stop receiving emails from it, send an email to paperjs+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Christopher

unread,
Oct 30, 2016, 9:31:45 PM10/30/16
to Paper.js
var size = new Size(10, 5);
followed by console.log(size); within codePen console log
produces undefined ?

Jürg Lehni

unread,
Oct 30, 2016, 9:47:59 PM10/30/16
to pap...@googlegroups.com
hmmm. How about this?

var size = new paper.Size(10, 5);

Crest Christopher

unread,
Oct 30, 2016, 11:33:44 PM10/30/16
to pap...@googlegroups.com
Nope, here is the pen; http://codepen.io/Sheep/pen/yadbBz?editors=0010.

Jürg Lehni wrote:

var size = new paper.Size(10, 5);

Jürg Lehni

unread,
Oct 31, 2016, 10:31:57 PM10/31/16
to pap...@googlegroups.com
I'm getting these errors in the console:

Refused to execute script from 'https://cdnjs.com/libraries/paper.js' because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled.
Uncaught ReferenceError: paper is not defined(…)

That's strange. Why would cdnjs.com send with a wrong mime type? Did you the http:// (non-encrypted) version?

Crest Christopher

unread,
Oct 31, 2016, 11:38:49 PM10/31/16
to pap...@googlegroups.com
I tried the non-encrypted, with the following in the console.log

var size = new paper.Size(10,5);
console.log(size.width); // undefined

Jürg Lehni

unread,
Nov 2, 2016, 11:23:47 AM11/2/16
to pap...@googlegroups.com
Do you see any error messages in the console concerning the loading of the library? What browser do you use?

Crest Christopher

unread,
Nov 2, 2016, 3:01:24 PM11/2/16
to pap...@googlegroups.com
I don't see any errors within console window of CodePen; I'm using FireFox 49.x.

If everything is working correctly; console.log(size.width); should output the width of the shape, correct ?
Wednesday, November 02, 2016 11:23 AM
Do you see any error messages in the console concerning the loading of the library? What browser do you use?


--
You received this message because you are subscribed to a topic in the Google Groups "Paper.js" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/paperjs/ikWm4mxoMpw/unsubscribe.
To unsubscribe from this group and all its topics, send an email to paperjs+u...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.
Monday, October 31, 2016 11:38 PM
I tried the non-encrypted, with the following in the console.log

var size = new paper.Size(10,5);
console.log(size.width); // undefined

Jürg Lehni wrote:
Monday, October 31, 2016 10:31 PM
I'm getting these errors in the console:

Refused to execute script from 'https://cdnjs.com/libraries/paper.js' because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled.
Uncaught ReferenceError: paper is not defined(…)

That's strange. Why would cdnjs.com send with a wrong mime type? Did you the http:// (non-encrypted) version?


Sunday, October 30, 2016 11:33 PM
Nope, here is the pen; http://codepen.io/Sheep/pen/yadbBz?editors=0010.

Jürg Lehni wrote:
Sunday, October 30, 2016 9:47 PM
hmmm. How about this?

Jürg Lehni

unread,
Nov 2, 2016, 3:04:08 PM11/2/16
to pap...@googlegroups.com
I mean the web tools console. Go to: Tools -> Web Developer -> Web Console

I see this error there:

Public-Key-Pins: The site specified a header that could not be parsed successfully. paper.js
SyntaxError: expected expression, got '<' paper.js:1
ReferenceError: paper is not defined
index.html:8:9

        

You received this message because you are subscribed to the Google Groups "Paper.js" group.
To unsubscribe from this group and stop receiving emails from it, send an email to paperjs+u...@googlegroups.com.

Crest Christopher

unread,
Nov 2, 2016, 3:14:09 PM11/2/16
to pap...@googlegroups.com
I get a type error.  CodePen has a console log which is where I was originally testing a snippet of paper.js but when testing with CodePen I get 'undefined' error.  If I run the snippet within FireFox console and define the variable;

var size = new paper.Size(10,5);
console.log(size.width);

I get paper is not defined ?

Wednesday, November 02, 2016 3:04 PM
I mean the web tools console. Go to: Tools -> Web Developer -> Web Console

I see this error there:

Public-Key-Pins: The site specified a header that could not be parsed successfully. paper.js
SyntaxError: expected expression, got '<' paper.js:1
ReferenceError: paper is not defined
index.html:8:9

        


Christopher

unread,
Nov 2, 2016, 9:57:06 PM11/2/16
to Paper.js
Try the code I posted in one of my previous message in CodePen, that is where I want to do my experiments with Paper but so far it has failed to load the CDN.
Reply all
Reply to author
Forward
0 new messages