[PLUGIN] Canvas

Post your completed addons to share with the community

Post » Tue Sep 09, 2014 8:06 pm

Dear rohound,

i have a problem with your plugin... it don't paste the objects right in the canvas...when i past the object the canvas became all white..the rgbat works fine...

can you help me please???

Thanks a lot,

Lestroso :oops:

http://www.fasasoftware.com
B
4
S
1
Posts: 73
Reputation: 504

Post » Wed Sep 10, 2014 6:28 am

No idea from your description. A simple capx could help.
B
79
S
24
G
54
Posts: 4,747
Reputation: 40,757

Post » Wed Sep 10, 2014 3:48 pm

Here it is......i hope you understand my code....it's little confused,....

http://www.fasasoftware.com/wp-content/uploads/2014/09/mytestcanvas.capx

best regards,

Lestroso :oops:

http://www.fasasoftware.com
B
4
S
1
Posts: 73
Reputation: 504

Post » Wed Sep 10, 2014 3:53 pm

you need to have an instance of "sprite" on at least one layout to use it.
you also need to position it in the place you want it to be pasted to, before pasting.
and the canvas did not turn white, it became clear since you cleared it in the event, the white is coming from the layer background color.
Image
B
59
S
21
G
11
Posts: 481
Reputation: 10,716

Post » Wed Sep 10, 2014 8:56 pm

ah...ok...but my idea is get fom snapshot from camera a picture and then use the rgbat function,....can you help me too with a capx example if you can please???

best regards,

Lestroso :oops:
B
4
S
1
Posts: 73
Reputation: 504

Post » Thu Sep 11, 2014 2:38 am

The camera object should have an expression to get the image URL. You can then use that with the load animation frame action of sprites. After that just position that sprite over the canvas and use the canvas' paste action and you should be good to go.
B
79
S
24
G
54
Posts: 4,747
Reputation: 40,757

Post » Thu Sep 11, 2014 5:57 am

Like he said :)
Just remember this important rule, in C2 you MUST have an instance of any object you want to access on at least one layout.
You can place it anywhere and destroy it on the beginning of the layout, you can make another "bank" layout and throw everything there (this will not affect memory usage of other layouts).
Image
B
59
S
21
G
11
Posts: 481
Reputation: 10,716

Post » Tue Sep 23, 2014 12:11 pm

R0J0hound,
i have some problems with your plugin..
Your plugin works on iOS?
i'm exporting it to ejecta and it doesn't work, i'ts a very simple coloring game
Could you help me?
B
4
Posts: 2
Reputation: 204

Post » Tue Oct 14, 2014 10:04 pm

@R0J0hound

the canvas plugin have problems with the tilemap object?
i'm trying to do a splitscreen drawing a second screen but i'm using a tilemap for the map, and keep getting the javascript error line206 (col20)

it works well if there is no tile on screen in the tilemap

update:

it didn't draw the tiles from the tilemap
B
48
S
5
G
6
Posts: 210
Reputation: 6,247

Post » Wed Oct 15, 2014 6:26 pm

@valdarko
It only works with it if webgl if off, since it internally uses the non webgl draw functions of objects. With webgl on the tilemap object doesn't need to set up it's non webgl images so when the canvas tries to use them it can't because they aren't there.
B
79
S
24
G
54
Posts: 4,747
Reputation: 40,757

PreviousNext

Return to Completed Addons

Who is online

Users browsing this forum: No registered users and 3 guests