setEffectEnabled.lua 881 B

1234567891011121314151617181920212223242526272829303132
  1. return {
  2. tag = 'sourceEffects',
  3. summary = 'Enable or disable an effect.',
  4. description = 'Enables or disables an effect on the Source.',
  5. arguments = {
  6. effect = {
  7. type = 'Effect',
  8. description = 'The effect.'
  9. },
  10. enable = {
  11. type = 'boolean',
  12. description = 'Whether the effect should be enabled.'
  13. }
  14. },
  15. returns = {},
  16. variants = {
  17. {
  18. arguments = { 'effect', 'enable' },
  19. returns = {}
  20. }
  21. },
  22. notes = [[
  23. The active spatializer will determine which effects are supported. If an unsupported effect is
  24. enabled on a Source, no error will be reported. Instead, it will be silently ignored. See
  25. `lovr.audio.getSpatializer` for a table showing the effects supported by each spatializer.
  26. Calling this function on a non-spatial Source will throw an error.
  27. ]],
  28. related = {
  29. 'Source:isSpatial'
  30. }
  31. }