doc: Fix references to setters and misc formatting
This commit is contained in:
parent
04c8a43741
commit
ee6f1fa3f8
|
@ -95,7 +95,7 @@
|
|||
If [code]true[/code], the area's audio bus overrides the default audio bus. Default value: [code]false[/code].
|
||||
</member>
|
||||
<member name="collision_layer" type="int" setter="set_collision_layer" getter="get_collision_layer">
|
||||
The area's physics layer(s). Collidable objects can exist in any of 32 different layers. A contact is detected if object A is in any of the layers that object B scans, or object B is in any layers that object A scans. See also [code]collision_mask[/code].
|
||||
The area's physics layer(s). Collidable objects can exist in any of 32 different layers. A contact is detected if object A is in any of the layers that object B scans, or object B is in any layers that object A scans. See also [member collision_mask].
|
||||
</member>
|
||||
<member name="collision_mask" type="int" setter="set_collision_mask" getter="get_collision_mask">
|
||||
The physics layers this area scans to determine collision detection.
|
||||
|
@ -107,10 +107,10 @@
|
|||
The falloff factor for point gravity. The greater the value, the faster gravity decreases with distance.
|
||||
</member>
|
||||
<member name="gravity_point" type="bool" setter="set_gravity_is_point" getter="is_gravity_a_point">
|
||||
If [code]true[/code], gravity is calculated from a point (set via [code]gravity_vec[/code]). Also see [code]space_override[/code]. Default value: [code]false[/code].
|
||||
If [code]true[/code], gravity is calculated from a point (set via [member gravity_vec]). Also see [member space_override]. Default value: [code]false[/code].
|
||||
</member>
|
||||
<member name="gravity_vec" type="Vector3" setter="set_gravity_vector" getter="get_gravity_vector">
|
||||
The area's gravity vector (not normalized). If gravity is a point (see [method is_gravity_a_point]), this will be the point of attraction.
|
||||
The area's gravity vector (not normalized). If gravity is a point (see [member gravity_point]), this will be the point of attraction.
|
||||
</member>
|
||||
<member name="linear_damp" type="float" setter="set_linear_damp" getter="get_linear_damp">
|
||||
The rate at which objects stop moving in this area. Represents the linear velocity lost per second. Values range from [code]0[/code] (no damping) to [code]1[/code] (full damping).
|
||||
|
@ -137,7 +137,7 @@
|
|||
The degree to which this area's reverb is a uniform effect. Ranges from [code]0[/code] to [code]1[/code] with [code]0.1[/code] precision.
|
||||
</member>
|
||||
<member name="space_override" type="int" setter="set_space_override_mode" getter="get_space_override_mode" enum="Area.SpaceOverride">
|
||||
Override mode for gravity and damping calculations within this area. See the SPACE_OVERRIDE_* constants for values.
|
||||
Override mode for gravity and damping calculations within this area. See [enum Area.SpaceOverride] for possible values.
|
||||
</member>
|
||||
</members>
|
||||
<signals>
|
||||
|
@ -227,16 +227,16 @@
|
|||
This area does not affect gravity/damping.
|
||||
</constant>
|
||||
<constant name="SPACE_OVERRIDE_COMBINE" value="1" enum="SpaceOverride">
|
||||
This area adds its gravity/damping values to whatever has been calculated so far (in [code]priority[/code] order).
|
||||
This area adds its gravity/damping values to whatever has been calculated so far (in [member priority] order).
|
||||
</constant>
|
||||
<constant name="SPACE_OVERRIDE_COMBINE_REPLACE" value="2" enum="SpaceOverride">
|
||||
This area adds its gravity/damping values to whatever has been calculated so far (in [code]priority[/code] order), ignoring any lower priority areas.
|
||||
This area adds its gravity/damping values to whatever has been calculated so far (in [member priority] order), ignoring any lower priority areas.
|
||||
</constant>
|
||||
<constant name="SPACE_OVERRIDE_REPLACE" value="3" enum="SpaceOverride">
|
||||
This area replaces any gravity/damping, even the defaults, ignoring any lower priority areas.
|
||||
</constant>
|
||||
<constant name="SPACE_OVERRIDE_REPLACE_COMBINE" value="4" enum="SpaceOverride">
|
||||
This area replaces any gravity/damping calculated so far (in [code]priority[/code] order), but keeps calculating the rest of the areas.
|
||||
This area replaces any gravity/damping calculated so far (in [member priority] order), but keeps calculating the rest of the areas.
|
||||
</constant>
|
||||
</constants>
|
||||
</class>
|
||||
|
|
|
@ -95,7 +95,7 @@
|
|||
If [code]true[/code], the area's audio bus overrides the default audio bus. Default value: [code]false[/code].
|
||||
</member>
|
||||
<member name="collision_layer" type="int" setter="set_collision_layer" getter="get_collision_layer">
|
||||
The area's physics layer(s). Collidable objects can exist in any of 32 different layers. A contact is detected if object A is in any of the layers that object B scans, or object B is in any layers that object A scans. See also [code]collision_mask[/code].
|
||||
The area's physics layer(s). Collidable objects can exist in any of 32 different layers. A contact is detected if object A is in any of the layers that object B scans, or object B is in any layers that object A scans. See also [member collision_mask].
|
||||
</member>
|
||||
<member name="collision_mask" type="int" setter="set_collision_mask" getter="get_collision_mask">
|
||||
The physics layers this area scans to determine collision detection.
|
||||
|
@ -107,10 +107,10 @@
|
|||
The falloff factor for point gravity. The greater the value, the faster gravity decreases with distance.
|
||||
</member>
|
||||
<member name="gravity_point" type="bool" setter="set_gravity_is_point" getter="is_gravity_a_point">
|
||||
If [code]true[/code], gravity is calculated from a point (set via [code]gravity_vec[/code]). Also see [code]space_override[/code]. Default value: [code]false[/code].
|
||||
If [code]true[/code], gravity is calculated from a point (set via [member gravity_vec]). Also see [member space_override]. Default value: [code]false[/code].
|
||||
</member>
|
||||
<member name="gravity_vec" type="Vector2" setter="set_gravity_vector" getter="get_gravity_vector">
|
||||
The area's gravity vector (not normalized). If gravity is a point (see [method is_gravity_a_point]), this will be the point of attraction.
|
||||
The area's gravity vector (not normalized). If gravity is a point (see [member gravity_point]), this will be the point of attraction.
|
||||
</member>
|
||||
<member name="linear_damp" type="float" setter="set_linear_damp" getter="get_linear_damp">
|
||||
The rate at which objects stop moving in this area. Represents the linear velocity lost per second. Values range from [code]0[/code] (no damping) to [code]1[/code] (full damping).
|
||||
|
@ -125,7 +125,7 @@
|
|||
The area's priority. Higher priority areas are processed first. Default value: 0.
|
||||
</member>
|
||||
<member name="space_override" type="int" setter="set_space_override_mode" getter="get_space_override_mode" enum="Area2D.SpaceOverride">
|
||||
Override mode for gravity and damping calculations within this area. See the SPACE_OVERRIDE_* constants for values.
|
||||
Override mode for gravity and damping calculations within this area. See [Area2D.SpaceOverride] for possible values.
|
||||
</member>
|
||||
</members>
|
||||
<signals>
|
||||
|
@ -215,16 +215,16 @@
|
|||
This area does not affect gravity/damping.
|
||||
</constant>
|
||||
<constant name="SPACE_OVERRIDE_COMBINE" value="1" enum="SpaceOverride">
|
||||
This area adds its gravity/damping values to whatever has been calculated so far (in [code]priority[/code] order).
|
||||
This area adds its gravity/damping values to whatever has been calculated so far (in [member priority] order).
|
||||
</constant>
|
||||
<constant name="SPACE_OVERRIDE_COMBINE_REPLACE" value="2" enum="SpaceOverride">
|
||||
This area adds its gravity/damping values to whatever has been calculated so far (in [code]priority[/code] order), ignoring any lower priority areas.
|
||||
This area adds its gravity/damping values to whatever has been calculated so far (in [member priority] order), ignoring any lower priority areas.
|
||||
</constant>
|
||||
<constant name="SPACE_OVERRIDE_REPLACE" value="3" enum="SpaceOverride">
|
||||
This area replaces any gravity/damping, even the defaults, ignoring any lower priority areas.
|
||||
</constant>
|
||||
<constant name="SPACE_OVERRIDE_REPLACE_COMBINE" value="4" enum="SpaceOverride">
|
||||
This area replaces any gravity/damping calculated so far (in [code]priority[/code] order), but keeps calculating the rest of the areas.
|
||||
This area replaces any gravity/damping calculated so far (in [member priority] order), but keeps calculating the rest of the areas.
|
||||
</constant>
|
||||
</constants>
|
||||
</class>
|
||||
|
|
|
@ -340,7 +340,7 @@
|
|||
<return type="void">
|
||||
</return>
|
||||
<description>
|
||||
Steal the focus from another control and become the focused control (see [method set_focus_mode]).
|
||||
Steal the focus from another control and become the focused control (see [member focus_mode]).
|
||||
</description>
|
||||
</method>
|
||||
<method name="has_color" qualifiers="const">
|
||||
|
@ -786,7 +786,7 @@
|
|||
Sent when the node loses focus.
|
||||
</constant>
|
||||
<constant name="NOTIFICATION_THEME_CHANGED" value="45">
|
||||
Sent when the node's [member theme] changes, right before Godot redraws the control. Happens when you call one of the [code]add_*_override[/code]
|
||||
Sent when the node's [member theme] changes, right before Godot redraws the control. Happens when you call one of the [code]add_*_override[/code] methods.
|
||||
</constant>
|
||||
<constant name="NOTIFICATION_MODAL_CLOSE" value="46">
|
||||
Sent when an open modal dialog closes. See [member show_modal].
|
||||
|
@ -796,7 +796,7 @@
|
|||
<constant name="NOTIFICATION_SCROLL_END" value="48">
|
||||
</constant>
|
||||
<constant name="CURSOR_ARROW" value="0" enum="CursorShape">
|
||||
Show the system's arrow mouse cursor when the user hovers the node. Use with [method set_default_cursor_shape].
|
||||
Show the system's arrow mouse cursor when the user hovers the node. Use with [member mouse_default_cursor_shape].
|
||||
</constant>
|
||||
<constant name="CURSOR_IBEAM" value="1" enum="CursorShape">
|
||||
Show the system's I-beam mouse cursor when the user hovers the node. The I-beam pointer has a shape similar to "I". It tells the user they can highlight or insert text.
|
||||
|
|
|
@ -24,8 +24,8 @@
|
|||
<argument index="3" name="at_position" type="int" default="-1">
|
||||
</argument>
|
||||
<description>
|
||||
Adds a point to a curve, at "position", with control points "in" and "out".
|
||||
If "at_position" is given, the point is inserted before the point number "at_position", moving that point (and every point after) after the inserted point. If "at_position" is not given, or is an illegal value (at_position <0 or at_position >= [method get_point_count]), the point will be appended at the end of the point list.
|
||||
Adds a point to a curve, at [code]position[/code], with control points [code]in[/code] and [code]out[/code].
|
||||
If [code]at_position[/code] is given, the point is inserted before the point number [code]at_position[/code], moving that point (and every point after) after the inserted point. If [code]at_position[/code] is not given, or is an illegal value ([code]at_position <0[/code] or [code]at_position >= [method get_point_count][/code]), the point will be appended at the end of the point list.
|
||||
</description>
|
||||
</method>
|
||||
<method name="clear_points">
|
||||
|
@ -39,7 +39,7 @@
|
|||
<return type="float">
|
||||
</return>
|
||||
<description>
|
||||
Returns the total length of the curve, based on the cached points. Given enough density (see [method set_bake_interval]), it should be approximate enough.
|
||||
Returns the total length of the curve, based on the cached points. Given enough density (see [member bake_interval]), it should be approximate enough.
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_baked_points" qualifiers="const">
|
||||
|
@ -82,7 +82,7 @@
|
|||
<argument index="0" name="idx" type="int">
|
||||
</argument>
|
||||
<description>
|
||||
Returns the position of the control point leading to the vertex "idx". If the index is out of bounds, the function sends an error to the console, and returns (0, 0).
|
||||
Returns the position of the control point leading to the vertex [code]idx[/code]. If the index is out of bounds, the function sends an error to the console, and returns [code](0, 0)[/code].
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_point_out" qualifiers="const">
|
||||
|
@ -91,7 +91,7 @@
|
|||
<argument index="0" name="idx" type="int">
|
||||
</argument>
|
||||
<description>
|
||||
Returns the position of the control point leading out of the vertex "idx". If the index is out of bounds, the function sends an error to the console, and returns (0, 0).
|
||||
Returns the position of the control point leading out of the vertex [code]idx[/code]. If the index is out of bounds, the function sends an error to the console, and returns [code](0, 0)[/code].
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_point_position" qualifiers="const">
|
||||
|
@ -100,7 +100,7 @@
|
|||
<argument index="0" name="idx" type="int">
|
||||
</argument>
|
||||
<description>
|
||||
Returns the position of the vertex "idx". If the index is out of bounds, the function sends an error to the console, and returns (0, 0).
|
||||
Returns the position of the vertex [code]idx[/code]. If the index is out of bounds, the function sends an error to the console, and returns [code](0, 0)[/code].
|
||||
</description>
|
||||
</method>
|
||||
<method name="interpolate" qualifiers="const">
|
||||
|
@ -111,8 +111,8 @@
|
|||
<argument index="1" name="t" type="float">
|
||||
</argument>
|
||||
<description>
|
||||
Returns the position between the vertex "idx" and the vertex "idx"+1, where "t" controls if the point is the first vertex (t = 0.0), the last vertex (t = 1.0), or in between. Values of "t" outside the range (0.0 >= t <=1) give strange, but predictable results.
|
||||
If "idx" is out of bounds it is truncated to the first or last vertex, and "t" is ignored. If the curve has no points, the function sends an error to the console, and returns (0, 0).
|
||||
Returns the position between the vertex [code]idx[/code] and the vertex [code]idx + 1[/code], where [code]t[/code] controls if the point is the first vertex ([code]t = 0.0[/code]), the last vertex ([code]t = 1.0[/code]), or in between. Values of [code]t[/code] outside the range ([code]0.0 >= t <=1[/code]) give strange, but predictable results.
|
||||
If [code]idx[/code] is out of bounds it is truncated to the first or last vertex, and [code]t[/code] is ignored. If the curve has no points, the function sends an error to the console, and returns [code](0, 0)[/code].
|
||||
</description>
|
||||
</method>
|
||||
<method name="interpolate_baked" qualifiers="const">
|
||||
|
@ -123,8 +123,8 @@
|
|||
<argument index="1" name="cubic" type="bool" default="false">
|
||||
</argument>
|
||||
<description>
|
||||
Returns a point within the curve at position "offset", where "offset" is measured as a pixel distance along the curve.
|
||||
To do that, it finds the two cached points where the "offset" lies between, then interpolates the values. This interpolation is cubic if "cubic" is set to true, or linear if set to false.
|
||||
Returns a point within the curve at position [code]offset[/code], where [code]offset[/code] is measured as a pixel distance along the curve.
|
||||
To do that, it finds the two cached points where the [code]offset[/code] lies between, then interpolates the values. This interpolation is cubic if [code]cubic[/code] is set to true, or linear if set to false.
|
||||
Cubic interpolation tends to follow the curves better, but linear is faster (and often, precise enough).
|
||||
</description>
|
||||
</method>
|
||||
|
@ -134,7 +134,7 @@
|
|||
<argument index="0" name="fofs" type="float">
|
||||
</argument>
|
||||
<description>
|
||||
Returns the position at the vertex "fofs". It calls [method interpolate] using the integer part of fofs as "idx", and its fractional part as "t".
|
||||
Returns the position at the vertex [code]fofs[/code]. It calls [method interpolate] using the integer part of [code]fofs[/code] as [code]idx[/code], and its fractional part as [code]t[/code].
|
||||
</description>
|
||||
</method>
|
||||
<method name="remove_point">
|
||||
|
@ -143,7 +143,7 @@
|
|||
<argument index="0" name="idx" type="int">
|
||||
</argument>
|
||||
<description>
|
||||
Deletes the point "idx" from the curve. Sends an error to the console if "idx" is out of bounds.
|
||||
Deletes the point [code]idx[/code] from the curve. Sends an error to the console if [code]idx[/code] is out of bounds.
|
||||
</description>
|
||||
</method>
|
||||
<method name="set_point_in">
|
||||
|
@ -154,7 +154,7 @@
|
|||
<argument index="1" name="position" type="Vector2">
|
||||
</argument>
|
||||
<description>
|
||||
Sets the position of the control point leading to the vertex "idx". If the index is out of bounds, the function sends an error to the console.
|
||||
Sets the position of the control point leading to the vertex [code]idx[/code]. If the index is out of bounds, the function sends an error to the console.
|
||||
</description>
|
||||
</method>
|
||||
<method name="set_point_out">
|
||||
|
@ -165,7 +165,7 @@
|
|||
<argument index="1" name="position" type="Vector2">
|
||||
</argument>
|
||||
<description>
|
||||
Sets the position of the control point leading out of the vertex "idx". If the index is out of bounds, the function sends an error to the console.
|
||||
Sets the position of the control point leading out of the vertex [code]idx[/code]. If the index is out of bounds, the function sends an error to the console.
|
||||
</description>
|
||||
</method>
|
||||
<method name="set_point_position">
|
||||
|
@ -176,7 +176,7 @@
|
|||
<argument index="1" name="position" type="Vector2">
|
||||
</argument>
|
||||
<description>
|
||||
Sets the position for the vertex "idx". If the index is out of bounds, the function sends an error to the console.
|
||||
Sets the position for the vertex [code]idx[/code]. If the index is out of bounds, the function sends an error to the console.
|
||||
</description>
|
||||
</method>
|
||||
<method name="tessellate" qualifiers="const">
|
||||
|
@ -189,8 +189,8 @@
|
|||
<description>
|
||||
Returns a list of points along the curve, with a curvature controlled point density. That is, the curvier parts will have more points than the straighter parts.
|
||||
This approximation makes straight segments between each point, then subdivides those segments until the resulting shape is similar enough.
|
||||
"max_stages" controls how many subdivisions a curve segment may face before it is considered approximate enough. Each subdivision splits the segment in half, so the default 5 stages may mean up to 32 subdivisions per curve segment. Increase with care!
|
||||
"tolerance_degrees" controls how many degrees the midpoint of a segment may deviate from the real curve, before the segment has to be subdivided.
|
||||
[code]max_stages[/code] controls how many subdivisions a curve segment may face before it is considered approximate enough. Each subdivision splits the segment in half, so the default 5 stages may mean up to 32 subdivisions per curve segment. Increase with care!
|
||||
[code]tolerance_degrees[/code] controls how many degrees the midpoint of a segment may deviate from the real curve, before the segment has to be subdivided.
|
||||
</description>
|
||||
</method>
|
||||
</methods>
|
||||
|
|
|
@ -24,8 +24,8 @@
|
|||
<argument index="3" name="at_position" type="int" default="-1">
|
||||
</argument>
|
||||
<description>
|
||||
Adds a point to a curve, at "position", with control points "in" and "out".
|
||||
If "at_position" is given, the point is inserted before the point number "at_position", moving that point (and every point after) after the inserted point. If "at_position" is not given, or is an illegal value (at_position <0 or at_position >= [method get_point_count]), the point will be appended at the end of the point list.
|
||||
Adds a point to a curve, at [code]position[/code], with control points [code]in[/code] and [code]out[/code].
|
||||
If [code]at_position[/code] is given, the point is inserted before the point number [code]at_position[/code], moving that point (and every point after) after the inserted point. If [code]at_position[/code] is not given, or is an illegal value ([code]at_position <0[/code] or [code]at_position >= [method get_point_count][/code]), the point will be appended at the end of the point list.
|
||||
</description>
|
||||
</method>
|
||||
<method name="clear_points">
|
||||
|
@ -39,7 +39,7 @@
|
|||
<return type="float">
|
||||
</return>
|
||||
<description>
|
||||
Returns the total length of the curve, based on the cached points. Given enough density (see [method set_bake_interval]), it should be approximate enough.
|
||||
Returns the total length of the curve, based on the cached points. Given enough density (see [member bake_interval]), it should be approximate enough.
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_baked_points" qualifiers="const">
|
||||
|
@ -70,7 +70,7 @@
|
|||
<argument index="0" name="to_point" type="Vector3">
|
||||
</argument>
|
||||
<description>
|
||||
Returns the closest offset to [code]to_point[/code]. This offset is meant to be used in one of the interpolate_baked* methods.
|
||||
Returns the closest offset to [code]to_point[/code]. This offset is meant to be used in [method interpolate_baked] or [method interpolate_baked_up_vector].
|
||||
[code]to_point[/code] must be in this curve's local space.
|
||||
</description>
|
||||
</method>
|
||||
|
@ -97,7 +97,7 @@
|
|||
<argument index="0" name="idx" type="int">
|
||||
</argument>
|
||||
<description>
|
||||
Returns the position of the control point leading to the vertex "idx". If the index is out of bounds, the function sends an error to the console, and returns (0, 0, 0).
|
||||
Returns the position of the control point leading to the vertex [code]idx[/code]. If the index is out of bounds, the function sends an error to the console, and returns [code](0, 0, 0)[/code].
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_point_out" qualifiers="const">
|
||||
|
@ -106,7 +106,7 @@
|
|||
<argument index="0" name="idx" type="int">
|
||||
</argument>
|
||||
<description>
|
||||
Returns the position of the control point leading out of the vertex "idx". If the index is out of bounds, the function sends an error to the console, and returns (0, 0, 0).
|
||||
Returns the position of the control point leading out of the vertex [code]idx[/code]. If the index is out of bounds, the function sends an error to the console, and returns [code](0, 0, 0)[/code].
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_point_position" qualifiers="const">
|
||||
|
@ -115,7 +115,7 @@
|
|||
<argument index="0" name="idx" type="int">
|
||||
</argument>
|
||||
<description>
|
||||
Returns the position of the vertex "idx". If the index is out of bounds, the function sends an error to the console, and returns (0, 0, 0).
|
||||
Returns the position of the vertex [code]idx[/code]. If the index is out of bounds, the function sends an error to the console, and returns [code](0, 0, 0)[/code].
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_point_tilt" qualifiers="const">
|
||||
|
@ -124,7 +124,7 @@
|
|||
<argument index="0" name="idx" type="int">
|
||||
</argument>
|
||||
<description>
|
||||
Returns the tilt angle in radians for the point "idx". If the index is out of bounds, the function sends an error to the console, and returns 0.
|
||||
Returns the tilt angle in radians for the point [code]idx[/code]. If the index is out of bounds, the function sends an error to the console, and returns [code]0[/code].
|
||||
</description>
|
||||
</method>
|
||||
<method name="interpolate" qualifiers="const">
|
||||
|
@ -135,8 +135,8 @@
|
|||
<argument index="1" name="t" type="float">
|
||||
</argument>
|
||||
<description>
|
||||
Returns the position between the vertex "idx" and the vertex "idx"+1, where "t" controls if the point is the first vertex (t = 0.0), the last vertex (t = 1.0), or in between. Values of "t" outside the range (0.0 >= t <=1) give strange, but predictable results.
|
||||
If "idx" is out of bounds it is truncated to the first or last vertex, and "t" is ignored. If the curve has no points, the function sends an error to the console, and returns (0, 0, 0).
|
||||
Returns the position between the vertex [code]idx[/code] and the vertex [code]idx + 1[/code], where [code]t[/code] controls if the point is the first vertex ([code]t = 0.0[/code]), the last vertex ([code]t = 1.0[/code]), or in between. Values of [code]t[/code] outside the range ([code]0.0 >= t <=1[/code]) give strange, but predictable results.
|
||||
If [code]idx[/code] is out of bounds it is truncated to the first or last vertex, and [code]t[/code] is ignored. If the curve has no points, the function sends an error to the console, and returns [code](0, 0, 0)[/code].
|
||||
</description>
|
||||
</method>
|
||||
<method name="interpolate_baked" qualifiers="const">
|
||||
|
@ -147,8 +147,8 @@
|
|||
<argument index="1" name="cubic" type="bool" default="false">
|
||||
</argument>
|
||||
<description>
|
||||
Returns a point within the curve at position "offset", where "offset" is measured as a distance in 3D units along the curve.
|
||||
To do that, it finds the two cached points where the "offset" lies between, then interpolates the values. This interpolation is cubic if "cubic" is set to true, or linear if set to false.
|
||||
Returns a point within the curve at position [code]offset[/code], where [code]offset[/code] is measured as a pixel distance along the curve.
|
||||
To do that, it finds the two cached points where the [code]offset[/code] lies between, then interpolates the values. This interpolation is cubic if [code]cubic[/code] is set to true, or linear if set to false.
|
||||
Cubic interpolation tends to follow the curves better, but linear is faster (and often, precise enough).
|
||||
</description>
|
||||
</method>
|
||||
|
@ -162,7 +162,7 @@
|
|||
<description>
|
||||
Returns an up vector within the curve at position [code]offset[/code], where [code]offset[/code] is measured as a distance in 3D units along the curve.
|
||||
To do that, it finds the two cached up vectors where the [code]offset[/code] lies between, then interpolates the values. If [code]apply_tilt[/code] is [code]true[/code], an interpolated tilt is applied to the interpolated up vector.
|
||||
If the curve has no up vectors, the function sends an error to the console, and returns (0, 1, 0).
|
||||
If the curve has no up vectors, the function sends an error to the console, and returns [code](0, 1, 0)[/code].
|
||||
</description>
|
||||
</method>
|
||||
<method name="interpolatef" qualifiers="const">
|
||||
|
@ -171,7 +171,7 @@
|
|||
<argument index="0" name="fofs" type="float">
|
||||
</argument>
|
||||
<description>
|
||||
Returns the position at the vertex "fofs". It calls [method interpolate] using the integer part of fofs as "idx", and its fractional part as "t".
|
||||
Returns the position at the vertex [code]fofs[/code]. It calls [method interpolate] using the integer part of [code]fofs[/code] as [code]idx[/code], and its fractional part as [code]t[/code].
|
||||
</description>
|
||||
</method>
|
||||
<method name="remove_point">
|
||||
|
@ -180,7 +180,7 @@
|
|||
<argument index="0" name="idx" type="int">
|
||||
</argument>
|
||||
<description>
|
||||
Deletes the point "idx" from the curve. Sends an error to the console if "idx" is out of bounds.
|
||||
Deletes the point [code]idx[/code] from the curve. Sends an error to the console if [code]idx[/code] is out of bounds.
|
||||
</description>
|
||||
</method>
|
||||
<method name="set_point_in">
|
||||
|
@ -191,7 +191,7 @@
|
|||
<argument index="1" name="position" type="Vector3">
|
||||
</argument>
|
||||
<description>
|
||||
Sets the position of the control point leading to the vertex "idx". If the index is out of bounds, the function sends an error to the console.
|
||||
Sets the position of the control point leading to the vertex [code]idx[/code]. If the index is out of bounds, the function sends an error to the console.
|
||||
</description>
|
||||
</method>
|
||||
<method name="set_point_out">
|
||||
|
@ -202,7 +202,7 @@
|
|||
<argument index="1" name="position" type="Vector3">
|
||||
</argument>
|
||||
<description>
|
||||
Sets the position of the control point leading out of the vertex "idx". If the index is out of bounds, the function sends an error to the console.
|
||||
Sets the position of the control point leading out of the vertex [code]idx[/code]. If the index is out of bounds, the function sends an error to the console.
|
||||
</description>
|
||||
</method>
|
||||
<method name="set_point_position">
|
||||
|
@ -213,7 +213,7 @@
|
|||
<argument index="1" name="position" type="Vector3">
|
||||
</argument>
|
||||
<description>
|
||||
Sets the position for the vertex "idx". If the index is out of bounds, the function sends an error to the console.
|
||||
Sets the position for the vertex [code]idx[/code]. If the index is out of bounds, the function sends an error to the console.
|
||||
</description>
|
||||
</method>
|
||||
<method name="set_point_tilt">
|
||||
|
@ -224,7 +224,7 @@
|
|||
<argument index="1" name="tilt" type="float">
|
||||
</argument>
|
||||
<description>
|
||||
Sets the tilt angle in radians for the point "idx". If the index is out of bounds, the function sends an error to the console.
|
||||
Sets the tilt angle in radians for the point [code]idx[/code]. If the index is out of bounds, the function sends an error to the console.
|
||||
The tilt controls the rotation along the look-at axis an object traveling the path would have. In the case of a curve controlling a [PathFollow] or [OrientedPathFollow], this tilt is an offset over the natural tilt the [PathFollow] or [OrientedPathFollow] calculates.
|
||||
</description>
|
||||
</method>
|
||||
|
@ -238,8 +238,8 @@
|
|||
<description>
|
||||
Returns a list of points along the curve, with a curvature controlled point density. That is, the curvier parts will have more points than the straighter parts.
|
||||
This approximation makes straight segments between each point, then subdivides those segments until the resulting shape is similar enough.
|
||||
"max_stages" controls how many subdivisions a curve segment may face before it is considered approximate enough. Each subdivision splits the segment in half, so the default 5 stages may mean up to 32 subdivisions per curve segment. Increase with care!
|
||||
"tolerance_degrees" controls how many degrees the midpoint of a segment may deviate from the real curve, before the segment has to be subdivided.
|
||||
[code]max_stages[/code] controls how many subdivisions a curve segment may face before it is considered approximate enough. Each subdivision splits the segment in half, so the default 5 stages may mean up to 32 subdivisions per curve segment. Increase with care!
|
||||
[code]tolerance_degrees[/code] controls how many degrees the midpoint of a segment may deviate from the real curve, before the segment has to be subdivided.
|
||||
</description>
|
||||
</method>
|
||||
</methods>
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
</brief_description>
|
||||
<description>
|
||||
EditorImportPlugins provide a way to extend the editor's resource import functionality. Use them to import resources from custom files or to provide alternatives to the editor's existing importers. Register your [EditorPlugin] with [method EditorPlugin.add_import_plugin].
|
||||
EditorImportPlugins work by associating with specific file extensions and a resource type. See [method get_recognized_extension] and [method get_resource_type]). They may optionally specify some import presets that affect the import process. EditorImportPlugins are responsible for creating the resources and saving them in the [code].import[/code] directory.
|
||||
EditorImportPlugins work by associating with specific file extensions and a resource type. See [method get_recognized_extensions] and [method get_resource_type]). They may optionally specify some import presets that affect the import process. EditorImportPlugins are responsible for creating the resources and saving them in the [code].import[/code] directory.
|
||||
Below is an example EditorImportPlugin that imports a [Mesh] from a file with the extension ".special" or ".spec":
|
||||
[codeblock]
|
||||
tool
|
||||
|
@ -60,7 +60,7 @@
|
|||
<argument index="0" name="preset" type="int">
|
||||
</argument>
|
||||
<description>
|
||||
Get the options and default values for the preset at this index. Returns an Array of Dictionaries with the following keys: "name", "default_value", "property_hint" (optional), "hint_string" (optional), "usage" (optional).
|
||||
Get the options and default values for the preset at this index. Returns an Array of Dictionaries with the following keys: [code]name[/code], [code]default_value[/code], [code]property_hint[/code] (optional), [code]hint_string[/code] (optional), [code]usage[/code] (optional).
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_import_order" qualifiers="virtual">
|
||||
|
@ -114,14 +114,14 @@
|
|||
<return type="Array">
|
||||
</return>
|
||||
<description>
|
||||
Get the list of file extensions to associate with this loader (case insensitive). e.g. ["obj"].
|
||||
Get the list of file extensions to associate with this loader (case insensitive). e.g. [code]["obj"][/code].
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_resource_type" qualifiers="virtual">
|
||||
<return type="String">
|
||||
</return>
|
||||
<description>
|
||||
Get the Godot resource type associated with this loader. e.g. "Mesh" or "Animation".
|
||||
Get the Godot resource type associated with this loader. e.g. [code]"Mesh"[/code] or [code]"Animation"[/code].
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_save_extension" qualifiers="virtual">
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
Gradient filled texture.
|
||||
</brief_description>
|
||||
<description>
|
||||
Uses a [Gradient] to fill the texture data, the gradient will be filled from left to right using colors obtained from the gradient, this means that the texture does not necessarily represent an exact copy of the gradient, but instead an interpolation of samples obtained from the gradient at fixed steps (see [method set_width]).
|
||||
Uses a [Gradient] to fill the texture data, the gradient will be filled from left to right using colors obtained from the gradient, this means that the texture does not necessarily represent an exact copy of the gradient, but instead an interpolation of samples obtained from the gradient at fixed steps (see [member width]).
|
||||
</description>
|
||||
<tutorials>
|
||||
</tutorials>
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
Grid container used to arrange elements in a grid like layout.
|
||||
</brief_description>
|
||||
<description>
|
||||
Grid container will arrange its children in a grid like structure, the grid columns are specified using the [method set_columns] method and the number of rows will be equal to the number of children in the container divided by the number of columns, for example: if the container has 5 children, and 2 columns, there will be 3 rows in the container. Notice that grid layout will preserve the columns and rows for every size of the container.
|
||||
Grid container will arrange its children in a grid like structure, the grid columns are specified using the [member columns] property and the number of rows will be equal to the number of children in the container divided by the number of columns, for example: if the container has 5 children, and 2 columns, there will be 3 rows in the container. Notice that grid layout will preserve the columns and rows for every size of the container.
|
||||
</description>
|
||||
<tutorials>
|
||||
</tutorials>
|
||||
|
|
|
@ -102,16 +102,16 @@
|
|||
Request failed while resolving.
|
||||
</constant>
|
||||
<constant name="RESULT_CONNECTION_ERROR" value="4" enum="Result">
|
||||
Request failed due to connection(read/write) error.
|
||||
Request failed due to connection (read/write) error.
|
||||
</constant>
|
||||
<constant name="RESULT_SSL_HANDSHAKE_ERROR" value="5" enum="Result">
|
||||
Request failed on SSL handshake.
|
||||
</constant>
|
||||
<constant name="RESULT_NO_RESPONSE" value="6" enum="Result">
|
||||
Request does not have a response(yet).
|
||||
Request does not have a response (yet).
|
||||
</constant>
|
||||
<constant name="RESULT_BODY_SIZE_LIMIT_EXCEEDED" value="7" enum="Result">
|
||||
Request exceeded its maximum size limit, see [method set_body_size_limit].
|
||||
Request exceeded its maximum size limit, see [member body_size_limit].
|
||||
</constant>
|
||||
<constant name="RESULT_REQUEST_FAILED" value="8" enum="Result">
|
||||
Request failed. (Unused)
|
||||
|
@ -123,7 +123,7 @@
|
|||
HTTPRequest couldn't write to the download file.
|
||||
</constant>
|
||||
<constant name="RESULT_REDIRECT_LIMIT_REACHED" value="11" enum="Result">
|
||||
Request reached its maximum redirect limit, see [method set_max_redirects].
|
||||
Request reached its maximum redirect limit, see [member max_redirects].
|
||||
</constant>
|
||||
</constants>
|
||||
</class>
|
||||
|
|
|
@ -23,9 +23,8 @@
|
|||
<argument index="3" name="flags" type="int" default="7">
|
||||
</argument>
|
||||
<description>
|
||||
Create a new [code]ImageTexture[/code] with "width" and "height".
|
||||
"format" one of [Image].FORMAT_*.
|
||||
"flags" one or more of [Texture].FLAG_*.
|
||||
Create a new [code]ImageTexture[/code] with [code]width[/code] and [code]height[/code].
|
||||
[code]format[/code] is a value from [enum Image.Format], [code]flags[/code] is any combination of [enum Texture.Flags].
|
||||
</description>
|
||||
</method>
|
||||
<method name="create_from_image">
|
||||
|
@ -36,14 +35,14 @@
|
|||
<argument index="1" name="flags" type="int" default="7">
|
||||
</argument>
|
||||
<description>
|
||||
Create a new [code]ImageTexture[/code] from an [Image] with "flags" from [Texture].FLAG_*. An sRGB to linear color space conversion can take place, according to [Image].FORMAT_*.
|
||||
Create a new [code]ImageTexture[/code] from an [Image] with [code]flags[/code] from [enum Texture.Flags]. An sRGB to linear color space conversion can take place, according to [enum Image.Format].
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_format" qualifiers="const">
|
||||
<return type="int" enum="Image.Format">
|
||||
</return>
|
||||
<description>
|
||||
Return the format of the [code]ImageTexture[/code], one of [Image].FORMAT_*.
|
||||
Return the format of the [code]ImageTexture[/code], one of [enum Image.Format].
|
||||
</description>
|
||||
</method>
|
||||
<method name="load">
|
||||
|
@ -76,7 +75,7 @@
|
|||
</methods>
|
||||
<members>
|
||||
<member name="lossy_quality" type="float" setter="set_lossy_storage_quality" getter="get_lossy_storage_quality">
|
||||
The storage quality for [code]ImageTexture[/code].STORAGE_COMPRESS_LOSSY.
|
||||
The storage quality for [code]STORAGE_COMPRESS_LOSSY[/code].
|
||||
</member>
|
||||
<member name="storage" type="int" setter="set_storage" getter="get_storage" enum="ImageTexture.Storage">
|
||||
The storage type (raw, lossy, or compressed).
|
||||
|
@ -87,7 +86,7 @@
|
|||
[Image] data is stored raw and unaltered.
|
||||
</constant>
|
||||
<constant name="STORAGE_COMPRESS_LOSSY" value="1" enum="Storage">
|
||||
[Image] data is compressed with a lossy algorithm. You can set the storage quality with [method set_lossy_storage_quality].
|
||||
[Image] data is compressed with a lossy algorithm. You can set the storage quality with [member lossy_quality].
|
||||
</constant>
|
||||
<constant name="STORAGE_COMPRESS_LOSSLESS" value="2" enum="Storage">
|
||||
[Image] data is compressed with a lossless algorithm.
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
This means that when adding a node to the scene tree, the following order will be used for the callbacks: [method _enter_tree] of the parent, [method _enter_tree] of the children, [method _ready] of the children and finally [method _ready] of the parent (recursively for the entire scene tree).
|
||||
[b]Processing:[/b] Nodes can override the "process" state, so that they receive a callback on each frame requesting them to process (do something). Normal processing (callback [method _process], toggled with [method set_process]) happens as fast as possible and is dependent on the frame rate, so the processing time [i]delta[/i] is passed as an argument. Physics processing (callback [method _physics_process], toggled with [method set_physics_process]) happens a fixed number of times per second (60 by default) and is useful for code related to the physics engine.
|
||||
Nodes can also process input events. When present, the [method _input] function will be called for each input that the program receives. In many cases, this can be overkill (unless used for simple projects), and the [method _unhandled_input] function might be preferred; it is called when the input event was not handled by anyone else (typically, GUI [Control] nodes), ensuring that the node only receives the events that were meant for it.
|
||||
To keep track of the scene hierarchy (especially when instancing scenes into other scenes), an "owner" can be set for the node with [method set_owner]. This keeps track of who instanced what. This is mostly useful when writing editors and tools, though.
|
||||
To keep track of the scene hierarchy (especially when instancing scenes into other scenes), an "owner" can be set for the node with the [member owner] property. This keeps track of who instanced what. This is mostly useful when writing editors and tools, though.
|
||||
Finally, when a node is freed with [method Object.free] or [method queue_free], it will also free all its children.
|
||||
[b]Groups:[/b] Nodes can be added to as many groups as you want to be easy to manage, you could create groups like "enemies" or "collectables" for example, depending on your game. See [method add_to_group], [method is_in_group] and [method remove_from_group]. You can then retrieve all nodes in these groups, iterate them and even call methods on groups via the methods on [SceneTree].
|
||||
[b]Networking with nodes:[/b] After connecting to a server (or making one, see [NetworkedMultiplayerENet]) it is possible to use the built-in RPC (remote procedure call) system to communicate over the network. By calling [method rpc] with a method name, it will be called locally and in all connected peers (peers = clients and the server that accepts connections). To identify which node receives the RPC call Godot will use its [NodePath] (make sure node names are the same on all peers). Also take a look at the high-level networking tutorial and corresponding demos.
|
||||
|
@ -152,7 +152,7 @@
|
|||
<return type="bool">
|
||||
</return>
|
||||
<description>
|
||||
Returns [code]true[/code] if the node can process while the scene tree is paused (see [method set_pause_mode]). Always returns [code]true[/code] if the scene tree is not paused, and [code]false[/code] if the node is not in the tree. FIXME: Why FAIL_COND?
|
||||
Returns [code]true[/code] if the node can process while the scene tree is paused (see [member pause_mode]). Always returns [code]true[/code] if the scene tree is not paused, and [code]false[/code] if the node is not in the tree.
|
||||
</description>
|
||||
</method>
|
||||
<method name="duplicate" qualifiers="const">
|
||||
|
@ -162,7 +162,7 @@
|
|||
</argument>
|
||||
<description>
|
||||
Duplicates the node, returning a new node.
|
||||
You can fine-tune the behavior using the [code]flags[/code]. See DUPLICATE_* constants.
|
||||
You can fine-tune the behavior using the [code]flags[/code] (see [enum Node.DuplicateFlags]).
|
||||
</description>
|
||||
</method>
|
||||
<method name="find_node" qualifiers="const">
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
<argument index="0" name="state" type="PhysicsDirectBodyState">
|
||||
</argument>
|
||||
<description>
|
||||
Called during physics processing, allowing you to read and safely modify the simulation state for the object. By default, it works in addition to the usual physics behavior, but [method set_use_custom_integrator] allows you to disable the default behavior and do fully custom force integration for a body.
|
||||
Called during physics processing, allowing you to read and safely modify the simulation state for the object. By default, it works in addition to the usual physics behavior, but the [member custom_integrator] property allows you to disable the default behavior and do fully custom force integration for a body.
|
||||
</description>
|
||||
</method>
|
||||
<method name="add_central_force">
|
||||
|
@ -88,7 +88,7 @@
|
|||
<return type="Array">
|
||||
</return>
|
||||
<description>
|
||||
Return a list of the bodies colliding with this one. By default, number of max contacts reported is at 0 , see [method set_max_contacts_reported] to increase it. Note that the result of this test is not immediate after moving objects. For performance, list of collisions is updated once per frame and before the physics step. Consider using signals instead.
|
||||
Return a list of the bodies colliding with this one. By default, number of max contacts reported is at 0, see the [member contacts_reported] property to increase it. Note that the result of this test is not immediate after moving objects. For performance, list of collisions is updated once per frame and before the physics step. Consider using signals instead.
|
||||
</description>
|
||||
</method>
|
||||
<method name="set_axis_velocity">
|
||||
|
|
|
@ -274,7 +274,7 @@
|
|||
When [code]false[/code] you need to manually call [method MultiplayerAPI.poll] for processing network packets and delivering RPCs/RSETs. This allows to run RPCs/RSETs in a different loop (e.g. physics, thread, specific time step) and for manual [Mutex] protection when accessing the [MultiplayerAPI] from threads.
|
||||
</member>
|
||||
<member name="network_peer" type="NetworkedMultiplayerPeer" setter="set_network_peer" getter="get_network_peer">
|
||||
The peer object to handle the RPC system (effectively enabling networking when set). Depending on the peer itself, the SceneTree will become a network server (check with [method is_network_server()]) and will set root node's network mode to master (see NETWORK_MODE_* constants in [Node]), or it will become a regular peer with root node set to puppet. All child nodes are set to inherit the network mode by default. Handling of networking-related events (connection, disconnection, new clients) is done by connecting to SceneTree's signals.
|
||||
The peer object to handle the RPC system (effectively enabling networking when set). Depending on the peer itself, the SceneTree will become a network server (check with [method is_network_server]) and will set root node's network mode to master (see NETWORK_MODE_* constants in [Node]), or it will become a regular peer with root node set to puppet. All child nodes are set to inherit the network mode by default. Handling of networking-related events (connection, disconnection, new clients) is done by connecting to SceneTree's signals.
|
||||
</member>
|
||||
<member name="paused" type="bool" setter="set_pause" getter="is_paused">
|
||||
If [code]true[/code], the SceneTree is paused.
|
||||
|
|
|
@ -114,9 +114,9 @@
|
|||
Border width for the top border.
|
||||
</member>
|
||||
<member name="corner_detail" type="int" setter="set_corner_detail" getter="get_corner_detail">
|
||||
This sets the amount of vertices used for each corner. Higher values result in rounder corners but take more processing power to compute. When choosing a value you should take the corner radius ([method set_corner_radius]) into account.
|
||||
For corner radius smaller than 10: 4-5 should be enough
|
||||
For corner radius smaller than 30: 8-12 should be enough
|
||||
This sets the amount of vertices used for each corner. Higher values result in rounder corners but take more processing power to compute. When choosing a value you should take the corner radius ([method set_corner_radius_all]) into account.
|
||||
For corner radius smaller than 10, 4-5 should be enough.
|
||||
For corner radius smaller than 30, 8-12 should be enough.
|
||||
</member>
|
||||
<member name="corner_radius_bottom_left" type="int" setter="set_corner_radius" getter="get_corner_radius">
|
||||
The corner radius of the bottom left corner. When set to 0 the corner is not rounded.
|
||||
|
|
|
@ -24,8 +24,8 @@
|
|||
<argument index="0" name="time_sec" type="float" default="-1">
|
||||
</argument>
|
||||
<description>
|
||||
Starts the timer. Sets [code]wait_time[/code] to [code]time_sec[/code] if [code]time_sec[/code] > 0. This also resets the remaining time to [code]wait_time[/code].
|
||||
Note: this method will not resume a paused timer. See [method set_paused].
|
||||
Starts the timer. Sets [code]wait_time[/code] to [code]time_sec[/code] if [code]time_sec > 0[/code]. This also resets the remaining time to [code]wait_time[/code].
|
||||
Note: this method will not resume a paused timer. See [member paused].
|
||||
</description>
|
||||
</method>
|
||||
<method name="stop">
|
||||
|
|
Loading…
Reference in New Issue