GithubHelp home page GithubHelp logo

Comments (5)

player-03 avatar player-03 commented on July 17, 2024 1

From the title it sounds like you want to do the following:

  1. Load asynchronously one time, and store the data in the cache.
  2. Use functions like getText() and getSound() to synchronously retrieve the data from cache.

I have good news and bad news on that front. The good news is that most of the functions already work that way. Sounds, images, and fonts are all cached, and the cache supersedes the "exists but only asynchronously" error. The bad news is that text is not cached on any target, and this was a deliberate decision way back when, so probably won't be changed.

In any case, Dimensionscape is right: there's no way around loading asynchronously at least once.

from lime.

Dimensionscape avatar Dimensionscape commented on July 17, 2024

Retrieval of assets on html5 are inherently asynchronous only regardless of the overlaying technology such as openfl or flixel.

The one exception to this is embedding asset data directly into javascript via text-encoding such as base64.

from lime.

Dimensionscape avatar Dimensionscape commented on July 17, 2024

Just a note: getting a resource from the cache is still asynchronous even though it is much faster due being local.

I went ahead and closed this issue. If you're having a specific problem with Flixel, be sure to draft an issue there.

from lime.

T1mL3arn avatar T1mL3arn commented on July 17, 2024

Trying to make a minimal repro I found the issue is on Flixel side.

from lime.

T1mL3arn avatar T1mL3arn commented on July 17, 2024

@player-03

The bad news is that text is not cached on any target, and this was a deliberate decision way back when, so probably won't be changed.

Here you considered you can add text/binary cache.

from lime.

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.