pixi-react

Write PIXI apps using React declarative style

MIT License

Downloads
55.6K
Stars
2.1K
Committers
56

Bot releases are hidden (Show)

pixi-react - v0.5.6

Published by inlet over 5 years ago

Fixed

Text component anchor prop is now a PointLike type.

Improved

Add comments to type declaration to support in-code type suggestions.

pixi-react - v0.5.5

Published by inlet over 5 years ago

Fixed

Typings for HOC withPixiApp

pixi-react - v0.5.4

Published by inlet over 5 years ago

Improved

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)
}
pixi-react - v0.5.3

Published by inlet over 5 years ago

Fixed

Bug that fire events twice

pixi-react - v0.5.2

Published by inlet over 5 years ago

Improved

Performance fixes, thanks to @EloB

  • Applying props
  • Helper utilities
pixi-react - v0.5.1

Published by inlet over 5 years ago

Fixed

Add Context types AppContext, AppProvider and AppConsumer to type declaration file.

pixi-react - v.0.5.0

Published by inlet over 5 years ago

Now support the latest React stable release v16.8.0 🙌

pixi-react - v0.4.4

Published by inlet over 5 years ago

Fixed

Hook useTick is now state aware!

const Box = () => {
  const [x, setX] = useState(0);

  useTick(() => setX(x + 1))

  return <Box x={x}>
}

Updated

React Reconciler, makes this lib work with React/ReactDOM v16.8.0-alpha.1

pixi-react - v0.4.3

Published by inlet almost 6 years ago

Improved

Typescript support for (observable)points, now supports Array-like syntax, example:
<Sprite anchor={[10, 10]}>

pixi-react - v0.4.2

Published by inlet almost 6 years ago

Added

  • Type def for hooks
  • Expose AppContext

Improved

  • Update docs
pixi-react - v0.4.0

Published by inlet almost 6 years ago

Update to React 16.7. Now with hooks!

useTick and useApp

pixi-react - v0.3.0

Published by inlet almost 6 years ago

Update to React v16.6.

pixi-react - v0.2.0

Published by inlet about 6 years ago

Improved

  • Use AppProvider and AppConsumer in custom render()
  • Forward ref in withPixiApp
  • Upgrade modules (including new React Reconciler)

Fixed

  • Wallaby config using new format
  • Update tests
  • Update docs

Migration Guide

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>
)
pixi-react - v0.1.7

Published by inlet about 6 years ago

Fixed

  • Update typescript definition. Support React <Canvas /> attributes on Stage.
<Stage className="stage" />
// renders => <canvas class="stage" />
pixi-react - v0.1.6

Published by inlet about 6 years ago

Fixed

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>
    )
  }
}
pixi-react - v0.1.5

Published by inlet about 6 years ago

Improved

  • Build outputs:
    • umd (browser and node)
    • cjs (node)
    • module (esnext)
  • Rewritten type definition:
    • Support interaction events
    • Better overall typing support
    • Add PixiFiber
    • Add additional components
  • Update docs
  • Update modules

Fixed

  • Do not create builds on CI
  • Fix linting
pixi-react - v0.1.3

Published by inlet about 6 years ago

Improved

  • Make Stage RAF dynamic
pixi-react - v0.1.2

Published by inlet about 6 years ago

Fixed

  • Fixed applying default props
  • Default cursor is null
pixi-react - v0.1.1

Published by inlet about 6 years ago

Improved

  • Update npm modules
  • Update Docz
  • Update Babel
  • Versioned cache for CircleCI
  • Update README and docs
pixi-react - v0.1.0

Published by inlet over 6 years ago

Improved

  • Use new React Context API
  • Upgrade npm modules
  • Upgrade React Reconciler (new API)
  • Catch errors in Stage

Added

  • Stage onUnmount prop