paper-core.js vs. paper-full.js

1,485 views
Skip to first unread message

Arne Schlüter

unread,
Aug 10, 2013, 4:06:30 AM8/10/13
to pap...@googlegroups.com
Hello,

I'm a little confused here – what exactly is the difference between the two? My setup is require.js with a shim config in order to use paper.js…
I used paper.js 0.3 before and it worked fine with the shim-config for require.js.

When I recently switched to bower for client-side package management it broke paper.js and the transition is giving me a bit of a headache:
Linking to paper-full.js is giving me an error about "mismatched anonymous define modules" and with paper-core.js I cannot seem to set up a scope properly.

What I am trying to accomplish is pretty much like the examples on paperjs.org, updating the view based on input into a textarea / editor.

Any help would be very appreciated.
The project code can be found at https://github.com/11am/paper-plane

Arne Schlüter

unread,
Aug 10, 2013, 8:17:00 AM8/10/13
to pap...@googlegroups.com
The complete error for paper-full.js is
Uncaught Error: Mismatched anonymous define() module: PaperScope @paperscope-0

Jürg Lehni

unread,
Aug 10, 2013, 1:01:13 PM8/10/13
to pap...@googlegroups.com
paper-full.js includes the PaperScript feature, paper-core.js only includes the API, and is useful for people who use paper.js from JavaScript directly and don't need the additional features, such as operator overloading, and automatic canvas linking.

This sounds like you are encountering an issue with require.js. Would you mind sharing a simplified test-case with me that would allow me to reproduce the issue at my end? You could just point me to a zip file to download online.

Thanks,

Jürg
> --
> 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/groups/opt_out.
>
>

Jürg Lehni

unread,
Aug 10, 2013, 1:02:17 PM8/10/13
to pap...@googlegroups.com
PS:

It's interesting to see that you're working on an IDE for paper! I started doing the same, and am already using it for teaching. We should perhaps join forces?

Best,

Jürg

Arne Schlüter

unread,
Aug 10, 2013, 2:33:00 PM8/10/13
to pap...@googlegroups.com
Thanks a lot for the quick answer and clearing that up!

So I figured out the error only occurs when running require.js' r.js optimizer.
There's the following message during the optimization:

lib/paper/dist/paper-full.js has more than one anonymous define. May be a built file from another build system like, Ender. Skipping normalization.

The anonymous define that's problematic seems to be the acorn-parser in this line.
I have set up a minimalistic example project right here (with optimization) and here (without optimization), whereas the second one seems to be working flawlessly.

PS: About joining forces:
I'd love to get in contact with you! My work has not gone very far as of yet, but I'm really excited about it and have some very cool features in mind. :)

Arne Schlüter

unread,
Aug 10, 2013, 2:34:11 PM8/10/13
to pap...@googlegroups.com
Oh, and of course the zip to download the files: http://aesthaddicts.net/paperjs-test/paperjs-test.zip

Molchanov Timophey

unread,
Aug 30, 2013, 11:04:23 AM8/30/13
to pap...@googlegroups.com
+1 i have the same error...

Jürg Lehni

unread,
Aug 30, 2013, 10:07:27 PM8/30/13
to pap...@googlegroups.com
I think this bug is fixed since a while. Could you try with the nightly builds?

https://github.com/paperjs/paper.js/pull/261

J

On Aug 30, 2013, at 08:04 , Molchanov Timophey <timo...@gmail.com> wrote:

> +1 i have the same error...
>
Reply all
Reply to author
Forward
0 new messages