Giter Club home page Giter Club logo

Comments (3)

photonstorm avatar photonstorm commented on June 29, 2024

How else could it be implemented? The Image data has to be created from something and those files can't be external. Unless there is another way to encode them that doesn't trip CSP?

What environment are you working in that requires this btw?

from phaser.

fliespl avatar fliespl commented on June 29, 2024

It's an gamification app for banking sector and their requirements are getting stricter every year :)

What actually does this check do? Maybe it's possible to override it locally (our fork) and set booleans based on other conditions like browser (even if it's not error prone)?

Alternatively, maybe it would be possible to allow custom function here from config? This way we can force it to true since we only allow modern browsers (while keeping possibility to use released version).

from phaser.

photonstorm avatar photonstorm commented on June 29, 2024

The Canvas Detect isn't really required anymore. That's for legacy Samsung devices where they had a glaring bug in their canvas implementation that was unable to detect or use blend modes properly.

The default images are a different matter, though - they are used by the Texture Manager in lots of internal cases (for Shape rendering in WebGL, when images are missing, etc). The values in the game config could be set to nothing, so it would remove the data elements (which is what trips CSP) - but you would also need to override this part of the Texture Manager (inside the boot method):

        this.addBase64('__DEFAULT', config.defaultImage);
        this.addBase64('__MISSING', config.missingImage);
        this.addBase64('__WHITE', config.whiteImage);

Then it won't try to create images from empty config data. However, you do need to provide images that use those keys - but you could provide them externally, as long as they are added to the Texture Manager as part of its boot process it will be happy with that.

from phaser.

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.