CanvasItemMaterial.xml 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <class name="CanvasItemMaterial" inherits="Material" category="Core" version="3.1">
  3. <brief_description>
  4. A material for [CanvasItem]s.
  5. </brief_description>
  6. <description>
  7. [code]CanvasItemMaterial[/code]s provide a means of modifying the textures associated with a CanvasItem. They specialize in describing blend and lighting behaviors for textures. Use a [ShaderMaterial] to more fully customize a material's interactions with a [CanvasItem].
  8. </description>
  9. <tutorials>
  10. </tutorials>
  11. <demos>
  12. </demos>
  13. <methods>
  14. </methods>
  15. <members>
  16. <member name="blend_mode" type="int" setter="set_blend_mode" getter="get_blend_mode" enum="CanvasItemMaterial.BlendMode">
  17. The manner in which a material's rendering is applied to underlying textures.
  18. </member>
  19. <member name="light_mode" type="int" setter="set_light_mode" getter="get_light_mode" enum="CanvasItemMaterial.LightMode">
  20. The manner in which material reacts to lighting.
  21. </member>
  22. <member name="particles_anim_h_frames" type="int" setter="set_particles_anim_h_frames" getter="get_particles_anim_h_frames">
  23. </member>
  24. <member name="particles_anim_loop" type="bool" setter="set_particles_anim_loop" getter="get_particles_anim_loop">
  25. </member>
  26. <member name="particles_anim_v_frames" type="int" setter="set_particles_anim_v_frames" getter="get_particles_anim_v_frames">
  27. </member>
  28. <member name="particles_animation" type="bool" setter="set_particles_animation" getter="get_particles_animation">
  29. </member>
  30. </members>
  31. <constants>
  32. <constant name="BLEND_MODE_MIX" value="0" enum="BlendMode">
  33. Mix blending mode. Colors are assumed to be independent of the alpha (opacity) value.
  34. </constant>
  35. <constant name="BLEND_MODE_ADD" value="1" enum="BlendMode">
  36. Additive blending mode.
  37. </constant>
  38. <constant name="BLEND_MODE_SUB" value="2" enum="BlendMode">
  39. Subtractive blending mode.
  40. </constant>
  41. <constant name="BLEND_MODE_MUL" value="3" enum="BlendMode">
  42. Multiplicative blending mode.
  43. </constant>
  44. <constant name="BLEND_MODE_PREMULT_ALPHA" value="4" enum="BlendMode">
  45. Mix blending mode. Colors are assumed to be premultiplied by the alpha (opacity) value.
  46. </constant>
  47. <constant name="LIGHT_MODE_NORMAL" value="0" enum="LightMode">
  48. Render the material using both light and non-light sensitive material properties.
  49. </constant>
  50. <constant name="LIGHT_MODE_UNSHADED" value="1" enum="LightMode">
  51. Render the material as if there were no light.
  52. </constant>
  53. <constant name="LIGHT_MODE_LIGHT_ONLY" value="2" enum="LightMode">
  54. Render the material as if there were only light.
  55. </constant>
  56. </constants>
  57. </class>