Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clarification of Vertex() Parameters #452

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ beginShape();
texture(img);
// "laDefense.jpg" is 100x100 pixels in size so
// the values 0 and 400 are used for the
// parameters "u" and "v" to map it directly
// parameters "s" and "t" to map it directly
// to the vertex points
vertex(40, 80, 0, 0);
vertex(320, 20, 100, 0);
Expand Down
20 changes: 10 additions & 10 deletions content/references/translations/en/processing/vertex_.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,23 +9,23 @@
"texture_"
],
"name": "vertex()",
"description": "All shapes are constructed by connecting a series of vertices.\n <b>vertex()</b> is used to specify the vertex coordinates for points, lines,\n triangles, quads, and polygons. It is used exclusively within the\n <b>beginShape()</b> and <b>endShape()</b> functions. <br />\n <br />\n Drawing a vertex in 3D using the <b>z</b> parameter requires the P3D\n parameter in combination with size, as shown in the above example. <br />\n <br />\n This function is also used to map a texture onto geometry. The\n <b>texture()</b> function declares the texture to apply to the geometry and\n the <b>u</b> and <b>v</b> coordinates set define the mapping of this texture\n to the form. By default, the coordinates used for <b>u</b> and <b>v</b> are\n specified in relation to the image's size in pixels, but this relation can be\n changed with <b>textureMode()</b>.",
"description": "All shapes are constructed by connecting a series of vertices.\n <b>vertex()</b> is used to specify the vertex coordinates for points, lines,\n triangles, quads, and polygons. It is used exclusively within the\n <b>beginShape()</b> and <b>endShape()</b> functions. <br />\n <br />\n Drawing a vertex in 3D using the <b>z</b> parameter requires the P3D\n parameter in combination with size, as shown in the above example. <br />\n <br />\n This function is also used to map a texture onto geometry. The\n <b>texture()</b> function declares the texture to apply to the geometry and\n the <b>s</b> and <b>t</b> coordinates set define the mapping of this texture\n to the form. By default, the coordinates used for <b>s</b> and <b>t</b> are\n specified in relation to the image's size in pixels, but this relation can be\n changed with <b>textureMode()</b>.",
"syntax": [
"vertex(x, y)",
"vertex(x, y, z)",
"vertex(v)",
"vertex(x, y, u, v)",
"vertex(x, y, z, u, v)"
"vertex(point)",
"vertex(x, y, s, t)",
"vertex(x, y, z, s, t)"
],
"returns": "void",
"type": "function",
"category": "shape",
"subcategory": "vertex",
"parameters": [
{
"name": "v",
"description": "vertex parameters, as a float array of length VERTEX_FIELD_COUNT",
"type": ["float[]", "float"]
"name": "point",
"description": "vertex parameters, as a float array of length VERTEX_FIELD_COUNT (the number of dimensions). Cannot be used to apply textures.",
"type": ["float[]"]
},
{
"name": "x",
Expand All @@ -43,14 +43,14 @@
"type": ["float"]
},
{
"name": "u",
"name": "s",
"description": "horizontal coordinate for the texture mapping",
"type": ["float"]
},
{
"name": "v",
"name": "t",
"description": "vertical coordinate for the texture mapping",
"type": ["float", "float[]"]
"type": ["float"]
}
]
}
20 changes: 10 additions & 10 deletions content/references/translations/es/processing/vertex_.es.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,23 +9,23 @@
"texture_"
],
"name": "vertex()",
"description": "All shapes are constructed by connecting a series of vertices.\n <b>vertex()</b> is used to specify the vertex coordinates for points, lines,\n triangles, quads, and polygons. It is used exclusively within the\n <b>beginShape()</b> and <b>endShape()</b> functions. <br />\n <br />\n Drawing a vertex in 3D using the <b>z</b> parameter requires the P3D\n parameter in combination with size, as shown in the above example. <br />\n <br />\n This function is also used to map a texture onto geometry. The\n <b>texture()</b> function declares the texture to apply to the geometry and\n the <b>u</b> and <b>v</b> coordinates set define the mapping of this texture\n to the form. By default, the coordinates used for <b>u</b> and <b>v</b> are\n specified in relation to the image's size in pixels, but this relation can be\n changed with <b>textureMode()</b>.",
"description": "All shapes are constructed by connecting a series of vertices.\n <b>vertex()</b> is used to specify the vertex coordinates for points, lines,\n triangles, quads, and polygons. It is used exclusively within the\n <b>beginShape()</b> and <b>endShape()</b> functions. <br />\n <br />\n Drawing a vertex in 3D using the <b>z</b> parameter requires the P3D\n parameter in combination with size, as shown in the above example. <br />\n <br />\n This function is also used to map a texture onto geometry. The\n <b>texture()</b> function declares the texture to apply to the geometry and\n the <b>s</b> and <b>t</b> coordinates set define the mapping of this texture\n to the form. By default, the coordinates used for <b>s</b> and <b>t</b> are\n specified in relation to the image's size in pixels, but this relation can be\n changed with <b>textureMode()</b>.",
"syntax": [
"vertex(x, y)",
"vertex(x, y, z)",
"vertex(v)",
"vertex(x, y, u, v)",
"vertex(x, y, z, u, v)"
"vertex(point)",
"vertex(x, y, s, t)",
"vertex(x, y, z, s, t)"
],
"returns": "void",
"type": "function",
"category": "shape",
"subcategory": "vertex",
"parameters": [
{
"name": "v",
"description": "vertex parameters, as a float array of length VERTEX_FIELD_COUNT",
"type": ["float[]", "float"]
"name": "point",
"description": "vertex parameters, as a float array of length VERTEX_FIELD_COUNT (the number of dimensions). Cannot be used to apply textures.",
"type": ["float[]"]
},
{
"name": "x",
Expand All @@ -43,14 +43,14 @@
"type": ["float"]
},
{
"name": "u",
"name": "s",
"description": "horizontal coordinate for the texture mapping",
"type": ["float"]
},
{
"name": "v",
"name": "t",
"description": "vertical coordinate for the texture mapping",
"type": ["float", "float[]"]
"type": ["float"]
}
]
}