Enumeration

Enumeration

new

Constructs an enumeration that contains both a numeric value and a name. This is used so the name of the enumeration is available in the debugger.

Parameters:
Name Type Argument Default Description
value Number <optional>
undefined The numeric value of the enumeration.
name String <optional>
undefined The name of the enumeration for debugging purposes.
properties Object <optional>
undefined An object containing extra properties to be added to the enumeration.
Example
// Create an object with two enumerations.
var filter = {
    NEAREST : new Enumeration(0x2600, 'NEAREST'),
    LINEAR : new Enumeration(0x2601, 'LINEAR')
};
Source:

Members

:String

The name of the enumeration for debugging purposes.
Default Value:
  • undefined

:Number

The numeric value of the enumeration.
Default Value:
  • undefined

Methods

Returns the name of the enumeration for debugging purposes.

Returns:
String The name of the enumeration for debugging purposes.

Returns the numeric value of the enumeration.

Returns:
Number The numeric value of the enumeration.