diff options
Diffstat (limited to 'doc/classes')
-rw-r--r-- | doc/classes/Expression.xml | 4 | ||||
-rw-r--r-- | doc/classes/Image.xml | 8 | ||||
-rw-r--r-- | doc/classes/MultiMesh.xml | 19 | ||||
-rw-r--r-- | doc/classes/PhysicsDirectSpaceState.xml | 2 | ||||
-rw-r--r-- | doc/classes/ResourcePreloader.xml | 13 |
5 files changed, 35 insertions, 11 deletions
diff --git a/doc/classes/Expression.xml b/doc/classes/Expression.xml index c5f71fe55e..78623b359e 100644 --- a/doc/classes/Expression.xml +++ b/doc/classes/Expression.xml @@ -16,7 +16,7 @@ func _on_text_entered(command): var error = expression.parse(command, []) if error != OK: - print(get_error_text()) + print(expression.get_error_text()) return var result = expression.execute([], null, true) if not expression.has_execute_failed(): @@ -39,6 +39,7 @@ </argument> <description> Executes the expression that was previously parsed by [method parse] and returns the result. Before you use the returned object, you should check if the method failed by calling [method has_execute_failed]. + If you defined input variables in [method parse], you can specify their values in the inputs array, in the same order. </description> </method> <method name="get_error_text" qualifiers="const"> @@ -64,6 +65,7 @@ </argument> <description> Parses the expression and returns a [enum @GlobalScope.Error]. + You can optionally specify names of variables that may appear in the expression with [code]input_names[/code], so that you can bind them when it gets executed. </description> </method> </methods> diff --git a/doc/classes/Image.xml b/doc/classes/Image.xml index 56accdcd9e..8868dd778d 100644 --- a/doc/classes/Image.xml +++ b/doc/classes/Image.xml @@ -4,7 +4,7 @@ Image datatype. </brief_description> <description> - Native image datatype. Contains image data, which can be converted to a [Texture], and several functions to interact with it. The maximum width and height for an [code]Image[/code] is 16384 pixels. + Native image datatype. Contains image data, which can be converted to a [Texture], and several functions to interact with it. The maximum width and height for an [code]Image[/code] are [constant MAX_WIDTH] and [constant MAX_HEIGHT]. </description> <tutorials> </tutorials> @@ -476,6 +476,12 @@ </member> </members> <constants> + <constant name="MAX_WIDTH" value="16384"> + The maximal width allowed for [code]Image[/code] resources. + </constant> + <constant name="MAX_HEIGHT" value="16384"> + The maximal height allowed for [code]Image[/code] resources. + </constant> <constant name="FORMAT_L8" value="0" enum="Format"> </constant> <constant name="FORMAT_LA8" value="1" enum="Format"> diff --git a/doc/classes/MultiMesh.xml b/doc/classes/MultiMesh.xml index 1908fdd684..7986461840 100644 --- a/doc/classes/MultiMesh.xml +++ b/doc/classes/MultiMesh.xml @@ -4,8 +4,8 @@ Provides high performance mesh instancing. </brief_description> <description> - MultiMesh provides low level mesh instancing. If the amount of [Mesh] instances needed goes from hundreds to thousands (and most need to be visible at close proximity) creating such a large amount of [MeshInstance] nodes may affect performance by using too much CPU or video memory. - For this case a MultiMesh becomes very useful, as it can draw thousands of instances with little API overhead. + MultiMesh provides low level mesh instancing. Drawing thousands of [MeshInstance] nodes can be slow because each object is submitted to the GPU to be drawn individually. + MultiMesh is much faster because it can draw thousands of instances with a single draw call, resulting in less API overhead. As a drawback, if the instances are too far away of each other, performance may be reduced as every single instance will always rendered (they are spatially indexed as one, for the whole object). Since instances may have any behavior, the AABB used for visibility must be provided by the user. </description> @@ -36,6 +36,7 @@ <argument index="0" name="instance" type="int"> </argument> <description> + Return the custom data that has been set for a specific instance. </description> </method> <method name="get_instance_transform" qualifiers="const"> @@ -66,6 +67,7 @@ <argument index="1" name="custom_data" type="Color"> </argument> <description> + Set custom data for a specific instance. Although [Color] is used, it is just a container for 4 numbers. </description> </method> <method name="set_instance_transform"> @@ -82,32 +84,45 @@ </methods> <members> <member name="color_format" type="int" setter="set_color_format" getter="get_color_format" enum="MultiMesh.ColorFormat"> + Format of colors in color array that gets passed to shader. </member> <member name="custom_data_format" type="int" setter="set_custom_data_format" getter="get_custom_data_format" enum="MultiMesh.CustomDataFormat"> + Format of custom data in custom data array that gets passed to shader. </member> <member name="instance_count" type="int" setter="set_instance_count" getter="get_instance_count"> + Number of instances that will get drawn. </member> <member name="mesh" type="Mesh" setter="set_mesh" getter="get_mesh"> + Mesh to be drawn. </member> <member name="transform_format" type="int" setter="set_transform_format" getter="get_transform_format" enum="MultiMesh.TransformFormat"> + Format of transform used to transform mesh, either 2D or 3D. </member> </members> <constants> <constant name="TRANSFORM_2D" value="0" enum="TransformFormat"> + Use this when using 2D transforms. </constant> <constant name="TRANSFORM_3D" value="1" enum="TransformFormat"> + Use this when using 3D transforms. </constant> <constant name="COLOR_NONE" value="0" enum="ColorFormat"> + Use when you are not using per-instance [Color]s. </constant> <constant name="COLOR_8BIT" value="1" enum="ColorFormat"> + Compress [Color] data into 8 bits when passing to shader. This uses less memory and can be faster, but the [Color] loses precision. </constant> <constant name="COLOR_FLOAT" value="2" enum="ColorFormat"> + The [Color] passed into [method set_instance_color] will use 4 floats. Use this for highest precision [Color]. </constant> <constant name="CUSTOM_DATA_NONE" value="0" enum="CustomDataFormat"> + Use when you are not using per-instance custom data. </constant> <constant name="CUSTOM_DATA_8BIT" value="1" enum="CustomDataFormat"> + Compress custom_data into 8 bits when passing to shader. This uses less memory and can be faster, but loses precision. </constant> <constant name="CUSTOM_DATA_FLOAT" value="2" enum="CustomDataFormat"> + The [Color] passed into [method set_instance_custom_data] will use 4 floats. Use this for highest precision. </constant> </constants> </class> diff --git a/doc/classes/PhysicsDirectSpaceState.xml b/doc/classes/PhysicsDirectSpaceState.xml index c4dc103b72..118010b3cf 100644 --- a/doc/classes/PhysicsDirectSpaceState.xml +++ b/doc/classes/PhysicsDirectSpaceState.xml @@ -21,7 +21,7 @@ </argument> <description> Checks whether the shape can travel to a point. The method will return an array with two floats between 0 and 1, both representing a fraction of [code]motion[/code]. The first is how far the shape can move without triggering a collision, and the second is the point at which a collision will occur. If no collision is detected, the returned array will be [code][1, 1][/code]. - If the shape can not move, the returned array will be [code][0, 0][/code]. + If the shape can not move, the returned array will be [code][0, 0][/code] under Bullet, and empty under GodotPhysics. </description> </method> <method name="collide_shape"> diff --git a/doc/classes/ResourcePreloader.xml b/doc/classes/ResourcePreloader.xml index 002bcd891a..18d6e04d8e 100644 --- a/doc/classes/ResourcePreloader.xml +++ b/doc/classes/ResourcePreloader.xml @@ -4,7 +4,7 @@ Resource Preloader Node. </brief_description> <description> - Resource Preloader Node. This node is used to preload sub-resources inside a scene, so when the scene is loaded all the resources are ready to use and be retrieved from here. + This node is used to preload sub-resources inside a scene, so when the scene is loaded, all the resources are ready to use and can be retrieved from the preloader. </description> <tutorials> </tutorials> @@ -19,6 +19,7 @@ <argument index="1" name="resource" type="Resource"> </argument> <description> + Adds a resource to the preloader with the given [code]name[/code]. If a resource with the given [code]name[/code] already exists, the new resource will be renamed to "[code]name[/code] N" where N is an incrementing number starting from 2. </description> </method> <method name="get_resource" qualifiers="const"> @@ -27,14 +28,14 @@ <argument index="0" name="name" type="String"> </argument> <description> - Return the resource given a text-id. + Returns the resource associated to [code]name[/code]. </description> </method> <method name="get_resource_list" qualifiers="const"> <return type="PoolStringArray"> </return> <description> - Return the list of resources inside the preloader. + Returns the list of resources inside the preloader. </description> </method> <method name="has_resource" qualifiers="const"> @@ -43,7 +44,7 @@ <argument index="0" name="name" type="String"> </argument> <description> - Return true if the preloader has a given resource. + Returns true if the preloader contains a resource associated to [code]name[/code]. </description> </method> <method name="remove_resource"> @@ -52,7 +53,7 @@ <argument index="0" name="name" type="String"> </argument> <description> - Remove a resource from the preloader by text id. + Removes the resource associated to [code]name[/code] from the preloader. </description> </method> <method name="rename_resource"> @@ -63,7 +64,7 @@ <argument index="1" name="newname" type="String"> </argument> <description> - Rename a resource inside the preloader, from a text-id to a new text-id. + Renames a resource inside the preloader from [code]name[/code] to [code]newname[/code]. </description> </method> </methods> |