defold.types

Welcome to hxdefold API documentation!

..
util
AtlasResourceReference
Buffer
BufferData
BufferResourceReference
BufferStream
FontResourceReference
Hash
HashOrString
  • Shortcut type that can be either either String or Hash.

Many functions in Defold accept both String and Hash, so this type is used to represent that.

HashOrStringOrUrl
  • Shortcut type that can be either either String or Hash or Url.

Some functions in Defold accept both String, Hash and Url objects, so this type is used to represent that.

LoadBufferAsyncHandle

MaterialResourceReference
Matrix4

The first number is the row (starting from 0) and the second number is the column. Columns can be accessed with c0 to c3, returning a vector4. Example: m.m21 which is equal to m.c1.z

Matrix4Data

Message
  • A typed message.

This abstract type wraps Hash and allows specifying message data as its type parameter. This is used to provide type-checked messaging.

PhysicsShape

PhysicsShapeData

PhysicsShapeType

PhysicsShapeWrapper

Property
  • A typed property.

This abstract type wraps Hash and allows specifying property names together with their types. This is used for type checking and type inference for getting and setting properties.

Quaternion
QuaternionData

RenderTargetResourceReference
SoundPlayId
TextureResourceHandle
TextureResourceReference
TileSourceResourceReference
Url
UrlOrString
  • Shortcut type that can be either either String or Url.

Many functions in Defold accept both String and Url, so this type is used to represent that.

UrlSocket
Vector
  • A vector of arbitrary size, which is returned by Vmath.vector().

Array access is possible, but note that the indices given are actually incremented by 1 in the abstract. This is because Lua indexes from 1, but on the Haxe side we want to index from 0.

Vector3
Vector3Data

Vector4
Vector4Data