davidfig / pixi-cull

a library to visibly cull objects designed to work with pixi.js
MIT License
109 stars 15 forks source link

Cannot read property 'Cull' of undefined #20

Open Vardan92 opened 3 years ago

Vardan92 commented 3 years ago

I followed the Installation example: `

`

and I'm getting an error: Cannot read property 'Cull' of undefined

davidfig commented 3 years ago

See https://github.com/davidfig/pixi-cull/issues/16. I need to redo the way pixi-cull is bundled. I'll try to get to it this week. It does work if using require or import.

Vardan92 commented 3 years ago

See #16. I need to redo the way pixi-cull is bundled. I'll try to get to it this week. It does work if using require or import.

Appreciate it! If it's not asking for much, can you also include how you did it with bundler? Or a link to a tutorial to it? It will help with less advance programmers like myself. Thank you!

davidfig commented 3 years ago

I updated the projected to v2.0.1. It is now accessible via the window.Cull variable. See the README.md for more information.

The easiest tool for bundling (I found) is parcel: https://parceljs.org/. It's almost magical. The tutorials are pretty good, and once you get it, you'll have all the packages at npmjs.com available with just an import statement. Good luck, and let me know if you run into any problems with pixi-cull.