Giter VIP home page Giter VIP logo

Comments (7)

englercj avatar englercj commented on August 26, 2024

Why are you shimming pixi? It has a UMD export so it should export fine in rjs environments. The shim could liekly be shadowing the forced global export that plugins rely on. (pixi exports as UMD and always to window.PIXI)

from spine.

gtothesquare avatar gtothesquare commented on August 26, 2024

Just desperate tries, since PIXI is now exposed globally, but seems that then is not needed :). Still if we remove it we get the same problem.
Minified version the exception is in this line:

e.exports = PIXI.spine = {Spine: t("./Spine"),SpineRuntime: t("./SpineRuntime"),loaders: t("./loaders")}

For some reason it tries to load browserify, as you can see in the network tab http://snag.gy/0Bez0.jpg

from spine.

gtothesquare avatar gtothesquare commented on August 26, 2024

Seems the examples have a similar problem which is not related to require.js http://pixijs.github.io/examples/index.html?s=spine&f=dragon.js&title=Dragon&plugins=pixi-spine

from spine.

englercj avatar englercj commented on August 26, 2024

The examples has a bad version of spine being uploaded on accident, I've fixed it.

As for your error, this happens when 1) pixi is not loaded first so the global doesn't exists, or 2) The global is shadowed by a shim or some such.

If you have a small testbed I can look at this further.

from spine.

gtothesquare avatar gtothesquare commented on August 26, 2024

Tried doing the testbed but couldn't. We ended up moving from requirejs to webpack and that solve the issue. Now we have another regarding spine looking for the atlas with the same the json file. This is a problem because we cache bust the files, so even if both are called dragon.png and dragon.atlas, when we build it it will have different rev.

BTW which pattern of UMD are you using https://github.com/umdjs/umd for both pixi and the pixi-spine plugin ?

from spine.

englercj avatar englercj commented on August 26, 2024

We use the browserify standalone option, so whatever they do. As for the new issue, I would open a separate ticket.

from spine.

gtothesquare avatar gtothesquare commented on August 26, 2024

Thanks for help :) will do

from spine.

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.