hello trixtor, just having some experiment and i already know the problem regarding on loading spriter on iOS. and i finally make it work now.
in your SpriterLoader.java the abstract 'load' method parameter 'path' seems having a value different in android and desktop.
when running in desktop and android the value of the 'path' is the image internal path
(e.g.
dir/head.png
dir/body.png ...
... etc)
while when running into iOS the value of the 'path' became the image absolute path.
(e.g.
/Users/arnelespiritu/Library/Application Support/iPhone Simulator/7.0/Applications/77C753E6-2712-4650-94D3-6BB805364B12/RunPogsRunGame.app/scml//head.png
/Users/arnelespiritu/Library/Application Support/iPhone Simulator/7.0/Applications/77C753E6-2712-4650-94D3-6BB805364B12/RunPogsRunGame.app/scml//face.png
so i modify your SpriterLoader.java load method a bit.
@Override public void load(final Reference ref, String path) { //System.out.println(path); FileHandle f = null; switch(Gdx.app.getType()) { case Android: case Desktop: f = Gdx.files.internal(path); break; case iOS: f = Gdx.files.absolute(path); break; default: break; } if(f==null) return;//other platform. yet not tested if(!f.exists()) { System.out.println(path); System.out.println("image not exist"); return; } if(packer == null && this.pack) packer = new PixmapPacker(2048, 2048, Pixmap.Format.RGBA8888, 2, true); final Pixmap pix = new Pixmap(f); if(packer != null) packer.pack(ref.fileName, pix); //files.put(ref,null);//Put first the reference into the map, in the next frame, the null value will be replaced with the actual texture. //Gdx.app.postRunnable(new Runnable(){ //Post the creation of a OpenGL Texture to the LibGDX rendering thread. //This is necessary if you are loading the scml file asynchrouously with more than one thread. // @Override // public void run() { files.put(ref, createSprite(new Texture(pix))); pix.dispose(); // } //}); }
i hav'nt test on webGL yet also on applet. anyway thanks trixtor this api is so cool.keep it up, im looking forward on your work thanks.