paperjs / paper.js

The Swiss Army Knife of Vector Graphics Scripting – Scriptographer ported to JavaScript and the browser, using HTML5 Canvas. Created by @lehni & @puckey
http://paperjs.org
Other
14.5k stars 1.23k forks source link

can't get one of the image tutorials work in direct javascript #1226

Closed shinigami1992 closed 7 years ago

shinigami1992 commented 7 years ago

Hi guys, thanks for your awesome library.

I've problem with one of the tutorials provided in paperjs website. It doesnt work when i use paperjs using direct javascript mode.

This is my code in jsfiddle website: https://jsfiddle.net/3g1Lyd76/38/

Would you please help me overcome this issue?

(I've also tried calling view.update or view.draw but doesn't work too.)

lehni commented 7 years ago

You're dealing with two issues:

  1. CORS
  2. PaperScript's use of operator overloading.

I've fixed both here:

https://jsfiddle.net/azmcw1kw/1/

But please note that https://github.com/paperjs/paper.js/issues is a bug database, not a forum. Please ask for support on the mailing list: http://groups.google.com/group/paperjs