Skip to content

Commit

Permalink
Merge #728
Browse files Browse the repository at this point in the history
728: Update to Godot 3.3 r=toasteater a=jdfreder

Hi, thanks for the great bindings!

Now that Godot 3.3 is the stable branch I thought that it made sense to update my local copy. Just upstreaming it incase it saves you time.

Tested: 
`cargo test`
I also verified that the hello-world example runs in the Godot IDE

Co-authored-by: Jonathan Frederic <jfrederic@google.com>
  • Loading branch information
bors[bot] and jdfreder committed Apr 28, 2021
2 parents 37a35c5 + 6fce91d commit 6a1af86
Show file tree
Hide file tree
Showing 562 changed files with 5,993 additions and 1,705 deletions.
3,485 changes: 3,179 additions & 306 deletions gdnative-bindings/api.json

Large diffs are not rendered by default.

47 changes: 40 additions & 7 deletions gdnative-bindings/docs/@GlobalScope.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="@GlobalScope" version="3.2">
<class name="@GlobalScope" version="3.3">
<brief_description>
Global scope constants and variables.
</brief_description>
Expand Down Expand Up @@ -30,9 +30,6 @@
<member name="Geometry" type="Geometry" setter="" getter="">
The [Geometry] singleton.
</member>
<member name="GodotSharp" type="GodotSharp" setter="" getter="">
The [GodotSharp] singleton.
</member>
<member name="IP" type="IP" setter="" getter="">
The [IP] singleton.
</member>
Expand Down Expand Up @@ -988,7 +985,25 @@
<constant name="JOY_BUTTON_15" value="15" enum="JoystickList">
Gamepad button 15.
</constant>
<constant name="JOY_BUTTON_MAX" value="16" enum="JoystickList">
<constant name="JOY_BUTTON_16" value="16" enum="JoystickList">
Gamepad button 16.
</constant>
<constant name="JOY_BUTTON_17" value="17" enum="JoystickList">
Gamepad button 17.
</constant>
<constant name="JOY_BUTTON_18" value="18" enum="JoystickList">
Gamepad button 18.
</constant>
<constant name="JOY_BUTTON_19" value="19" enum="JoystickList">
Gamepad button 19.
</constant>
<constant name="JOY_BUTTON_20" value="20" enum="JoystickList">
Gamepad button 20.
</constant>
<constant name="JOY_BUTTON_21" value="21" enum="JoystickList">
Gamepad button 21.
</constant>
<constant name="JOY_BUTTON_MAX" value="22" enum="JoystickList">
Represents the maximum number of joystick buttons supported.
</constant>
<constant name="JOY_SONY_CIRCLE" value="1" enum="JoystickList">
Expand Down Expand Up @@ -1066,6 +1081,24 @@
<constant name="JOY_DPAD_RIGHT" value="15" enum="JoystickList">
Gamepad DPad right.
</constant>
<constant name="JOY_MISC1" value="16" enum="JoystickList">
Gamepad SDL miscellaneous button.
</constant>
<constant name="JOY_PADDLE1" value="17" enum="JoystickList">
Gamepad SDL paddle 1 button.
</constant>
<constant name="JOY_PADDLE2" value="18" enum="JoystickList">
Gamepad SDL paddle 2 button.
</constant>
<constant name="JOY_PADDLE3" value="19" enum="JoystickList">
Gamepad SDL paddle 3 button.
</constant>
<constant name="JOY_PADDLE4" value="20" enum="JoystickList">
Gamepad SDL paddle 4 button.
</constant>
<constant name="JOY_TOUCHPAD" value="21" enum="JoystickList">
Gamepad SDL touchpad button.
</constant>
<constant name="JOY_L" value="4" enum="JoystickList">
Gamepad left Shoulder button.
</constant>
Expand Down Expand Up @@ -1174,10 +1207,10 @@
[codeblock]
var err = method_that_returns_error()
if err != OK:
print("Failure!)
print("Failure!")
# Or, equivalent:
if err:
print("Still failing!)
print("Still failing!")
[/codeblock]
</constant>
<constant name="FAILED" value="1" enum="Error">
Expand Down
12 changes: 8 additions & 4 deletions gdnative-bindings/docs/AABB.xml
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="AABB" version="3.2">
<class name="AABB" version="3.3">
<brief_description>
Axis-Aligned Bounding Box.
</brief_description>
<description>
AABB consists of a position, a size, and several utility functions. It is typically used for fast overlap tests.
[AABB] consists of a position, a size, and several utility functions. It is typically used for fast overlap tests.
It uses floating-point coordinates. The 2D counterpart to [AABB] is [Rect2].
[b]Note:[/b] Unlike [Rect2], [AABB] does not have a variant that uses integer coordinates.
</description>
<tutorials>
<link>https://docs.godotengine.org/en/latest/tutorials/math/index.html</link>
<link title="Math tutorial index">https://docs.godotengine.org/en/3.3/tutorials/math/index.html</link>
<link title="Vector math">https://docs.godotengine.org/en/3.3/tutorials/math/vector_math.html</link>
<link title="Advanced vector math">https://docs.godotengine.org/en/3.3/tutorials/math/vectors_advanced.html</link>
</tutorials>
<methods>
<method name="AABB">
Expand Down Expand Up @@ -210,7 +214,7 @@
Beginning corner. Typically has values lower than [member end].
</member>
<member name="size" type="Vector3" setter="" getter="" default="Vector3( 0, 0, 0 )">
Size from [member position] to [member end]. Typically all components are positive.
Size from [member position] to [member end]. Typically, all components are positive.
If the size is negative, you can use [method abs] to fix it.
</member>
</members>
Expand Down
2 changes: 1 addition & 1 deletion gdnative-bindings/docs/ARVRAnchor.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="ARVRAnchor" inherits="Spatial" version="3.2">
<class name="ARVRAnchor" inherits="Spatial" version="3.3">
<brief_description>
An anchor point in AR space.
</brief_description>
Expand Down
4 changes: 2 additions & 2 deletions gdnative-bindings/docs/ARVRCamera.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="ARVRCamera" inherits="Camera" version="3.2">
<class name="ARVRCamera" inherits="Camera" version="3.3">
<brief_description>
A camera node with a few overrules for AR/VR applied, such as location tracking.
</brief_description>
Expand All @@ -8,7 +8,7 @@
The position and orientation of this node is automatically updated by the ARVR Server to represent the location of the HMD if such tracking is available and can thus be used by game logic. Note that, in contrast to the ARVR Controller, the render thread has access to the most up-to-date tracking data of the HMD and the location of the ARVRCamera can lag a few milliseconds behind what is used for rendering as a result.
</description>
<tutorials>
<link>https://docs.godotengine.org/en/latest/tutorials/vr/index.html</link>
<link>https://docs.godotengine.org/en/3.3/tutorials/vr/index.html</link>
</tutorials>
<methods>
</methods>
Expand Down
4 changes: 2 additions & 2 deletions gdnative-bindings/docs/ARVRController.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="ARVRController" inherits="Spatial" version="3.2">
<class name="ARVRController" inherits="Spatial" version="3.3">
<brief_description>
A spatial node representing a spatially-tracked controller.
</brief_description>
Expand All @@ -9,7 +9,7 @@
The position of the controller node is automatically updated by the [ARVRServer]. This makes this node ideal to add child nodes to visualize the controller.
</description>
<tutorials>
<link>https://docs.godotengine.org/en/latest/tutorials/vr/index.html</link>
<link>https://docs.godotengine.org/en/3.3/tutorials/vr/index.html</link>
</tutorials>
<methods>
<method name="get_controller_name" qualifiers="const">
Expand Down
4 changes: 2 additions & 2 deletions gdnative-bindings/docs/ARVRInterface.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="ARVRInterface" inherits="Reference" version="3.2">
<class name="ARVRInterface" inherits="Reference" version="3.3">
<brief_description>
Base class for an AR/VR interface implementation.
</brief_description>
Expand All @@ -8,7 +8,7 @@
Interfaces should be written in such a way that simply enabling them will give us a working setup. You can query the available interfaces through [ARVRServer].
</description>
<tutorials>
<link>https://docs.godotengine.org/en/latest/tutorials/vr/index.html</link>
<link>https://docs.godotengine.org/en/3.3/tutorials/vr/index.html</link>
</tutorials>
<methods>
<method name="get_camera_feed_id">
Expand Down
4 changes: 2 additions & 2 deletions gdnative-bindings/docs/ARVROrigin.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="ARVROrigin" inherits="Spatial" version="3.2">
<class name="ARVROrigin" inherits="Spatial" version="3.3">
<brief_description>
The origin point in AR/VR.
</brief_description>
Expand All @@ -10,7 +10,7 @@
For example, if your character is driving a car, the ARVROrigin node should be a child node of this car. Or, if you're implementing a teleport system to move your character, you should change the position of this node.
</description>
<tutorials>
<link>https://docs.godotengine.org/en/latest/tutorials/vr/index.html</link>
<link>https://docs.godotengine.org/en/3.3/tutorials/vr/index.html</link>
</tutorials>
<methods>
</methods>
Expand Down
4 changes: 2 additions & 2 deletions gdnative-bindings/docs/ARVRPositionalTracker.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="ARVRPositionalTracker" inherits="Object" version="3.2">
<class name="ARVRPositionalTracker" inherits="Object" version="3.3">
<brief_description>
A tracked object.
</brief_description>
Expand All @@ -9,7 +9,7 @@
The [ARVRController] and [ARVRAnchor] both consume objects of this type and should be used in your project. The positional trackers are just under-the-hood objects that make this all work. These are mostly exposed so that GDNative-based interfaces can interact with them.
</description>
<tutorials>
<link>https://docs.godotengine.org/en/latest/tutorials/vr/index.html</link>
<link>https://docs.godotengine.org/en/3.3/tutorials/vr/index.html</link>
</tutorials>
<methods>
<method name="get_hand" qualifiers="const">
Expand Down
4 changes: 2 additions & 2 deletions gdnative-bindings/docs/ARVRServer.xml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="ARVRServer" inherits="Object" version="3.2">
<class name="ARVRServer" inherits="Object" version="3.3">
<brief_description>
Server for AR and VR features.
</brief_description>
<description>
The AR/VR server is the heart of our Advanced and Virtual Reality solution and handles all the processing.
</description>
<tutorials>
<link>https://docs.godotengine.org/en/latest/tutorials/vr/index.html</link>
<link>https://docs.godotengine.org/en/3.3/tutorials/vr/index.html</link>
</tutorials>
<methods>
<method name="center_on_hmd">
Expand Down
11 changes: 7 additions & 4 deletions gdnative-bindings/docs/AStar.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="AStar" inherits="Reference" version="3.2">
<class name="AStar" inherits="Reference" version="3.3">
<brief_description>
An implementation of A* to find shortest paths among connected points in space.
An implementation of A* to find the shortest paths among connected points in space.
</brief_description>
<description>
A* (A star) is a computer algorithm that is widely used in pathfinding and graph traversal, the process of plotting short paths among vertices (points), passing through a given set of edges (segments). It enjoys widespread use due to its performance and accuracy. Godot's A* implementation uses points in three-dimensional space and Euclidean distances by default.
Expand All @@ -18,6 +18,7 @@
return min(0, abs(u - v) - 1)
[/codeblock]
[method _estimate_cost] should return a lower bound of the distance, i.e. [code]_estimate_cost(u, v) &lt;= _compute_cost(u, v)[/code]. This serves as a hint to the algorithm because the custom [code]_compute_cost[/code] might be computation-heavy. If this is not the case, make [method _estimate_cost] return the same value as [method _compute_cost] to provide the algorithm with the most accurate information.
If the default [method _estimate_cost] and [method _compute_cost] methods are used, or if the supplied [method _estimate_cost] method returns a lower bound of the cost, then the paths returned by A* will be the lowest cost paths. Here, the cost of a path equals to the sum of the [method _compute_cost] results of all segments in the path multiplied by the [code]weight_scale[/code]s of the end points of the respective segments. If the default methods are used and the [code]weight_scale[/code]s of all points are set to [code]1.0[/code], then this equals to the sum of Euclidean distances of all segments in the path.
</description>
<tutorials>
</tutorials>
Expand Down Expand Up @@ -56,7 +57,8 @@
<argument index="2" name="weight_scale" type="float" default="1.0">
</argument>
<description>
Adds a new point at the given position with the given identifier. The algorithm prefers points with lower [code]weight_scale[/code] to form a path. The [code]id[/code] must be 0 or larger, and the [code]weight_scale[/code] must be 1 or larger.
Adds a new point at the given position with the given identifier. The [code]id[/code] must be 0 or larger, and the [code]weight_scale[/code] must be 1 or larger.
The [code]weight_scale[/code] is multiplied by the result of [method _compute_cost] when determining the overall cost of traveling across a segment from a neighboring point to this point. Thus, all else being equal, the algorithm prefers points with lower [code]weight_scale[/code]s to form a path.
[codeblock]
var astar = AStar.new()
astar.add_point(1, Vector3(1, 0, 0), 4) # Adds the point (1, 0, 0) with weight_scale 4 and id 1
Expand Down Expand Up @@ -222,6 +224,7 @@
</argument>
<description>
Returns an array with the points that are in the path found by AStar between the given points. The array is ordered from the starting point to the ending point of the path.
[b]Note:[/b] This method is not thread-safe. If called from a [Thread], it will return an empty [PoolVector3Array] and will print an error message.
</description>
</method>
<method name="get_point_position" qualifiers="const">
Expand Down Expand Up @@ -315,7 +318,7 @@
<argument index="1" name="weight_scale" type="float">
</argument>
<description>
Sets the [code]weight_scale[/code] for the point with the given [code]id[/code].
Sets the [code]weight_scale[/code] for the point with the given [code]id[/code]. The [code]weight_scale[/code] is multiplied by the result of [method _compute_cost] when determining the overall cost of traveling across a segment from a neighboring point to this point.
</description>
</method>
</methods>
Expand Down
8 changes: 5 additions & 3 deletions gdnative-bindings/docs/AStar2D.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="AStar2D" inherits="Reference" version="3.2">
<class name="AStar2D" inherits="Reference" version="3.3">
<brief_description>
AStar class representation that uses 2D vectors as edges.
</brief_description>
Expand Down Expand Up @@ -43,7 +43,8 @@
<argument index="2" name="weight_scale" type="float" default="1.0">
</argument>
<description>
Adds a new point at the given position with the given identifier. The algorithm prefers points with lower [code]weight_scale[/code] to form a path. The [code]id[/code] must be 0 or larger, and the [code]weight_scale[/code] must be 1 or larger.
Adds a new point at the given position with the given identifier. The [code]id[/code] must be 0 or larger, and the [code]weight_scale[/code] must be 1 or larger.
The [code]weight_scale[/code] is multiplied by the result of [method _compute_cost] when determining the overall cost of traveling across a segment from a neighboring point to this point. Thus, all else being equal, the algorithm prefers points with lower [code]weight_scale[/code]s to form a path.
[codeblock]
var astar = AStar2D.new()
astar.add_point(1, Vector2(1, 0), 4) # Adds the point (1, 0) with weight_scale 4 and id 1
Expand Down Expand Up @@ -205,6 +206,7 @@
</argument>
<description>
Returns an array with the points that are in the path found by AStar2D between the given points. The array is ordered from the starting point to the ending point of the path.
[b]Note:[/b] This method is not thread-safe. If called from a [Thread], it will return an empty [PoolVector2Array] and will print an error message.
</description>
</method>
<method name="get_point_position" qualifiers="const">
Expand Down Expand Up @@ -298,7 +300,7 @@
<argument index="1" name="weight_scale" type="float">
</argument>
<description>
Sets the [code]weight_scale[/code] for the point with the given [code]id[/code].
Sets the [code]weight_scale[/code] for the point with the given [code]id[/code]. The [code]weight_scale[/code] is multiplied by the result of [method _compute_cost] when determining the overall cost of traveling across a segment from a neighboring point to this point.
</description>
</method>
</methods>
Expand Down
2 changes: 1 addition & 1 deletion gdnative-bindings/docs/AcceptDialog.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="AcceptDialog" inherits="WindowDialog" version="3.2">
<class name="AcceptDialog" inherits="WindowDialog" version="3.3">
<brief_description>
Base dialog for user notification.
</brief_description>
Expand Down
5 changes: 3 additions & 2 deletions gdnative-bindings/docs/AnimatedSprite.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="AnimatedSprite" inherits="Node2D" version="3.2">
<class name="AnimatedSprite" inherits="Node2D" version="3.3">
<brief_description>
Sprite node that can use multiple textures for animation.
</brief_description>
Expand All @@ -8,7 +8,8 @@
[b]Note:[/b] You can associate a set of normal maps by creating additional [SpriteFrames] resources with a [code]_normal[/code] suffix. For example, having 2 [SpriteFrames] resources [code]run[/code] and [code]run_normal[/code] will make it so the [code]run[/code] animation uses the normal map.
</description>
<tutorials>
<link title="2D Sprite animation">https://docs.godotengine.org/en/latest/tutorials/2d/2d_sprite_animation.html</link>
<link title="2D Sprite animation">https://docs.godotengine.org/en/3.3/tutorials/2d/2d_sprite_animation.html</link>
<link title="2D Dodge The Creeps Demo">https://godotengine.org/asset-library/asset/515</link>
</tutorials>
<methods>
<method name="is_playing" qualifiers="const">
Expand Down
9 changes: 7 additions & 2 deletions gdnative-bindings/docs/AnimatedSprite3D.xml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="AnimatedSprite3D" inherits="SpriteBase3D" version="3.2">
<class name="AnimatedSprite3D" inherits="SpriteBase3D" version="3.3">
<brief_description>
2D sprite node in 3D world, that can use multiple 2D textures for animation.
</brief_description>
<description>
Animations are created using a [SpriteFrames] resource, which can be configured in the editor via the SpriteFrames panel.
</description>
<tutorials>
<link title="2D Sprite animation (also applies to 3D)">https://docs.godotengine.org/en/latest/tutorials/2d/2d_sprite_animation.html</link>
<link title="2D Sprite animation (also applies to 3D)">https://docs.godotengine.org/en/3.3/tutorials/2d/2d_sprite_animation.html</link>
</tutorials>
<methods>
<method name="is_playing" qualifiers="const">
Expand Down Expand Up @@ -49,6 +49,11 @@
</member>
</members>
<signals>
<signal name="animation_finished">
<description>
Emitted when the animation is finished (when it plays the last frame). If the animation is looping, this signal is emitted every time the last frame is drawn.
</description>
</signal>
<signal name="frame_changed">
<description>
Emitted when [member frame] changed.
Expand Down
2 changes: 1 addition & 1 deletion gdnative-bindings/docs/AnimatedTexture.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="AnimatedTexture" inherits="Texture" version="3.2">
<class name="AnimatedTexture" inherits="Texture" version="3.3">
<brief_description>
Proxy texture for simple frame-based animations.
</brief_description>
Expand Down
Loading

0 comments on commit 6a1af86

Please sign in to comment.