Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Masked layers with many keyframes are not published properly #24

Open
andrewstart opened this issue Dec 6, 2016 · 0 comments
Open

Masked layers with many keyframes are not published properly #24

andrewstart opened this issue Dec 6, 2016 · 0 comments
Labels

Comments

@andrewstart
Copy link
Collaborator

andrewstart commented Dec 6, 2016

If a single keyframe of a mask is masking a layer with many keyframes, the published file creates the mask instance once for each masked keyframe (overwriting the same variable), then masks only the first keyframe. After that, it adds the mask as a timed child for the length of its frame once for each masked keyframe.

//Example Output
var mask = new Graphics()
            .drawCommands(shapes.Example[0])
            .setRenderable(false);
var mask = new Graphics()
            .drawCommands(shapes.Example[0])
            .setRenderable(false);
var mask = new Graphics()
            .drawCommands(shapes.Example[0])
            .setRenderable(false);
var frame1 = new Sprite(fromFrame("foobar"))
            .setMask(mask);
var frame2 = new Sprite(fromFrame("foobar2"));
var frame3 = new Sprite(fromFrame("foobar3"));
this.addTimedChild(mask, 0, 3, {
                "0": {
                    x: 0,
                    y: 0
                }
            })
            .addTimedChild(mask, 0, 3, {
                "0": {
                    x: 0,
                    y: 0
                }
            })
            .addTimedChild(mask, 0, 3, {
                "0": {
                    x: 0,
                    y: 0
                }
            })
            .addTimedChild(frame1, 0, 1, {
                "0": {
                    x: 0,
                    y: 0
                }
            })
            .addTimedChild(frame2, 1, 1, {
                "1": {
                    x: 0,
                    y: 0
                }
            })
            .addTimedChild(frame1, 2, 1, {
                "2": {
                    x: 0,
                    y: 0
                }
            })

Example Timeline:
mask_issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants