Channel Name
The channel name is the name of the animation channel you want to be controlled by Xpressionist. Animation channels are drawn dark green in the editor of Xpressionist. The available channels are listed in the Active Channel list on the right of the Xpressionist interface. The naming of the channels is the same as or close to the naming in the Universe project window. Read more about naming in Xpressionist.
Assignment Operator
The = (equals sign) to the right of the channel name is the assignment operator. This symbol assigns the result of the statement on the right side of = to the channel on the left. Therefore it has the meaning "has the value of". In the example, Ball.Position.X "has the value of" sin( time * 180 ). You can also assign a value to a variable through the use of the = sign. The assignment operator in an expression does not mean "is equal to". "Is equal to" is a relational operator and is expressed with ==.
Variable
Variables are all values that change over time. Basically you can say that these are the values that drive an animation created in Xpressionist: If all values would stay static in an expression nothing would move in an otherwise static project. For example, the variable time is a predefined EIU system variable that stores the current time of the animation. Time is an example of a variable that can be read but not set. Read more about variables in Xpressionist.
Function
A function is a special word with a value - called an argument - in brackets and will be drawn dark blue bold in the editor of Xpressionist. In the above example, the argument of the functions is time * 180. Using the value of the argument, Xpressionist runs a calculation on the function and returns a new value or performs another action. In the first example, the function sin( time * 180 ) calculates the sine of the value of time * 180, which translates to a number between -1 and 1. Xpressionist has many convenient built-in functions and commands that do math calculations, conversions, and so on. Read more about functions in Xpressionist.
Arithmetic, relational and logic operators
Arithmetic operators are basic math operators like + (plus) and - (minus). Relational operators compare values with each other: > (greater than) or < (less than), or == (equal to) from above . These operators as well as the logic operators && (and) and || (or) are often used in conditional statements. More about operators
Constant
Constants are values that stay static when time changes. A simple number like 5 is a constant. Constants can be used as multipliers or to offset values. There are lots of predefined constants available in Xpressionist which will be drawn dark red bold (the same as predefined variables) in the editor of Xpressionist. Read more about constants in Xpressionist.
Terminator
A semicolon (;) is used to mark the end of a statement. As noted above, an expression can be a series of statements and comments - in Xpressionist you can have an unlimited number of statements. However, each statement must be terminated through the use of the semicolon. This ensures that there is logic and order to your expression.
The most basic statement in an expression usually has the following components: a channel name, an assignment operator (=) and some value that gets assigned to the channel; and a statement terminator (;). A statement can have many more elements than this, but this is the basic structure.
The most simple expression is made of a channel name, the assignment operator, a constant and a terminator. E.g.
Ball.Position.X = 2;
This assigns the static value of 2 to the animation channel Ball.Position.X.
|