I am attempting to set a PixiJS animated sprite as a chrome browser extension icon, but running into quite a few issues.
Setting the app.view or app.stage as image data returns this error:
QuoteThe imageData property must contain an ImageData object or dictionary of ImageData objects
I attempted to use new PIXI.CanvasExtract and new PIXI.CanvasRenderer to extract the pixels but they are now deprecated?
Quote'CanvasExtract' is not exported from 'pixi.js'
Is there any insight on how I can get this to work? I can get the sprite to render as a normal react component, but not as the browser extension icon.
Here is my code snippet
componentDidMount() {
const app = new PIXI.Application({ backgroundColor: 0x1099bb, height: 16, width: 16})
const logo = PIXI.Sprite.from('/logo_16.png');
app.stage.addChild(logo);
chrome.browserAction.setIcon({imageData: app.view});
}