Skip to content

v0.1.0

Compare
Choose a tag to compare
@Zyie Zyie released this 08 Mar 10:31
· 2 commits to main since this release

What's Changed

  • Feat: add support for v8 by @Zyie in #17

With this release there is now an appReady promise that you can await to always make sure the Application is always ready since PixiJS v8 requires an await

export const Story: StoryFn<typeof args> = (currentArgs, context) => {
    const view = new Container()
    context.parameters.pixi.appReady.then(()=>{
        .. add stuff to container
    })

    return { view }
})

There is now also a helper class that does the await for you and gives you an init hook to start adding everything too

import { PixiStory, StoryFn } from '@pixi/storybook-renderer';

const args = {
    text: 'Click me!',
};

export const Story: StoryFn<typeof args> = (currentArgs, context) =>
    new PixiStory({
        context,
        init: (view) =>
        {
                view.addChild(new Text(currentArgs.text));
        },
         resize: (view, width, height)=> view.position.set(width / 2, height / 2),
        update: (view , ticker: Ticker | number) => {},
        destroy: (view)=> {}
    });

export default {
   ...
};

Full Changelog: v0.0.6...v0.1.0