@pixi/react-animated
v7.1.3
Published
Animate your @pixi/react components with react-spring
Downloads
5,429
Readme
React Spring
Use "@pixi/react-animated"
with "@pixi/react"
for react-spring compatible animated components.
Usage
import React from 'react';
import { Spring } from 'react-spring';
import { Texture } from 'pixi.js';
import { Stage, Sprite } from '@pixi/react-animated';
const App = () => (
<Stage>
<Spring native from={{ x: 0, y: 0 }} to={{ x: 200, y: 200 }}>
{(props) => <Sprite texture={Texture.WHITE} tint={0xff0000} {...props} />}
</Spring>
</Stage>
);