node icon indicating copy to clipboard operation
node copied to clipboard

Incompatibility of @pixi/node with @pixi/extract 7.2.4

Open UlyssesZh opened this issue 2 years ago • 2 comments

@pixi/extract 7.2.4 uses ImageData (introduced in commit 242eac):

https://github.com/pixijs/pixijs/blob/v7.2.4/packages/extract/src/Extract.ts#L153

We need to polyfill this object correctly to the ImageData provided by node-canvas.

This bug is similar to #4 because they are both due to not polyfilling objects from node-canvas correctly in @pixi/node.

UlyssesZh avatar Jan 03 '24 19:01 UlyssesZh

Yes, extract doesn't work. Use the canvas directly. e.g., app.renderer.view.toDataUrl('image/png'). I updated the hello world to not use extract. Will likely remove extract plugin.

bigtimebuddy avatar Mar 20 '24 20:03 bigtimebuddy

No need to remove that plugin, though. Wouldn't it be enough to modify that plugin so that it uses ImageData from node-canvas in Node.js environment?

UlyssesZh avatar Mar 20 '24 20:03 UlyssesZh