push.lua 916 B

123456789101112131415161718192021222324252627282930313233
  1. return {
  2. tag = 'transform',
  3. summary = 'Push state onto a stack.',
  4. description = [[
  5. Saves a copy of the transform or render states. Further changes can be made to the transform or
  6. render states, and afterwards `Pass:pop` can be used to restore the original state. Pushes and
  7. pops can be nested, but it's an error to pop without a corresponding push.
  8. ]],
  9. arguments = {
  10. stack = {
  11. type = 'StackType',
  12. default = [['transform']],
  13. description = 'The type of stack to push.'
  14. }
  15. },
  16. returns = {},
  17. variants = {
  18. {
  19. arguments = { 'stack' },
  20. returns = {}
  21. }
  22. },
  23. notes = [[
  24. Each stack has a limit of the number of copies it can store. There can be 16 transforms and 4
  25. render states saved.
  26. The `state` stack does not save the camera info or shader variables changed with `Pass:send`.
  27. ]],
  28. related = {
  29. 'Pass:pop',
  30. 'StackType'
  31. }
  32. }