Skip to content

Recreate animation on resize #265

@mrleblanc101

Description

@mrleblanc101

Hi,

I have a cube bouncing to each side of the window like this:

Image

How would I reset the animation on resize ?
I can't figure out how.

If I put useMotion in a method, and call in onMounted and onResize, it seems like the previous useMotion is not destroyed and everything bug.

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions