public class JsonAtlas extends Atlas
Atlas.Listener
Modifier and Type | Field and Description |
---|---|
protected int |
mAxisSystem |
protected static java.lang.String |
TAG |
mHeight, mImage, mListener, mMasterFrameSet, mNumSubFrameSets, mSubFrameSets, mWidth
Modifier and Type | Method and Description |
---|---|
void |
load(AssetManager assets,
java.lang.String filePath,
float scale)
Load from assets
|
protected void |
load(java.io.InputStream stream,
float scale) |
void |
load(java.lang.String filePath,
float scale)
Load from file system
|
void |
loadAsync(AssetManager assets,
java.lang.String filePath,
float scale) |
boolean |
loadURL(java.lang.String urlPath,
java.lang.String cachePath,
float scale)
Load from a url and cache as an option
|
void |
loadURLAsync(java.lang.String urlPath,
java.lang.String cachePath,
float scale) |
protected void |
parse(java.lang.String json,
float scale) |
protected AtlasFrame |
parseFrame(int index,
JSONObject frameJson,
float scale) |
addFrame, addSubFrameSet, getFrame, getFrame, getHeight, getImage, getListener, getMasterFrameSet, getNumSubFrameSets, getSubFrameSet, getSubFrameSets, getWidth, removeAllFrames, removeFrame, setListener, setSize
protected void load(java.io.InputStream stream, float scale) throws java.io.IOException, JSONException
java.io.IOException
JSONException
public void load(AssetManager assets, java.lang.String filePath, float scale) throws java.io.IOException, JSONException
assets
- filePath
- scale
- java.io.IOException
JSONException
public void load(java.lang.String filePath, float scale) throws java.io.IOException, JSONException
filePath
- scale
- java.io.IOException
JSONException
public void loadAsync(AssetManager assets, java.lang.String filePath, float scale)
public boolean loadURL(java.lang.String urlPath, java.lang.String cachePath, float scale) throws JSONException
urlPath
- cachePath
- scale
- JSONException
public void loadURLAsync(java.lang.String urlPath, java.lang.String cachePath, float scale)
protected void parse(java.lang.String json, float scale) throws JSONException
JSONException
protected AtlasFrame parseFrame(int index, JSONObject frameJson, float scale) throws JSONException
JSONException