class_canvasitemmaterial.rst 6.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150
  1. .. Generated automatically by doc/tools/makerst.py in Godot's source tree.
  2. .. DO NOT EDIT THIS FILE, but the CanvasItemMaterial.xml source instead.
  3. .. The source is found in doc/classes or modules/<name>/doc_classes.
  4. .. _class_CanvasItemMaterial:
  5. CanvasItemMaterial
  6. ==================
  7. **Inherits:** :ref:`Material<class_Material>` **<** :ref:`Resource<class_Resource>` **<** :ref:`Reference<class_Reference>` **<** :ref:`Object<class_Object>`
  8. **Category:** Core
  9. Brief Description
  10. -----------------
  11. A material for :ref:`CanvasItem<class_CanvasItem>`\ s.
  12. Properties
  13. ----------
  14. +-----------------------------------------------------+-------------------------------------------------------------------------------------------+
  15. | :ref:`BlendMode<enum_CanvasItemMaterial_BlendMode>` | :ref:`blend_mode<class_CanvasItemMaterial_property_blend_mode>` |
  16. +-----------------------------------------------------+-------------------------------------------------------------------------------------------+
  17. | :ref:`LightMode<enum_CanvasItemMaterial_LightMode>` | :ref:`light_mode<class_CanvasItemMaterial_property_light_mode>` |
  18. +-----------------------------------------------------+-------------------------------------------------------------------------------------------+
  19. | :ref:`int<class_int>` | :ref:`particles_anim_h_frames<class_CanvasItemMaterial_property_particles_anim_h_frames>` |
  20. +-----------------------------------------------------+-------------------------------------------------------------------------------------------+
  21. | :ref:`bool<class_bool>` | :ref:`particles_anim_loop<class_CanvasItemMaterial_property_particles_anim_loop>` |
  22. +-----------------------------------------------------+-------------------------------------------------------------------------------------------+
  23. | :ref:`int<class_int>` | :ref:`particles_anim_v_frames<class_CanvasItemMaterial_property_particles_anim_v_frames>` |
  24. +-----------------------------------------------------+-------------------------------------------------------------------------------------------+
  25. | :ref:`bool<class_bool>` | :ref:`particles_animation<class_CanvasItemMaterial_property_particles_animation>` |
  26. +-----------------------------------------------------+-------------------------------------------------------------------------------------------+
  27. Enumerations
  28. ------------
  29. .. _enum_CanvasItemMaterial_BlendMode:
  30. .. _class_CanvasItemMaterial_constant_BLEND_MODE_MIX:
  31. .. _class_CanvasItemMaterial_constant_BLEND_MODE_ADD:
  32. .. _class_CanvasItemMaterial_constant_BLEND_MODE_SUB:
  33. .. _class_CanvasItemMaterial_constant_BLEND_MODE_MUL:
  34. .. _class_CanvasItemMaterial_constant_BLEND_MODE_PREMULT_ALPHA:
  35. enum **BlendMode**:
  36. - **BLEND_MODE_MIX** = **0** --- Mix blending mode. Colors are assumed to be independent of the alpha (opacity) value.
  37. - **BLEND_MODE_ADD** = **1** --- Additive blending mode.
  38. - **BLEND_MODE_SUB** = **2** --- Subtractive blending mode.
  39. - **BLEND_MODE_MUL** = **3** --- Multiplicative blending mode.
  40. - **BLEND_MODE_PREMULT_ALPHA** = **4** --- Mix blending mode. Colors are assumed to be premultiplied by the alpha (opacity) value.
  41. .. _enum_CanvasItemMaterial_LightMode:
  42. .. _class_CanvasItemMaterial_constant_LIGHT_MODE_NORMAL:
  43. .. _class_CanvasItemMaterial_constant_LIGHT_MODE_UNSHADED:
  44. .. _class_CanvasItemMaterial_constant_LIGHT_MODE_LIGHT_ONLY:
  45. enum **LightMode**:
  46. - **LIGHT_MODE_NORMAL** = **0** --- Render the material using both light and non-light sensitive material properties.
  47. - **LIGHT_MODE_UNSHADED** = **1** --- Render the material as if there were no light.
  48. - **LIGHT_MODE_LIGHT_ONLY** = **2** --- Render the material as if there were only light.
  49. Description
  50. -----------
  51. ``CanvasItemMaterial``\ s provide a means of modifying the textures associated with a CanvasItem. They specialize in describing blend and lighting behaviors for textures. Use a :ref:`ShaderMaterial<class_ShaderMaterial>` to more fully customize a material's interactions with a :ref:`CanvasItem<class_CanvasItem>`.
  52. Property Descriptions
  53. ---------------------
  54. .. _class_CanvasItemMaterial_property_blend_mode:
  55. - :ref:`BlendMode<enum_CanvasItemMaterial_BlendMode>` **blend_mode**
  56. +----------+-----------------------+
  57. | *Setter* | set_blend_mode(value) |
  58. +----------+-----------------------+
  59. | *Getter* | get_blend_mode() |
  60. +----------+-----------------------+
  61. The manner in which a material's rendering is applied to underlying textures.
  62. .. _class_CanvasItemMaterial_property_light_mode:
  63. - :ref:`LightMode<enum_CanvasItemMaterial_LightMode>` **light_mode**
  64. +----------+-----------------------+
  65. | *Setter* | set_light_mode(value) |
  66. +----------+-----------------------+
  67. | *Getter* | get_light_mode() |
  68. +----------+-----------------------+
  69. The manner in which material reacts to lighting.
  70. .. _class_CanvasItemMaterial_property_particles_anim_h_frames:
  71. - :ref:`int<class_int>` **particles_anim_h_frames**
  72. +----------+------------------------------------+
  73. | *Setter* | set_particles_anim_h_frames(value) |
  74. +----------+------------------------------------+
  75. | *Getter* | get_particles_anim_h_frames() |
  76. +----------+------------------------------------+
  77. .. _class_CanvasItemMaterial_property_particles_anim_loop:
  78. - :ref:`bool<class_bool>` **particles_anim_loop**
  79. +----------+--------------------------------+
  80. | *Setter* | set_particles_anim_loop(value) |
  81. +----------+--------------------------------+
  82. | *Getter* | get_particles_anim_loop() |
  83. +----------+--------------------------------+
  84. .. _class_CanvasItemMaterial_property_particles_anim_v_frames:
  85. - :ref:`int<class_int>` **particles_anim_v_frames**
  86. +----------+------------------------------------+
  87. | *Setter* | set_particles_anim_v_frames(value) |
  88. +----------+------------------------------------+
  89. | *Getter* | get_particles_anim_v_frames() |
  90. +----------+------------------------------------+
  91. .. _class_CanvasItemMaterial_property_particles_animation:
  92. - :ref:`bool<class_bool>` **particles_animation**
  93. +----------+--------------------------------+
  94. | *Setter* | set_particles_animation(value) |
  95. +----------+--------------------------------+
  96. | *Getter* | get_particles_animation() |
  97. +----------+--------------------------------+