Ver código fonte

Sync classref with 3.2 branch

Rémi Verschelde 5 anos atrás
pai
commit
19329329de

+ 4 - 2
classes/class_arraymesh.rst

@@ -38,6 +38,10 @@ The most basic example is the creation of a single triangle:
 
 The :ref:`MeshInstance<class_MeshInstance>` is ready to be added to the :ref:`SceneTree<class_SceneTree>` to be shown.
 
+See also :ref:`ImmediateGeometry<class_ImmediateGeometry>`, :ref:`MeshDataTool<class_MeshDataTool>` and :ref:`SurfaceTool<class_SurfaceTool>` for procedural geometry generation.
+
+**Note:** Godot uses clockwise `winding order <https://learnopengl.com/Advanced-OpenGL/Face-culling>`_ for front faces of triangle primitive modes.
+
 Tutorials
 ---------
 
@@ -247,8 +251,6 @@ The ``arrays`` argument is an array of arrays. See :ref:`ArrayType<enum_ArrayMes
 
 Adding an index array puts this function into "index mode" where the vertex and other arrays become the sources of data, and the index array defines the order of the vertices.
 
-Godot uses clockwise winding order for front faces of triangle primitive modes.
-
 ----
 
 .. _class_ArrayMesh_method_clear_blend_shapes:

+ 1 - 1
classes/class_audiostreamplayer.rst

@@ -150,7 +150,7 @@ If the audio configuration has more than two speakers, this sets the target chan
 | *Getter*  | get_pitch_scale()      |
 +-----------+------------------------+
 
-Changes the pitch and the tempo of the audio.
+The pitch and the tempo of the audio, as a multiplier of the audio sample's sample rate.
 
 ----
 

+ 1 - 1
classes/class_audiostreamplayer2d.rst

@@ -167,7 +167,7 @@ Maximum distance from which audio is still hearable.
 | *Getter*  | get_pitch_scale()      |
 +-----------+------------------------+
 
-Changes the pitch and the tempo of the audio.
+The pitch and the tempo of the audio, as a multiplier of the audio sample's sample rate.
 
 ----
 

+ 1 - 1
classes/class_audiostreamplayer3d.rst

@@ -368,7 +368,7 @@ Decides if audio should pause when source is outside of :ref:`max_distance<class
 | *Getter*  | get_pitch_scale()      |
 +-----------+------------------------+
 
-Changes the pitch and the tempo of the audio.
+The pitch and the tempo of the audio, as a multiplier of the audio sample's sample rate.
 
 ----
 

+ 2 - 0
classes/class_editorfilesystem.rst

@@ -18,6 +18,8 @@ Description
 
 This object holds information of all resources in the filesystem, their types, etc.
 
+**Note:** This class shouldn't be instantiated directly. Instead, access the singleton using :ref:`EditorInterface.get_resource_filesystem<class_EditorInterface_method_get_resource_filesystem>`.
+
 Methods
 -------
 

+ 3 - 1
classes/class_editorinspector.rst

@@ -16,7 +16,9 @@ A tab used to edit properties of the selected node.
 Description
 -----------
 
-The editor inspector is by default located on the right-hand side of the editor. It's used to edit the properties of the selected node. For example, you can select a node such as Sprite2D then edit its transform through the inspector tool. The editor inspector is an essential tool in the game development workflow.
+The editor inspector is by default located on the right-hand side of the editor. It's used to edit the properties of the selected node. For example, you can select a node such as :ref:`Sprite<class_Sprite>` then edit its transform through the inspector tool. The editor inspector is an essential tool in the game development workflow.
+
+**Note:** This class shouldn't be instantiated directly. Instead, access the singleton using :ref:`EditorInterface.get_inspector<class_EditorInterface_method_get_inspector>`.
 
 Properties
 ----------

+ 2 - 0
classes/class_editorinterface.rst

@@ -18,6 +18,8 @@ Description
 
 EditorInterface gives you control over Godot editor's window. It allows customizing the window, saving and (re-)loading scenes, rendering mesh previews, inspecting and editing resources and objects, and provides access to :ref:`EditorSettings<class_EditorSettings>`, :ref:`EditorFileSystem<class_EditorFileSystem>`, :ref:`EditorResourcePreview<class_EditorResourcePreview>`, :ref:`ScriptEditor<class_ScriptEditor>`, the editor viewport, and information about scenes.
 
+**Note:** This class shouldn't be instantiated directly. Instead, access the singleton using :ref:`EditorPlugin.get_editor_interface<class_EditorPlugin_method_get_editor_interface>`.
+
 Methods
 -------
 

+ 2 - 0
classes/class_editorresourcepreview.rst

@@ -18,6 +18,8 @@ Description
 
 This object is used to generate previews for resources of files.
 
+**Note:** This class shouldn't be instantiated directly. Instead, access the singleton using :ref:`EditorInterface.get_resource_previewer<class_EditorInterface_method_get_resource_previewer>`.
+
 Methods
 -------
 

+ 2 - 0
classes/class_editorselection.rst

@@ -18,6 +18,8 @@ Description
 
 This object manages the SceneTree selection in the editor.
 
+**Note:** This class shouldn't be instantiated directly. Instead, access the singleton using :ref:`EditorInterface.get_selection<class_EditorInterface_method_get_selection>`.
+
 Methods
 -------
 

+ 2 - 0
classes/class_editorsettings.rst

@@ -26,6 +26,8 @@ Accessing the settings is done by using the regular :ref:`Object<class_Object>`
     settings.get(prop)
     list_of_settings = settings.get_property_list()
 
+**Note:** This class shouldn't be instantiated directly. Instead, access the singleton using :ref:`EditorInterface.get_editor_settings<class_EditorInterface_method_get_editor_settings>`.
+
 Methods
 -------
 

+ 6 - 0
classes/class_immediategeometry.rst

@@ -18,6 +18,12 @@ Description
 
 Draws simple geometry from code. Uses a drawing mode similar to OpenGL 1.x.
 
+See also :ref:`ArrayMesh<class_ArrayMesh>`, :ref:`MeshDataTool<class_MeshDataTool>` and :ref:`SurfaceTool<class_SurfaceTool>` for procedural geometry generation.
+
+**Note:** ImmediateGeometry3D is best suited to small amounts of mesh data that change every frame. It will be slow when handling large amounts of mesh data. If mesh data doesn't change often, use :ref:`ArrayMesh<class_ArrayMesh>`, :ref:`MeshDataTool<class_MeshDataTool>` or :ref:`SurfaceTool<class_SurfaceTool>` instead.
+
+**Note:** Godot uses clockwise `winding order <https://learnopengl.com/Advanced-OpenGL/Face-culling>`_ for front faces of triangle primitive modes.
+
 Methods
 -------
 

+ 4 - 0
classes/class_meshdatatool.rst

@@ -33,6 +33,10 @@ Below is an example of how MeshDataTool may be used.
     mesh.surface_remove(0)
     mdt.commit_to_surface(mesh)
 
+See also :ref:`ArrayMesh<class_ArrayMesh>`, :ref:`ImmediateGeometry<class_ImmediateGeometry>` and :ref:`SurfaceTool<class_SurfaceTool>` for procedural geometry generation.
+
+**Note:** Godot uses clockwise `winding order <https://learnopengl.com/Advanced-OpenGL/Face-culling>`_ for front faces of triangle primitive modes.
+
 Methods
 -------
 

+ 5 - 0
classes/class_scripteditor.rst

@@ -13,6 +13,11 @@ ScriptEditor
 
 Godot editor's script editor.
 
+Description
+-----------
+
+**Note:** This class shouldn't be instantiated directly. Instead, access the singleton using :ref:`EditorInterface.get_script_editor<class_EditorInterface_method_get_script_editor>`.
+
 Methods
 -------
 

+ 4 - 0
classes/class_surfacetool.rst

@@ -32,6 +32,10 @@ Vertex attributes must be passed **before** calling :ref:`add_vertex<class_Surfa
 
 Additionally, the attributes used before the first vertex is added determine the format of the mesh. For example, if you only add UVs to the first vertex, you cannot add color to any of the subsequent vertices.
 
+See also :ref:`ArrayMesh<class_ArrayMesh>`, :ref:`ImmediateGeometry<class_ImmediateGeometry>` and :ref:`MeshDataTool<class_MeshDataTool>` for procedural geometry generation.
+
+**Note:** Godot uses clockwise `winding order <https://learnopengl.com/Advanced-OpenGL/Face-culling>`_ for front faces of triangle primitive modes.
+
 Methods
 -------
 

+ 4 - 2
classes/class_tween.rst

@@ -20,7 +20,7 @@ Tweens are useful for animations requiring a numerical property to be interpolat
 
 ``Tween`` is more suited than :ref:`AnimationPlayer<class_AnimationPlayer>` for animations where you don't know the final values in advance. For example, interpolating a dynamically-chosen camera zoom value is best done with a ``Tween`` node; it would be difficult to do the same thing with an :ref:`AnimationPlayer<class_AnimationPlayer>` node.
 
-Here is a brief usage example that causes a 2D node to move smoothly between two positions:
+Here is a brief usage example that makes a 2D node move smoothly between two positions:
 
 ::
 
@@ -32,7 +32,9 @@ Here is a brief usage example that causes a 2D node to move smoothly between two
 
 Many methods require a property name, such as ``"position"`` above. You can find the correct property name by hovering over the property in the Inspector. You can also provide the components of a property directly by using ``"property:component"`` (eg. ``position:x``), where it would only apply to that particular component.
 
-Many of the methods accept ``trans_type`` and ``ease_type``. The first accepts an :ref:`TransitionType<enum_Tween_TransitionType>` constant, and refers to the way the timing of the animation is handled (see ``http://easings.net/`` for some examples). The second accepts an :ref:`EaseType<enum_Tween_EaseType>` constant, and controls the where ``trans_type`` is applied to the interpolation (in the beginning, the end, or both). If you don't know which transition and easing to pick, you can try different :ref:`TransitionType<enum_Tween_TransitionType>` constants with :ref:`EASE_IN_OUT<class_Tween_constant_EASE_IN_OUT>`, and use the one that looks best.
+Many of the methods accept ``trans_type`` and ``ease_type``. The first accepts an :ref:`TransitionType<enum_Tween_TransitionType>` constant, and refers to the way the timing of the animation is handled (see `easings.net <https://easings.net/>`_ for some examples). The second accepts an :ref:`EaseType<enum_Tween_EaseType>` constant, and controls the where ``trans_type`` is applied to the interpolation (in the beginning, the end, or both). If you don't know which transition and easing to pick, you can try different :ref:`TransitionType<enum_Tween_TransitionType>` constants with :ref:`EASE_IN_OUT<class_Tween_constant_EASE_IN_OUT>`, and use the one that looks best.
+
+**`Tween easing and transition types cheatsheet <https://raw.githubusercontent.com/godotengine/godot-docs/master/img/tween_cheatsheet.png>`_**
 
 Properties
 ----------