Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
UlyssesZh opened this issue Jan 3, 2024 · 2 comments
Open

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

UlyssesZh opened this issue Jan 3, 2024 · 2 comments

Comments

@UlyssesZh
Copy link

@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.

@bigtimebuddy
Copy link
Contributor

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.

@UlyssesZh
Copy link
Author

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants