Table of Contents

Class CanvasItemMaterial

A material for CanvasItems.

Inheritance
CanvasItemMaterial

Remarks

CanvasItemMaterials 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.

Properties

blend_mode

The manner in which a material's rendering is applied to underlying textures.

var blend_mode : int = 0

Property Value

int

Remarks

  • void set_blend_mode(int value)
  • int get_blend_mode

light_mode

The manner in which material reacts to lighting.

var light_mode : int = 0

Property Value

int

Remarks

  • void set_light_mode(int value)
  • int get_light_mode

particles_anim_h_frames

The number of columns in the spritesheet assigned as Texture2D for a GPUParticles2D or CPUParticles2D.

Note: This property is only used and visible in the editor if particles_animation is true.

var particles_anim_h_frames : int

Property Value

int

Remarks

  • void set_particles_anim_h_frames(int value)
  • int get_particles_anim_h_frames

particles_anim_loop

If true, the particles animation will loop.

Note: This property is only used and visible in the editor if particles_animation is true.

var particles_anim_loop : bool

Property Value

bool

Remarks

  • void set_particles_anim_loop(bool value)
  • bool get_particles_anim_loop

particles_anim_v_frames

The number of rows in the spritesheet assigned as Texture2D for a GPUParticles2D or CPUParticles2D.

Note: This property is only used and visible in the editor if particles_animation is true.

var particles_anim_v_frames : int

Property Value

int

Remarks

  • void set_particles_anim_v_frames(int value)
  • int get_particles_anim_v_frames

particles_animation

If true, enable spritesheet-based animation features when assigned to GPUParticles2D and CPUParticles2D nodes. The anim_speed_max or anim_speed_max 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.

var particles_animation : bool = false

Property Value

bool

Remarks

  • void set_particles_animation(bool value)
  • bool get_particles_animation