Mario 抱歉,我使用的翻译引擎不是很好。 您能否更详细地解释一下,您的问题是什么以及您要达到的目标是什么? Sorry, the translation engine I use is not very good. Could you please explain in more detail, what your problem is and what you are trying to achieve?
huey Mario wrote抱歉,我使用的翻译引擎不是很好。 您能否更详细地解释一下,您的问题是什么以及您要达到的目标是什么? Sorry, the translation engine I use is not very good. Could you please explain in more detail, what your problem is and what you are trying to achieve? I want spin-web-player to not need to load new resources when switching resources to play, but to load all resources at initial initialization. How should I write it if it can
Mario How are you switching resources with Spine Player? You can pass a custom Downloader to the Spine player that preloads all the resources the player needs: https://github.com/EsotericSoftware/spine-runtimes/blob/4.0/spine-ts/spine-player/src/Player.ts#L166 https://github.com/EsotericSoftware/spine-runtimes/blob/e39f74837a615e32e97ffac3b89eb692e3783ad6/spine-ts/spine-core/src/AssetManagerBase.ts#L242
huey Mario wroteHow are you switching resources with Spine Player? You can pass a custom Downloader to the Spine player that preloads all the resources the player needs: https://github.com/EsotericSoftware/spine-runtimes/blob/4.0/spine-ts/spine-player/src/Player.ts#L166 https://github.com/EsotericSoftware/spine-runtimes/blob/e39f74837a615e32e97ffac3b89eb692e3783ad6/spine-ts/spine-core/src/AssetManagerBase.ts#L242 uh.Do you have an example of how to override "Downloader"
Mario You don't even necessarily need to override Downloader. You could just do the following: Preload all asset files (.json/.skel, .altas, .png) however you want and convert them to data URIs. Instantiate a Downloader and fill the rawDataURIs map (file path > data uri) https://github.com/EsotericSoftware/spine-runtimes/blob/e39f74837a615e32e97ffac3b89eb692e3783ad6/spine-ts/spine-core/src/AssetManagerBase.ts#L244 Set the Downloader on the SpinePlayerConfig and create the web player. Everytime you then tell the webplayer to reload assets with specific paths, it will ask the Downloader which will return thek from its rawDataURIS map.