Skip to content

Using Animated.ValueXY as prop directly does not animate consistently #95

@michalochman

Description

@michalochman

Description

Hey, I'm working on PixiJS integration integration with React 16 called react-pixi-fiber. I love the way Animated works and I think the use cases it tries to solve perfectly fit the React-Pixi world I am in currently.

Everything works as expected when I use Animated.Value, however I have noticed that when I try to use Animated.ValueXY directly (i.e. not referring to its x or y properties) it does not animate unless there's already another prop being animated.

A picture is worth a thousand words though, so it's easier to understand by seeing it in action.

Steps to reproduce

  1. Go to: https://codesandbox.io/s/9qyxrljyo
  2. Click on the Bunny and notice that it's both rotating and scaling.
  3. Comment out lines 30 and 36 (related to rotation).
  4. Clicking the Bunny no longer animates scale.

Additional info

  • animated version: 0.2.2
  • React version: 16.2.0

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