help_1.bin 1.3 KB

1234567891011121314151617181920212223242526272829303132
  1. Many AVS effects allow you to write simple expressions to control
  2. visualization. Here is a brief summary of how to write AVS code.
  3. Many aspects of AVS code are similar to C (including comments).
  4. You can create new variables just by using them, and you can read
  5. and write predefined variables (of which each effect has its own)
  6. to interact with the effect. Note that variables are all floating
  7. point numbers (no strings), and the maximum length of a variable's
  8. name is 8 characters (anything longer will be ignored.
  9. So, to create a variable, you can simply use it, for example:
  10. x = 5;
  11. You can also use a variety of operators and math functions to
  12. modify variables, see the Operators and Functions tabs above.
  13. Code can include C and C++ style comments:
  14. // using the doubleslash comments until the end of the line
  15. /* using the classic C comments
  16. comment a block of text */
  17. You can combine operators and functions into expressions, such
  18. as:
  19. x = 5 * cos(y) / 32.0; // this does some leetness right here
  20. You can use multiple expressions by seperating them with one or
  21. more semicolons, for example:
  22. x = x * 17.0; x = x / 5; y = pow(x,3.0);
  23. It is worth noting that extra whitespace (spaces, newlines) is
  24. ignored, so if you need to space things out for clarity, you can.