Write PIXI apps using React declarative style
MIT License
Bot releases are hidden (Show)
Published by inlet over 5 years ago
Text component anchor
prop is now a PointLike
type.
Add comments to type declaration to support in-code type suggestions.
Published by inlet over 5 years ago
Typings for HOC withPixiApp
Published by inlet over 5 years ago
Enable the useTick
hook with a second argument:
import { useTick } from '@inlet/react-pixi'
const myComponent = () => {
const [enableTick, setEnableTick] = useState(true)
useTick((delta: number) => {
// raf
}, enableTick)
}
Published by inlet over 5 years ago
Bug that fire events twice
Published by inlet over 5 years ago
Performance fixes, thanks to @EloB
Published by inlet over 5 years ago
Add Context types AppContext
, AppProvider
and AppConsumer
to type declaration file.
Published by inlet over 5 years ago
Now support the latest React stable release v16.8.0
🙌
Published by inlet over 5 years ago
Hook useTick
is now state aware!
const Box = () => {
const [x, setX] = useState(0);
useTick(() => setX(x + 1))
return <Box x={x}>
}
React Reconciler, makes this lib work with React/ReactDOM v16.8.0-alpha.1
Published by inlet almost 6 years ago
Typescript support for (observable)points, now supports Array-like syntax, example:
<Sprite anchor={[10, 10]}>
Published by inlet almost 6 years ago
AppContext
Published by inlet almost 6 years ago
Update to React 16.7. Now with hooks!
useTick
and useApp
Published by inlet almost 6 years ago
Update to React v16.6.
Published by inlet about 6 years ago
AppProvider
and AppConsumer
in custom render()
ref
in withPixiApp
This minor release has breaking changes for accessing the PIXI.Application
through render prop.
Fix: rename Provider
to AppConsumer
.
Example:
import { Stage, AppConsumer } from '@inlet/react-pixi'
import MyComponent from './MyComponent'
const App = (
<Stage>
<AppConsumer>
{ app => <MyComponent app={app} />}
</AppConsumer>
</Stage>
)
Published by inlet about 6 years ago
<Canvas />
attributes on Stage
.<Stage className="stage" />
// renders => <canvas class="stage" />
Published by inlet about 6 years ago
Use refs
import * as React from 'react'
import { Stage, Sprite } from '@inlet/react-pixi'
class App extends React.Component {
stage = React.createRef()
sprite = React.createRef()
render() {
return (
<Stage ref={this.stage}>
<Sprite ref={this.sprite} />
</Stage>
)
}
}
Published by inlet about 6 years ago
PixiFiber
Published by inlet about 6 years ago
Published by inlet about 6 years ago
null
Published by inlet about 6 years ago
Published by inlet over 6 years ago
onUnmount
prop