... | ... | @@ -6,33 +6,26 @@ Free and Pro-tier developers only have access to in-play scripting. Enterprise c |
|
|
|
|
|
## Getting started with Javacript
|
|
|
|
|
|
The simplest way to try custom scripting is through the
|
|
|
The simplest way to try custom scripting is through the custom javascript action in the effect builder.
|
|
|
|
|
|
|
|
|
To use it, use the custom javascript action. All javascript is runned in the context of the the match and the action specifically.
|
|
|
To use it, use the custom javascript action. All javascript is executed in the context of that action.
|
|
|
|
|
|
Examples of custom javascript commands.
|
|
|
|
|
|
console.log(thisCard)
|
|
|
console.log(thisCard.variable)
|
|
|
console.log(parseVariable('$variable'))
|
|
|
console.log(thisMatch.variable)
|
|
|
console.log(thisCard.effects)
|
|
|
console.log(thisCard)
|
|
|
thisCard.variable = "foobar"
|
|
|
console.log(parseVariable('$variable'))
|
|
|
console.log(dotSyntax('$variable.variable2'))
|
|
|
|
|
|
## Included third party libraries
|
|
|
|
|
|
**Server side libraries:**
|
|
|
Async
|
|
|
Lodash
|
|
|
* Async
|
|
|
* Lodash
|
|
|
|
|
|
**Client side Libraries:**
|
|
|
Async
|
|
|
Lodash
|
|
|
jQuery
|
|
|
three.js
|
|
|
hammer.js
|
|
|
|
|
|
|
|
|
|
|
|
For client side scripting you have full access to the DOM as well as included libraries Lodash, jQuery, threejs.
|
|
|
|
|
|
* Async
|
|
|
* Lodash
|
|
|
* jQuery
|
|
|
* three.js
|
|
|
* hammer.js |