javascript - External script not working in PaperJS v0.9.22 -


i new paperjs , i'm trying include external paperscript file in html, isn't working. while inline scripting working fine. code are:

html code:

<!doctype html> <html> <head> <script type="text/javascript" src="js/paper.js"></script> </head> <body>     <script type="text/paperscript" src = "js/myscript.js" canvas = "mycanvas" >     </script>     <canvas id="mycanvas" resize></canvas> 

paperscript code (myscript.js):

// create paper.js path draw line it: var path = new path(); // give stroke color path.strokecolor = 'black'; var start = new point(100, 100); // move start , draw line there path.moveto(start); // note plus operator on point objects. // paperscript us, , more! path.lineto(start + [ 100, -50 ]); 

i found old link on stackoverflow says using version 0.9.10 fix problem. issue still not fixed in newer version? here's link:

how use paperscript external source?

this not paperjs issue. here trying load resource local file system, chrome doesn't permit (violation of same-origin policy) , need local web server.why?

local web server can setup using wamp (on windows), mamp (on os x), lamp(for ubuntu). can aslo setup python http-server , nodejs http-server.


Comments

Popular posts from this blog

facebook - android ACTION_SEND to share with specific application only -

python - Creating a new virtualenv gives a permissions error -

javascript - cocos2d-js draw circle not instantly -