public enum AssetDef.Type
- Object
- Enum<AssetDef.Type>
- AssetDef.Type
ImplementsComparable<AssetDef.Type>
The art format of an asset, which decides what it is realized into.
Enum constants
IMAGE | A single static image (source is a PNG/JPG), realized as a com.codename1.gaming.Sprite. |
SHEET | A sprite sheet (a grid of equal frames) played as an animated com.codename1.gaming.AnimatedSprite. |
MESH | A 3D mesh (glTF/glb), realized as a com.codename1.gaming.Model. |
Methods
public static AssetDef.Type[] values() | |
public static AssetDef.Type valueOf(String name) | |
public String wireName() | The lowercase JSON token for this format ("image" / "sheet" / "mesh"). |
public static AssetDef.Type fromWire(String name) | The format for an explicit JSON token (case-insensitive); null/unknown is #IMAGE. |
Inherited methods
Enum constant details
IMAGE
IMAGEA single static image (
source is a PNG/JPG), realized as a com.codename1.gaming.Sprite.SHEET
SHEETA sprite sheet (a grid of equal frames) played as an animated
com.codename1.gaming.AnimatedSprite.MESH
MESHA 3D mesh (glTF/glb), realized as a
com.codename1.gaming.Model.Method details
values
public static AssetDef.Type[] values()valueOf
public static AssetDef.Type valueOf(String name)wireName
public String wireName()The lowercase JSON token for this format (
"image" / "sheet" / "mesh").fromWire
public static AssetDef.Type fromWire(String name)The format for an explicit JSON token (case-insensitive);
null/unknown is #IMAGE.