haramanai / sifplayer

An HTML5 synfig files player.
16 stars 0 forks source link

Layer blends affects layers in other groups #2

Open animationista opened 11 years ago

animationista commented 11 years ago

A layer inside a group that uses some blend method other than Composite does in the sif-player spill over to layers inside other groups outside and below that first group.

Test this file: https://dl.dropbox.com/u/2811229/TEMP/Synfig/blend-onto-test.sif

-David (rylleman on Synfig forums)

haramanai commented 11 years ago

Sorry for the delayed response. For some reason I wanted to answer you with a new version but time slips by. The thing is, that I have to change the PasteCanvas at to an actual html5 canvas. I was planning to extend the use of the html5 canvas but then I wrote the Param dir to support conversion. I got to busy with other things and didn't find the time to fix this.

animationista commented 11 years ago

Alright. thanks. Is a fix long down your todo-list?

haramanai commented 11 years ago

It is of curse in the todo list but I have first to add a matrix lib so I can transform the context of the newly created canvas of the PasteCanva layer.

haramanai commented 11 years ago

After reading about the situation of 2d context and matrix. I decided to abandon for now at least this problem. The reason is that I have to do extra work just because they forgotten to add a function to get the matrix of the context. I read that after so many years they added it in the specifications.

You can see it here : http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html#transformations

But browser do not support it yet.

So to deal with this problem ( which is necessary to get the matrix transformation of the context ) I have to write a way to get track of the matrix. This will mess up what I am trying to do. Keep as possible clear the code for understanding and extend it with new layers. Also I will have to clean the code again when browsers are going to implement currentTransform.

So I am not going to fix this problem till then. Sorry about that but I cannot find any other solution and I am not going to mess up this script and my free time cause for some reason one of the most important functions was out of the specs. Thanks.

haramanai commented 11 years ago

Just fixed the issue. I wanted to bypass the usage of a matrix tracker for the context. I had no luck on this one. So now I use a tracker that mimics the transform of the context. Please test. Thanks.