Comments (5)
From the title it sounds like you want to do the following:
- Load asynchronously one time, and store the data in the cache.
- Use functions like
getText()
andgetSound()
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.
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.
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.
Trying to make a minimal repro I found the issue is on Flixel side.
from lime.
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)
- Issue involving lime.ndll HOT 6
- Error compiling android on latest Ubuntu HOT 4
- `lime.ndll` fails to load `libneko.dylib` with certain homebrew installs of haxe/neko HOT 2
- [Question] Wrong .dll name when building hashlink? HOT 3
- Uncaught exception: [lime.utils.Preloader] ERROR: There is no asset library with an ID of "default" HOT 2
- Multiple font assets specified using <font> tag aren't preloaded by lime.utils.Preloader HOT 2
- Linux ARM64 Support? HOT 5
- Mac ARM64 support? HOT 3
- Nightly Haxe issues HOT 17
- TextField IME candidate list pane invisible on Windows HOT 8
- lime rebuild extension-webm windows error HOT 3
- CURL is freezing the application
- window.fullscreen toggling error on MacOS HOT 5
- Doc on ThreadPool.new doesn't match the function HOT 1
- Lack of option to disable automatic `full-screen` mode. HOT 1
- Weird title bar on unfocused borderless window HOT 3
- Android emulator crashes with antialiasing >= 2
- Compilation error HOT 1
- Using HXP complains about a missing NDLL HOT 9
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lime.