Configuration parameters for a GridCraft grid.
API Overview #
- Constructors - API calls which return an object, typically one that offers API methods
- Fields - Variables which can only be accessed from an object returned by a constructor
- Methods - API calls which can only be made on an object returned by a constructor
API Documentation #
Constructors #
new #
Signature | GridCraft.Configuration.new() -> table |
Type | Constructor |
Description | Create a new configuration object for a GridCraft grid. |
Returns |
|
Fields #
animationMs #
Signature | GridCraft.Configuration.animationMs |
Type | Field |
Description | Time for key-seledction animation in ms, default is 150ms. |
gridMaxWidth #
Signature | GridCraft.Configuration.gridMaxWidth |
Type | Field |
Description | The max width for the grid in px, default is 1024 |
gridMaxHeight #
Signature | GridCraft.Configuration.gridMaxHeight |
Type | Field |
Description | The max height for the grid in px, default is 768 |
displayScreen #
Signature | GridCraft.Configuration.displayScreen |
Type | Field |
Description | The screen on which the grid should be displayed. |
Methods #
animationSeconds #
Signature | GridCraft.Configuration:animationSeconds() -> number |
Type | Method |
Description | Time for key-selection animation in seconds (derived from animationMs) |
toJSON #
Signature | GridCraft.Configuration:toJSON() -> string |
Type | Method |
Description | Return the configuration as a JSON string. |
replace #
Signature | GridCraft.Configuration:replace() -> GridCraft.Configuration |
Type | Method |
Description | Replace ALL values of the configuration with values from the upddate object |
Parameters |
|
Returns |
|
Notes |
|