Releases: pixijs/pixi-react
Releases · pixijs/pixi-react
v5.0.3
Fixed
Ref's in custom components (PixiComponent
):
import { Graphics } from 'pixi.js';
interface RectangleProps {
x: number;
y: number;
color: number;
}
const Rectangle = PixiComponent<RectangleProps, Graphics>('Rectangle', {
create: () => new Graphics(),
applyProps: (ins, _, props) => {
ins.x = props.x;
ins.y = props.y;
ins.beginFill(props.color);
ins.drawRect(0, 0, 100, 100);
ins.endFill();
},
});
const App = () => (
<Rectangle
ref={rect => console.assert(rect instanceof Graphics)}
x={100}
y={100}
color={0xff0000}
/>
);
v5.0.2
v5.0.1
v5.0.0
New major release 🎉
Now compatible with PIXI v5.3+.
v4.1.2
v4.1.1
v4.1.0
v4.0.0
Added
Support for updating the PIXI stage on React component change 🙌
v3.0.0
Fixed
- Typings for
PointLike
supporting{ x: number, y: number }
Improved
-
Graphics
draw
prop.Breaking change
The
draw
prop now accepts a function to redraw that is part of the
React eco-system, see https://reactpixi.org/components/graphics#usage
Removed
-
Graphics
preventDefault
prop.Breaking change