Code Monkey home page Code Monkey logo

Comments (4)

bigtimebuddy avatar bigtimebuddy commented on April 28, 2024 1

loadParser is indeed the correct solution to this problem. Welcome PR if someone wants to add more explicit mention in the docs or to the guides.

from pixijs.

elsassph avatar elsassph commented on April 28, 2024

What is the role of the format option then?

from pixijs.

bigtimebuddy avatar bigtimebuddy commented on April 28, 2024

Good question @elsassph. The format is similar to resolution in that they are used by the Assets' Resolver figure out which asset to load based on the developer's preferences. For example, maybe on a mobile device you want to prefer resolution of 1 and a format of webp. These attributes allow you to explicitly define that instead of inferring from the filename (however resolution/format can be inferred from src, e.g., [email protected] would be 2 resolution and png format). It's helpful if you are shipping cross-platform assets like compressed textures, or image formats like avif that might not have universal support to be able to define fallbacks.

from pixijs.

elsassph avatar elsassph commented on April 28, 2024

Thanks, I'll let you guys document that ;)

from pixijs.

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.