Revision of Data Types from Thu, 09/28/2017 - 20:16
Submitted by Leonard Daly on Tue, 05/30/2017 - 21:22
All field data is defined using data types. The types are what is needed by the XSeen node collection. It is possible to add additional data types with the xseen.Parser.addType method.
The data types are:
- string - this is the default and allows any set of characters in the HTML encoding
- boolean - either true or false
- integer - must pass the JavaScript number check and have no fractional part
- float - must pass the JavaScript number check
- vec2 - a two-element vector of floats. The elements are space separated.
- vec3 - a three-element vector of floats. The elements are space separated.
- vec4 - a four-element vector of floats. The elements are space separated.
- color - A color specified as one of the following
- <name> - A valid HTML color name
- #<24-bit hex> - A color specified as three douples of hex digits
- #<base-10> - A color specified as an integer that converts to a 24-bit color
- "r g b" - Where r, g, and b are either three floats from [0,1] or three integers from [0-255]. The elements are space separated.
XSeen | JavaScript |
---|---|
string | String |
boolean | Boolean (true or false) |
integer | Number (integer) |
float | Number |
vec2 | Array with 2 numeric elements |
vec3 | Array with 3 numeric elements |
vec4 | Array with 4 numeric elements |
color | Number [0 - (2^24-1)] |