跳转至

CanvasItemMaterial

继承

Material

简要描述

CanvasItem的材料。

描述

CanvasItemMaterial提供了一种修改与CanvasItem相关联的纹理的方法。

成员

类型 属性名 默认值
int blend_mode 0
int light_mode 0
int particles_anim_h_frames
bool particles_anim_loop
int particles_anim_v_frames
bool particles_animation false

枚举

enum BlendMode: - BLEND_MODE_MIX = 0

混合型混合模式。

  • BLEND_MODE_ADD = 1

加法混合模式。

  • BLEND_MODE_SUB = 2

减法混合模式。

  • BLEND_MODE_MUL = 3

乘法混合模式。

  • BLEND_MODE_PREMULT_ALPHA = 4

混合混合模式。


enum LightMode: - LIGHT_MODE_NORMAL = 0

使用光和非光敏材料属性渲染材料。

  • LIGHT_MODE_UNSHADED = 1

渲染材质,就好像没有灯光一样。

  • LIGHT_MODE_LIGHT_ONLY = 2

渲染材质,就好像只有灯光一样。


成员说明

  • int blend_mode
Default 0
setter set_blend_mode(value)
getter get_blend_mode
  • int light_mode
Default 0
setter set_light_mode(value)
getter get_light_mode
  • int particles_anim_h_frames
setter set_particles_anim_h_frames(value)
getter get_particles_anim_h_frames
  • bool particles_anim_loop
setter set_particles_anim_loop(value)
getter get_particles_anim_loop
  • int particles_anim_v_frames
setter set_particles_anim_v_frames(value)
getter get_particles_anim_v_frames
  • bool particles_animation
Default false
setter set_particles_animation(value)
getter get_particles_animation