Skip to content

Commit e61ad46

Browse files
authored
Merge pull request #6965 from frigorific44/patch-1
Update rename changes to SurfaceTool
2 parents 6538f38 + 642282b commit e61ad46

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

tutorials/3d/procedural_geometry/surfacetool.rst

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@ Attributes are added before each vertex is added:
1515
.. tabs::
1616
.. code-tab:: gdscript GDScript
1717

18-
st.add_normal() # Overwritten by normal below.
19-
st.add_normal() # Added to next vertex.
20-
st.add_color() # Added to next vertex.
18+
st.set_normal() # Overwritten by normal below.
19+
st.set_normal() # Added to next vertex.
20+
st.set_color() # Added to next vertex.
2121
st.add_vertex() # Captures normal and color above.
22-
st.add_normal() # Normal never added to a vertex.
22+
st.set_normal() # Normal never added to a vertex.
2323

2424
When finished generating your geometry with the :ref:`SurfaceTool <class_surfacetool>`
2525
call ``commit()`` to finish generating the mesh. If an :ref:`ArrayMesh <class_ArrayMesh>` is passed
@@ -43,17 +43,17 @@ Code creates a triangle with indices
4343
st.begin(Mesh.PRIMITIVE_TRIANGLES)
4444

4545
# Prepare attributes for add_vertex.
46-
st.add_normal(Vector3(0, 0, 1))
47-
st.add_uv(Vector2(0, 0))
46+
st.set_normal(Vector3(0, 0, 1))
47+
st.set_uv(Vector2(0, 0))
4848
# Call last for each vertex, adds the above attributes.
4949
st.add_vertex(Vector3(-1, -1, 0))
5050

51-
st.add_normal(Vector3(0, 0, 1))
52-
st.add_uv(Vector2(0, 1))
51+
st.set_normal(Vector3(0, 0, 1))
52+
st.set_uv(Vector2(0, 1))
5353
st.add_vertex(Vector3(-1, 1, 0))
5454

55-
st.add_normal(Vector3(0, 0, 1))
56-
st.add_uv(Vector2(1, 1))
55+
st.set_normal(Vector3(0, 0, 1))
56+
st.set_uv(Vector2(1, 1))
5757
st.add_vertex(Vector3(1, 1, 0))
5858

5959
# Commit to a mesh.

0 commit comments

Comments
 (0)