Data driven design
"behaviors": {
"global": [ // this is scope
{
"id": "create_element", // for logging
"trigger": {
"input": "mouse", //
"event": "click", // type of event
"target": "canvas", // where we are
"conditions": [
{
"type": "click_count", // define different types of X, to then bind it by the key or the key "type"
"count": 2
}
]
},
"effect": {
"action": "create_element",
"params": { // metadata
"type": "text"
}
}
}
],
}