I am new to paperJS and I'm trying to include an external paperscript file in html, but it isn't working. While the inline scripting is working fine. My 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 a Paper.js Path to draw a line into it:
var path = new Path();
// Give the stroke a color
path.strokeColor = 'black';
var start = new Point(100, 100);
// Move to start and draw a line from there
path.moveTo(start);
// Note the plus operator on Point objects.
// PaperScript does that for us, and much more!
path.lineTo(start + [ 100, -50 ]);
I found an old link on stackOverflow which says that using version 0.9.10 fix the problem. But is that issue still not fixed in newer version? Here's the link:
--
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.