getLayerCount.lua 601 B

1234567891011121314151617181920212223242526
  1. return {
  2. tag = 'texture-metadata',
  3. summary = 'Get the layer count of the Texture.',
  4. description = [[
  5. Returns the layer count of the Texture. 2D textures always have 1 layer and cubemaps always
  6. have 6 layers. 3D and array textures have a variable number of layers.
  7. ]],
  8. arguments = {},
  9. returns = {
  10. layers = {
  11. type = 'number',
  12. description = 'The layer count of the Texture.'
  13. }
  14. },
  15. variants = {
  16. {
  17. arguments = {},
  18. returns = { 'layers' }
  19. }
  20. },
  21. related = {
  22. 'Texture:getWidth',
  23. 'Texture:getHeight',
  24. 'Texture:getDimensions'
  25. }
  26. }