[PLUGIN] Canvas

Post your completed addons to share with the community

Post » Mon Jul 09, 2012 1:49 pm

@milengk : put a layer on top of the canvas, with the outlines black, and everything else transparent.
B
33
S
9
G
6
Posts: 709
Reputation: 6,704

Post » Tue Jul 10, 2012 4:33 pm

The problem is if you color the outlines, then you can color couple parts with one click. A copy of outlines on top doesn't help.
B
109
S
6
G
6
Posts: 14
Reputation: 7,327

Post » Tue Jul 10, 2012 5:29 pm

Try sampling the color of the pixel with the expression rgbaAt(x,y) before flood filling.
B
79
S
24
G
54
Posts: 4,738
Reputation: 40,739

Post » Wed Jul 11, 2012 10:46 am

It works perfect, thanks ROJOhound.
B
109
S
6
G
6
Posts: 14
Reputation: 7,327

Post » Tue Jul 17, 2012 5:12 pm

Can the 'SVG CANVAS' object be pasted into the Canvas plugin?
B
19
S
6
G
7
Posts: 1,205
Reputation: 7,298

Post » Tue Jul 17, 2012 8:35 pm

@chrisbrobs : I need to add a "export to base64 string" to the SVG to do that, but I think it's possible.
B
33
S
9
G
6
Posts: 709
Reputation: 6,704

Post » Fri Jul 20, 2012 8:42 am

Where do I input the expression rgbaAt(x,y) before flood filling to sample the pixel color?
B
41
S
11
G
4
Posts: 428
Reputation: 7,356

Post » Thu Jul 26, 2012 8:34 pm

Hmm, I needed something like this and this plugin seems great - however I can not get it to work :(
I installed the plugin, used it in an empty project, but none of its actions work. Tried rotating it, setting opacity, clearing it, drawing a line, and fill/floodfill - nothing happens in either case.

I also tried Pode's cat painting tutorial (both capx and from the provided link), and the floodfill he uses works but the whole result behaves rather strangely:
- initial color is grey, and painting with grey works
- changing color to pink or brown works, but only if you use those colors first
- using any of the other colors first switches to black, and makes it impossible to use pink/brown anymore (everything's black)
- the CPU usage remains around 25% for me, but it keeps eating up RAM continuously until crashing the browser (both Chrome and FF)

I turned WebGL off as you guys said it might cause problems.
Any ideas as to what might be causing this?
Seems like a rather powerful plugin, but since it works ok to so many people I wonder if there's something seriously wrong on my side (everything else in Construct works fine though).

Cheers!
D.



Edit: I shut down Construct, remade a fresh project, put in only Canvas and Mouse, and now all the actions are working fine - in that project.
The cat painting example however is still acting up and taking up RAM uncontrollably until crash (and still accepting only pink and brown).
I'll leave the symptoms here just in case, maybe it's something worth looking into?quetzy2012-07-26 21:36:28
B
14
S
3
G
3
Posts: 6
Reputation: 3,646

Post » Fri Jul 27, 2012 7:53 pm

The increasing ram usage is caused when using webgl. Internally the plugin still uses canvas2d and with webgl a new texture of the canvas is made every frame causing the memory leak. I need to re-write it properly use webgl in an efficient manner.
B
79
S
24
G
54
Posts: 4,738
Reputation: 40,739

Post » Sat Jul 28, 2012 1:18 am

@R0J0hound

I use canvas plugin in my cool down mask behavior.
B
97
S
22
G
177
Posts: 4,111
Reputation: 103,525

PreviousNext

Return to Completed Addons

Who is online

Users browsing this forum: No registered users and 6 guests