123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164 |
- :github_url: hide
- .. Generated automatically by doc/tools/makerst.py in Godot's source tree.
- .. DO NOT EDIT THIS FILE, but the CanvasItemMaterial.xml source instead.
- .. The source is found in doc/classes or modules/<name>/doc_classes.
- .. _class_CanvasItemMaterial:
- CanvasItemMaterial
- ==================
- **Inherits:** :ref:`Material<class_Material>` **<** :ref:`Resource<class_Resource>` **<** :ref:`Reference<class_Reference>` **<** :ref:`Object<class_Object>`
- **Category:** Core
- Brief Description
- -----------------
- A material for :ref:`CanvasItem<class_CanvasItem>`\ s.
- Properties
- ----------
- +-----------------------------------------------------+-------------------------------------------------------------------------------------------+
- | :ref:`BlendMode<enum_CanvasItemMaterial_BlendMode>` | :ref:`blend_mode<class_CanvasItemMaterial_property_blend_mode>` |
- +-----------------------------------------------------+-------------------------------------------------------------------------------------------+
- | :ref:`LightMode<enum_CanvasItemMaterial_LightMode>` | :ref:`light_mode<class_CanvasItemMaterial_property_light_mode>` |
- +-----------------------------------------------------+-------------------------------------------------------------------------------------------+
- | :ref:`int<class_int>` | :ref:`particles_anim_h_frames<class_CanvasItemMaterial_property_particles_anim_h_frames>` |
- +-----------------------------------------------------+-------------------------------------------------------------------------------------------+
- | :ref:`bool<class_bool>` | :ref:`particles_anim_loop<class_CanvasItemMaterial_property_particles_anim_loop>` |
- +-----------------------------------------------------+-------------------------------------------------------------------------------------------+
- | :ref:`int<class_int>` | :ref:`particles_anim_v_frames<class_CanvasItemMaterial_property_particles_anim_v_frames>` |
- +-----------------------------------------------------+-------------------------------------------------------------------------------------------+
- | :ref:`bool<class_bool>` | :ref:`particles_animation<class_CanvasItemMaterial_property_particles_animation>` |
- +-----------------------------------------------------+-------------------------------------------------------------------------------------------+
- Enumerations
- ------------
- .. _enum_CanvasItemMaterial_BlendMode:
- .. _class_CanvasItemMaterial_constant_BLEND_MODE_MIX:
- .. _class_CanvasItemMaterial_constant_BLEND_MODE_ADD:
- .. _class_CanvasItemMaterial_constant_BLEND_MODE_SUB:
- .. _class_CanvasItemMaterial_constant_BLEND_MODE_MUL:
- .. _class_CanvasItemMaterial_constant_BLEND_MODE_PREMULT_ALPHA:
- enum **BlendMode**:
- - **BLEND_MODE_MIX** = **0** --- Mix blending mode. Colors are assumed to be independent of the alpha (opacity) value.
- - **BLEND_MODE_ADD** = **1** --- Additive blending mode.
- - **BLEND_MODE_SUB** = **2** --- Subtractive blending mode.
- - **BLEND_MODE_MUL** = **3** --- Multiplicative blending mode.
- - **BLEND_MODE_PREMULT_ALPHA** = **4** --- Mix blending mode. Colors are assumed to be premultiplied by the alpha (opacity) value.
- ----
- .. _enum_CanvasItemMaterial_LightMode:
- .. _class_CanvasItemMaterial_constant_LIGHT_MODE_NORMAL:
- .. _class_CanvasItemMaterial_constant_LIGHT_MODE_UNSHADED:
- .. _class_CanvasItemMaterial_constant_LIGHT_MODE_LIGHT_ONLY:
- enum **LightMode**:
- - **LIGHT_MODE_NORMAL** = **0** --- Render the material using both light and non-light sensitive material properties.
- - **LIGHT_MODE_UNSHADED** = **1** --- Render the material as if there were no light.
- - **LIGHT_MODE_LIGHT_ONLY** = **2** --- Render the material as if there were only light.
- Description
- -----------
- ``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>`.
- Property Descriptions
- ---------------------
- .. _class_CanvasItemMaterial_property_blend_mode:
- - :ref:`BlendMode<enum_CanvasItemMaterial_BlendMode>` **blend_mode**
- +----------+-----------------------+
- | *Setter* | set_blend_mode(value) |
- +----------+-----------------------+
- | *Getter* | get_blend_mode() |
- +----------+-----------------------+
- The manner in which a material's rendering is applied to underlying textures.
- ----
- .. _class_CanvasItemMaterial_property_light_mode:
- - :ref:`LightMode<enum_CanvasItemMaterial_LightMode>` **light_mode**
- +----------+-----------------------+
- | *Setter* | set_light_mode(value) |
- +----------+-----------------------+
- | *Getter* | get_light_mode() |
- +----------+-----------------------+
- The manner in which material reacts to lighting.
- ----
- .. _class_CanvasItemMaterial_property_particles_anim_h_frames:
- - :ref:`int<class_int>` **particles_anim_h_frames**
- +----------+------------------------------------+
- | *Setter* | set_particles_anim_h_frames(value) |
- +----------+------------------------------------+
- | *Getter* | get_particles_anim_h_frames() |
- +----------+------------------------------------+
- ----
- .. _class_CanvasItemMaterial_property_particles_anim_loop:
- - :ref:`bool<class_bool>` **particles_anim_loop**
- +----------+--------------------------------+
- | *Setter* | set_particles_anim_loop(value) |
- +----------+--------------------------------+
- | *Getter* | get_particles_anim_loop() |
- +----------+--------------------------------+
- ----
- .. _class_CanvasItemMaterial_property_particles_anim_v_frames:
- - :ref:`int<class_int>` **particles_anim_v_frames**
- +----------+------------------------------------+
- | *Setter* | set_particles_anim_v_frames(value) |
- +----------+------------------------------------+
- | *Getter* | get_particles_anim_v_frames() |
- +----------+------------------------------------+
- ----
- .. _class_CanvasItemMaterial_property_particles_animation:
- - :ref:`bool<class_bool>` **particles_animation**
- +----------+--------------------------------+
- | *Setter* | set_particles_animation(value) |
- +----------+--------------------------------+
- | *Getter* | get_particles_animation() |
- +----------+--------------------------------+
|