[PLUGIN] Canvas

Post your completed addons to share with the community

Post » Sat Aug 31, 2013 6:32 pm

@newt
I'd rather not remove features if I can.

@clrammer
Opps, re-download the plugin to eliminate the javascript error.

And yeah, the performance issue is related to webgl and this plugin.
B
79
S
24
G
54
Posts: 4,746
Reputation: 40,755

Post » Sat Aug 31, 2013 6:33 pm

Ok, not a big deal I guess.

Also:
Ios doesn't use webgl.newt2013-08-31 18:35:04
Image Image
B
161
S
48
G
90
Posts: 7,356
Reputation: 66,767

Post » Sat Aug 31, 2013 7:59 pm

@R0J0hound
Let me preface by saying thank you for this plugin, it's a great asset!
I'm working with clrammer on the same project, and we are both psyched to see an update to address the performance hit introduced with CJS 1.4.

We haven't seen a difference in performance, but we are probably missing something since it works for others.

2 Questions:

1) Was just wondering if minifying the script is necessary for the performance fix? I don't see why it would, but worth asking.

We haven't been using it (or able to use it) because of conflicts during export with 64-bit java, and due to our lack of understanding of the minifying process we just kind have been forgoing that aspect.

2) What operating systems / devices do you personally test on? In what capacity have you tested iOS?

I'm sure we are probably overlooking something at this point, just trying to identify what it is.


@SirSpunky
What operating systems / devices are you testing on that you noticed the performance gain?
ImageImageImage
B
16
S
3
Posts: 45
Reputation: 2,188

Post » Sat Aug 31, 2013 8:45 pm

@Sigmag
1) The minifying bug isn't the cause of the performance hit. The hit is from using canvas2d internally and copying it to a webgl texture every frame. A proper fix would be to only use webgl when it's enabled.

2) I test on a 10+ year old laptop with winxp/sp3 and a 5+ year old laptop with vista. Due to their age and a lack of updated drivers I only get a marginal speedup from using webgl. I have both android and ios devices but I haven't tested on them.
B
79
S
24
G
54
Posts: 4,746
Reputation: 40,755

Post » Sat Aug 31, 2013 9:04 pm

@R0J0hound

So the memory leak fix in your latest update doesn't address canvas copying to webgl texture? I take it that a proper fix would require a code overhaul with a large time commitment on your part?
ImageImageImage
B
16
S
3
Posts: 45
Reputation: 2,188

Post » Sun Sep 01, 2013 7:48 pm

Question: can I use minifying?
I'm getting an empty c2runtime.js
Thanks.
B
12
S
3
G
1
Posts: 347
Reputation: 2,866

Post » Sun Sep 01, 2013 8:39 pm

I found a workaround: I'm using a YUI compressor to minify the HTML5 script, works fine.
B
12
S
3
G
1
Posts: 347
Reputation: 2,866

Post » Mon Sep 02, 2013 1:55 am

@ROJOhound
I hate being a devil's advocate, but I still have that memory issue when trying the updated example from @keepee at https://dl.dropboxusercontent.com/u/53374990/Misc%20C2/Light%2BShadow/02/index.html
Image
B
23
S
8
G
10
Posts: 1,820
Reputation: 8,242

Post » Mon Sep 02, 2013 1:59 am

Ok, a quick update. Updated download on first post.

*Fixed the issue with the minifier.
*A optimization was added for webgl. A texture won't be created every frame if nothing has changed on the canvas. Now only after stuff was drawn to the canvas will it update. This will make it faster for projects that draw occasionally or just once. If stuff is to be drawn every frame then there will be no benefit.
B
79
S
24
G
54
Posts: 4,746
Reputation: 40,755

Post » Mon Sep 02, 2013 2:04 am

@tulamide
Hmm... The memory usage stays stable for me on my vista computer. I'll have to try it out on the xp one and get back to you.
B
79
S
24
G
54
Posts: 4,746
Reputation: 40,755

PreviousNext

Return to Completed Addons

Who is online

Users browsing this forum: No registered users and 0 guests