Skip to content

Interpolation #36

@gtokman

Description

@gtokman

Is it possible to have an API for interpolation like this with Motion?

@State var x = 0


@State var xOffset = AnimationWrapper(SpringAnimation<CGPoint>(value: x, input: [0, 1], output: [0, 300]))

// ...
Circle()
   .offset(x: yOffset)
Button(action: { x = 1 }) {
    Text("Tap me")
}
// ...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions