diff options
Diffstat (limited to 'doc')
26 files changed, 162 insertions, 31 deletions
diff --git a/doc/classes/ArrayMesh.xml b/doc/classes/ArrayMesh.xml index 62ff0edbd2..e3e9c38419 100644 --- a/doc/classes/ArrayMesh.xml +++ b/doc/classes/ArrayMesh.xml @@ -23,6 +23,7 @@ The [code]MeshInstance[/code] is ready to be added to the SceneTree to be shown. </description> <tutorials> + <link>http://docs.godotengine.org/en/latest/tutorials/content/procedural_geometry/arraymesh.html</link> </tutorials> <methods> <method name="add_blend_shape"> @@ -185,6 +186,7 @@ </methods> <members> <member name="blend_shape_mode" type="int" setter="set_blend_shape_mode" getter="get_blend_shape_mode" enum="Mesh.BlendShapeMode" default="1"> + Sets the blend shape mode to one of [enum Mesh.BlendShapeMode]. </member> <member name="custom_aabb" type="AABB" setter="set_custom_aabb" getter="get_custom_aabb" default="AABB( 0, 0, 0, 0, 0, 0 )"> Overrides the [AABB] with one defined by user for use with frustum culling. Especially useful to avoid unexpected culling when using a shader to offset vertices. diff --git a/doc/classes/CPUParticles.xml b/doc/classes/CPUParticles.xml index e68b0feb2d..cef0ee7587 100644 --- a/doc/classes/CPUParticles.xml +++ b/doc/classes/CPUParticles.xml @@ -367,5 +367,8 @@ <constant name="EMISSION_SHAPE_DIRECTED_POINTS" value="4" enum="EmissionShape"> Particles will be emitted at a position chosen randomly among [member emission_points]. Particle velocity and rotation will be set based on [member emission_normals]. Particle color will be modulated by [member emission_colors]. </constant> + <constant name="EMISSION_SHAPE_MAX" value="5" enum="EmissionShape"> + Represents the size of the [enum EmissionShape] enum. + </constant> </constants> </class> diff --git a/doc/classes/CPUParticles2D.xml b/doc/classes/CPUParticles2D.xml index c8dbffb4cb..dac00051a9 100644 --- a/doc/classes/CPUParticles2D.xml +++ b/doc/classes/CPUParticles2D.xml @@ -360,5 +360,8 @@ <constant name="EMISSION_SHAPE_DIRECTED_POINTS" value="4" enum="EmissionShape"> Particles will be emitted at a position chosen randomly among [member emission_points]. Particle velocity and rotation will be set based on [member emission_normals]. Particle color will be modulated by [member emission_colors]. </constant> + <constant name="EMISSION_SHAPE_MAX" value="5" enum="EmissionShape"> + Represents the size of the [enum EmissionShape] enum. + </constant> </constants> </class> diff --git a/doc/classes/Crypto.xml b/doc/classes/Crypto.xml index bce7895973..bb2c443618 100644 --- a/doc/classes/Crypto.xml +++ b/doc/classes/Crypto.xml @@ -22,6 +22,7 @@ key.save("user://generated.key") cert.save("user://generated.crt") [/codeblock] + [b]Note:[/b] Not available in HTML5 exports. </description> <tutorials> </tutorials> diff --git a/doc/classes/CryptoKey.xml b/doc/classes/CryptoKey.xml index 8c825c9e1c..8feb7d4809 100644 --- a/doc/classes/CryptoKey.xml +++ b/doc/classes/CryptoKey.xml @@ -6,6 +6,7 @@ <description> The CryptoKey class represents a cryptographic key. Keys can be loaded and saved like any other [Resource]. They can be used to generate a self-signed [X509Certificate] via [method Crypto.generate_self_signed_certificate] and as private key in [method StreamPeerSSL.accept_stream] along with the appropriate certificate. + [b]Note:[/b] Not available in HTML5 exports. </description> <tutorials> </tutorials> diff --git a/doc/classes/Engine.xml b/doc/classes/Engine.xml index 04e203793b..53ddde0e4a 100644 --- a/doc/classes/Engine.xml +++ b/doc/classes/Engine.xml @@ -41,7 +41,7 @@ <return type="int"> </return> <description> - Returns the total number of frames drawn. + Returns the total number of frames drawn. If the render loop is disabled with [code]--disable-render-loop[/code] via command line, this returns [code]0[/code]. See also [method get_idle_frames]. </description> </method> <method name="get_frames_per_second" qualifiers="const"> @@ -51,6 +51,13 @@ Returns the frames per second of the running game. </description> </method> + <method name="get_idle_frames" qualifiers="const"> + <return type="int"> + </return> + <description> + Returns the total number of frames passed since engine initialization which is advanced on each [b]idle frame[/b], regardless of whether the render loop is enabled. See also [method get_frames_drawn]. + </description> + </method> <method name="get_license_info" qualifiers="const"> <return type="Dictionary"> </return> @@ -72,6 +79,13 @@ Returns the main loop object (see [MainLoop] and [SceneTree]). </description> </method> + <method name="get_physics_frames" qualifiers="const"> + <return type="int"> + </return> + <description> + Returns the total number of frames passed since engine initialization which is advanced on each [b]physics frame[/b]. + </description> + </method> <method name="get_physics_interpolation_fraction" qualifiers="const"> <return type="float"> </return> diff --git a/doc/classes/Geometry.xml b/doc/classes/Geometry.xml index 3824baa4dc..dbc06f7c4f 100644 --- a/doc/classes/Geometry.xml +++ b/doc/classes/Geometry.xml @@ -1,8 +1,10 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="Geometry" inherits="Object" category="Core" version="3.2"> <brief_description> + Helper node to calculate generic geometry operations. </brief_description> <description> + Geometry provides users with a set of helper functions to create geometric shapes, compute intersections between shapes, and process various other geometric operations. </description> <tutorials> </tutorials> diff --git a/doc/classes/GeometryInstance.xml b/doc/classes/GeometryInstance.xml index 02f2c27043..980815e5fd 100644 --- a/doc/classes/GeometryInstance.xml +++ b/doc/classes/GeometryInstance.xml @@ -15,6 +15,7 @@ <argument index="0" name="flag" type="int" enum="GeometryInstance.Flags"> </argument> <description> + Returns the [enum GeometryInstance.Flags] that have been set for this object. </description> </method> <method name="set_custom_aabb"> @@ -34,6 +35,7 @@ <argument index="1" name="value" type="bool"> </argument> <description> + Sets the [enum GeometryInstance.Flags] specified. See [enum GeometryInstance.Flags] for options. </description> </method> </methods> diff --git a/doc/classes/HashingContext.xml b/doc/classes/HashingContext.xml index 802b186ef3..8a20eb99b8 100644 --- a/doc/classes/HashingContext.xml +++ b/doc/classes/HashingContext.xml @@ -27,6 +27,7 @@ # Print the result as hex string and array. printt(res.hex_encode(), Array(res)) [/codeblock] + [b]Note:[/b] Not available in HTML5 exports. </description> <tutorials> </tutorials> diff --git a/doc/classes/Image.xml b/doc/classes/Image.xml index 0303585120..612b9ed3f5 100644 --- a/doc/classes/Image.xml +++ b/doc/classes/Image.xml @@ -71,6 +71,7 @@ <argument index="0" name="bump_scale" type="float" default="1.0"> </argument> <description> + Converts a bumpmap to a normalmap. A bumpmap provides a height offset per-pixel, while a normalmap provides a normal direction per pixel. </description> </method> <method name="clear_mipmaps"> @@ -165,7 +166,7 @@ <return type="int" enum="Image.AlphaMode"> </return> <description> - Returns [constant ALPHA_BLEND] if the image has data for alpha values. Returns [constant ALPHA_BIT] if all the alpha values are below a certain threshold or the maximum value. Returns [constant ALPHA_NONE] if no data for alpha values is found. + Returns [constant ALPHA_BLEND] if the image has data for alpha values. Returns [constant ALPHA_BIT] if all the alpha values are stored in a single bit. Returns [constant ALPHA_NONE] if no data for alpha values is found. </description> </method> <method name="expand_x2_hq2x"> @@ -405,6 +406,7 @@ <return type="Image"> </return> <description> + Converts a standard RGBE (Red Green Blue Exponent) image to an sRGB image. </description> </method> <method name="save_exr" qualifiers="const"> @@ -502,8 +504,10 @@ The maximal height allowed for [Image] resources. </constant> <constant name="FORMAT_L8" value="0" enum="Format"> + Texture format with a single 8-bit depth representing luminance. </constant> <constant name="FORMAT_LA8" value="1" enum="Format"> + OpenGL texture format with two values, luminance and alpha each stored with 8 bits. </constant> <constant name="FORMAT_R8" value="2" enum="Format"> OpenGL texture format [code]RED[/code] with a single component and a bitdepth of 8. @@ -643,26 +647,37 @@ Performs Lanczos interpolation. This is the slowest image resizing mode, but it typically gives the best results, especially when downscalng images. </constant> <constant name="ALPHA_NONE" value="0" enum="AlphaMode"> + Image does not have alpha. </constant> <constant name="ALPHA_BIT" value="1" enum="AlphaMode"> + Image stores alpha in a single bit. </constant> <constant name="ALPHA_BLEND" value="2" enum="AlphaMode"> + Image uses alpha. </constant> <constant name="COMPRESS_S3TC" value="0" enum="CompressMode"> + Use S3TC compression. </constant> <constant name="COMPRESS_PVRTC2" value="1" enum="CompressMode"> + Use PVRTC2 compression. </constant> <constant name="COMPRESS_PVRTC4" value="2" enum="CompressMode"> + Use PVRTC4 compression. </constant> <constant name="COMPRESS_ETC" value="3" enum="CompressMode"> + Use ETC compression. </constant> <constant name="COMPRESS_ETC2" value="4" enum="CompressMode"> + Use ETC2 compression. </constant> <constant name="COMPRESS_SOURCE_GENERIC" value="0" enum="CompressSource"> + Source texture (before compression) is a regular texture. Default for all textures. </constant> <constant name="COMPRESS_SOURCE_SRGB" value="1" enum="CompressSource"> + Source texture (before compression) is in sRGB space. </constant> <constant name="COMPRESS_SOURCE_NORMAL" value="2" enum="CompressSource"> + Source texture (before compression) is a normal texture (e.g. it can be compressed into two channels). </constant> </constants> </class> diff --git a/doc/classes/KinematicBody.xml b/doc/classes/KinematicBody.xml index f796b15307..c32264221d 100644 --- a/doc/classes/KinematicBody.xml +++ b/doc/classes/KinematicBody.xml @@ -25,14 +25,14 @@ <return type="Vector3"> </return> <description> - Returns the normal vector of the floor. + Returns the surface normal of the floor at the last collision point. Only valid after calling [method move_and_slide] or [method move_and_slide_with_snap] and when [method is_on_floor] returns [code]true[/code]. </description> </method> <method name="get_floor_velocity" qualifiers="const"> <return type="Vector3"> </return> <description> - Returns the velocity of the floor. Only updates when calling [method move_and_slide]. + Returns the linear velocity of the floor at the last collision point. Only valid after calling [method move_and_slide] or [method move_and_slide_with_snap] and when [method is_on_floor] returns [code]true[/code]. </description> </method> <method name="get_slide_collision"> @@ -106,7 +106,7 @@ <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 [KinematicBody] 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. [code]linear_velocity[/code] is the velocity vector (typically meters per second). Unlike in [method move_and_collide], you should [i]not[/i] multiply it by [code]delta[/code] — the physics engine handles applying the velocity. - [code]floor_normal[/code] is the up direction, used to determine what is a wall and what is a floor or a ceiling. If set to the default value of [code]Vector3(0, 0, 0)[/code], everything is considered a wall. This is useful for topdown games. + [code]up_direction[/code] is the up direction, used to determine what is a wall and what is a floor or a ceiling. If set to the default value of [code]Vector3(0, 0, 0)[/code], everything is considered a wall. If [code]stop_on_slope[/code] is [code]true[/code], body will not slide on slopes if you include gravity in [code]linear_velocity[/code]. If the body collides, it will change direction a maximum of [code]max_slides[/code] times before it stops. [code]floor_max_angle[/code] is the maximum angle (in radians) where a slope is still considered a floor (or a ceiling), rather than a wall. The default value equals 45 degrees. @@ -121,7 +121,7 @@ </argument> <argument index="1" name="snap" type="Vector3"> </argument> - <argument index="2" name="floor_normal" type="Vector3" default="Vector3( 0, 0, 0 )"> + <argument index="2" name="up_direction" type="Vector3" default="Vector3( 0, 0, 0 )"> </argument> <argument index="3" name="stop_on_slope" type="bool" default="false"> </argument> diff --git a/doc/classes/KinematicBody2D.xml b/doc/classes/KinematicBody2D.xml index 1de75cd71b..6a3b3dabb1 100644 --- a/doc/classes/KinematicBody2D.xml +++ b/doc/classes/KinematicBody2D.xml @@ -17,14 +17,14 @@ <return type="Vector2"> </return> <description> - Returns the normal vector of the floor. + Returns the surface normal of the floor at the last collision point. Only valid after calling [method move_and_slide] or [method move_and_slide_with_snap] and when [method is_on_floor] returns [code]true[/code]. </description> </method> <method name="get_floor_velocity" qualifiers="const"> <return type="Vector2"> </return> <description> - Returns the velocity of the floor. Only updates when calling [method move_and_slide]. + Returns the linear velocity of the floor at the last collision point. Only valid after calling [method move_and_slide] or [method move_and_slide_with_snap] and when [method is_on_floor] returns [code]true[/code]. </description> </method> <method name="get_slide_collision"> @@ -91,7 +91,7 @@ </return> <argument index="0" name="linear_velocity" type="Vector2"> </argument> - <argument index="1" name="floor_normal" type="Vector2" default="Vector2( 0, 0 )"> + <argument index="1" name="up_direction" type="Vector2" default="Vector2( 0, 0 )"> </argument> <argument index="2" name="stop_on_slope" type="bool" default="false"> </argument> @@ -104,7 +104,7 @@ <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 [KinematicBody2D] 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. [code]linear_velocity[/code] is the velocity vector in pixels per second. Unlike in [method move_and_collide], you should [i]not[/i] multiply it by [code]delta[/code] — the physics engine handles applying the velocity. - [code]floor_normal[/code] is the up direction, used to determine what is a wall and what is a floor or a ceiling. If set to the default value of [code]Vector2(0, 0)[/code], everything is considered a wall. This is useful for topdown games. + [code]up_direction[/code] is the up direction, used to determine what is a wall and what is a floor or a ceiling. If set to the default value of [code]Vector2(0, 0)[/code], everything is considered a wall. This is useful for topdown games. If [code]stop_on_slope[/code] is [code]true[/code], body will not slide on slopes when you include gravity in [code]linear_velocity[/code] and the body is standing still. If the body collides, it will change direction a maximum of [code]max_slides[/code] times before it stops. [code]floor_max_angle[/code] is the maximum angle (in radians) where a slope is still considered a floor (or a ceiling), rather than a wall. The default value equals 45 degrees. @@ -119,7 +119,7 @@ </argument> <argument index="1" name="snap" type="Vector2"> </argument> - <argument index="2" name="floor_normal" type="Vector2" default="Vector2( 0, 0 )"> + <argument index="2" name="up_direction" type="Vector2" default="Vector2( 0, 0 )"> </argument> <argument index="3" name="stop_on_slope" type="bool" default="false"> </argument> diff --git a/doc/classes/Light.xml b/doc/classes/Light.xml index 6ef7c2652d..ae5bba4f06 100644 --- a/doc/classes/Light.xml +++ b/doc/classes/Light.xml @@ -16,6 +16,7 @@ <argument index="0" name="param" type="int" enum="Light.Param"> </argument> <description> + Returns the value of the specified [enum Light.Param] parameter. </description> </method> <method name="set_param"> @@ -26,6 +27,7 @@ <argument index="1" name="value" type="float"> </argument> <description> + Sets the value of the specified [enum Light.Param] parameter. </description> </method> </methods> @@ -67,38 +69,54 @@ If [code]true[/code], the light will cast shadows. </member> <member name="shadow_reverse_cull_face" type="bool" setter="set_shadow_reverse_cull_face" getter="get_shadow_reverse_cull_face" default="false"> + If [code]true[/code], reverses the backface culling of the mesh. This can be useful when you have a flat mesh that has a light behind it. If you need to cast a shadow on both sides of the mesh, set the mesh to use double-sided shadows with [constant GeometryInstance.SHADOW_CASTING_SETTING_DOUBLE_SIDED]. </member> </members> <constants> <constant name="PARAM_ENERGY" value="0" enum="Param"> + Constant for accessing [member light_energy]. </constant> <constant name="PARAM_INDIRECT_ENERGY" value="1" enum="Param"> + Constant for accessing [member light_indirect_energy]. </constant> <constant name="PARAM_SPECULAR" value="2" enum="Param"> + Constant for accessing [member light_specular]. </constant> <constant name="PARAM_RANGE" value="3" enum="Param"> + Constant for accessing [member OmniLight.omni_range] or [member SpotLight.spot_range]. </constant> <constant name="PARAM_ATTENUATION" value="4" enum="Param"> + Constant for accessing [member OmniLight.omni_attenuation] or [member SpotLight.spot_attenuation]. </constant> <constant name="PARAM_SPOT_ANGLE" value="5" enum="Param"> + Constant for accessing [member SpotLight.spot_angle]. </constant> <constant name="PARAM_SPOT_ATTENUATION" value="6" enum="Param"> + Constant for accessing [member SpotLight.spot_angle_attenuation]. </constant> <constant name="PARAM_CONTACT_SHADOW_SIZE" value="7" enum="Param"> + Constant for accessing [member shadow_contact]. </constant> <constant name="PARAM_SHADOW_MAX_DISTANCE" value="8" enum="Param"> + Constant for accessing [member DirectionalLight.directional_shadow_max_distance]. </constant> <constant name="PARAM_SHADOW_SPLIT_1_OFFSET" value="9" enum="Param"> + Constant for accessing [member DirectionalLight.directional_shadow_split_1]. </constant> <constant name="PARAM_SHADOW_SPLIT_2_OFFSET" value="10" enum="Param"> + Constant for accessing [member DirectionalLight.directional_shadow_split_2]. </constant> <constant name="PARAM_SHADOW_SPLIT_3_OFFSET" value="11" enum="Param"> + Constant for accessing [member DirectionalLight.directional_shadow_split_3]. </constant> <constant name="PARAM_SHADOW_NORMAL_BIAS" value="12" enum="Param"> + Constant for accessing [member DirectionalLight.directional_shadow_normal_bias]. </constant> <constant name="PARAM_SHADOW_BIAS" value="13" enum="Param"> + Constant for accessing [member shadow_bias]. </constant> <constant name="PARAM_SHADOW_BIAS_SPLIT_SCALE" value="14" enum="Param"> + Constant for accessing [member DirectionalLight.directional_shadow_bias_split_scale]. </constant> <constant name="PARAM_MAX" value="15" enum="Param"> Represents the size of the [enum Param] enum. diff --git a/doc/classes/Mesh.xml b/doc/classes/Mesh.xml index d4804930e1..2dd3ce5529 100644 --- a/doc/classes/Mesh.xml +++ b/doc/classes/Mesh.xml @@ -103,6 +103,7 @@ </methods> <members> <member name="lightmap_size_hint" type="Vector2" setter="set_lightmap_size_hint" getter="get_lightmap_size_hint" default="Vector2( 0, 0 )"> + Sets a hint to be used for lightmap resolution in [BakedLightmap]. Overrides [member BakedLightmap.bake_default_texels_per_unit]. </member> </members> <constants> @@ -128,52 +129,76 @@ Render array as triangle fans. </constant> <constant name="BLEND_SHAPE_MODE_NORMALIZED" value="0" enum="BlendShapeMode"> + Blend shapes are normalized. </constant> <constant name="BLEND_SHAPE_MODE_RELATIVE" value="1" enum="BlendShapeMode"> + Blend shapes are relative to base weight. </constant> <constant name="ARRAY_FORMAT_VERTEX" value="1" enum="ArrayFormat"> + Mesh array contains vertices. All meshes require a vertex array so this should always be present. </constant> <constant name="ARRAY_FORMAT_NORMAL" value="2" enum="ArrayFormat"> + Mesh array contains normals. </constant> <constant name="ARRAY_FORMAT_TANGENT" value="4" enum="ArrayFormat"> + Mesh array contains tangents. </constant> <constant name="ARRAY_FORMAT_COLOR" value="8" enum="ArrayFormat"> + Mesh array contains colors. </constant> <constant name="ARRAY_FORMAT_TEX_UV" value="16" enum="ArrayFormat"> + Mesh array contains UVs. </constant> <constant name="ARRAY_FORMAT_TEX_UV2" value="32" enum="ArrayFormat"> + Mesh array contains second UV. </constant> <constant name="ARRAY_FORMAT_BONES" value="64" enum="ArrayFormat"> + Mesh array contains bones. </constant> <constant name="ARRAY_FORMAT_WEIGHTS" value="128" enum="ArrayFormat"> + Mesh array contains bone weights. </constant> <constant name="ARRAY_FORMAT_INDEX" value="256" enum="ArrayFormat"> + Mesh array uses indices. </constant> <constant name="ARRAY_COMPRESS_BASE" value="9" enum="ArrayFormat"> + Used internally to calculate other [code]ARRAY_COMPRESS_*[/code] enum values. Do not use. </constant> <constant name="ARRAY_COMPRESS_VERTEX" value="512" enum="ArrayFormat"> + Flag used to mark a compressed (half float) vertex array. </constant> <constant name="ARRAY_COMPRESS_NORMAL" value="1024" enum="ArrayFormat"> + Flag used to mark a compressed (half float) normal array. </constant> <constant name="ARRAY_COMPRESS_TANGENT" value="2048" enum="ArrayFormat"> + Flag used to mark a compressed (half float) tangent array. </constant> <constant name="ARRAY_COMPRESS_COLOR" value="4096" enum="ArrayFormat"> + Flag used to mark a compressed (half float) color array. </constant> <constant name="ARRAY_COMPRESS_TEX_UV" value="8192" enum="ArrayFormat"> + Flag used to mark a compressed (half float) UV coordinates array. </constant> <constant name="ARRAY_COMPRESS_TEX_UV2" value="16384" enum="ArrayFormat"> + Flag used to mark a compressed (half float) UV coordinates array for the second UV coordinates. </constant> <constant name="ARRAY_COMPRESS_BONES" value="32768" enum="ArrayFormat"> + Flag used to mark a compressed bone array. </constant> <constant name="ARRAY_COMPRESS_WEIGHTS" value="65536" enum="ArrayFormat"> + Flag used to mark a compressed (half float) weight array. </constant> <constant name="ARRAY_COMPRESS_INDEX" value="131072" enum="ArrayFormat"> + Flag used to mark a compressed index array. </constant> <constant name="ARRAY_FLAG_USE_2D_VERTICES" value="262144" enum="ArrayFormat"> + Flag used to mark that the array contains 2D vertices. </constant> <constant name="ARRAY_FLAG_USE_16_BIT_BONES" value="524288" enum="ArrayFormat"> + Flag used to mark that the array uses 16-bit bones instead of 8-bit. </constant> <constant name="ARRAY_COMPRESS_DEFAULT" value="97280" enum="ArrayFormat"> + Used to set flags [constant ARRAY_COMPRESS_VERTEX], [constant ARRAY_COMPRESS_NORMAL], [constant ARRAY_COMPRESS_TANGENT], [constant ARRAY_COMPRESS_COLOR], [constant ARRAY_COMPRESS_TEX_UV], [constant ARRAY_COMPRESS_TEX_UV2] and [constant ARRAY_COMPRESS_WEIGHTS] quickly. </constant> <constant name="ARRAY_VERTEX" value="0" enum="ArrayType"> Array of vertices. diff --git a/doc/classes/MeshInstance.xml b/doc/classes/MeshInstance.xml index a4d2bb4295..c7cddf5977 100644 --- a/doc/classes/MeshInstance.xml +++ b/doc/classes/MeshInstance.xml @@ -66,6 +66,7 @@ [NodePath] to the [Skeleton] associated with the instance. </member> <member name="skin" type="Skin" setter="set_skin" getter="get_skin"> + Sets the skin to be used by this instance. </member> </members> <constants> diff --git a/doc/classes/MeshInstance2D.xml b/doc/classes/MeshInstance2D.xml index 4b38b9aa96..7f1466ccf6 100644 --- a/doc/classes/MeshInstance2D.xml +++ b/doc/classes/MeshInstance2D.xml @@ -25,6 +25,7 @@ <signals> <signal name="texture_changed"> <description> + Emitted when the [member texture] is changed. </description> </signal> </signals> diff --git a/doc/classes/MultiMeshInstance.xml b/doc/classes/MultiMeshInstance.xml index 16f16fdc8b..7dcfd2808d 100644 --- a/doc/classes/MultiMeshInstance.xml +++ b/doc/classes/MultiMeshInstance.xml @@ -10,6 +10,7 @@ <tutorials> <link>http://docs.godotengine.org/en/latest/tutorials/3d/vertex_animation/animating_thousands_of_fish.html</link> <link>http://docs.godotengine.org/en/latest/tutorials/3d/using_multi_mesh_instance.html</link> + <link>http://docs.godotengine.org/en/latest/tutorials/optimization/using_multimesh.html</link> </tutorials> <methods> </methods> diff --git a/doc/classes/MultiMeshInstance2D.xml b/doc/classes/MultiMeshInstance2D.xml index 8509986c3c..0c6f1a4a62 100644 --- a/doc/classes/MultiMeshInstance2D.xml +++ b/doc/classes/MultiMeshInstance2D.xml @@ -25,6 +25,7 @@ <signals> <signal name="texture_changed"> <description> + Emitted when the [member texture] is changed. </description> </signal> </signals> diff --git a/doc/classes/OmniLight.xml b/doc/classes/OmniLight.xml index 7189826385..646c2d3166 100644 --- a/doc/classes/OmniLight.xml +++ b/doc/classes/OmniLight.xml @@ -33,8 +33,10 @@ Shadows are rendered to a cubemap. Slower than [constant SHADOW_DUAL_PARABOLOID], but higher-quality. </constant> <constant name="SHADOW_DETAIL_VERTICAL" value="0" enum="ShadowDetail"> + Use more detail vertically when computing the shadow. </constant> <constant name="SHADOW_DETAIL_HORIZONTAL" value="1" enum="ShadowDetail"> + Use more detail horizontally when computing the shadow. </constant> </constants> </class> diff --git a/doc/classes/ParticlesMaterial.xml b/doc/classes/ParticlesMaterial.xml index 187ad1688d..1f23649b75 100644 --- a/doc/classes/ParticlesMaterial.xml +++ b/doc/classes/ParticlesMaterial.xml @@ -321,5 +321,8 @@ <constant name="EMISSION_SHAPE_DIRECTED_POINTS" value="4" enum="EmissionShape"> Particles will be emitted at a position determined by sampling a random point on the [member emission_point_texture]. Particle velocity and rotation will be set based on [member emission_normal_texture]. Particle color will be modulated by [member emission_color_texture]. </constant> + <constant name="EMISSION_SHAPE_MAX" value="5" enum="EmissionShape"> + Represents the size of the [enum EmissionShape] enum. + </constant> </constants> </class> diff --git a/doc/classes/StreamPeerSSL.xml b/doc/classes/StreamPeerSSL.xml index b34d8d1b25..eea44ef93d 100644 --- a/doc/classes/StreamPeerSSL.xml +++ b/doc/classes/StreamPeerSSL.xml @@ -38,6 +38,7 @@ </argument> <description> Connects to a peer using an underlying [StreamPeer] [code]stream[/code]. If [code]validate_certs[/code] is [code]true[/code], [StreamPeerSSL] will validate that the certificate presented by the peer matches the [code]for_hostname[/code]. + [b]Note:[/b] Specifying a custom [code]valid_certificate[/code] is not supported in HTML5 exports due to browsers restrictions. </description> </method> <method name="disconnect_from_stream"> diff --git a/doc/classes/Texture3D.xml b/doc/classes/Texture3D.xml index c11a48137f..aac55710fe 100644 --- a/doc/classes/Texture3D.xml +++ b/doc/classes/Texture3D.xml @@ -1,8 +1,10 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="Texture3D" inherits="TextureLayered" category="Core" version="3.2"> <brief_description> + Texture with 3 dimensions. </brief_description> <description> + Texture3D is a 3-dimensional texture that has a width, height, and depth. </description> <tutorials> </tutorials> diff --git a/doc/classes/VisualInstance.xml b/doc/classes/VisualInstance.xml index 7576bf7ad8..692e051674 100644 --- a/doc/classes/VisualInstance.xml +++ b/doc/classes/VisualInstance.xml @@ -1,8 +1,10 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="VisualInstance" inherits="Spatial" category="Core" version="3.2"> <brief_description> + Parent of all visual 3D nodes. </brief_description> <description> + The VisualInstance is used to connect a resource to a visual representation. All visual 3D nodes inherit from the VisualInstance. In general, you should not access the VisualInstance properties directly as they are accessed and managed by the nodes that inherit from VisualInstance. VisualInstance is the node representation of the [VisualServer] instance. </description> <tutorials> </tutorials> @@ -18,12 +20,14 @@ <return type="RID"> </return> <description> + Returns the RID of the resource associated with this VisualInstance. For example, if the Node is a [MeshInstance], this will return the RID of the associated [Mesh]. </description> </method> <method name="get_instance" qualifiers="const"> <return type="RID"> </return> <description> + Returns the RID of this instance. This RID is the same as the RID returned by [method VisualServer.instance_create]. This RID is needed if you want to call [VisualServer] functions directly on this VisualInstance. </description> </method> <method name="get_layer_mask_bit" qualifiers="const"> @@ -32,6 +36,7 @@ <argument index="0" name="layer" type="int"> </argument> <description> + Returns [code]true[/code] when the specified layer is enabled in [member layers] and [code]false[/code] otherwise. </description> </method> <method name="get_transformed_aabb" qualifiers="const"> @@ -48,8 +53,7 @@ <argument index="0" name="base" type="RID"> </argument> <description> - Sets the base of the VisualInstance, which changes how the engine handles the VisualInstance under the hood. - It is recommended to only use [method set_base] if you know what you're doing. + Sets the resource that is instantiated by this VisualInstance, which changes how the engine handles the VisualInstance under the hood. Equivalent to [method VisualServer.instance_set_base]. </description> </method> <method name="set_layer_mask_bit"> @@ -60,6 +64,7 @@ <argument index="1" name="enabled" type="bool"> </argument> <description> + Enables a particular layer in [member layers]. </description> </method> </methods> diff --git a/doc/classes/X509Certificate.xml b/doc/classes/X509Certificate.xml index 50e9e4e0d4..5f3e91c4e6 100644 --- a/doc/classes/X509Certificate.xml +++ b/doc/classes/X509Certificate.xml @@ -6,6 +6,7 @@ <description> The X509Certificate class represents an X509 certificate. Certificates can be loaded and saved like any other [Resource]. They can be used as the server certificate in [method StreamPeerSSL.accept_stream] (along with the proper [CryptoKey]), and to specify the only certificate that should be accepted when connecting to an SSL server via [method StreamPeerSSL.connect_to_stream]. + [b]Note:[/b] Not available in HTML5 exports. </description> <tutorials> </tutorials> diff --git a/doc/classes/bool.xml b/doc/classes/bool.xml index 533963b460..ba6a932d4f 100644 --- a/doc/classes/bool.xml +++ b/doc/classes/bool.xml @@ -4,7 +4,38 @@ Boolean built-in type. </brief_description> <description> - Boolean built-in type. + Boolean is a built-in type. It can represent any data type that is either a true or false value. You can think of it as an switch with on or off (1 or 0) setting . It's often used as part of programming logic in condition statements like [code]if[/code] statements. + [b]Note:[/b] In a code below [code]if can_shoot[/code] is equivalent of [code]if can_shoot == true[/code]. It is good practice to follow the natural spoken language structure when possible. Use [code]if can_shoot[/code] rather than [code]if can_shoot == true[/code] and use [code]if not can_shoot[/code] rather than [code]if can_shoot == false[/code]. + [codeblock] + var can_shoot = true + + func shoot(): + if can_shoot: + # Perform shooting actions here. + [/codeblock] + The following code will only create a bullet if both conditions are met: action "shoot" is pressed and if [code]can_shoot[/code] is [code]true[/code]. + [b]Note:[/b] [code]Input.is_action_pressed("shoot")[/code] is also a boolean that is [code]true[/code] when "shoot" is pressed and [code]false[/code] when "shoot" isn't pressed. + [codeblock] + var can_shoot = true + + func shoot(): + if can_shoot and Input.is_action_pressed("shoot"): + create_bullet() + [/codeblock] + The following code will set [code]can_shoot[/code] to [code]false[/code] and start a timer. This will prevent player from shooting until the timer runs out. Next [code]can_shoot[/code] will be set to [code]true[/code] again allowing player to shoot once again. + [codeblock] + var can_shoot = true + onready var cool_down = $CoolDownTimer + + func shoot(): + if can_shoot and Input.is_action_pressed("shoot"): + create_bullet() + can_shoot = false + cool_down.start() + + func _on_CoolDownTimer_timeout(): + can_shoot = true + [/codeblock] </description> <tutorials> </tutorials> diff --git a/doc/tools/makerst.py b/doc/tools/makerst.py index 91240e9550..4b07bf00ee 100755 --- a/doc/tools/makerst.py +++ b/doc/tools/makerst.py @@ -393,15 +393,22 @@ def make_rst_class(class_def, state, dry_run, output_dir): # type: (ClassDef, S f.write(make_type(child, state)) f.write("\n\n") - # Category - if class_def.category is not None: - f.write('**Category:** ' + class_def.category.strip() + "\n\n") - # Brief description - f.write(make_heading('Brief Description', '-')) if class_def.brief_description is not None: f.write(rstize_text(class_def.brief_description.strip(), state) + "\n\n") + # Class description + if class_def.description is not None and class_def.description.strip() != '': + f.write(make_heading('Description', '-')) + f.write(rstize_text(class_def.description.strip(), state) + "\n\n") + + # Online tutorials + if len(class_def.tutorials) > 0: + f.write(make_heading('Tutorials', '-')) + for t in class_def.tutorials: + link = t.strip() + f.write("- " + make_url(link) + "\n\n") + # Properties overview if len(class_def.properties) > 0: f.write(make_heading('Properties', '-')) @@ -494,18 +501,6 @@ def make_rst_class(class_def, state, dry_run, output_dir): # type: (ClassDef, S f.write('\n\n') - # Class description - if class_def.description is not None and class_def.description.strip() != '': - f.write(make_heading('Description', '-')) - f.write(rstize_text(class_def.description.strip(), state) + "\n\n") - - # Online tutorials - if len(class_def.tutorials) > 0: - f.write(make_heading('Tutorials', '-')) - for t in class_def.tutorials: - link = t.strip() - f.write("- " + make_url(link) + "\n\n") - # Property descriptions if any(not p.overridden for p in class_def.properties.values()) > 0: f.write(make_heading('Property Descriptions', '-')) |