CanvasItemMaterial¶
Inherits: Material < Resource < Reference < Object
Un material para CanvasItems.
Descripción¶
Los CanvasItemMaterial
s proporcionan un medio de modificar las texturas asociadas a un CanvasItem. Se especializan en describir los comportamientos de mezcla e iluminación de las texturas. Utiliza un ShaderMaterial para personalizar más completamente las interacciones de un material con un CanvasItem.
Propiedades¶
|
||
|
||
|
Enumeraciones¶
enum BlendMode:
BLEND_MODE_MIX = 0 --- Modo de mezcla. Se supone que los colores son independientes del valor alfa (opacidad).
BLEND_MODE_ADD = 1 --- Modo de mezcla de añadidos.
BLEND_MODE_SUB = 2 --- Modo de mezcla de substracción.
BLEND_MODE_MUL = 3 --- Modo de mezcla multiplicativo.
BLEND_MODE_PREMULT_ALPHA = 4 --- Modo de mezcla Mix. Se supone que los colores se premultiplican por el valor alfa (opacidad).
enum LightMode:
LIGHT_MODE_NORMAL = 0 --- Renderizar el material utilizando tanto las propiedades de los materiales sensibles a la luz como las que no lo son.
LIGHT_MODE_UNSHADED = 1 --- Renderiza el material como si no hubiera luz.
LIGHT_MODE_LIGHT_ONLY = 2 --- Renderizar el material como si sólo hubiera luz.
Descripciones de Propiedades¶
BlendMode blend_mode
Default |
|
Setter |
set_blend_mode(value) |
Getter |
get_blend_mode() |
La manera en que la representación de un material se aplica a las texturas inferiores.
LightMode light_mode
Default |
|
Setter |
set_light_mode(value) |
Getter |
get_light_mode() |
La manera en que el material reacciona a la iluminación.
int particles_anim_h_frames
Setter |
set_particles_anim_h_frames(value) |
Getter |
get_particles_anim_h_frames() |
The number of columns in the spritesheet assigned as Texture for a Particles2D or CPUParticles2D.
Note: This property is only used and visible in the editor if particles_animation is true
.
bool particles_anim_loop
Setter |
set_particles_anim_loop(value) |
Getter |
get_particles_anim_loop() |
Si true
, la animación de las partículas se hará en bucle.
Nota: Esta propiedad sólo se usa y es visible en el editor si particles_animation es true
.
int particles_anim_v_frames
Setter |
set_particles_anim_v_frames(value) |
Getter |
get_particles_anim_v_frames() |
The number of rows in the spritesheet assigned as Texture for a Particles2D or CPUParticles2D.
Note: This property is only used and visible in the editor if particles_animation is true
.
bool particles_animation
Default |
|
Setter |
set_particles_animation(value) |
Getter |
get_particles_animation() |
If true
, enable spritesheet-based animation features when assigned to Particles2D and CPUParticles2D nodes. The ParticlesMaterial.anim_speed or CPUParticles2D.anim_speed should also be set to a positive value for the animation to play.
This property (and other particles_anim_*
properties that depend on it) has no effect on other types of nodes.