Bläddra i källkod

Typo fix vertizes -> vertices

Iñigo Valentin 12 år sedan
förälder
incheckning
4260feae6e
2 ändrade filer med 11 tillägg och 11 borttagningar
  1. 5 5
      README.md
  2. 6 6
      script/ObJS.js

+ 5 - 5
README.md

@@ -18,9 +18,9 @@ ObJS
 * Zoom in and out.
 * Object movement.
 * Mouse and touch control.
-* Choose to draw (or not) vertizes, edges or faces.
+* Choose to draw (or not) vertices, edges or faces.
 * Use mtl files for material color.
-* Change colors of background, vertizes, edges, and faces during runtime.
+* Change colors of background, vertices, edges, and faces during runtime.
 * Change face transparency during runtime, so hidden elements are visible.
 * Change zoom and rotation speed during runtime.
 
@@ -98,8 +98,8 @@ You can change parameters such as the elements to draw, their color, transparenc
 
 ##### Select which elements to draw #####
 ```javascript
-myObJS.drawVertizes(true);    //Draw vertizes
-myObJS.drawVertizes(false);   //Don't draw vertizes
+myObJS.drawVertices(true);    //Draw vertices
+myObJS.drawVertices(false);   //Don't draw vertices
 
 myObJS.drawEdges(true);       //Draw edges
 myObJS.drawEdges(false);      //Don't draw edges
@@ -114,7 +114,7 @@ myObJS.drawBackground(false); //Don't draw the background
 
 ##### Select color for elements #####
 ```javascript
-myObJS.setVertizesColor(code);   //Set the color for the vertizes
+myObJS.setVerticesColor(code);   //Set the color for the vertices
 
 myObJS.setEdgesColor(code);      //Set the color for the edges
 

+ 6 - 6
script/ObJS.js

@@ -258,7 +258,7 @@ function ObJS(){
 	 * #return: nothing                                                 *
 	 * #scope: public                                                   *
 	 ********************************************************************/ 
-	this.drawVertizes = function(on){
+	this.drawVertices = function(on){
 		if (on == true || on == false){
 			dVerts = on;
 			draw();
@@ -295,14 +295,14 @@ function ObJS(){
 	 * #return: nothing                                                 *
 	 * #scope: public                                                   *
 	 ********************************************************************/
-	this.setVertizesColor = function(code){
+	this.setVerticesColor = function(code){
 		if (isColor(code)){
 			var color = hexToRgb(code);
 			vertColor = "rgba(" + color.r + ", " + color.g + ", "  + color.b + ", 1)";
 			draw();
 		}
 		else
-			console.log("setVertizesColor(" + code + ") ERROR: " + code + " not a valid hex color");
+			console.log("setVerticesColor(" + code + ") ERROR: " + code + " not a valid hex color");
 	};
 	
 	this.setEdgesColor = function(code){
@@ -553,7 +553,7 @@ function ObJS(){
 	/********************************************************************
 	 * Function tat populates the vert[] array with and array of three  *
 	 * elements, containig the coordinates, and the face[] array with   *
-	 * the vertizes forming the face, plus one element indicating the   *
+	 * the vertices forming the face, plus one element indicating the   *
 	 * codename of the material.                                        *
 	 * #parameters:                                                     *
 	 *   text (string): the content of the obj file.                    *
@@ -717,11 +717,11 @@ function ObJS(){
 		ctx.font = "12px Arial";
 		var h = canvas.height / 2 - 14;
 		var w = 10 - (canvas.width / 2);
-		ctx.fillText("ObJS:   " + totalVert + " vertizes   " + totalFace + " faces   " + totalMaterial + " materials", w, h);
+		ctx.fillText("ObJS:   " + totalVert + " vertices   " + totalFace + " faces   " + totalMaterial + " materials", w, h);
 	};
 	
 	/********************************************************************
-	 * Function that draws th vertizes, faces and edges in the canvas.  *
+	 * Function that draws th vertices, faces and edges in the canvas.  *
 	 * #parameters: none                                                *
 	 * #return: nothing                                                 *
 	 * #scope: private                                                  *