[PLUGIN] Canvas

Post your completed addons to share with the community

Post » Fri Mar 24, 2017 8:43 pm

It's possible to slice up the image but we can't change the collision polygon.
B
92
S
32
G
107
Posts: 5,280
Reputation: 69,971

Post » Fri Mar 24, 2017 9:37 pm

I see , but is there a method to slice a shape and apply a physics to that object ?

Like in 3 Slices ?
B
10
S
2
Posts: 7
Reputation: 681

Post » Fri Mar 24, 2017 10:07 pm

The canvas plugin can only do the visual portion. Here's an old example:
viewtopic.php?f=147&t=73349&p=613623#p613623

Here's a rambling of how to split a polygon itself.
viewtopic.php?f=147&t=187331&p=1098531&hilit=slice#p1098531

Then to actually change a collision polygon to do the physics there is this plugin:
plugin-polygon-update-2013-04-23_t77970?&hilit=polygon

I don't have a comprehensive example.
B
92
S
32
G
107
Posts: 5,280
Reputation: 69,971

Post » Sat Mar 25, 2017 8:13 am

Thank You
even someone mentioned the same example as me :)
B
10
S
2
Posts: 7
Reputation: 681

Post » Fri Apr 07, 2017 9:51 pm

@R0J0hound

I think I found a bug where the paste layer and paste object actions paste invisible objects.

Link to bug: https://www.dropbox.com/s/3gfk7plpsm9vj ... .capx?dl=0
B
11
S
5
G
6
Posts: 82
Reputation: 3,754

Post » Tue Apr 11, 2017 1:22 am

R0J0hound wrote:A curve can be approximated by a bunch of lines so you either can do that or another way would be to use a tilemap with 1x1 tiles.
If you make the size the same as the canvas and loop overall the pixels and set the tile if it's a certain color after a pretty good delay you'll have it colliding with what you drew.

Hey @R0J0hound , can you please explain a little better the "loop overall the pixels"? I managed to make the tilemap draw with the touch/mouse, but if you go a bit fast, it makes gaps between pixels.
B
24
S
6
Posts: 64
Reputation: 1,436

Post » Tue May 16, 2017 4:56 pm

i am using canvas Eval() to run external script

this code runs fine
var sections = ['choice 1', 'choice 2','choice 3','choice 4','choice 5','choice 6','choice 7','choice 8'];


but i want to load variables from array (arrayChoices) into sections

i am doing it like this, but failing always


var j = " & arrayChoices.Width & "; // size of array for loop


Image

your help is appreciated !
resources may be free, but creativity is personal!
B
68
S
27
G
9
Posts: 30
Reputation: 9,164

Post » Fri Jun 09, 2017 11:22 am

Hey @R0J0hound

First thank you for all your efforts for making Canvas and helping here.

I am trying to do a simple "fill area with color" much like the MS Paint bucket coloring or Photoshop.

- I have a problem where I can't use floodfill with color on a canvas object, it freezes the preview. and I have to quit the chrome window.

- Tested many times on blanc projects: the only thing that works so far is fill canvas with color, but then all the object is colored as square or rectangle etc.

- I'm on R 244, Win7 - 64bit, but a friend using Win 10 - 64 bit can create the floodfill with color interaction, yet if he sends me his capx, it still doesn't work for me.

Is there something I can do? Also is there another way to fill areas with color other than using Canvas? I am thinking of other ways but my C2 knowledge is limited and it's been a while I didn't use it, but I like thinking of problems to solve...

If anyone has a suggestion for making a simple area color fill (like the color bucket of MS Paint) then please feel free to share ideas

Thanks in advance for any help! :)
B
19
S
4
G
3
Posts: 56
Reputation: 3,692

Post » Fri Jun 09, 2017 12:35 pm

The flood fill action doesn't work with transparent pixels. Rect fill it to a color first before drawing. I think that should work.
B
92
S
32
G
107
Posts: 5,280
Reputation: 69,971

Post » Fri Jun 09, 2017 4:10 pm

Hey @R0J0hound
thanks for your reply,

Unfortunately doesn't work with filled colors either for me (but works for a friend, weird, and his capx gives me the same result: no coloring,)

The simple capx:
https://www.dropbox.com/s/zlv7n5z5mjnle ... .capx?dl=0


reinstalled the graphics card driver to latest, verified Chrome version to latest etc (tried turning off Intel Virtualization but was told it's unrelated) so i don't understand the problem (I also reinstalled the canvas plugin again just in case)

No Idea how I can fix that, what would you do?

Otherwise I'd think of other techniques, but it would add more work, so if I can make the Canvas plugin work, that would save me a lot of time and energy, thanks again for any suggestion!
B
19
S
4
G
3
Posts: 56
Reputation: 3,692

PreviousNext

Return to Completed Addons

Who is online

Users browsing this forum: No registered users and 5 guests