Iñigo Valentin 12 роки тому
батько
коміт
f25b94fc4c
1 змінених файлів з 15 додано та 5 видалено
  1. 15 5
      README.md

+ 15 - 5
README.md

@@ -52,6 +52,7 @@ Note that the canvas is automatically cleared when a new object is loaded.
 
 
 ### Transformations ###
 ### Transformations ###
 
 
+
 ##### Rotate the object #####
 ##### Rotate the object #####
 
 
 You can rotate the object by dragging it with the mouse or your finger in a touch screen. Also, you can apply rotation programatically:
 You can rotate the object by dragging it with the mouse or your finger in a touch screen. Also, you can apply rotation programatically:
@@ -64,17 +65,19 @@ myObJS.rotateY(1);  //Rotate along the Y edge to the right
 ```
 ```
 Note that the rotation speed can be set (see *Set rotation speed*).
 Note that the rotation speed can be set (see *Set rotation speed*).
 
 
+
 ##### Move the object #####
 ##### Move the object #####
 
 
 You can move the object around by dragging it with the mouse while holding down the *shift* key. Also, you can move it programatically:
 You can move the object around by dragging it with the mouse while holding down the *shift* key. Also, you can move it programatically:
 
 
 ```javascript
 ```javascript
-myObJS.rotateX(-1); //Rotate along the X edge to the left
-myObJS.rotateX(1);  //Rotate along the X edge to the right
-myObJS.rotateY(-1); //Rotate along the Y edge to the left
-myObJS.rotateY(1);  //Rotate along the Y edge to the right
+myObJS.moveHorizontal(-1); //Move to the left
+myObJS.moveHorizontal(1);  //Move right
+myObJS.moveVertical(-1);   //Move up
+myObJS.moveVertical(1);    //Move down
 ```
 ```
-Note that the rotation speed can be set (see *Set movement speed*).
+Note that the movement speed can be set (see *Set movement speed*).
+
 
 
 ##### Zoom #####
 ##### Zoom #####
 
 
@@ -92,6 +95,7 @@ Note that the zoom speed can be set (see *Set zoom speed*).
 
 
 You can change parameters such as the elements to draw, their color, transparency, rotation speed, zoom speed... in the script, but much of them can be changed on runtime, so you can use controls.
 You can change parameters such as the elements to draw, their color, transparency, rotation speed, zoom speed... in the script, but much of them can be changed on runtime, so you can use controls.
 
 
+
 ##### Select which elements to draw #####
 ##### Select which elements to draw #####
 ```javascript
 ```javascript
 myObJS.drawVertizes(true);    //Draw vertizes
 myObJS.drawVertizes(true);    //Draw vertizes
@@ -107,6 +111,7 @@ myObJS.drawBackground(true);  //Draw the background
 myObJS.drawBackground(false); //Don't draw the background
 myObJS.drawBackground(false); //Don't draw the background
 ```
 ```
 
 
+
 ##### Select color for elements #####
 ##### Select color for elements #####
 ```javascript
 ```javascript
 myObJS.setVertizesColor(code);   //Set the color for the vertizes
 myObJS.setVertizesColor(code);   //Set the color for the vertizes
@@ -123,6 +128,7 @@ myObJS.setBackgroundColor(code); //Set the background color
 	- *'#FF8600'*, for <span style="color:#FF8600">orange</span>.
 	- *'#FF8600'*, for <span style="color:#FF8600">orange</span>.
 	- *'#DDFFDD'*, for <span style="color:#AAFFAA">light green</span>.
 	- *'#DDFFDD'*, for <span style="color:#AAFFAA">light green</span>.
 
 
+
 ##### Use materials #####
 ##### Use materials #####
 
 
 If a .mtl file is present in the same directory as the obj file, you can use the materials there to colorize the model (enabled by default). 
 If a .mtl file is present in the same directory as the obj file, you can use the materials there to colorize the model (enabled by default). 
@@ -132,24 +138,28 @@ myObJS.linkMaterial(false); //Don't use .mtl file
 ```
 ```
 Note that, when using .mtl files, faces with no material assigned will use the color defined by the user.
 Note that, when using .mtl files, faces with no material assigned will use the color defined by the user.
 
 
+
 ##### Select face transparency #####
 ##### Select face transparency #####
 ```javascript
 ```javascript
 myObJS.setAlpha(percent);
 myObJS.setAlpha(percent);
 ```
 ```
 * *percent* is an integer, between 0 and 100, indicating the level of transparency you want to apply to the faces.
 * *percent* is an integer, between 0 and 100, indicating the level of transparency you want to apply to the faces.
 
 
+
 ##### Set rotation speed #####
 ##### Set rotation speed #####
 ```javascript
 ```javascript
 myObJS.setRotationSpeed(value);
 myObJS.setRotationSpeed(value);
 ```
 ```
 * *value* is an integer, between 0 and 10. The greater it is, the greater the rotation speed.
 * *value* is an integer, between 0 and 10. The greater it is, the greater the rotation speed.
 
 
+
 ##### Set movement speed #####
 ##### Set movement speed #####
 ```javascript
 ```javascript
 myObJS.setMovementSpeed(value);
 myObJS.setMovementSpeed(value);
 ```
 ```
 * *value* is an integer, between 0 and 10. The greater it is, the greater the movement speed.
 * *value* is an integer, between 0 and 10. The greater it is, the greater the movement speed.
 
 
+
 ##### Set zoom speed #####
 ##### Set zoom speed #####
 ```javascript
 ```javascript
 myObJS.setZoomSpeed(value);
 myObJS.setZoomSpeed(value);