The node for the swipe event.
Input parameters:
- Time - duration of the swipe (default value 0.15 s);
- Min Length (px) - the minimum length that the swipe must “pass” (default value 100 px).
Output parameters:
- Direction - normalized vector of the swipe direction;
- Length (px) - the length of the swipe (to assess the “strength”);
The Length output parameter is calculated by the vector value (without normalization) to relate to the input value.
- Angle (0-360) - swipe angle in the range from 0 to 360 degrees (0 is on the right, i.e. Vector (1, 0) = 0 degrees).
- States are states with direction output (Up, Down …). By default, they are not displayed, but if you press “Add 4 State”, then 4 states will appear (Up, Down, Left, Right) and if again, then 8 states will already be displayed.
Determining direction for a state:
for 4 directions - "circle" is divided into 4 segments of 90 degrees;
for 8 directions - "circle" is divided into 8 segments of 45 degrees.
- changed the way custom node sockets are handled at several places
- updated the `replaceAll` and `replace` functions used to perform node replacements
- renamed and improved the NodeReplacement [new name] class, which represents a replacement task
- added an arm_version property to all logic nodes, as well as a `get_replacement_node` method (to be overridden for each node)
- added an option to declare a node as obselete in add_node() (useful in order to have the node defined, but out of the menu)
- added classes for UI popups linked to node updates, as well as an operator dedicated to said node update
Thanks to MoritzBrueckner for part of the ground work!
Add buttons:
- New Node Tree – creates and sets a new Node Tree in the list;
- Edit Node Tree – loads the Node Tree selected from the list into all Logic Node Editor;
- From Node Tree – loops through all the working Logic Node Editor and from the last in the list sets the value to the list.