Complete various class references

This commit is contained in:
clayjohn 2020-01-25 21:59:51 -08:00
parent be1bc53d42
commit c5700f7464
16 changed files with 68 additions and 9 deletions

View file

@ -172,10 +172,13 @@
The rectangle's extents if [member emission_shape] is set to [constant EMISSION_SHAPE_BOX].
</member>
<member name="emission_colors" type="PoolColorArray" setter="set_emission_colors" getter="get_emission_colors" default="PoolColorArray( )">
Sets the [Color]s to modulate particles by when using [constant EMISSION_SHAPE_POINTS] or [constant EMISSION_SHAPE_DIRECTED_POINTS].
</member>
<member name="emission_normals" type="PoolVector3Array" setter="set_emission_normals" getter="get_emission_normals">
Sets the direction the particles will be emitted in when using [constant EMISSION_SHAPE_DIRECTED_POINTS].
</member>
<member name="emission_points" type="PoolVector3Array" setter="set_emission_points" getter="get_emission_points" default="PoolVector3Array( )">
Sets the initial positions to spawn particles when using [constant EMISSION_SHAPE_POINTS] or [constant EMISSION_SHAPE_DIRECTED_POINTS].
</member>
<member name="emission_shape" type="int" setter="set_emission_shape" getter="get_emission_shape" enum="CPUParticles.EmissionShape" default="0">
Particles will be emitted inside this region. See [enum EmissionShape] for possible values.

View file

@ -170,10 +170,13 @@
Particle draw order. Uses [enum DrawOrder] values.
</member>
<member name="emission_colors" type="PoolColorArray" setter="set_emission_colors" getter="get_emission_colors">
Sets the [Color]s to modulate particles by when using [constant EMISSION_SHAPE_POINTS] or [constant EMISSION_SHAPE_DIRECTED_POINTS].
</member>
<member name="emission_normals" type="PoolVector2Array" setter="set_emission_normals" getter="get_emission_normals">
Sets the direction the particles will be emitted in when using [constant EMISSION_SHAPE_DIRECTED_POINTS].
</member>
<member name="emission_points" type="PoolVector2Array" setter="set_emission_points" getter="get_emission_points">
Sets the initial positions to spawn particles when using [constant EMISSION_SHAPE_POINTS] or [constant EMISSION_SHAPE_DIRECTED_POINTS].
</member>
<member name="emission_rect_extents" type="Vector2" setter="set_emission_rect_extents" getter="get_emission_rect_extents">
The rectangle's extents if [member emission_shape] is set to [constant EMISSION_SHAPE_RECTANGLE].

View file

@ -24,8 +24,10 @@
The custom [Viewport] node assigned to the [CanvasLayer]. If [code]null[/code], uses the default viewport instead.
</member>
<member name="follow_viewport_enable" type="bool" setter="set_follow_viewport" getter="is_following_viewport" default="false">
Sets the layer to follow the viewport in order to simulate a pseudo 3D effect.
</member>
<member name="follow_viewport_scale" type="float" setter="set_follow_viewport_scale" getter="get_follow_viewport_scale" default="1.0">
Scales the layer when using [member follow_viewport_enable]. Layers moving into the foreground should have increasing scales, while layers moving into the background should have decreasing scales.
</member>
<member name="layer" type="int" setter="set_layer" getter="get_layer" default="1">
Layer index for draw order. Lower values are drawn first.

View file

@ -193,6 +193,7 @@
<argument index="0" name="normal" type="Vector3">
</argument>
<description>
Used internally by the engine.
</description>
</method>
<method name="intersect_polygons_2d">

View file

@ -17,6 +17,7 @@
<argument index="0" name="flag" type="int" enum="ParticlesMaterial.Flags">
</argument>
<description>
Returns [code]true[/code] if the specified flag is enabled.
</description>
</method>
<method name="get_param" qualifiers="const">
@ -25,6 +26,7 @@
<argument index="0" name="param" type="int" enum="ParticlesMaterial.Parameter">
</argument>
<description>
Returns the value of the specified parameter.
</description>
</method>
<method name="get_param_randomness" qualifiers="const">
@ -33,6 +35,7 @@
<argument index="0" name="param" type="int" enum="ParticlesMaterial.Parameter">
</argument>
<description>
Returns the randomness ratio associated with the specified parameter.
</description>
</method>
<method name="get_param_texture" qualifiers="const">
@ -41,6 +44,7 @@
<argument index="0" name="param" type="int" enum="ParticlesMaterial.Parameter">
</argument>
<description>
Returns the [Texture] used by the specified parameter.
</description>
</method>
<method name="set_flag">
@ -51,6 +55,7 @@
<argument index="1" name="enable" type="bool">
</argument>
<description>
If [code]true[/code], enables the specified flag. See [enum Flags] for options.
</description>
</method>
<method name="set_param">
@ -61,6 +66,7 @@
<argument index="1" name="value" type="float">
</argument>
<description>
Sets the specified [enum Parameter].
</description>
</method>
<method name="set_param_randomness">
@ -71,6 +77,7 @@
<argument index="1" name="randomness" type="float">
</argument>
<description>
Sets the randomness ratio for the specified [enum Parameter].
</description>
</method>
<method name="set_param_texture">
@ -81,6 +88,7 @@
<argument index="1" name="texture" type="Texture">
</argument>
<description>
Sets the [Texture] for the specified [enum Parameter].
</description>
</method>
</methods>

View file

@ -170,10 +170,13 @@
</members>
<constants>
<constant name="PLANE_YZ" value="Plane( 1, 0, 0, 0 )">
A plane that extends in the Y and Z axes.
</constant>
<constant name="PLANE_XZ" value="Plane( 0, 1, 0, 0 )">
A plane that extends in the X and Z axes.
</constant>
<constant name="PLANE_XY" value="Plane( 0, 0, 1, 0 )">
A plane that extends in the X and Y axes.
</constant>
</constants>
</class>

View file

@ -63,14 +63,19 @@
</members>
<constants>
<constant name="TEXTURE_SIZE_256" value="0" enum="TextureSize">
Sky texture will be 256x128.
</constant>
<constant name="TEXTURE_SIZE_512" value="1" enum="TextureSize">
Sky texture will be 512x256.
</constant>
<constant name="TEXTURE_SIZE_1024" value="2" enum="TextureSize">
Sky texture will be 1024x512. This is the default size.
</constant>
<constant name="TEXTURE_SIZE_2048" value="3" enum="TextureSize">
Sky texture will be 2048x1024.
</constant>
<constant name="TEXTURE_SIZE_4096" value="4" enum="TextureSize">
Sky texture will be 4096x2048.
</constant>
<constant name="TEXTURE_SIZE_MAX" value="5" enum="TextureSize">
Represents the size of the [enum TextureSize] enum.

View file

@ -195,6 +195,7 @@
</members>
<constants>
<constant name="IDENTITY" value="Quat( 0, 0, 0, 1 )">
The identity rotation. Equivalent to an identity matrix. If a vector is transformed by an identity quaternion, it will not change.
</constant>
</constants>
</class>

View file

@ -277,7 +277,7 @@
<argument index="0" name="offset" type="Vector3">
</argument>
<description>
Changes the node's position by given offset [Vector3].
Changes the node's position by the given offset [Vector3].
Note that the translation [code]offset[/code] is affected by the node's scale, so if scaled by e.g. [code](10, 1, 1)[/code], a translation by an offset of [code](2, 0, 0)[/code] would actually add 20 ([code]2 * 10[/code]) to the X coordinate.
</description>
</method>
@ -287,6 +287,7 @@
<argument index="0" name="offset" type="Vector3">
</argument>
<description>
Changes the node's position by the given offset [Vector3] in local space.
</description>
</method>
<method name="update_gizmo">

View file

@ -174,6 +174,7 @@
<return type="Array">
</return>
<description>
Commits the data to the same format used by [method ArrayMesh.add_surface_from_arrays]. This way you can further process the mesh data using the [ArrayMesh] API.
</description>
</method>
<method name="create_from">
@ -197,6 +198,7 @@
<argument index="2" name="blend_shape" type="String">
</argument>
<description>
Creates a vertex array from the specified blend shape of an existing [Mesh]. This can be used to extract a specific pose from a blend shape.
</description>
</method>
<method name="deindex">

View file

@ -6,6 +6,7 @@
<description>
A texture works by registering an image in the video hardware, which then can be used in 3D models or 2D [Sprite] or GUI [Control].
Textures are often created by loading them from a file. See [method @GDScript.load].
[Texture] is a base for other resources. It cannot be used directly.
</description>
<tutorials>
</tutorials>
@ -24,6 +25,7 @@
<argument index="4" name="normal_map" type="Texture" default="null">
</argument>
<description>
Draws the texture using a [CanvasItem] with the [VisualServer] API at the specified [code]position[/code]. Equivalent to [method VisualServer.canvas_item_add_texture_rect] with a rect at [code]position[/code] and the size of this [Texture].
</description>
</method>
<method name="draw_rect" qualifiers="const">
@ -42,6 +44,7 @@
<argument index="5" name="normal_map" type="Texture" default="null">
</argument>
<description>
Draws the texture using a [CanvasItem] with the [VisualServer] API. Equivalent to [method VisualServer.canvas_item_add_texture_rect].
</description>
</method>
<method name="draw_rect_region" qualifiers="const">
@ -62,12 +65,14 @@
<argument index="6" name="clip_uv" type="bool" default="true">
</argument>
<description>
Draws a part of the texture using a [CanvasItem] with the [VisualServer] API. Equivalent to [method VisualServer.canvas_item_add_texture_rect_region].
</description>
</method>
<method name="get_data" qualifiers="const">
<return type="Image">
</return>
<description>
Returns an [Image] with the data from this [Texture]. [Image]s can be accessed and manipulated directly.
</description>
</method>
<method name="get_height" qualifiers="const">
@ -95,12 +100,13 @@
<return type="bool">
</return>
<description>
Returns [code]true[/code] if this [Texture] has an alpha channel.
</description>
</method>
</methods>
<members>
<member name="flags" type="int" setter="set_flags" getter="get_flags" default="4">
The texture's flags.
The texture's [enum Flags]. [enum Flags] are used to set various properties of the [Texture].
</member>
</members>
<constants>

View file

@ -1,8 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="TextureArray" inherits="TextureLayered" category="Core" version="3.2">
<brief_description>
Array of textures stored in a single primitive.
</brief_description>
<description>
[TextureArray]s store an array of images in a single [Texture] primitive. Each layer of the texture array has its own mipmap chain. This makes it is a good alternative to texture atlases.
</description>
<tutorials>
</tutorials>

View file

@ -1,8 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="TextureLayered" inherits="Resource" category="Core" version="3.2">
<brief_description>
Base class for 3D texture types.
</brief_description>
<description>
Base class for [Texture3D] and [TextureArray]. Cannot be used directly.
</description>
<tutorials>
</tutorials>

View file

@ -73,6 +73,7 @@
<argument index="0" name="quadrant" type="int">
</argument>
<description>
Returns the [enum ShadowAtlasQuadrantSubdiv] of the specified quadrant.
</description>
</method>
<method name="get_size_override" qualifiers="const">
@ -156,12 +157,14 @@
<argument index="0" name="rect" type="Rect2">
</argument>
<description>
Attaches this [Viewport] to the root [Viewport] with the specified rectangle. This bypasses the need for another node to display this [Viewport] but makes you responsible for updating the position of this [Viewport] manually.
</description>
</method>
<method name="set_input_as_handled">
<return type="void">
</return>
<description>
Stops the input from propagating further down the [SceneTree].
</description>
</method>
<method name="set_shadow_atlas_quadrant_subdiv">
@ -172,6 +175,7 @@
<argument index="1" name="subdiv" type="int" enum="Viewport.ShadowAtlasQuadrantSubdiv">
</argument>
<description>
Sets the number of subdivisions to use in the specified quadrant. A higher number of subdivisions allows you to have more shadows in the scene at once, but reduces the quality of the shadows. A good practice is to have quadrants with a varying number of subdivisions and to have as few subdivisions as possible.
</description>
</method>
<method name="set_size_override">
@ -243,13 +247,13 @@
<member name="handle_input_locally" type="bool" setter="set_handle_input_locally" getter="is_handling_input_locally" default="true">
</member>
<member name="hdr" type="bool" setter="set_hdr" getter="get_hdr" default="true">
If [code]true[/code], the viewport rendering will receive benefits from High Dynamic Range algorithm.
If [code]true[/code], the viewport rendering will receive benefits from High Dynamic Range algorithm. High Dynamic Range allows the viewport to receive values that are outside the 0-1 range. In Godot HDR uses 16 bits, meaning it does not store the full range of a floating point number.
</member>
<member name="keep_3d_linear" type="bool" setter="set_keep_3d_linear" getter="get_keep_3d_linear" default="false">
If [code]true[/code], the result after 3D rendering will not have a linear to sRGB color conversion applied. This is important when the viewport is used as a render target where the result is used as a texture on a 3D object rendered in another viewport. It is also important if the viewport is used to create data that is not color based (noise, heightmaps, pickmaps, etc.). Do not enable this when the viewport is used as a texture on a 2D object or if the viewport is your final output.
</member>
<member name="msaa" type="int" setter="set_msaa" getter="get_msaa" enum="Viewport.MSAA" default="0">
The multisample anti-aliasing mode.
The multisample anti-aliasing mode. A higher number results in smoother edges at the cost of significantly worse performance. A value of 4 is best unless targetting very high-end systems.
</member>
<member name="own_world" type="bool" setter="set_use_own_world" getter="is_using_own_world" default="false">
If [code]true[/code], the viewport will use [World] defined in [code]world[/code] property.
@ -270,16 +274,16 @@
If [code]true[/code], the result of rendering will be flipped vertically.
</member>
<member name="shadow_atlas_quad_0" type="int" setter="set_shadow_atlas_quadrant_subdiv" getter="get_shadow_atlas_quadrant_subdiv" enum="Viewport.ShadowAtlasQuadrantSubdiv" default="2">
The subdivision amount of first quadrant on shadow atlas.
The subdivision amount of the first quadrant on the shadow atlas.
</member>
<member name="shadow_atlas_quad_1" type="int" setter="set_shadow_atlas_quadrant_subdiv" getter="get_shadow_atlas_quadrant_subdiv" enum="Viewport.ShadowAtlasQuadrantSubdiv" default="2">
The subdivision amount of second quadrant on shadow atlas.
The subdivision amount of the second quadrant on the shadow atlas.
</member>
<member name="shadow_atlas_quad_2" type="int" setter="set_shadow_atlas_quadrant_subdiv" getter="get_shadow_atlas_quadrant_subdiv" enum="Viewport.ShadowAtlasQuadrantSubdiv" default="3">
The subdivision amount of third quadrant on shadow atlas.
The subdivision amount of the third quadrant on the shadow atlas.
</member>
<member name="shadow_atlas_quad_3" type="int" setter="set_shadow_atlas_quadrant_subdiv" getter="get_shadow_atlas_quadrant_subdiv" enum="Viewport.ShadowAtlasQuadrantSubdiv" default="4">
The subdivision amount of fourth quadrant on shadow atlas.
The subdivision amount of the fourth quadrant on the shadow atlas.
</member>
<member name="shadow_atlas_size" type="int" setter="set_shadow_atlas_size" getter="get_shadow_atlas_size" default="0">
The shadow atlas' resolution (used for omni and spot lights). The value will be rounded up to the nearest power of 2.
@ -332,18 +336,25 @@
Always update the render target.
</constant>
<constant name="SHADOW_ATLAS_QUADRANT_SUBDIV_DISABLED" value="0" enum="ShadowAtlasQuadrantSubdiv">
This quadrant will not be used.
</constant>
<constant name="SHADOW_ATLAS_QUADRANT_SUBDIV_1" value="1" enum="ShadowAtlasQuadrantSubdiv">
This quadrant will only be used by one shadow map.
</constant>
<constant name="SHADOW_ATLAS_QUADRANT_SUBDIV_4" value="2" enum="ShadowAtlasQuadrantSubdiv">
This quadrant will be split in 4 and used by up to 4 shadow maps.
</constant>
<constant name="SHADOW_ATLAS_QUADRANT_SUBDIV_16" value="3" enum="ShadowAtlasQuadrantSubdiv">
This quadrant will be split 16 ways and used by up to 16 shadow maps.
</constant>
<constant name="SHADOW_ATLAS_QUADRANT_SUBDIV_64" value="4" enum="ShadowAtlasQuadrantSubdiv">
This quadrant will be split 64 ways and used by up to 64 shadow maps.
</constant>
<constant name="SHADOW_ATLAS_QUADRANT_SUBDIV_256" value="5" enum="ShadowAtlasQuadrantSubdiv">
This quadrant will be split 256 ways and used by up to 256 shadow maps. Unless the [member shadow_atlas_size] is very high, the shadows in this quadrant will be very low resolution.
</constant>
<constant name="SHADOW_ATLAS_QUADRANT_SUBDIV_1024" value="6" enum="ShadowAtlasQuadrantSubdiv">
This quadrant will be split 1024 ways and used by up to 1024 shadow maps. Unless the [member shadow_atlas_size] is very high, the shadows in this quadrant will be very low resolution.
</constant>
<constant name="SHADOW_ATLAS_QUADRANT_SUBDIV_MAX" value="7" enum="ShadowAtlasQuadrantSubdiv">
Represents the size of the [enum ShadowAtlasQuadrantSubdiv] enum.
@ -385,20 +396,28 @@
Multisample anti-aliasing mode disabled. This is the default value.
</constant>
<constant name="MSAA_2X" value="1" enum="MSAA">
Use 2x Multisample Antialiasing.
</constant>
<constant name="MSAA_4X" value="2" enum="MSAA">
Use 4x Multisample Antialiasing.
</constant>
<constant name="MSAA_8X" value="3" enum="MSAA">
Use 8x Multisample Antialiasing. Likely unsupported on low-end and older hardware.
</constant>
<constant name="MSAA_16X" value="4" enum="MSAA">
Use 16x Multisample Antialiasing. Likely unsupported on medium and low-end hardware.
</constant>
<constant name="USAGE_2D" value="0" enum="Usage">
Allocates all buffers needed for drawing 2D scenes. This takes less VRAM than the 3D usage modes.
</constant>
<constant name="USAGE_2D_NO_SAMPLING" value="1" enum="Usage">
Allocates buffers needed for 2D scenes without allocating a buffer for screen copy. Accordingly, you cannot read from the screen. Of the [enum Usage] types, this requires the least VRAM.
</constant>
<constant name="USAGE_3D" value="2" enum="Usage">
Allocates full buffers for drawing 3D scenes and all 3D effects including buffers needed for 2D scenes and effects.
</constant>
<constant name="USAGE_3D_NO_EFFECTS" value="3" enum="Usage">
Allocates buffers needed for drawing 3D scenes. But does not allocate buffers needed for reading from the screen and post-processing effects. Saves some VRAM.
</constant>
<constant name="CLEAR_MODE_ALWAYS" value="0" enum="ClearMode">
Always clear the render target before drawing.

View file

@ -3897,7 +3897,7 @@
<argument index="2" name="screen" type="int" default="0">
</argument>
<description>
Copies viewport to a region of the screen specified by [code]rect[/code]. If Viewport.[member Viewport.render_direct_to_screen] is [code]true[/code], then viewport does not use a framebuffer and the contents of the viewport are rendered directly to screen. However, note that the root viewport is drawn last, therefore it will draw over the screen. Accordingly, you must set the root viewport to an area that does not cover the area that you have attached this viewport to.
Copies viewport to a region of the screen specified by [code]rect[/code]. If [member Viewport.render_direct_to_screen] is [code]true[/code], then viewport does not use a framebuffer and the contents of the viewport are rendered directly to screen. However, note that the root viewport is drawn last, therefore it will draw over the screen. Accordingly, you must set the root viewport to an area that does not cover the area that you have attached this viewport to.
For example, you can set the root viewport to not render at all with the following code:
[codeblock]
func _ready():

View file

@ -16,6 +16,7 @@
If [code]true[/code], the resulting texture contains a normal map created from the original noise interpreted as a bump map.
</member>
<member name="bump_strength" type="float" setter="set_bump_strength" getter="get_bump_strength" default="8.0">
Strength of the bump maps used in this texture. A higher value will make the bump maps appear larger while a lower value will make them appear softer.
</member>
<member name="flags" type="int" setter="set_flags" getter="get_flags" override="true" default="7" />
<member name="height" type="int" setter="set_height" getter="get_height" default="512">