public enum AssetDef.Type

  1. Object
  2. Enum<AssetDef.Type>
  3. AssetDef.Type

ImplementsComparable<AssetDef.Type>

The art format of an asset, which decides what it is realized into.

Enum constants

IMAGEA single static image (source is a PNG/JPG), realized as a com.codename1.gaming.Sprite.
SHEETA sprite sheet (a grid of equal frames) played as an animated com.codename1.gaming.AnimatedSprite.
MESHA 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

IMAGE
A single static image (source is a PNG/JPG), realized as a com.codename1.gaming.Sprite.

SHEET

SHEET
A sprite sheet (a grid of equal frames) played as an animated com.codename1.gaming.AnimatedSprite.

MESH

MESH
A 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.