summaryrefslogtreecommitdiff
path: root/doc/classes/SurfaceTool.xml
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2019-04-05 15:19:21 +0200
committerGitHub <noreply@github.com>2019-04-05 15:19:21 +0200
commit63d3a42f82d386c94eb9e11641d04ada4150c5e5 (patch)
tree5617e7270df9be072037c251fc49f4b0f9fb77e4 /doc/classes/SurfaceTool.xml
parent4011429e574a4d7a31725c38d92dd34925487dc7 (diff)
parentd80bc5cbbab71fb9b8f25ec56a0baa5b4cee68a9 (diff)
Merge pull request #27465 from neikeq/road-to-lang-agnostic-docs-is-going-to-be-tough
EditorHelp: Improve enum ref resolving and add constant ref support
Diffstat (limited to 'doc/classes/SurfaceTool.xml')
-rw-r--r--doc/classes/SurfaceTool.xml4
1 files changed, 2 insertions, 2 deletions
diff --git a/doc/classes/SurfaceTool.xml b/doc/classes/SurfaceTool.xml
index 0786aece34..3ee0e0ac0a 100644
--- a/doc/classes/SurfaceTool.xml
+++ b/doc/classes/SurfaceTool.xml
@@ -4,7 +4,7 @@
Helper tool to create geometry.
</brief_description>
<description>
- The [code]SurfaceTool[/code] is used to construct a [Mesh] by specifying vertex attributes individually. It can be used to construct a [Mesh] from script. All properties except index need to be added before a call to [method add_vertex]. For example adding vertex colors and UVs looks like
+ The [SurfaceTool] is used to construct a [Mesh] by specifying vertex attributes individually. It can be used to construct a [Mesh] from script. All properties except index need to be added before a call to [method add_vertex]. For example adding vertex colors and UVs looks like
[codeblock]
var st = SurfaceTool.new()
st.begin(Mesh.PRIMITIVE_TRIANGLES)
@@ -12,7 +12,7 @@
st.add_uv(Vector2(0, 0))
st.add_vertex(Vector3(0, 0, 0))
[/codeblock]
- The [code]SurfaceTool[/code] now contains one vertex of a triangle which has a UV coordinate and a specified [Color]. If another vertex were added without calls to [method add_uv] or [method add_color] then the last values would be used.
+ The [SurfaceTool] now contains one vertex of a triangle which has a UV coordinate and a specified [Color]. If another vertex were added without calls to [method add_uv] or [method add_color] then the last values would be used.
It is very important that vertex attributes are passed [b]before[/b] the call to [method add_vertex], failure to do this will result in an error when committing the vertex information to a mesh.
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.
</description>