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

Problems with clipping during animation #137

Closed
zapletnev opened this issue Jul 7, 2017 · 2 comments
Closed

Problems with clipping during animation #137

zapletnev opened this issue Jul 7, 2017 · 2 comments
Assignees
Labels
Milestone

Comments

@zapletnev
Copy link
Contributor

        let polygonShape = Shape(
            form: Polygon(points: [50, 0, 100, 50, 50, 100, 0, 50]),
            fill: Color.red
        )
        let polygonShape2 = Shape(
            form: Polygon(points: [50, 0, 100, 50, 50, 100, 0, 50]),
            fill: Color.red,
            place: Transform.move(dx: 100, dy: 0)
        )
        
        let polygonShape3 = Shape(
            form: Polygon(points: [50, 0, 100, 50, 50, 100, 0, 50]),
            fill: Color.red,
            place: Transform.move(dx: 200, dy: 0)
        )
        
        let polygonGroup = [polygonShape, polygonShape2, polygonShape3].group()
        
        let clip = Rect(x: 100.0, y: 0.0, w: 100.0, h: 100.0)
        let clipShape = Shape(form: clip, stroke: Stroke(fill: Color.yellow))
        
        let polygonGroupGroup = [polygonGroup].group()
        
        // COMMENT this line
        polygonGroup.clip = clip
        
        polygonGroup.onTap { _ in
            polygonGroup.placeVar.animation(to: polygonGroup.place.move(dx: -100.0, dy: 0.0)).easing(.linear).cycle().play()
        }
        self.node = [polygonGroupGroup, clipShape].group()
        self.node.place = Transform.move(dx: 50, dy: 300)
@zapletnev zapletnev added the bug label Jul 7, 2017
@zapletnev zapletnev added this to the 0.8.3 milestone Jul 7, 2017
@ystrot ystrot modified the milestones: 0.8.3, 0.9.1 Sep 19, 2017
@ystrot ystrot modified the milestones: 0.9.1, 0.9.x Nov 28, 2017
@f3dm76
Copy link
Collaborator

f3dm76 commented Jun 25, 2018

Here is how it works now, is it correct?
Untitled.mov.zip

@ystrot ystrot modified the milestones: 0.9.x, 0.9.2 Jun 28, 2018
@ystrot
Copy link
Member

ystrot commented Jun 28, 2018

Closing this ticket. Please reopen it if you still have some issues 😉

@ystrot ystrot closed this as completed Jun 28, 2018
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

4 participants