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