[PLUGIN] Paster

Post your completed addons to share with the community

Post » Tue Jan 13, 2015 6:40 am

Okay, this is just freaking odd.

To sum up: I have a 3570k w/ HD4000 graphics. This is only happening in chrome canary and firefox. Here is the tally (triple checked this time):

Android:

The latest chrome, v39, works fine. Firefox doesn't capture anything, just gives me a blank paster object (big surprise).

PC - Chrome:

Chrome Stable v39 works fine. Unbeknownst to me, I was testing in Canary before (it comes up when I select chrome in C2).

Canary v41 is doing the odd mirror and flip trick, plus I can see thru the paster object slightly, as if it had an opacity of ~96 or so.

PC - Other:

Firefox does the exact same thing canary does...sometimes. Other times, the paster object remains blank. Odd, considering Firefox is a separate code base.

IE 11 doesn't do anything; the paster object remains blank.

Node-Webkit 0.10.5 works fine as well. Not sure about the newer versions (though who would want to use them, anyway).

See any of this on your end?
Don't lose your work. Backup your game with Dropbox.
B
44
S
10
G
10
Posts: 1,106
Reputation: 9,202

Post » Tue Jan 13, 2015 6:59 am

@TiAm
I appreciate testing it. I'm currently limited to only being able to use webgl in chrome 33 (probably should upgrade). Every other browser either on my laptop either never worked with webgl or somehow now won't work with webgl. I have another pc that I don't have access to atm that I'll test on if I need to.

I did another tweak to do something that is used elsewhere in the plugins. Does it give better results?
B
92
S
32
G
109
Posts: 5,291
Reputation: 70,993

Post » Tue Jan 13, 2015 7:19 am

R0J0hound wrote:@Somebody
This may be useful for you for saving part of the window at any size image you want.


Wow! This is simply beastly - I suspect it also enables a feature I was kinda going to mention as a slim possibility - supersampling (in a way) - i.e. punching a higher res image into a lover res canvas and thus improving the quality of the result.

Speaking of which - can I set the resolution to beyond object size? Would the pasted objects then be, for example, pasted at a higher res. And can I change the res and thus downsize that image before saving?
B
19
S
6
G
6
Posts: 1,101
Reputation: 5,646

Post » Tue Jan 13, 2015 7:27 am

@Somebody
The resolution can be set to anything from 1x1 up to the largest texture size your graphics card supports, whatever that may be. And yes you can do just that. In the example the canvas is copied to the screen object and a portion of that is pasted to the paster object which has a resolution of 32x32. So then if you saved Paster.imageUrl you'd get a 32x32 pixel image.
B
92
S
32
G
109
Posts: 5,291
Reputation: 70,993

Post » Tue Jan 13, 2015 7:29 am

Ok, another sub-question: Can I capture things off-screen (but on canvas) or will only screen-visible objects be pasted?
B
19
S
6
G
6
Posts: 1,101
Reputation: 5,646

Post » Tue Jan 13, 2015 7:39 am

You can paste object's anywhere, including off-screen. The object you're pasting just needs to overlap the paster object.

The exceptions currently are particles and tilemaps. They need to be onscreen to be able to be pasted.
B
92
S
32
G
109
Posts: 5,291
Reputation: 70,993

Post » Tue Jan 13, 2015 7:45 am

Super-awesome! Will need to play around with this, but it sounds like nearly all the export questions have been answered by this. Thank you!
B
19
S
6
G
6
Posts: 1,101
Reputation: 5,646

Post » Tue Jan 13, 2015 9:28 am

@R0J0hound

I'm getting generally inconsistent results, but it seems like the newest update is actually worse in preview: on android I'm now getting the upside-down/mirrored effect I was seeing on Canary/FF. On desktop, I don't see any difference.

I reverted back to the previous version of paster and the android preview seems fine again. I tried updating/reverting the plugin a few times: once it seemed to be working correctly, a couple times nothing was pasted at all, and most of the time I got the backwards paste.

Going to try an XDK export and see where that goes.

Somebody wrote:
R0J0hound wrote:@Somebody
This may be useful for you for saving part of the window at any size image you want.


Wow! This is simply beastly - I suspect it also enables a feature I was kinda going to mention as a slim possibility - supersampling (in a way) - i.e. punching a higher res image into a lover res canvas and thus improving the quality of the result.

Speaking of which - can I set the resolution to beyond object size? Would the pasted objects then be, for example, pasted at a higher res. And can I change the res and thus downsize that image before saving?


Wow, I hadn't thought of that...supersampling would be awesome for more powerful PC's, and this would be an easy way of doing it.

I've noticed before that you can force downsampling in chrome by zooming out; if high-dpi and high quality scaling are enabled, chrome will render to a higher rez, then downsample in the window. It really smooths out some of the hard edges induced by some blend effects.

Being able to do that in an actual game...seriously amazing. :D
Don't lose your work. Backup your game with Dropbox.
B
44
S
10
G
10
Posts: 1,106
Reputation: 9,202

Post » Tue Jan 13, 2015 9:47 am

Update:

Tried an XDK export with v7 stable, and the paste from canvas effect seems to work aces.
Don't lose your work. Backup your game with Dropbox.
B
44
S
10
G
10
Posts: 1,106
Reputation: 9,202

Post » Tue Jan 13, 2015 11:50 am

Interesting things happen if "Fullscreen in browser:" is set to Crop:

Glitch.gif
You do not have the required permissions to view the files attached to this post.
B
19
S
6
G
6
Posts: 1,101
Reputation: 5,646

PreviousNext

Return to Completed Addons

Who is online

Users browsing this forum: No registered users and 1 guest