Write PIXI apps using React declarative style
MIT License
Bot releases are visible (Hide)
Published by inlet about 4 years ago
Make prop { options: { resizeTo } }
for <Stage>
optional.
Published by inlet about 4 years ago
Typings for animated components
Published by inlet about 4 years ago
π Use React-Pixi with React Spring is now available through import @inlet/react-pixi/animated
,
see https://reactpixi.org/react-spring
Compatible with
react-spring@next
(v9+). Note that older versions of react-spring don't work as they have a different API.
fbjs
dependencyidx
dependencyanimated
animated
.React-Pixi:
https://unpkg.com/@inlet/[email protected]/dist/react-pixi.umd.js
React-Pixi with React-Spring support:
https://unpkg.com/@inlet/[email protected]/animated/react-pixi.umd.js
Published by inlet about 4 years ago
Instead of resetting the interaction manager, simply update the resolution
of the interaction manager. Libraries like pixi-viewport
depends on the interaction manager, this patch will fix any related issues.
Published by inlet about 4 years ago
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}
/>
);
Published by inlet about 4 years ago
AutoDensity is now set to PIXI.Application
allowing app.renderer.resize
to set width, height and css styles correctly.
Published by inlet over 4 years ago
Change the applyDefaultProps
behaviour, fixes #235
Prop is not undefined?
Set direct PIXI value
Prop has a default value?
Set value to default
Else?
Show a warn log
Published by inlet over 4 years ago
New major release π
Now compatible with PIXI v5.3+.
Published by inlet over 4 years ago
Supports multiple renderer contexts
Published by inlet over 4 years ago
Published by inlet over 4 years ago
options.resolution
changePublished by inlet over 4 years ago
Support for updating the PIXI stage on React component change π
Published by inlet over 4 years ago
PointLike
supporting { x: number, y: number }
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
Graphics preventDefault
prop.
Breaking change
Published by inlet over 4 years ago
v2.0.0
πreact-reconciler
docz
and internalsPublished by inlet over 4 years ago
The type definition wrapping Container
works better.
Published by inlet over 4 years ago
Types for Graphics
, and all Components have children
props now
Published by inlet over 4 years ago
Type def for Container
Published by inlet over 4 years ago
Update on initialFrame
change
<AnimatedSprite isPlaying={false} initialFrame={frame} />
Published by inlet over 4 years ago
Make skew
a PointLike
type
Published by inlet over 4 years ago
PointLike props types