Free hand drawing with Paper.js

1,068 views
Skip to first unread message

Martin Thoma

unread,
Apr 6, 2014, 5:33:52 AM4/6/14
to pap...@googlegroups.com
Hello,

I've just started a reference question "How do I hand draw on canvas?" and I hope to get many answers with different javascript libraries.
If somebody knows how to do this with Paper.js, could you please give me an answer here: http://stackoverflow.com/q/22891827/562769 ?

Best regards,
Martin

Jürg Lehni

unread,
Apr 6, 2014, 7:05:34 AM4/6/14
to pap...@googlegroups.com, Martin Thoma
Here's a simple example that shows how it's done, featuring curve fitting as well:


--
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.

Martin Thoma

unread,
Apr 6, 2014, 7:13:27 AM4/6/14
to pap...@googlegroups.com, Martin Thoma
I've seen this and tried to get it work (see http://jsfiddle.net/MartinThoma/84WTz/), but it didn't work. Could you please tell me what I did wrong?

Martin Thoma

unread,
Apr 6, 2014, 7:16:20 AM4/6/14
to pap...@googlegroups.com, Martin Thoma
I get:

"PointText is not defined"

Jürg Lehni

unread,
Apr 6, 2014, 7:54:47 AM4/6/14
to pap...@googlegroups.com, Martin Thoma
0.22 is an extremely outdated version. Not sure where you got that from. Why don't you download the latest built version and use the included example there? 


You'll find it at examples/Paperjs.org/Simplify.html

J

On Apr 6, 2014, at 13:16 , Martin Thoma <themoo...@googlemail.com> wrote:

I get:

"PointText is not defined"

Martin Thoma

unread,
Apr 6, 2014, 8:28:35 AM4/6/14
to pap...@googlegroups.com, Martin Thoma
Thank you Jürg, it works now :-) (see http://stackoverflow.com/a/22893998/562769 )

My problem was that I didn't know how paper.js got the information about the canvas id ( `<script type="text/paperscript" canvas="sheet">`)

I've used the old version, because jsfiddle did not have a newer version. I've contacted them and suggested to use / include a more recent version.

Best regards,
Martin


Reply all
Reply to author
Forward
0 new messages