Pixi and babylon earcut conflicts in webpack

I’ve noticed that if I try to include earcut in my externals and have both BJs and PIXI as a project dependency it breaks everything.

I’m not in the office this morning or id post screenshots.

Anyone have any idea which version they are running and which version we are? Would there be a version I can include that would make both engines happy?

Ohh btw my fix was to just go with pixis dependency, and manually include earcut on the script that BJS needed it.

Earcut can also be ES6 imported and passed in to ie: ExtrudePolygon/CreatePolygon with earcutInjection.
ie:

import * as Earcut from 'earcut';

MeshBuilder.CreatePolygon(...., Earcut)

I don’t see earcut listed as a dependency of PIXI.

Odd, yeah I even found a discussion on how Ivan substituted something out for it on a old post on HTML5 forums.

Let me change my stuff back to the setup that caused the error when I get a chance and ill post the actual error from it. It definitely is PIXI side and not us as far as it seems.

1 Like