Skip to main content

Types

Easel has a number of built-in types which are used to represent different kinds of values.

Primitive Types

Values in Easel can be of different types, such as Numbers, Strings, and Booleans. Easel also has a number of more complex types, such as Arrays and Maps, which can be used to represent more complex data structures. There is also a special type called null, which is used to represent a value which is present but is nothing, whereas undefined indicates the absence of a value.

One of the most important types in Easel is the Entity type, which is used to represent objects in the game world. There are a number of other game-specific types, such as Vector, Color, Polygon, Category and Flag.

Types like Symbol and Callback are used to represent more abstract concepts, and are used in more advanced programming techniques.

There are a number of other types available as well - explore the full list in the sidebar to learn more.

Type Properties

If a type is null or undefined it is considered nullish. Values that are non-zero are considered truthy.

Only certain values can be used as keys in a Map. These are called Keyable values.

And only certain values can be saved to disk or transmitted across the network. These are called Serializable values.