# [PLUGIN] Paster

### » Sat May 10, 2014 9:28 am

@R0J0hound

I am playing little with your example from page 3 and i have some wierd results when i:
1. when i change z order of points when on same layer
2. move upper points to newly created layer 2

are those features or bugs?

https://dl.dropboxusercontent.com/u/169390986/PUB/paster2layers.capx
B
37
S
16
G
3
Posts: 860
Reputation: 6,748

### » Sun May 11, 2014 8:32 pm

@R0J0hound

https://dl.dropboxusercontent.com/u/169390986/PUB/paster2layers-part2.capx

You can notice that PIN worky only if object moves... if layer scrolls than its not...

(use up-down arrows to notice that it dont work)
(use left-right arrows to see how it works works)

...thats how i was intented to use paster in my project
Is possible to make it work without need for object to move?
B
37
S
16
G
3
Posts: 860
Reputation: 6,748

### » Mon May 12, 2014 5:05 am

@irina
For the first capx the issue is the layer scales aren't considered currently.
The second capx is the same. So moving the objects is a solution or you can maybe look into the system expressions to convert layer positions to screen and vise versa.
B
100
S
38
G
134
Posts: 5,555
Reputation: 85,323

### » Mon May 12, 2014 6:05 am

R0J0hound wrote:@irina
So moving the objects is a solution or you can maybe look into the system expressions to convert layer positions to screen and vise versa.

Since moving is not an option... can you please elaborate more on this system expressions please?
thank you.
B
37
S
16
G
3
Posts: 860
Reputation: 6,748

### » Mon May 12, 2014 4:30 pm

@irina
From the C2 manual:
https://www.scirra.com/manual/126/system-expressions
CanvasToLayerX(layer)
CanvasToLayerY(layer)
Calculate the layout co-ordinates underneath a position in canvas co-ordinates for a given layer.

LayerToCanvasX(layer)
LayerToCanvasY(layer)
Calculate the canvas co-ordinates above a position in layout co-ordinates for a given layer.
B
100
S
38
G
134
Posts: 5,555
Reputation: 85,323

### » Mon May 12, 2014 5:46 pm

Thank you... i'll look into that!
Cheers!
B
37
S
16
G
3
Posts: 860
Reputation: 6,748

### » Sat May 24, 2014 7:14 pm

@R0J0hound

I've been getting an issue w/ the plugin not working since it hit 0.5. 0.4 works fine, even in more recent versions of C2 (like the recent beta with shadows), but 0.5, when pasting into a canvas, ends up not pasting anything at all.

Has something changed that may be causing this? It's happening on every computer I've tried it on, with nVidia/AMD/Intel chipsets, so I don't think it's related to my video card.
B
106
S
58
G
27
Posts: 563
Reputation: 24,380

### » Sat May 24, 2014 8:06 pm

@digitalsoapbox
I can't reproduce the issue. It's working fine here in Firefox, Chrome and NodeWebkit. Can you post a capx with the issue?
B
100
S
38
G
134
Posts: 5,555
Reputation: 85,323

### » Tue May 27, 2014 6:05 pm

@R0J0hound
Here's a screenshot of the code that pastes the sprites into the Paster object. What it does is pick a canvas with the same ID as that assigned to the sprite's layer (defined in varibles in both the Paster object & sprite), pastes the sprite into that Paster object, then deletes itself.

It works fine w/ 0.4, and also works if I'm using Canvas objects instead of Paster objects (it's just a LOT slower). It just doesn't paste the sprites using 0.5. I've also tried it on multiple machines, Windows 7 x64 on three of them (nVidia GTX 750i, nVidia GTX 770 Superclocked, nVidia Quadro K5000M) & Windows 8.1 x32 on another (Tablet PC, not sure on GPU).
You do not have the required permissions to view the files attached to this post.
B
106
S
58
G
27
Posts: 563
Reputation: 24,380

### » Wed Jun 04, 2014 8:23 pm

Awesome WebGL plugin! Not sure if this has been asked but will it be possible to clear the WebGL area to a clear colour instead of an opaque one?
B
24
S
5
G
1
Posts: 89
Reputation: 3,015

PreviousNext