GithubHelp home page GithubHelp logo

Comments (11)

spassvogel avatar spassvogel commented on June 26, 2024 3

@ivanpopelyshev for the health and longevity for pixijs and its plugins I believe it would be really good to have this. I think a lot lof developers will be initially put off by some of these old school javascript paradigms and the hacks you have to apply to get it to work in a modern setup.

from tilemap.

ShukantPal avatar ShukantPal commented on June 26, 2024 2

#110 fixes the global PIXI problem

from tilemap.

eranimo avatar eranimo commented on June 26, 2024

This is currently breaking the latest version of pixi-tilemap

from tilemap.

ivanpopelyshev avatar ivanpopelyshev commented on June 26, 2024

@eranimo please elaborate, whats wrong there? i still cant figure out how to make all those modules

from tilemap.

martinemmert avatar martinemmert commented on June 26, 2024

I think the package needs a bit of love to support the ES6 module system and CommonJS projects.
It is possible by having a correct set-up project and a package.json containing a proper exports config.

I am currently struggling with this issue as well, and there are many pitfalls regarding that. I might come up with a pull-request to solve that. But I cannot guarantee that old projects still work correctly since I ultimately would deprecate the global PIXI object.

from tilemap.

ivanpopelyshev avatar ivanpopelyshev commented on June 26, 2024

we are experimenting with pixi-tilemap, and new pixi.js 5.4 rc1 , im waiting for rc2. When one plugin will be ready - i'll move everything else

previously, when i tried to move to modules, it ended bad. several times. there's also something that is missing that's wasnt possible to do using es6 modules. The whole approach was fucked up because lack of necessary build tools.

How did I unfuck it: I invented "global mixins" approach and it will be posted in 5.4 rc2

from tilemap.

martinemmert avatar martinemmert commented on June 26, 2024

Hm, I've yet to see a mixin solution that brings something good to the table.
Care to share?

from tilemap.

ivanpopelyshev avatar ivanpopelyshev commented on June 26, 2024

This is the story: https://github.com/pixijs/pixi.js/pulls?q=is%3Apr+global+mixins+

This is one of files: https://github.com/pixijs/pixi.js/blob/dev/packages/mixin-cache-as-bitmap/global.d.ts

from tilemap.

martinemmert avatar martinemmert commented on June 26, 2024

I skimmed the issues and PR's, but I can't see when or how these global mixins are introduced.
Even though it might be better to have this conversation somewhere else.

Anyway, I'll continue working on my fork and come up with a PR as soon as it is ready.

from tilemap.

ivanpopelyshev avatar ivanpopelyshev commented on June 26, 2024

Basically, we introduce interfaces in global scope, that we implement in PixiJS. That interface can be changed in other modules. To support this perversion and ensure correct generation of docs / types we had to experiment. a lot.

from tilemap.

martinemmert avatar martinemmert commented on June 26, 2024

Sounds interesting. Hopefully, it works out as planned. 👍
I've added my proposal to solve the module compatibility issues as PR, tested it locally with the examples and my current project. It seems to be working without any issues so far.

from tilemap.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.