Explorar o código

Doc and examples

Didn't change the link to the source code at the end of
docs/api/extras/geometries/LatheGeometry.html.
rfm1201 %!s(int64=9) %!d(string=hai) anos
pai
achega
7a5f7629d0

+ 4 - 4
docs/api/extras/geometries/LatheGeometry.html

@@ -1,7 +1,7 @@
 <!DOCTYPE html>
 <html lang="en">
 	<head>
-		<meta charset="utf-8" />
+		<meta charset="utf-8" />
 		<base href="../../../" />
 		<script src="list.js"></script>
 		<script src="page.js"></script>
@@ -12,7 +12,7 @@
 
 		<h1>[name]</h1>
 
-		<div class="desc">Class for generating meshes with axial symmetry. Possible uses include donuts, pipes, vases etc. The lathe rotate around the Z axis.</div>
+		<div class="desc">Class for generating meshes with axial symmetry. Possible uses include donuts, pipes, vases etc. The lathe rotate around the Y axis.</div>
 
 
 		<h2>Example</h2>
@@ -20,7 +20,7 @@
 		<code>
 		var points = [];
 		for ( var i = 0; i < 10; i ++ ) {
-			points.push( new THREE.Vector3( Math.sin( i * 0.2 ) * 15 + 50, 0, ( i - 5 ) * 2 ) );
+			points.push( new THREE.Vector2( Math.sin( i * 0.2 ) * 15 + 50, ( i - 5 ) * 2 ) );
 
 		}
 		var geometry = new THREE.LatheGeometry( points );
@@ -34,7 +34,7 @@
 
 		<h3>[name]([page:Array points], [page:Integer segments], [page:Float phiStart], [page:Float phiLength])</h3>
 		<div>
-		points — Array of Vector3s. Since this rotates around Z axis, the y-values can be set to 0<br />
+		points — Array of Vector2s.<br />
 		segments — the number of circumference segments to generate. Default is 12.<br />
 		phiStart — the starting angle in radians. Default is 0.<br />
 		phiLength — the radian (0 to 2*PI) range of the lathed section 2*PI is a closed lathe, less than 2PI is a portion. Default is 2*PI

+ 1 - 1
editor/js/libs/tern-threejs/threejs.js

@@ -1618,7 +1618,7 @@
       "prototype": {
         "!proto": "THREE.Geometry.prototype"
       },
-      "!doc": "Class for generating meshes with axial symmetry. Possible uses include donuts, pipes, vases etc. The lathe rotate around the Z axis.",
+      "!doc": "Class for generating meshes with axial symmetry. Possible uses include donuts, pipes, vases etc. The lathe rotate around the Y axis.",
       "!type": "fn(points: [], segments: number, phiStart: number, phiLength: number)"
     },
     "OctahedronGeometry": {

+ 1 - 1
examples/misc_uv_tests.html

@@ -47,7 +47,7 @@
 
 			for ( var i = 0; i < 10; i ++ ) {
 
-			    points.push( new THREE.Vector3( Math.sin( i * 0.2 ) * 15 + 50, 0, ( i - 5 ) * 2 ) );
+			    points.push( new THREE.Vector2( Math.sin( i * 0.2 ) * 15 + 50, ( i - 5 ) * 2 ) );
 
 			}
 

+ 1 - 1
examples/webgl_geometries.html

@@ -101,7 +101,7 @@
 
 				for ( var i = 0; i < 50; i ++ ) {
 
-					points.push( new THREE.Vector3( Math.sin( i * 0.2 ) * Math.sin( i * 0.1 ) * 15 + 50, 0, ( i - 5 ) * 2 ) );
+					points.push( new THREE.Vector2( Math.sin( i * 0.2 ) * Math.sin( i * 0.1 ) * 15 + 50, ( i - 5 ) * 2 ) );
 
 				}
 

+ 15 - 15
examples/webgl_geometry_normals.html

@@ -66,23 +66,23 @@
 				{ type: 'CylinderGeometry', args: [ 25, 75, 200, 8, 3 ]} ,
 				{ type: 'OctahedronGeometry', args: [200, 0] },
 				{ type: 'LatheGeometry', args: [ [
-					new THREE.Vector3(0,0,-100),
-					new THREE.Vector3(0,50,-50),
-					new THREE.Vector3(0,10,0),
-					new THREE.Vector3(0,50,050),
-					new THREE.Vector3(0,0,100) ] ]},
+					new THREE.Vector2(0,-100),
+					new THREE.Vector2(50,-50),
+					new THREE.Vector2(10,0),
+					new THREE.Vector2(50,050),
+					new THREE.Vector2(0,100) ] ]},
 				{ type: 'LatheGeometry', args: [ [
-					new THREE.Vector3(0,0,-100),
-					new THREE.Vector3(0,50,-50),
-					new THREE.Vector3(0,10,0),
-					new THREE.Vector3(0,50,050),
-					new THREE.Vector3(0,100,100) ], 12, 0, Math.PI ] },
+					new THREE.Vector2(0,-100),
+					new THREE.Vector2(50,-50),
+					new THREE.Vector2(10,0),
+					new THREE.Vector2(50,050),
+					new THREE.Vector2(100,100) ], 12, 0, Math.PI ] },
 				{ type: 'LatheGeometry', args: [ [
-					new THREE.Vector3(0,10,-100),
-					new THREE.Vector3(0,50,-50),
-					new THREE.Vector3(0,10,0),
-					new THREE.Vector3(0,50,050),
-					new THREE.Vector3(0,0,100) ], 12, Math.PI*2/3, Math.PI*3/2 ] },
+					new THREE.Vector2(10,-100),
+					new THREE.Vector2(50,-50),
+					new THREE.Vector2(10,0),
+					new THREE.Vector2(50,050),
+					new THREE.Vector2(0,100) ], 12, Math.PI*2/3, Math.PI*3/2 ] },
 				{ type: 'TextGeometry', args: ['&', {
 						size: 200,
 						height: 50,

+ 5 - 5
examples/webgl_modifier_subdivision.html

@@ -67,11 +67,11 @@
 				{ type: 'CylinderGeometry', args: [ 25, 75, 200, 8, 3 ]} ,
 				{ type: 'OctahedronGeometry', args: [200, 0], meshScale:2 },
 				{ type: 'LatheGeometry', args: [ [
-					new THREE.Vector3(0,0,0),
-					new THREE.Vector3(0,50,50),
-					new THREE.Vector3(0,10,100),
-					new THREE.Vector3(0,50,150),
-					new THREE.Vector3(0,0,200) ] ]},
+					new THREE.Vector2(0,0),
+					new THREE.Vector2(50,50),
+					new THREE.Vector2(10,100),
+					new THREE.Vector2(50,150),
+					new THREE.Vector2(0,200) ] ]},
 				{ type: 'TextGeometry', args: ['&', {
 						size: 200,
 						height: 50,