[PLUGIN] Canvas

Post your completed addons to share with the community

Post » Thu Apr 24, 2014 3:15 pm

zenox98 wrote:Neither example makes use of the canvas plugin at all.


In your last post, the first link that you mention (https://www.scirra.com/forum/is-there-a-way-to-give-a-sprite-a-trail_p557543?#p557543) has a post from Yann that use the Canvas plugin (http://dl.dropbox.com/u/23551572/C2/trail.capx).

-EDIT-

The more I think of it, the more I conclude that R0J0hound also meant not using the canvas plugin for the trail effect... :roll:

So thanks anyway @zenox98 ;)
composer - multimedia artist
www.eli0s.com/en/
B
69
S
26
G
5
Posts: 1,146
Reputation: 9,829

Post » Sat May 10, 2014 10:46 am

Hello guys, I'm new to construct2 and I'm trying to create a colouring book for my 5 years old kid. I'm finding a lot of good words on Canvas plugin but I'm finding it hard to use the plugin (I come form an art background).
Is there a tutorial or a guided help on how to take advantage of the this awesome plugin.

Thanks a lot :)
B
7
S
2
Posts: 5
Reputation: 564

Post » Mon May 12, 2014 12:05 am

check the Lemmings example, I'm pretty sure page 8 or 9 has another file you can use.
B
12
S
3
G
1
Posts: 347
Reputation: 2,866

Post » Mon May 12, 2014 4:37 am

@zixofranic
There isn't really any documentation but the are descriptions in the editor when adding expressions, actions or conditions.

For a coloring book you want a paint bucket fill like mspaint right? Look at the "floodfill canvas with color" action to do that.
However the only limitation with that is Just make sure the canvas is completely opaque, aka has no transparency. Transparency can cause the flood fill to hang the game currently.
B
92
S
32
G
107
Posts: 5,280
Reputation: 69,971

Post » Mon May 12, 2014 1:30 pm

@R0J0hound @ghost thanks you guys, I'll check it out
B
7
S
2
Posts: 5
Reputation: 564

Post » Thu May 15, 2014 9:02 pm

Hi, I'm also trying to do a coloring book and I can't find a way to make it work with just a simple test. Firefox or chrome hang for a while then pop-up the javascript error using the floodfill action. What I'm doing wrong? Attached is a .capx of the test I'm trying.
You do not have the required permissions to view the files attached to this post.
B
3
S
1
Posts: 7
Reputation: 339

Post » Thu May 15, 2014 11:18 pm

Here you go, i had this problem too and almost cracked my head over it, the problem is that flood fill can not work with non integer numbers, so add int() to your X and Y values and also using "red" as a color won't work, you need to give the color code or use rgb.

canvas_test.capx
You do not have the required permissions to view the files attached to this post.
Image
B
76
S
28
G
12
Posts: 515
Reputation: 12,409

Post » Fri May 16, 2014 12:07 pm

Lof wrote:Here you go, i had this problem too and almost cracked my head over it, the problem is that flood fill can not work with non integer numbers, so add int() to your X and Y values and also using "red" as a color won't work, you need to give the color code or use rgb.

canvas_test.capx


Thank you! Now is working. I could never figure it out this solution.
B
3
S
1
Posts: 7
Reputation: 339

Post » Sat May 17, 2014 8:27 pm

Someone knows why in the example I provide the floodfill doesn't fill all and leaves white pixels between the black lines? Is something of the canvas or the drawing I'm using? Is there way yo have a clean floodfill without those white pixels?
B
3
S
1
Posts: 7
Reputation: 339

Post » Sat May 17, 2014 8:58 pm

@leofenix , It's your picture. If you check closely you will find gray pixels on these areas. I crashed the blacks/whites and the result is much better. You can't get rid of a slim white outline around the black lines though, I don't know if that is a limitation on the Canvas plugin or there is some other way to do pixel perfect fills.
You do not have the required permissions to view the files attached to this post.
composer - multimedia artist
www.eli0s.com/en/
B
69
S
26
G
5
Posts: 1,146
Reputation: 9,829

PreviousNext

Return to Completed Addons

Who is online

Users browsing this forum: No registered users and 1 guest