diff options
Diffstat (limited to 'doc')
-rw-r--r-- | doc/classes/AudioStreamSample.xml | 12 | ||||
-rw-r--r-- | doc/classes/Dictionary.xml | 22 | ||||
-rw-r--r-- | doc/classes/PhysicalBone3D.xml | 41 | ||||
-rw-r--r-- | doc/classes/RigidBody3D.xml | 7 |
4 files changed, 67 insertions, 15 deletions
diff --git a/doc/classes/AudioStreamSample.xml b/doc/classes/AudioStreamSample.xml index 6d99433c90..c12e1bd05c 100644 --- a/doc/classes/AudioStreamSample.xml +++ b/doc/classes/AudioStreamSample.xml @@ -30,13 +30,13 @@ Audio format. See [enum Format] constants for values. </member> <member name="loop_begin" type="int" setter="set_loop_begin" getter="get_loop_begin" default="0"> - Loop start in bytes. + The loop start point (in number of samples, relative to the beginning of the sample). This information will be imported automatically from the WAV file if present. </member> <member name="loop_end" type="int" setter="set_loop_end" getter="get_loop_end" default="0"> - Loop end in bytes. + The loop end point (in number of samples, relative to the beginning of the sample). This information will be imported automatically from the WAV file if present. </member> <member name="loop_mode" type="int" setter="set_loop_mode" getter="get_loop_mode" enum="AudioStreamSample.LoopMode" default="0"> - Loop mode. See [enum LoopMode] constants for values. + The loop mode. This information will be imported automatically from the WAV file if present. See [enum LoopMode] constants for values. </member> <member name="mix_rate" type="int" setter="set_mix_rate" getter="get_mix_rate" default="44100"> The sample rate for mixing this audio. @@ -59,13 +59,13 @@ Audio does not loop. </constant> <constant name="LOOP_FORWARD" value="1" enum="LoopMode"> - Audio loops the data between [member loop_begin] and [member loop_end] playing forward only. + Audio loops the data between [member loop_begin] and [member loop_end], playing forward only. </constant> <constant name="LOOP_PING_PONG" value="2" enum="LoopMode"> - Audio loops the data between [member loop_begin] and [member loop_end] playing back and forth. + Audio loops the data between [member loop_begin] and [member loop_end], playing back and forth. </constant> <constant name="LOOP_BACKWARD" value="3" enum="LoopMode"> - Audio loops the data between [member loop_begin] and [member loop_end] playing backward only. + Audio loops the data between [member loop_begin] and [member loop_end], playing backward only. </constant> </constants> </class> diff --git a/doc/classes/Dictionary.xml b/doc/classes/Dictionary.xml index cf0ed8bf68..7bd01d6781 100644 --- a/doc/classes/Dictionary.xml +++ b/doc/classes/Dictionary.xml @@ -4,8 +4,9 @@ Dictionary type. </brief_description> <description> - Dictionary type. Associative container which contains values referenced by unique keys. Dictionary are composed of pairs of keys (which must be unique) and values. You can define a dictionary by placing a comma separated list of [code]key: value[/code] pairs in curly braces [code]{}[/code]. - Erasing elements while iterating over them [b]is not supported[/b]. + Dictionary type. Associative container which contains values referenced by unique keys. Dictionaries are composed of pairs of keys (which must be unique) and values. Dictionaries will preserve the insertion order when adding elements, even though this may not be reflected when printing the dictionary. In other programming languages, this data structure is sometimes referred to as an hash map or associative array. + You can define a dictionary by placing a comma-separated list of [code]key: value[/code] pairs in curly braces [code]{}[/code]. + Erasing elements while iterating over them [b]is not supported[/b] and will result in undefined behavior. Creating a dictionary: [codeblock] var my_dir = {} # Creates an empty dictionary. @@ -16,15 +17,16 @@ key3: value3, } [/codeblock] - You can access values of a dictionary by referencing appropriate key in above example [code]points_dir["White"][/code] would return value of 50. + You can access a dictionary's values by referencing the appropriate key. In the above example, [code]points_dir["White"][/code] will return [code]50[/code]. You can also write [code]points_dir.White[/code], which is equivalent. However, you'll have to use the bracket syntax if the key you're accessing the dictionary with isn't a fixed string (such as a number or variable). [codeblock] export(String, "White", "Yellow", "Orange") var my_color var points_dir = {"White": 50, "Yellow": 75, "Orange": 100} func _ready(): + # We can't use dot syntax here as `my_color` is a variable. var points = points_dir[my_color] [/codeblock] - In the above code [code]points[/code] will be assigned the value that is paired with the appropriate color selected in [code]my_color[/code]. + In the above code, [code]points[/code] will be assigned the value that is paired with the appropriate color selected in [code]my_color[/code]. Dictionaries can contain more complex data: [codeblock] my_dir = {"First Array": [1, 2, 3, 4]} # Assigns an Array to a String key. @@ -36,9 +38,17 @@ [/codeblock] Finally, dictionaries can contain different types of keys and values in the same dictionary: [codeblock] - var my_dir = {"String Key": 5, 4: [1, 2, 3], 7: "Hello"} # This is a valid dictionary. + # This is a valid dictionary. + # To access the string "Nested value" below, use `my_dir.sub_dir.sub_key` or `my_dir["sub_dir"]["sub_key"]`. + # Indexing styles can be mixed and matched depending on your needs. + var my_dir = { + "String Key": 5, + 4: [1, 2, 3], + 7: "Hello", + "sub_dir": {"sub_key": "Nested value"}, + } [/codeblock] - [b]Note:[/b] Unlike [Array]s you can't compare dictionaries directly: + [b]Note:[/b] Unlike [Array]s, you can't compare dictionaries directly: [codeblock] array1 = [1, 2, 3] array2 = [1, 2, 3] diff --git a/doc/classes/PhysicalBone3D.xml b/doc/classes/PhysicalBone3D.xml index d45c72ee87..75f1f3eab4 100644 --- a/doc/classes/PhysicalBone3D.xml +++ b/doc/classes/PhysicalBone3D.xml @@ -45,21 +45,62 @@ </method> </methods> <members> + <member name="angular_damp" type="float" setter="set_angular_damp" getter="get_angular_damp" default="-1.0"> + Damps the body's rotation if greater than [code]0[/code]. + </member> + <member name="axis_lock_angular_x" type="bool" setter="set_axis_lock" getter="get_axis_lock" default="false"> + Lock the body's rotation in the X axis. + </member> + <member name="axis_lock_angular_y" type="bool" setter="set_axis_lock" getter="get_axis_lock" default="false"> + Lock the body's rotation in the Y axis. + </member> + <member name="axis_lock_angular_z" type="bool" setter="set_axis_lock" getter="get_axis_lock" default="false"> + Lock the body's rotation in the Z axis. + </member> + <member name="axis_lock_linear_x" type="bool" setter="set_axis_lock" getter="get_axis_lock" default="false"> + Lock the body's movement in the X axis. + </member> + <member name="axis_lock_linear_y" type="bool" setter="set_axis_lock" getter="get_axis_lock" default="false"> + Lock the body's movement in the Y axis. + </member> + <member name="axis_lock_linear_z" type="bool" setter="set_axis_lock" getter="get_axis_lock" default="false"> + Lock the body's movement in the Z axis. + </member> <member name="body_offset" type="Transform" setter="set_body_offset" getter="get_body_offset" default="Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 )"> + Sets the body's transform. </member> <member name="bounce" type="float" setter="set_bounce" getter="get_bounce" default="0.0"> + The body's bounciness. Values range from [code]0[/code] (no bounce) to [code]1[/code] (full bounciness). + </member> + <member name="can_sleep" type="bool" setter="set_can_sleep" getter="is_able_to_sleep" default="true"> + If [code]true[/code], the body is deactivated when there is no movement, so it will not take part in the simulation until it is awaken by an external force. </member> <member name="friction" type="float" setter="set_friction" getter="get_friction" default="1.0"> + The body's friction, from [code]0[/code] (frictionless) to [code]1[/code] (max friction). </member> <member name="gravity_scale" type="float" setter="set_gravity_scale" getter="get_gravity_scale" default="1.0"> + This is multiplied by the global 3D gravity setting found in [b]Project > Project Settings > Physics > 3d[/b] to produce the body's gravity. For example, a value of 1 will be normal gravity, 2 will apply double gravity, and 0.5 will apply half gravity to this object. </member> <member name="joint_offset" type="Transform" setter="set_joint_offset" getter="get_joint_offset" default="Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 )"> + Sets the joint's transform. + </member> + <member name="joint_rotation" type="Vector3" setter="set_joint_rotation" getter="get_joint_rotation" default="Vector3( 0, 0, 0 )"> + Sets the joint's rotation in radians. + </member> + <member name="joint_rotation_degrees" type="Vector3" setter="set_joint_rotation_degrees" getter="get_joint_rotation_degrees" default="Vector3( 0, 0, 0 )"> + Sets the joint's rotation in degrees. </member> <member name="joint_type" type="int" setter="set_joint_type" getter="get_joint_type" enum="PhysicalBone3D.JointType" default="0"> + Sets the joint type. See [enum JointType] for possible values. + </member> + <member name="linear_damp" type="float" setter="set_linear_damp" getter="get_linear_damp" default="-1.0"> + Damps the body's movement if greater than [code]0[/code]. </member> <member name="mass" type="float" setter="set_mass" getter="get_mass" default="1.0"> + The body's mass. </member> <member name="weight" type="float" setter="set_weight" getter="get_weight" default="9.8"> + The body's weight based on its mass and the global 3D gravity. Global values are set in [b]Project > Project Settings > Physics > 3d[/b]. </member> </members> <constants> diff --git a/doc/classes/RigidBody3D.xml b/doc/classes/RigidBody3D.xml index 829589f650..1db818d6af 100644 --- a/doc/classes/RigidBody3D.xml +++ b/doc/classes/RigidBody3D.xml @@ -28,7 +28,7 @@ <argument index="0" name="force" type="Vector3"> </argument> <description> - Adds a constant directional force without affecting rotation. + Adds a constant directional force (i.e. acceleration) without affecting rotation. This is equivalent to [code]add_force(force, Vector3(0,0,0))[/code]. </description> </method> @@ -40,7 +40,8 @@ <argument index="1" name="position" type="Vector3"> </argument> <description> - Adds a constant force (i.e. acceleration). + Adds a constant directional force (i.e. acceleration). + The position uses the rotation of the global coordinate system, but is centered at the object's origin. </description> </method> <method name="add_torque"> @@ -146,7 +147,7 @@ Lock the body's movement in the Z axis. </member> <member name="can_sleep" type="bool" setter="set_can_sleep" getter="is_able_to_sleep" default="true"> - If [code]true[/code], the RigidBody3D will not calculate forces and will act as a static body while there is no movement. It will wake up when forces are applied through other collisions or when the [code]apply_impulse[/code] method is used. + If [code]true[/code], the body is deactivated when there is no movement, so it will not take part in the simulation until it is awaken by an external force. </member> <member name="contact_monitor" type="bool" setter="set_contact_monitor" getter="is_contact_monitor_enabled" default="false"> If [code]true[/code], the RigidBody3D will emit signals when it collides with another RigidBody3D. |