[DOCS] CanvasItem/Material/Layer, ClassDB, CollisionObject(2D)
This commit is contained in:
parent
6527f2e684
commit
a9c9499c73
|
@ -119,6 +119,7 @@
|
|||
<argument index="3" name="antialiased" type="bool" default="false">
|
||||
</argument>
|
||||
<description>
|
||||
Draw a polyline with a uniform [code]color[/code] and [code]width[/code] and optional antialiasing.
|
||||
</description>
|
||||
</method>
|
||||
<method name="draw_polyline_colors">
|
||||
|
@ -133,6 +134,7 @@
|
|||
<argument index="3" name="antialiased" type="bool" default="false">
|
||||
</argument>
|
||||
<description>
|
||||
Draw a polyline with a uniform [code]width[/code], segment-by-segment coloring, and optional antialiasing. Colors assigned to line segments match by index between [code]points[/code] and [code]colors[/code].
|
||||
</description>
|
||||
</method>
|
||||
<method name="draw_primitive">
|
||||
|
@ -177,7 +179,7 @@
|
|||
<argument index="2" name="scale" type="Vector2">
|
||||
</argument>
|
||||
<description>
|
||||
Set a custom transform for drawing. Anything drawn afterwards will be transformed by this.
|
||||
Sets a custom transform for drawing via components. Anything drawn afterwards will be transformed by this.
|
||||
</description>
|
||||
</method>
|
||||
<method name="draw_set_transform_matrix">
|
||||
|
@ -186,6 +188,7 @@
|
|||
<argument index="0" name="xform" type="Transform2D">
|
||||
</argument>
|
||||
<description>
|
||||
Sets a custom transform for drawing via matrix. Anything drawn afterwards will be transformed by this.
|
||||
</description>
|
||||
</method>
|
||||
<method name="draw_string">
|
||||
|
@ -359,6 +362,7 @@
|
|||
<return type="bool">
|
||||
</return>
|
||||
<description>
|
||||
Returns [code]true[/code] if local transform notifications are communicated to children.
|
||||
</description>
|
||||
</method>
|
||||
<method name="is_set_as_toplevel" qualifiers="const">
|
||||
|
@ -372,12 +376,14 @@
|
|||
<return type="bool">
|
||||
</return>
|
||||
<description>
|
||||
Returns [code]true[/code] if global transform notifications are communicated to children.
|
||||
</description>
|
||||
</method>
|
||||
<method name="is_visible_in_tree" qualifiers="const">
|
||||
<return type="bool">
|
||||
</return>
|
||||
<description>
|
||||
Returns [code]true[/code] if the node is in the [SceneTree] and is visible on-screen.
|
||||
</description>
|
||||
</method>
|
||||
<method name="make_canvas_position_local" qualifiers="const">
|
||||
|
@ -386,6 +392,7 @@
|
|||
<argument index="0" name="screen_point" type="Vector2">
|
||||
</argument>
|
||||
<description>
|
||||
Assigns [code]screen_point[/code] as this node's new local transform.
|
||||
</description>
|
||||
</method>
|
||||
<method name="make_input_local" qualifiers="const">
|
||||
|
@ -394,6 +401,7 @@
|
|||
<argument index="0" name="event" type="InputEvent">
|
||||
</argument>
|
||||
<description>
|
||||
Transformations issued by [code]event[/code]'s inputs are applied in local space instead of global space.
|
||||
</description>
|
||||
</method>
|
||||
<method name="set_as_toplevel">
|
||||
|
@ -402,7 +410,7 @@
|
|||
<argument index="0" name="enable" type="bool">
|
||||
</argument>
|
||||
<description>
|
||||
Set as top level. This means that it will not inherit transform from parent canvas items.
|
||||
Sets as top level. This means that it will not inherit transform from parent canvas items.
|
||||
</description>
|
||||
</method>
|
||||
<method name="set_notify_local_transform">
|
||||
|
@ -411,6 +419,7 @@
|
|||
<argument index="0" name="enable" type="bool">
|
||||
</argument>
|
||||
<description>
|
||||
If [code]enable[/code] is [code]true[/code], children will be updated with local transform data.
|
||||
</description>
|
||||
</method>
|
||||
<method name="set_notify_transform">
|
||||
|
@ -419,6 +428,7 @@
|
|||
<argument index="0" name="enable" type="bool">
|
||||
</argument>
|
||||
<description>
|
||||
If [code]enable[/code] is [code]true[/code], children will be updated with global transform data.
|
||||
</description>
|
||||
</method>
|
||||
<method name="show">
|
||||
|
@ -438,20 +448,28 @@
|
|||
</methods>
|
||||
<members>
|
||||
<member name="light_mask" type="int" setter="set_light_mask" getter="get_light_mask">
|
||||
The rendering layers in which this [code]CanvasItem[/code] responds to [Light2D] nodes. Default value: [code]1[/code].
|
||||
</member>
|
||||
<member name="material" type="Material" setter="set_material" getter="get_material">
|
||||
The material applied to textures on this [code]CanvasItem[/code]. Default value: [code]null[/code].
|
||||
</member>
|
||||
<member name="modulate" type="Color" setter="set_modulate" getter="get_modulate">
|
||||
The color applied to textures on this [code]CanvasItem[/code]. Default value: [code]Color(1, 1, 1, 1)[/code] (opaque "white").
|
||||
</member>
|
||||
<member name="self_modulate" type="Color" setter="set_self_modulate" getter="get_self_modulate">
|
||||
The color applied to textures on this [code]CanvasItem[/code]. This is not inherited by children [code]CanvasItem[/code]s. Default value: [code]Color(1, 1, 1, 1)[/code] (opaque "white")..
|
||||
</member>
|
||||
<member name="show_behind_parent" type="bool" setter="set_draw_behind_parent" getter="is_draw_behind_parent_enabled">
|
||||
If [code]true[/code] the object draws behind its parent. Default value: [code]false[/code].
|
||||
</member>
|
||||
<member name="show_on_top" type="bool" setter="_set_on_top" getter="_is_on_top">
|
||||
If [code]true[/code] the object draws on top of its parent. Default value: [code]true[/code].
|
||||
</member>
|
||||
<member name="use_parent_material" type="bool" setter="set_use_parent_material" getter="get_use_parent_material">
|
||||
If [code]true[/code] the parent [code]CanvasItem[/code]'s [member material] property is used as this one's material. Default value: [code]false[/code].
|
||||
</member>
|
||||
<member name="visible" type="bool" setter="set_visible" getter="is_visible">
|
||||
If [code]true[/code] this [code]CanvasItem[/code] is drawn. Default value: [code]true[/code].
|
||||
</member>
|
||||
</members>
|
||||
<signals>
|
||||
|
|
|
@ -1,8 +1,10 @@
|
|||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<class name="CanvasItemMaterial" inherits="Material" category="Core" version="3.0-beta">
|
||||
<brief_description>
|
||||
A material for [CanvasItem]s.
|
||||
</brief_description>
|
||||
<description>
|
||||
[code]CanvasItemMaterial[/code]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].
|
||||
</description>
|
||||
<tutorials>
|
||||
</tutorials>
|
||||
|
@ -12,26 +14,36 @@
|
|||
</methods>
|
||||
<members>
|
||||
<member name="blend_mode" type="int" setter="set_blend_mode" getter="get_blend_mode" enum="CanvasItemMaterial.BlendMode">
|
||||
The manner in which a material's rendering is applied to underlying textures.
|
||||
</member>
|
||||
<member name="light_mode" type="int" setter="set_light_mode" getter="get_light_mode" enum="CanvasItemMaterial.LightMode">
|
||||
The manner in which material reacts to lighting.
|
||||
</member>
|
||||
</members>
|
||||
<constants>
|
||||
<constant name="BLEND_MODE_MIX" value="0" enum="BlendMode">
|
||||
Mix blending mode. Colors are assumed to be independent of the alpha (opacity) value.
|
||||
</constant>
|
||||
<constant name="BLEND_MODE_ADD" value="1" enum="BlendMode">
|
||||
Additive blending mode.
|
||||
</constant>
|
||||
<constant name="BLEND_MODE_SUB" value="2" enum="BlendMode">
|
||||
Subtractive blending mode.
|
||||
</constant>
|
||||
<constant name="BLEND_MODE_MUL" value="3" enum="BlendMode">
|
||||
Multiplicative blending mode.
|
||||
</constant>
|
||||
<constant name="BLEND_MODE_PREMULT_ALPHA" value="4" enum="BlendMode">
|
||||
Mix blending mode. Colors are assumed to be premultiplied by the alpha (opacity) value.
|
||||
</constant>
|
||||
<constant name="LIGHT_MODE_NORMAL" value="0" enum="LightMode">
|
||||
Render the material using both light and non-light sensitive material properties.
|
||||
</constant>
|
||||
<constant name="LIGHT_MODE_UNSHADED" value="1" enum="LightMode">
|
||||
Render the material as if there were no light.
|
||||
</constant>
|
||||
<constant name="LIGHT_MODE_LIGHT_ONLY" value="2" enum="LightMode">
|
||||
Render the material as if there were only light.
|
||||
</constant>
|
||||
</constants>
|
||||
</class>
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
<return type="Node">
|
||||
</return>
|
||||
<description>
|
||||
Returns the [Viewport] used by the camera if it is not using the default viewport.
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_rotation" qualifiers="const">
|
||||
|
@ -44,6 +45,7 @@
|
|||
<argument index="0" name="viewport" type="Node">
|
||||
</argument>
|
||||
<description>
|
||||
Assigns a custom [Viewport] node to the [code]CanvasLayer[/code]. If [code]viewport[/code] is not a [Viewport], it re-assigns the default viewport instead.
|
||||
</description>
|
||||
</method>
|
||||
<method name="set_rotation">
|
||||
|
|
|
@ -35,6 +35,7 @@
|
|||
<argument index="0" name="class" type="String">
|
||||
</argument>
|
||||
<description>
|
||||
Returns a category associated with the class for use in documentation and the Asset Library. Debug mode required.
|
||||
</description>
|
||||
</method>
|
||||
<method name="class_get_integer_constant" qualifiers="const">
|
||||
|
|
|
@ -25,6 +25,7 @@
|
|||
<argument index="4" name="shape_idx" type="int">
|
||||
</argument>
|
||||
<description>
|
||||
Accepts unhandled [InputEvent]s. [code]click_position[/code] is the clicked location in world space and [code]click_normal[/code] is the normal vector extending from the clicked surface of the [Shape] at [code]shape_idx[/code]. Connect to the [code]input_event[/code] signal to easily pick up these events.
|
||||
</description>
|
||||
</method>
|
||||
<method name="create_shape_owner">
|
||||
|
@ -134,6 +135,7 @@
|
|||
<argument index="1" name="shape_id" type="int">
|
||||
</argument>
|
||||
<description>
|
||||
Returns the child index of the [Shape] with the given id from the given shape owner.
|
||||
</description>
|
||||
</method>
|
||||
<method name="shape_owner_get_transform" qualifiers="const">
|
||||
|
@ -181,8 +183,10 @@
|
|||
</methods>
|
||||
<members>
|
||||
<member name="input_capture_on_drag" type="bool" setter="set_capture_input_on_drag" getter="get_capture_input_on_drag">
|
||||
If [code]true[/code] the [code]CollisionObject[/code] will continue to receive input events as the mouse is dragged across its shapes. Default value: [code]false[/code].
|
||||
</member>
|
||||
<member name="input_ray_pickable" type="bool" setter="set_ray_pickable" getter="is_ray_pickable">
|
||||
If [code]true[/code] the [CollisionObject]'s shapes will respond to [RayCast]s. Default value: [code]true[/code].
|
||||
</member>
|
||||
</members>
|
||||
<signals>
|
||||
|
@ -198,6 +202,7 @@
|
|||
<argument index="4" name="shape_idx" type="int">
|
||||
</argument>
|
||||
<description>
|
||||
Emitted when [method _input_event] receives an event. See its description for details.
|
||||
</description>
|
||||
</signal>
|
||||
<signal name="mouse_entered">
|
||||
|
|
|
@ -21,6 +21,7 @@
|
|||
<argument index="2" name="shape_idx" type="int">
|
||||
</argument>
|
||||
<description>
|
||||
Accepts unhandled [InputEvent]s. [code]shape_idx[/code] is the child index of the clicked [Shape2D]. Connect to the [code]input_event[/code] signal to easily pick up these events.
|
||||
</description>
|
||||
</method>
|
||||
<method name="create_shape_owner">
|
||||
|
@ -61,6 +62,7 @@
|
|||
<argument index="0" name="owner_id" type="int">
|
||||
</argument>
|
||||
<description>
|
||||
Returns [code]true[/code] if collisions for the shape owner originating from this [code]CollisionObject2D[/code] will not be reported to collided with [code]CollisionObject2D[/code]s.
|
||||
</description>
|
||||
</method>
|
||||
<method name="remove_shape_owner">
|
||||
|
@ -138,6 +140,7 @@
|
|||
<argument index="1" name="shape_id" type="int">
|
||||
</argument>
|
||||
<description>
|
||||
Returns the child index of the [Shape2D] with the given id from the given shape owner.
|
||||
</description>
|
||||
</method>
|
||||
<method name="shape_owner_get_transform" qualifiers="const">
|
||||
|
@ -179,6 +182,7 @@
|
|||
<argument index="1" name="enable" type="bool">
|
||||
</argument>
|
||||
<description>
|
||||
If [code]enable[/code] is [code]true[/code], collisions for the shape owner originating from this [code]CollisionObject2D[/code] will not be reported to collided with [code]CollisionObject2D[/code]s.
|
||||
</description>
|
||||
</method>
|
||||
<method name="shape_owner_set_transform">
|
||||
|
@ -207,7 +211,7 @@
|
|||
<argument index="2" name="shape_idx" type="int">
|
||||
</argument>
|
||||
<description>
|
||||
Emitted when an input event occurs and [code]input_pickable[/code] is [code]true[/code].
|
||||
Emitted when an input event occurs and [code]input_pickable[/code] is [code]true[/code]. See [method _input_event] for details.
|
||||
</description>
|
||||
</signal>
|
||||
<signal name="mouse_entered">
|
||||
|
|
Loading…
Reference in New Issue