# Enum GameLevel.Mode

java.lang.Object
java.lang.Enum<GameLevel.Mode>
com.codename1.gaming.level.GameLevel.Mode

All Implemented Interfaces:
  `Comparable<GameLevel.Mode>`

Enclosing class:
  `GameLevel`

public static enum GameLevel.Mode extends Enum<GameLevel.Mode>
The kind of a level, which decides how its elements are realized and rendered. Each constant carries its JSON wire token (`#wireName()`) and a display `#label()`.

- ## Enum Constant Summary

  Enum Constants
  Enum Constant
  Description
  `BOARD`
  Isometric board: sprites placed through an `IsoProjection`.
  `THREE_D`
  Perspective 3D: meshes, terrain and lights in a world.
  `TWO_D`
  Orthographic 2D: tile layers + sprites in pixel space.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static GameLevel.Mode`
  `fromWire(String name)`
  The mode for a JSON wire token (case-insensitive); defaults to `#TWO_D` for an unknown or missing token, so an older or hand-edited file still loads.
  `String`
  `label()`
  A human-readable label for menus (`"2D"` / `"3D"` / `"Board"`).
  `static GameLevel.Mode`
  `valueOf(String name)`
  Returns the enum constant of this type with the specified name.
  `static GameLevel.Mode[]`
  `values()`
  Returns an array containing the constants of this enum type, in the order they are declared.
  `String`
  `wireName()`
  The lowercase token this mode is written as in the `.game` JSON (`"2d"` / `"3d"` / `"board"`).

  ### Methods inherited from class Enum

  `clone, compareTo, equals, getDeclaringClass, getEnumValues, hashCode, name, ordinal, setEnumValues, toString, valueOf`

  ### Methods inherited from class Object

  `getClass, notify, notifyAll, wait, wait, wait`

- ## Enum Constant Details

  - ### TWO_D

    public static final GameLevel.Mode TWO_D
    Orthographic 2D: tile layers + sprites in pixel space.

  - ### THREE_D

    public static final GameLevel.Mode THREE_D
    Perspective 3D: meshes, terrain and lights in a world.

  - ### BOARD

    public static final GameLevel.Mode BOARD
    Isometric board: sprites placed through an `IsoProjection`.

- ## Method Details

  - ### values

    public static GameLevel.Mode[] values()
    Returns an array containing the constants of this enum type, in the order they are declared.
    Returns:
      an array containing the constants of this enum type, in the order they are declared

  - ### valueOf

    public static GameLevel.Mode valueOf(String name)
    Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
    Parameters:
      `name` - the name of the enum constant to be returned.
    Returns:
      the enum constant with the specified name
    Throws:
      `IllegalArgumentException` - if this enum type has no constant with the specified name
      `NullPointerException` - if the argument is null

  - ### wireName

    public String wireName()
    The lowercase token this mode is written as in the `.game` JSON (`"2d"` / `"3d"` / `"board"`).

  - ### label

    public String label()
    A human-readable label for menus (`"2D"` / `"3D"` / `"Board"`).

  - ### fromWire

    public static GameLevel.Mode fromWire(String name)
    The mode for a JSON wire token (case-insensitive); defaults to `#TWO_D` for an unknown or missing token, so an older or hand-edited file still loads.