EsotericSoftware / spine-runtimes

2D skeletal animation runtimes for Spine.
http://esotericsoftware.com/
Other
4.43k stars 2.92k forks source link

[runtimes] Example for loading attachment images from external sources #2639

Open badlogic opened 2 months ago

badlogic commented 2 months ago

See https://esotericsoftware.com/forum/d/26930-spine-ios-runtime-%E5%A6%82%E4%BD%95%E9%80%9A%E8%BF%87%E5%8A%A0%E8%BD%BD%E5%8F%A6%E4%B8%80%E4%B8%AA%E5%AF%BC%E5%87%BA%E7%9A%84spine%E4%B8%AD%E7%9A%84skin%E5%AE%9E%E7%8E%B0%E6%9B%B4%E6%8D%A2%E7%9A%AE%E8%82%A4 https://esotericsoftware.com/forum/d/26806-spine-ios-runtime-%E4%B8%8D%E6%94%AF%E6%8C%81%E4%BD%BF%E7%94%A8%E5%A4%96%E9%83%A8%E5%8A%A8%E6%80%81%E8%B4%B4%E5%9B%BE%E6%9B%BF%E6%8D%A2%E9%99%84%E4%BB%B6%E8%B4%B4%E5%9B%BE/2

We need:

  1. A Spine project that demonstrates how to set up a skeleton with placeholder images
  2. A PSD file with the placeholder images that can be used to create concrete variations of e.g. eyes, hair, hats, etc.
  3. An example for each runtime that shows how to
    1. Load the skeleton
    2. Load individual attachment images and replace the images in the skeleton's skin with them
    3. Possibly how to combine multiple externally loaded images into a single texture at runtime for best performance

This might not be possible for every runtime due to API limitations of the respective engine/platform.

davidetan commented 2 months ago

Related issue: https://github.com/EsotericSoftware/spine-runtimes/issues/2566