[PLUGIN] Paster

Post your completed addons to share with the community

Post » Fri Jan 17, 2014 10:09 pm

@Arima
Fixed, just re-download the plugins. ".alphaAt" wasn't correctly implemented and the other problem was an issue of pre-multiplied alpha.
B
92
S
32
G
107
Posts: 5,280
Reputation: 69,971

Post » Sat Jan 18, 2014 2:17 am

Sweet, they work great now. I noticed one more problem with paster, though - when pasting a sprite, it doesn't seem to take opacity into account if the pasted sprite has a shader effect (I tried blur horizontal, radial blur and tint), so a pasted sprite with an effect always pastes like it's at 100% opacity.
Moderator
B
94
S
33
G
33
Posts: 3,006
Reputation: 27,749

Post » Sun Jan 19, 2014 12:19 pm

I run the demo capx and get this message..



Using the latest beta 158.2
B
48
S
16
G
9
Posts: 1,097
Reputation: 11,195

Post » Tue Jan 21, 2014 5:07 pm

@spongehammer
Pasting a paster object to itself is no longer permitted by the runtime.
B
92
S
32
G
107
Posts: 5,280
Reputation: 69,971

Post » Thu Jan 23, 2014 1:08 pm

Hi,

I've been working with the Paster plugin to create a fancy pageflip animation when I came across a bug when using spritesheeted images with Canvas2d instead of WebGL (the current project required it).
The bug itself is very minor, but it took me some time to find the culprit! The offset of the frame in the spritesheet isn't set correctly (when using canvas2d).

I'm too new to post links or PM you, so I'll type it out. I've added the underlined code to fix the problem.

Runtime.js line 595

if (sprite && sprite.spritesheeted)
{
       this.points[0].x=x1;
       this.points[0].y=y1;
       this.points[0].u=sprite.offx;
       this.points[0].v=sprite.offy;
       this.points[1].x=x2;
       this.points[1].y=y2;
       this.points[1].u=sprite.offx + sprite.width;
       this.points[1].v=sprite.offy;
       this.points[2].x=x3;
       this.points[2].y=y3;
       this.points[2].u=sprite.offx + sprite.width;
       this.points[2].v=sprite.offy + sprite.height;
       this.points[3].x=x4;
       this.points[3].y=y4;
       this.points[3].u=sprite.offx;
       this.points[3].v=sprite.offy + sprite.height;
}

Hope this helps!

EDIT: Also, thanks so much for this plugin, it's awesome!Everyname2014-01-23 13:09:36
B
4
S
1
Posts: 6
Reputation: 287

Post » Tue Jan 28, 2014 8:04 pm

Fantastic plugin. I've had great success with it in Chrome on Win 7. Does anyone have any experience using it with Cocoon? I'm curious if it works on Android and ios
B
24
S
4
G
3
Posts: 43
Reputation: 2,795

Post » Tue Jan 28, 2014 9:03 pm

@fishbottle (& @R0J0hound), funnily enough I have just reverted back to using the Canvas plugin for something I'm testing through CocoonJS. I had a selection of Paster tiles covering the ground onto which I was pasting battle scars and other visual effects. There were about 100 tiles... Initially all went well with my testing then something happened - I presume I exceeded a memory threshold or something by adding a sprite (~50mb was being used on desktop according to debug, unfortunately my testing was too infrequent to be able to identify what it was that I changed to cause this).

All of the blank canvas tiles appeared corrupted with pasted parts of random image files (some from my game and others from apps that were installed but not running on my phone!). I would be very interested if anyone else has had this experience (I tested on 3 different android devices with the same problem evident on each).Colludium2014-01-28 21:04:13
A big fan of JavaScript.
B
74
S
20
G
69
Posts: 2,215
Reputation: 43,852

Post » Wed Jan 29, 2014 4:21 am

Thanks very much for that report @Colludium My use may be much less demanding but good to know both that it does work in Cocoonjs, and that it sometimes doesn't or at least didn't in your case in the end. If I do any successful testing on ios I'll put a note in here for anyone interested.
B
24
S
4
G
3
Posts: 43
Reputation: 2,795

Post » Wed Jan 29, 2014 8:41 am

Hey friends and especially the great RojoHound,

some of the users here suggested "Paster" to be the perfect tool for what I want to do. My aim is to make a city with fake 3D buildings like in top down games (e.g. GTA)
So I installed "Paster" yesterday, but im not really sure how to handle it, to be honest.

How do i get the cubes inside? Do I need real models, or can I create something with "Paster" itself and just texture it?
How about the transformation of the landscape, how does that work? (camera-zoom/player movement)
How will it affect the CPU, if I make a whole town from it (with 4-5 buildings repeating?)
Is there any chance to ever get this fluent on mobile, or is 3D transformation just to much for the telephone-market?

If anyone could help me with this, Ill definitely donate some coffee :)

Thanks a billion times,
Beav
Image
Check out our start-up and configure your own helmet in true 3D.
B
44
S
11
G
11
Posts: 1,154
Reputation: 9,978

Post » Wed Jan 29, 2014 9:40 pm

You will need your own 2D images of buildings @beaverlicious.
Have you tried playing around with the sample capx? It's a great place to start. Paster just, well, pastes sprite images onto the screen.

You can download it here:
https://dl.dropboxusercontent.com/u/5426011/plugins/paster_example.capx
B
24
S
4
G
3
Posts: 43
Reputation: 2,795

PreviousNext

Return to Completed Addons

Who is online

Users browsing this forum: No registered users and 2 guests