[REQUEST] Paper JS

Post your work in progress addons and get feedback

Post » Sun Dec 13, 2015 6:51 pm

This is really useful for games : http://paperjs.org/

But I don't really know if it's possible to use this with physics and collisions in C2 with a decent performance.
Image
B
55
S
23
G
39
Posts: 448
Reputation: 23,446

Post » Sun Dec 13, 2015 8:19 pm

The examples look impressive and all, but that's due to clever coders. The library itself is just a cleaner interface to draw stuff rather than using the html5 canvas interface. It would be a nice alternative to C2 to make a html project if you like scripting, but putting it inside C2 would be clunky to use imo.

You can already draw curves with the canvas plugin if that's what you're after. I don't see anything in this library that makes that any easier.

To make it work with C2's collision and physics system the curves would need to be converted to polygons. Doable but probably not the fastest considering C2 prefers you to use collision polygons with 8 or less points.
B
89
S
30
G
95
Posts: 5,160
Reputation: 63,456

Post » Sun Dec 13, 2015 10:29 pm

Hey @R0J0hound, thank you for checking out.

Actually I'm looking for something that we can use for elastic objects like ropes, blobs, water, objects that can be sliced etc. They can be really cool effects and also can be core mechanic in some type of games.

There's an another thread I just found : [Request] Horizontal water/fluid/elastic effect
Image
B
55
S
23
G
39
Posts: 448
Reputation: 23,446

Post » Mon Dec 14, 2015 2:24 pm

lol this JS is amazing, is like agar.io fluid physic
B
6
S
1
Posts: 34
Reputation: 474

Post » Mon Dec 14, 2015 9:19 pm

@dellong
If you look at the source of the example, paperJS only does the drawing part. Everything else is done with code.
B
89
S
30
G
95
Posts: 5,160
Reputation: 63,456

Post » Mon Dec 14, 2015 10:00 pm

@R0J0hound Write on google Hohokum made with paperJS this example is so smooth
B
6
S
1
Posts: 34
Reputation: 474

Post » Tue Dec 15, 2015 5:22 am

@bilgekaan
The water motion in that post's video can be done with this:
1d-water_p559245?#p559245

You could in turn utilize this to draw those points to draw a smoothed curve using the canvas plugin:
viewtopic.php?f=146&t=115321&p=826754&hilit=water+1d#p826754
B
89
S
30
G
95
Posts: 5,160
Reputation: 63,456

Post » Tue Dec 15, 2015 7:45 pm

@R0J0hound Thank you for the examples and the canvas plugin!
Image
B
55
S
23
G
39
Posts: 448
Reputation: 23,446


Return to Work in Progress Addons

Who is online

Users browsing this forum: No registered users and 0 guests