Giter VIP home page Giter VIP logo

Comments (3)

B0sh avatar B0sh commented on May 24, 2024 1

Thank you! Just tried it this morning and it does work. I figured the hack with using loader itself wouldn't work out, glad you were able to resolve it quickly

from melonjs.

obiot avatar obiot commented on May 24, 2024

oh interesting, thanks for reporting it !

from melonjs.

obiot avatar obiot commented on May 24, 2024

Hi, so I fixed the issue. The trick to use loader.withCredentials works indeed but the problem is that it's creating cyclic dependencies. So I did reorganise the source code, but then because you cannot modify exported properties in es6 (this was overlooked when we migrated from es5 to es6), I added a setOption() method that allows to set custom settings for the loader.

 // Set the crossOrigin attribute to "anonymous"
 me.loader.setOptions({ crossOrigin: "anonymous" });
 
 // Enable the nocache mechanism
 me.loader.setOptions({ nocache: true });

 // Enable withCredentials
 me.loader.setOptions({ withCredentials: true });

this also breaks compatibility with previous version, so I also had to increase the major version (now it's 17.0)

Before I release it, would you be able to give it a test, the latest distribution file is here :
https://github.com/melonjs/melonJS/tree/master/dist

from melonjs.

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.