CanvasItemMaterial.xml 3.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <class name="CanvasItemMaterial" inherits="Material" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
  3. <brief_description>
  4. A material for [CanvasItem]s.
  5. </brief_description>
  6. <description>
  7. [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 [ShaderMaterial] to more fully customize a material's interactions with a [CanvasItem].
  8. </description>
  9. <tutorials>
  10. </tutorials>
  11. <methods>
  12. </methods>
  13. <members>
  14. <member name="blend_mode" type="int" setter="set_blend_mode" getter="get_blend_mode" enum="CanvasItemMaterial.BlendMode" default="0">
  15. The manner in which a material's rendering is applied to underlying textures.
  16. </member>
  17. <member name="light_mode" type="int" setter="set_light_mode" getter="get_light_mode" enum="CanvasItemMaterial.LightMode" default="0">
  18. The manner in which material reacts to lighting.
  19. </member>
  20. <member name="particles_anim_h_frames" type="int" setter="set_particles_anim_h_frames" getter="get_particles_anim_h_frames">
  21. The number of columns in the spritesheet assigned as [Texture] for a [Particles2D] or [CPUParticles2D].
  22. [b]Note:[/b] This property is only used and visible in the editor if [member particles_animation] is [code]true[/code].
  23. </member>
  24. <member name="particles_anim_loop" type="bool" setter="set_particles_anim_loop" getter="get_particles_anim_loop">
  25. If [code]true[/code], the particles animation will loop.
  26. [b]Note:[/b] This property is only used and visible in the editor if [member particles_animation] is [code]true[/code].
  27. </member>
  28. <member name="particles_anim_v_frames" type="int" setter="set_particles_anim_v_frames" getter="get_particles_anim_v_frames">
  29. The number of rows in the spritesheet assigned as [Texture] for a [Particles2D] or [CPUParticles2D].
  30. [b]Note:[/b] This property is only used and visible in the editor if [member particles_animation] is [code]true[/code].
  31. </member>
  32. <member name="particles_animation" type="bool" setter="set_particles_animation" getter="get_particles_animation" default="false">
  33. If [code]true[/code], enable spritesheet-based animation features when assigned to [Particles2D] and [CPUParticles2D] nodes. The [member ParticlesMaterial.anim_speed] or [member CPUParticles2D.anim_speed] should also be set to a positive value for the animation to play.
  34. This property (and other [code]particles_anim_*[/code] properties that depend on it) has no effect on other types of nodes.
  35. </member>
  36. </members>
  37. <constants>
  38. <constant name="BLEND_MODE_MIX" value="0" enum="BlendMode">
  39. Mix blending mode. Colors are assumed to be independent of the alpha (opacity) value.
  40. </constant>
  41. <constant name="BLEND_MODE_ADD" value="1" enum="BlendMode">
  42. Additive blending mode.
  43. </constant>
  44. <constant name="BLEND_MODE_SUB" value="2" enum="BlendMode">
  45. Subtractive blending mode.
  46. </constant>
  47. <constant name="BLEND_MODE_MUL" value="3" enum="BlendMode">
  48. Multiplicative blending mode.
  49. </constant>
  50. <constant name="BLEND_MODE_PREMULT_ALPHA" value="4" enum="BlendMode">
  51. Mix blending mode. Colors are assumed to be premultiplied by the alpha (opacity) value.
  52. </constant>
  53. <constant name="LIGHT_MODE_NORMAL" value="0" enum="LightMode">
  54. Render the material using both light and non-light sensitive material properties.
  55. </constant>
  56. <constant name="LIGHT_MODE_UNSHADED" value="1" enum="LightMode">
  57. Render the material as if there were no light.
  58. </constant>
  59. <constant name="LIGHT_MODE_LIGHT_ONLY" value="2" enum="LightMode">
  60. Render the material as if there were only light.
  61. </constant>
  62. </constants>
  63. </class>