分页: 1 / 1
huey
我希望spine-web-player在切换资源播放时不需要去加载新资源,而是在一开始初始化时加载全部的资源,如果可以的话应该怎么写呢
1 week ago
- huey
- 帖子: 3
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?
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?
1 week ago
-
Mario - 帖子: 3035
huey
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 canMario 写道:抱歉,我使用的翻译引擎不是很好。 您能否更详细地解释一下,您的问题是什么以及您要达到的目标是什么?
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?
1 week ago
- huey
- 帖子: 3
Mario
How are you switching resources with Spine Player? You can pass a custom
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
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
1 week ago
-
Mario - 帖子: 3035
huey
uh.Do you have an example of how to override "Downloader"Mario 写道:How are you switching resources with Spine Player? You can pass a customDownloader
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
1 week ago
- huey
- 帖子: 3
Mario
You don't even necessarily need to override Downloader. You could just do the following:
1. Preload all asset files (.json/.skel, .altas, .png) however you want and convert them to data URIs.
2. Instantiate a
3. Set the
Everytime you then tell the webplayer to reload assets with specific paths, it will ask the
1. Preload all asset files (.json/.skel, .altas, .png) however you want and convert them to data URIs.
2. 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#L2443. 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. 1 week ago
-
Mario - 帖子: 3035
Mark topic unread
• 分页: 1 / 1
回到 中国Spine用户
- 当前时区为 UTC