浏览代码

Docs: Clean up.

Mugen87 5 年之前
父节点
当前提交
55a6e7f656
共有 2 个文件被更改,包括 8 次插入8 次删除
  1. 2 2
      docs/api/en/constants/DrawModes.html
  2. 6 6
      docs/api/zh/constants/DrawModes.html

+ 2 - 2
docs/api/en/constants/DrawModes.html

@@ -60,12 +60,12 @@
 
 		// ...
 
-		geometry.addAttribute( 'position', new THREE.Float32BufferAttribute( vertices, 3 ) );
+		geometry.setAttribute( 'position', new THREE.Float32BufferAttribute( vertices, 3 ) );
 
 		var material = new THREE.MeshBasicMaterial( { color: 0xffff00 } );
 
 		var mesh = new THREE.Mesh( geometry, material );
-		mesh.drawMode = THREE.TrianglesDrawMode; //default
+		mesh.setDrawMode( THREE.TrianglesDrawMode ); //default
 
 		scene.add( mesh );
 		</code>

+ 6 - 6
docs/api/zh/constants/DrawModes.html

@@ -51,19 +51,19 @@
 		var geometry = new THREE.BufferGeometry();
 
 		var vertices = [];
-	
+
 		vertices.push( -10,  10, 0 );
 		vertices.push( -10, -10, 0 );
 		vertices.push(  10, -10, 0 );
-	
+
 		// ...
-	
-		geometry.addAttribute( 'position', new THREE.Float32BufferAttribute( vertices, 3 ) );
-	
+
+		geometry.setAttribute( 'position', new THREE.Float32BufferAttribute( vertices, 3 ) );
+
 		var material = new THREE.MeshBasicMaterial( { color: 0xffff00 } );
 
 		var mesh = new THREE.Mesh( geometry, material );
-		mesh.drawMode = THREE.TrianglesDrawMode; //default
+		mesh.setDrawMode( THREE.TrianglesDrawMode ); //default
 
 		scene.add( mesh );
 		</code>