summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--doc/classes/Array.xml10
-rw-r--r--doc/classes/BitMap.xml4
-rw-r--r--doc/classes/CanvasItem.xml24
-rw-r--r--doc/classes/Color.xml18
-rw-r--r--doc/classes/EditorPlugin.xml20
-rw-r--r--doc/classes/KinematicBody.xml12
-rw-r--r--doc/classes/KinematicBody2D.xml12
-rw-r--r--doc/classes/MeshInstance2D.xml23
-rw-r--r--doc/classes/Physics2DServer.xml6
-rw-r--r--doc/classes/PhysicsDirectBodyState.xml16
-rw-r--r--doc/classes/RayShape.xml3
-rw-r--r--doc/classes/RayShape2D.xml3
-rw-r--r--doc/classes/RigidBody.xml2
-rw-r--r--doc/classes/RigidBody2D.xml6
-rw-r--r--doc/classes/Sprite.xml7
-rw-r--r--doc/classes/VehicleWheel.xml8
-rw-r--r--doc/classes/VisualServer.xml8
-rw-r--r--servers/visual_server.cpp4
18 files changed, 161 insertions, 25 deletions
diff --git a/doc/classes/Array.xml b/doc/classes/Array.xml
index 1e129d70d0..498445a027 100644
--- a/doc/classes/Array.xml
+++ b/doc/classes/Array.xml
@@ -265,6 +265,11 @@
Searches the array in reverse order. Optionally, a start search index can be passed. If negative, the start index is considered relative to the end of the array.
</description>
</method>
+ <method name="shuffle">
+ <description>
+ Shuffle the array such that the items will have a random order.
+ </description>
+ </method>
<method name="size">
<return type="int">
</return>
@@ -296,11 +301,6 @@
[/codeblock]
</description>
</method>
- <method name="shuffle">
- <description>
- Shuffle the array such that the items will have a random order.
- </description>
- </method>
</methods>
<constants>
</constants>
diff --git a/doc/classes/BitMap.xml b/doc/classes/BitMap.xml
index 1d2fc950f0..036e968b65 100644
--- a/doc/classes/BitMap.xml
+++ b/doc/classes/BitMap.xml
@@ -25,8 +25,10 @@
</return>
<argument index="0" name="image" type="Image">
</argument>
+ <argument index="1" name="threshold" type="float" default="0.1">
+ </argument>
<description>
- Creates a bitmap that matches the given image dimensions, every element of the bitmap is set to false if the alpha value of the image at that position is 0, and true in other case.
+ Creates a bitmap that matches the given image dimensions, every element of the bitmap is set to false if the alpha value of the image at that position is equal to [code]threshold[/code] or less, and true in other case.
</description>
</method>
<method name="get_bit" qualifiers="const">
diff --git a/doc/classes/CanvasItem.xml b/doc/classes/CanvasItem.xml
index e3bf2b9577..ff9eb6bfe9 100644
--- a/doc/classes/CanvasItem.xml
+++ b/doc/classes/CanvasItem.xml
@@ -90,6 +90,18 @@
Draws a line from a 2D point to another, with a given color and width. It can be optionally antialiased.
</description>
</method>
+ <method name="draw_mesh">
+ <return type="void">
+ </return>
+ <argument index="0" name="mesh" type="Mesh">
+ </argument>
+ <argument index="1" name="texture" type="Texture">
+ </argument>
+ <argument index="2" name="normal_map" type="Texture" default="null">
+ </argument>
+ <description>
+ </description>
+ </method>
<method name="draw_multiline">
<return type="void">
</return>
@@ -120,6 +132,18 @@
Draws multiple, parallel lines 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_multimesh">
+ <return type="void">
+ </return>
+ <argument index="0" name="mesh" type="Mesh">
+ </argument>
+ <argument index="1" name="texture" type="Texture">
+ </argument>
+ <argument index="2" name="normal_map" type="Texture" default="null">
+ </argument>
+ <description>
+ </description>
+ </method>
<method name="draw_polygon">
<return type="void">
</return>
diff --git a/doc/classes/Color.xml b/doc/classes/Color.xml
index 8113ee3415..490583b427 100644
--- a/doc/classes/Color.xml
+++ b/doc/classes/Color.xml
@@ -117,6 +117,24 @@
[/codeblock]
</description>
</method>
+ <method name="from_hsv">
+ <return type="Color">
+ </return>
+ <argument index="0" name="h" type="float">
+ </argument>
+ <argument index="1" name="s" type="float">
+ </argument>
+ <argument index="2" name="v" type="float">
+ </argument>
+ <argument index="3" name="a" type="float" default="1">
+ </argument>
+ <description>
+ Constructs a color from an HSV profile. [code]h[/code] is a value between 0 and 360. [code]s[/code] and [code]v[/code] are values between 0 and 1.
+ [codeblock]
+ var c = Color.from_hsv(210, 0.5, 0.79, 0.8) # equivalent to HSV(210, 50, 79, 0.8) or Color8(100, 151, 201, 0.8)
+ [/codeblock]
+ </description>
+ </method>
<method name="gray">
<return type="float">
</return>
diff --git a/doc/classes/EditorPlugin.xml b/doc/classes/EditorPlugin.xml
index b7f7d74f54..d0ba6c2ce0 100644
--- a/doc/classes/EditorPlugin.xml
+++ b/doc/classes/EditorPlugin.xml
@@ -12,6 +12,17 @@
<demos>
</demos>
<methods>
+ <method name="add_autoload_singleton">
+ <return type="void">
+ </return>
+ <argument index="0" name="name" type="String">
+ </argument>
+ <argument index="1" name="path" type="String">
+ </argument>
+ <description>
+ Add a script at [code]path[/code] to the Autoload list as [code]name[/code].
+ </description>
+ </method>
<method name="add_control_to_bottom_panel">
<return type="ToolButton">
</return>
@@ -265,6 +276,15 @@
Queue save the project's editor layout.
</description>
</method>
+ <method name="remove_autoload_singleton">
+ <return type="void">
+ </return>
+ <argument index="0" name="name" type="String">
+ </argument>
+ <description>
+ Remove an Autoload [code]name[/code] from the list.
+ </description>
+ </method>
<method name="remove_control_from_bottom_panel">
<return type="void">
</return>
diff --git a/doc/classes/KinematicBody.xml b/doc/classes/KinematicBody.xml
index 7ebea43cb9..7a20331115 100644
--- a/doc/classes/KinematicBody.xml
+++ b/doc/classes/KinematicBody.xml
@@ -63,6 +63,8 @@
</return>
<argument index="0" name="rel_vec" type="Vector3">
</argument>
+ <argument index="1" name="infinite_inertia" type="bool" default="true">
+ </argument>
<description>
Moves the body along the vector [code]rel_vec[/code]. The body will stop if it collides. Returns a [KinematicCollision], which contains information about the collision.
</description>
@@ -74,11 +76,13 @@
</argument>
<argument index="1" name="floor_normal" type="Vector3" default="Vector3( 0, 0, 0 )">
</argument>
- <argument index="2" name="slope_stop_min_velocity" type="float" default="0.05">
+ <argument index="2" name="infinite_inertia" type="bool" default="true">
+ </argument>
+ <argument index="3" name="slope_stop_min_velocity" type="float" default="0.05">
</argument>
- <argument index="3" name="max_slides" type="int" default="4">
+ <argument index="4" name="max_slides" type="int" default="4">
</argument>
- <argument index="4" name="floor_max_angle" type="float" default="0.785398">
+ <argument index="5" name="floor_max_angle" type="float" default="0.785398">
</argument>
<description>
Moves the body along a vector. If the body collides with another, it will slide along the other body rather than stop immediately. If the other body is a [code]KinematicBody[/code] or [RigidBody], it will also be affected by the motion of the other body. You can use this to make moving or rotating platforms, or to make nodes push other nodes.
@@ -97,6 +101,8 @@
</argument>
<argument index="1" name="rel_vec" type="Vector3">
</argument>
+ <argument index="2" name="infinite_inertia" type="bool">
+ </argument>
<description>
Checks for collisions without moving the body. Virtually sets the node's position, scale and rotation to that of the given [Transform], then tries to move the body along the vector [code]rel_vec[/code]. Returns [code]true[/code] if a collision would occur.
</description>
diff --git a/doc/classes/KinematicBody2D.xml b/doc/classes/KinematicBody2D.xml
index da7b34440e..df4b719eae 100644
--- a/doc/classes/KinematicBody2D.xml
+++ b/doc/classes/KinematicBody2D.xml
@@ -62,6 +62,8 @@
</return>
<argument index="0" name="rel_vec" type="Vector2">
</argument>
+ <argument index="1" name="infinite_inertia" type="bool" default="true">
+ </argument>
<description>
Moves the body along the vector [code]rel_vec[/code]. The body will stop if it collides. Returns a [KinematicCollision2D], which contains information about the collision.
</description>
@@ -73,11 +75,13 @@
</argument>
<argument index="1" name="floor_normal" type="Vector2" default="Vector2( 0, 0 )">
</argument>
- <argument index="2" name="slope_stop_min_velocity" type="float" default="5">
+ <argument index="2" name="infinite_inertia" type="bool" default="true">
+ </argument>
+ <argument index="3" name="slope_stop_min_velocity" type="float" default="5">
</argument>
- <argument index="3" name="max_bounces" type="int" default="4">
+ <argument index="4" name="max_bounces" type="int" default="4">
</argument>
- <argument index="4" name="floor_max_angle" type="float" default="0.785398">
+ <argument index="5" name="floor_max_angle" type="float" default="0.785398">
</argument>
<description>
Moves the body along a vector. If the body collides with another, it will slide along the other body rather than stop immediately. If the other body is a [code]KinematicBody2D[/code] or [RigidBody2D], it will also be affected by the motion of the other body. You can use this to make moving or rotating platforms, or to make nodes push other nodes.
@@ -96,6 +100,8 @@
</argument>
<argument index="1" name="rel_vec" type="Vector2">
</argument>
+ <argument index="2" name="infinite_inertia" type="bool">
+ </argument>
<description>
Checks for collisions without moving the body. Virtually sets the node's position, scale and rotation to that of the given [Transform2D], then tries to move the body along the vector [code]rel_vec[/code]. Returns [code]true[/code] if a collision would occur.
</description>
diff --git a/doc/classes/MeshInstance2D.xml b/doc/classes/MeshInstance2D.xml
new file mode 100644
index 0000000000..5e5af692fd
--- /dev/null
+++ b/doc/classes/MeshInstance2D.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="MeshInstance2D" inherits="Node2D" category="Core" version="3.1-dev">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ </methods>
+ <members>
+ <member name="mesh" type="Mesh" setter="set_mesh" getter="get_mesh">
+ </member>
+ <member name="normal_map" type="Texture" setter="set_normal_map" getter="get_normal_map">
+ </member>
+ <member name="texture" type="Texture" setter="set_texture" getter="get_texture">
+ </member>
+ </members>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/Physics2DServer.xml b/doc/classes/Physics2DServer.xml
index 644731516f..a97a198e4b 100644
--- a/doc/classes/Physics2DServer.xml
+++ b/doc/classes/Physics2DServer.xml
@@ -713,9 +713,11 @@
</argument>
<argument index="2" name="motion" type="Vector2">
</argument>
- <argument index="3" name="margin" type="float" default="0.08">
+ <argument index="3" name="infinite_inertia" type="bool">
</argument>
- <argument index="4" name="result" type="Physics2DTestMotionResult" default="null">
+ <argument index="4" name="margin" type="float" default="0.08">
+ </argument>
+ <argument index="5" name="result" type="Physics2DTestMotionResult" default="null">
</argument>
<description>
Returns whether a body can move from a given point in a given direction. Apart from the boolean return value, a [Physics2DTestMotionResult] can be passed to return additional information in.
diff --git a/doc/classes/PhysicsDirectBodyState.xml b/doc/classes/PhysicsDirectBodyState.xml
index fa0e529a73..1c92ea1cc4 100644
--- a/doc/classes/PhysicsDirectBodyState.xml
+++ b/doc/classes/PhysicsDirectBodyState.xml
@@ -9,6 +9,14 @@
<demos>
</demos>
<methods>
+ <method name="add_central_force">
+ <return type="void">
+ </return>
+ <argument index="0" name="force" type="Vector3">
+ </argument>
+ <description>
+ </description>
+ </method>
<method name="add_force">
<return type="void">
</return>
@@ -19,6 +27,14 @@
<description>
</description>
</method>
+ <method name="add_torque">
+ <return type="void">
+ </return>
+ <argument index="0" name="torque" type="Vector3">
+ </argument>
+ <description>
+ </description>
+ </method>
<method name="apply_impulse">
<return type="void">
</return>
diff --git a/doc/classes/RayShape.xml b/doc/classes/RayShape.xml
index 5d488cb3f5..8df910a5c6 100644
--- a/doc/classes/RayShape.xml
+++ b/doc/classes/RayShape.xml
@@ -16,6 +16,9 @@
<member name="length" type="float" setter="set_length" getter="get_length">
The ray's length.
</member>
+ <member name="slips_on_slope" type="bool" setter="set_slips_on_slope" getter="get_slips_on_slope">
+ If [code]true[/code] allow the shape to return the correct normal. Default value: [code]false[/code].
+ </member>
</members>
<constants>
</constants>
diff --git a/doc/classes/RayShape2D.xml b/doc/classes/RayShape2D.xml
index 3137bbd1ad..f0d63f9998 100644
--- a/doc/classes/RayShape2D.xml
+++ b/doc/classes/RayShape2D.xml
@@ -16,6 +16,9 @@
<member name="length" type="float" setter="set_length" getter="get_length">
The ray's length.
</member>
+ <member name="slips_on_slope" type="bool" setter="set_slips_on_slope" getter="get_slips_on_slope">
+ If [code]true[/code] allow the shape to return the correct normal. Default value: [code]false[/code].
+ </member>
</members>
<constants>
</constants>
diff --git a/doc/classes/RigidBody.xml b/doc/classes/RigidBody.xml
index a1aa479ea1..21bd60e138 100644
--- a/doc/classes/RigidBody.xml
+++ b/doc/classes/RigidBody.xml
@@ -38,7 +38,7 @@
<method name="apply_torque_impulse">
<return type="void">
</return>
- <argument index="1" name="impulse" type="Vector3">
+ <argument index="0" name="impulse" type="Vector3">
</argument>
<description>
Apply a torque impulse (which will be affected by the body mass and shape). This will rotate the body around the passed in vector.
diff --git a/doc/classes/RigidBody2D.xml b/doc/classes/RigidBody2D.xml
index 719ddfffe4..d94c917af2 100644
--- a/doc/classes/RigidBody2D.xml
+++ b/doc/classes/RigidBody2D.xml
@@ -66,9 +66,11 @@
</return>
<argument index="0" name="motion" type="Vector2">
</argument>
- <argument index="1" name="margin" type="float" default="0.08">
+ <argument index="1" name="infinite_inertia" type="bool" default="true">
</argument>
- <argument index="2" name="result" type="Physics2DTestMotionResult" default="null">
+ <argument index="2" name="margin" type="float" default="0.08">
+ </argument>
+ <argument index="3" name="result" type="Physics2DTestMotionResult" default="null">
</argument>
<description>
Returns [code]true[/code] if a collision would result from moving in the given vector. [code]margin[/code] increases the size of the shapes involved in the collision detection, and [code]result[/code] is an object of type [Physics2DTestMotionResult], which contains additional information about the collision (should there be one).
diff --git a/doc/classes/Sprite.xml b/doc/classes/Sprite.xml
index a3423a0739..dc0310acb5 100644
--- a/doc/classes/Sprite.xml
+++ b/doc/classes/Sprite.xml
@@ -11,6 +11,13 @@
<demos>
</demos>
<methods>
+ <method name="get_rect" qualifiers="const">
+ <return type="Rect2">
+ </return>
+ <description>
+ Returns a Rect2 representing the Sprite's boundary relative to its local coordinates.
+ </description>
+ </method>
</methods>
<members>
<member name="centered" type="bool" setter="set_centered" getter="is_centered">
diff --git a/doc/classes/VehicleWheel.xml b/doc/classes/VehicleWheel.xml
index ccc4b964c1..4dceecedef 100644
--- a/doc/classes/VehicleWheel.xml
+++ b/doc/classes/VehicleWheel.xml
@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="VehicleWheel" inherits="Spatial" category="Core" version="3.1-dev">
<brief_description>
- Physics object that simulates the behaviour of a wheel.
+ Physics object that simulates the behaviour of a wheel.
</brief_description>
<description>
- This node needs to be used as a child node of [VehicleBody] and simulates the behaviour of one of its wheels. This node also acts as a collider to detect if the wheel is touching a surface.
+ This node needs to be used as a child node of [VehicleBody] and simulates the behaviour of one of its wheels. This node also acts as a collider to detect if the wheel is touching a surface.
</description>
<tutorials>
</tutorials>
@@ -34,7 +34,7 @@
The damping applied to the spring when relaxing. This value should be between 0.0 (no damping) and 1.0. This value should always be slighly higher then the [member damping_compression] property. For a [member damping_compression] value of 0.3, try a relaxation value of 0.5
</member>
<member name="suspension_max_force" type="float" setter="set_suspension_max_force" getter="get_suspension_max_force">
- The maximum force the spring can resist. This value should be higher then a quarter of the [member RigidBody.mass] of the [VehicleBody] or the spring will not carry the weight of the vehicle. Good results are often obtained by a value that is about 3x to 4x this number.
+ The maximum force the spring can resist. This value should be higher then a quarter of the [member RigidBody.mass] of the [VehicleBody] or the spring will not carry the weight of the vehicle. Good results are often obtained by a value that is about 3x to 4x this number.
</member>
<member name="suspension_stiffness" type="float" setter="set_suspension_stiffness" getter="get_suspension_stiffness">
This value defines the stiffness of the suspension. Use a value lower then 50 for an offroad car, a value between 50 and 100 for a race car and try something around 200 for something like a Formula 1 car.
@@ -56,7 +56,7 @@
The radius of the wheel in meters.
</member>
<member name="wheel_rest_length" type="float" setter="set_suspension_rest_length" getter="get_suspension_rest_length">
- This is the distance in meters the wheel is lowered from its origin point. Don't set this to 0.0 and move the wheel into position, instead move the origin point of your wheel (the gizmo in Godot) to the position the wheel will take when bottoming out, then use the rest lenght to move the wheel down to the position it should be in when the car is in rest.
+ This is the distance in meters the wheel is lowered from its origin point. Don't set this to 0.0 and move the wheel into position, instead move the origin point of your wheel (the gizmo in Godot) to the position the wheel will take when bottoming out, then use the rest lenght to move the wheel down to the position it should be in when the car is in rest.
</member>
<member name="wheel_roll_influence" type="float" setter="set_roll_influence" getter="get_roll_influence">
This value effects the roll of your vehicle. If set to 0.0 for all wheels your vehicle will be prone to rolling over while a value of 1.0 will resist body roll.
diff --git a/doc/classes/VisualServer.xml b/doc/classes/VisualServer.xml
index 505a3d1474..b709883dad 100644
--- a/doc/classes/VisualServer.xml
+++ b/doc/classes/VisualServer.xml
@@ -175,7 +175,9 @@
</argument>
<argument index="1" name="mesh" type="RID">
</argument>
- <argument index="2" name="skeleton" type="RID">
+ <argument index="2" name="texture" type="RID">
+ </argument>
+ <argument index="3" name="normal_map" type="RID">
</argument>
<description>
Adds a [Mesh] to the [CanvasItem]'s draw commands. Only affects its aabb at the moment.
@@ -188,7 +190,9 @@
</argument>
<argument index="1" name="mesh" type="RID">
</argument>
- <argument index="2" name="skeleton" type="RID">
+ <argument index="2" name="texture" type="RID">
+ </argument>
+ <argument index="3" name="normal_map" type="RID">
</argument>
<description>
Adds a [MultiMesh] to the [CanvasItem]'s draw commands. Only affects its aabb at the moment.
diff --git a/servers/visual_server.cpp b/servers/visual_server.cpp
index 47577a3359..f8640720cb 100644
--- a/servers/visual_server.cpp
+++ b/servers/visual_server.cpp
@@ -1828,8 +1828,8 @@ void VisualServer::_bind_methods() {
ClassDB::bind_method(D_METHOD("canvas_item_add_primitive", "item", "points", "colors", "uvs", "texture", "width", "normal_map"), &VisualServer::canvas_item_add_primitive, DEFVAL(1.0), DEFVAL(RID()));
ClassDB::bind_method(D_METHOD("canvas_item_add_polygon", "item", "points", "colors", "uvs", "texture", "normal_map", "antialiased"), &VisualServer::canvas_item_add_polygon, DEFVAL(Vector<Point2>()), DEFVAL(RID()), DEFVAL(RID()), DEFVAL(false));
ClassDB::bind_method(D_METHOD("canvas_item_add_triangle_array", "item", "indices", "points", "colors", "uvs", "texture", "count", "normal_map"), &VisualServer::canvas_item_add_triangle_array, DEFVAL(Vector<Point2>()), DEFVAL(RID()), DEFVAL(-1), DEFVAL(RID()));
- ClassDB::bind_method(D_METHOD("canvas_item_add_mesh", "item", "mesh", "skeleton"), &VisualServer::canvas_item_add_mesh, DEFVAL(RID()));
- ClassDB::bind_method(D_METHOD("canvas_item_add_multimesh", "item", "mesh", "skeleton"), &VisualServer::canvas_item_add_multimesh, DEFVAL(RID()));
+ ClassDB::bind_method(D_METHOD("canvas_item_add_mesh", "item", "mesh", "texture", "normal_map"), &VisualServer::canvas_item_add_mesh, DEFVAL(RID()));
+ ClassDB::bind_method(D_METHOD("canvas_item_add_multimesh", "item", "mesh", "texture", "normal_map"), &VisualServer::canvas_item_add_multimesh, DEFVAL(RID()));
ClassDB::bind_method(D_METHOD("canvas_item_add_particles", "item", "particles", "texture", "normal_map", "h_frames", "v_frames"), &VisualServer::canvas_item_add_particles);
ClassDB::bind_method(D_METHOD("canvas_item_add_set_transform", "item", "transform"), &VisualServer::canvas_item_add_set_transform);
ClassDB::bind_method(D_METHOD("canvas_item_add_clip_ignore", "item", "ignore"), &VisualServer::canvas_item_add_clip_ignore);