Răsfoiți Sursa

docs: MultiMaterial references removed

Jost Schmithals 8 ani în urmă
părinte
comite
b86d04006b

+ 7 - 7
docs/api/core/BufferGeometry.html

@@ -138,12 +138,12 @@
 		<h3>[property:Array groups]</h3>
 		<div>
 			Split the geometry into groups, each of which will be rendered in a separate WebGL draw call.
-			This allows a [page:MultiMaterial] to be used with the bufferGeometry.<br /><br />
+			This allows an array of materials to be used with the bufferGeometry.<br /><br />
 
 			Each group is an object of the form:
 			<code>{ start: Integer, count: Integer, materialIndex: Integer }</code>
 			where start specifies the index of the first vertex in this draw call, count specifies
-			how many vertices are included, and materialIndex specifies the [page:MultiMaterial] index to use.<br /><br />
+			how many vertices are included, and materialIndex specifies the material array index to use.<br /><br />
 
 			Use [page:.addGroup] to add groups, rather than modifying this array directly.
 		</div>
@@ -329,11 +329,11 @@
 		<div>
 		Translate the geometry. This is typically done as a one time operation, and not during a loop.
     Use [page:Object3D.position] for typical real-time mesh translation.
-		</div>
-
-		<h3>[method:BufferGeometry updateFromObject] ( [page:Object3D object] )</h3>
-		<div>Updates the attributes for this BufferGeometry from an [page:Object3D].</div>
-
+		</div>
+
+		<h3>[method:BufferGeometry updateFromObject] ( [page:Object3D object] )</h3>
+		<div>Updates the attributes for this BufferGeometry from an [page:Object3D].</div>
+
 
 
 

+ 133 - 133
docs/api/core/Face3.html

@@ -1,134 +1,134 @@
-<!DOCTYPE html>
-<html lang="en">
-	<head>
+<!DOCTYPE html>
+<html lang="en">
+	<head>
 		<meta charset="utf-8" />
-		<base href="../../" />
-		<script src="list.js"></script>
-		<script src="page.js"></script>
-		<link type="text/css" rel="stylesheet" href="page.css" />
-	</head>
-	<body>
-		<h1>[name]</h1>
-
-		<div class="desc">
-		Triangular face used in [page:Geometry]. These are created automatically for all
-		standard geometry types, however if you are building a custom geometry you will have to
-		create them manually.
-		</div>
-
-
-		<h2>Examples</h2>
-
-		<div>[example:misc_ubiquity_test ubiquity / test ]</div>
-		<div>[example:svg_sandbox svg / sandbox ]</div>
-		<div>[example:webgl_exporter_obj WebGL / exporter / obj ]</div>
-		<div>[example:webgl_shaders_vector WebGL / shaders / vector ]</div>
-
-
-		<code>
-var material = new THREE.MeshStandardMaterial( { color : 0x00cc00 } );
-
-//create a triangular geometry
-var geometry = new THREE.Geometry();
-geometry.vertices.push( new THREE.Vector3( -50, -50, 0 ) );
-geometry.vertices.push( new THREE.Vector3(  50, -50, 0 ) );
-geometry.vertices.push( new THREE.Vector3(  50,  50, 0 ) );
-
-//create a new face using vertices 0, 1, 2
-var normal = new THREE.Vector3( 0, 1, 0 ); //optional
-var color = new THREE.Color( 0xffaa00 ); //optional
-var materialIndex = 0; //optional
-var face = new THREE.Face3( 0, 1, 2, normal, color, materialIndex );
-
-//add the face to the geometry's faces array
-geometry.faces.push( face );
-
-//the face normals and vertex normals can be calculated automatically if not supplied above
-geometry.computeFaceNormals();
-geometry.computeVertexNormals();
-
-scene.add( new THREE.Mesh( geometry, material ) );
-	</code>
-
-
-		<h2>Constructor</h2>
-
-		<h3>[name]( [page:Integer a], [page:Integer b], [page:Integer c], [page:Vector3 normal], [page:Color color], [page:Integer materialIndex] )</h3>
-		<div>
-		a — Vertex A index.<br />
-		b — Vertex B index.<br />
-		c — Vertex C index.<br /><br />
-
-		normal — (optional) Face normal ([page:Vector3 Vector3]) or array of vertex normals.
-		If a single vector is passed in, this sets [page:.normal], otherwise if an array of three
-		vectors is passed in this sets [page:.vertexNormals]<br /><br />
-
-		color — (optional) Face [page:Color color] or array of vertex [page:Color colors].
-		If a single vector is passed in, this sets [page:.color], otherwise if an array of three
-		vectors is passed in this sets [page:.vertexColors]<br /><br />
-
-		materialIndex — (optional) which index of a [page:MultiMaterial] to associate
-		with the face.
-		</div>
-
-		<h2>Properties</h2>
-
-		<h3>[property:Integer a]</h3>
-		<div>
-		Vertex A index.
-		</div>
-
-		<h3>[property:Integer b]</h3>
-		<div>
-		Vertex B index.
-		</div>
-
-		<h3>[property:Integer c]</h3>
-		<div>
-		Vertex C index.
-		</div>
-
-		<h3>[property:Vector3 normal]</h3>
-		<div>
-		Face normal - vector showing the direction of the Face3. If calculated automatically
-		(using [page:Geometry.computeFaceNormals]), this is the normalized cross product of two edges of the
-		triangle. Default is *(0, 0, 0)*.
-		</div>
-
-		<h3>[property:Color color]</h3>
-		<div>
-		Face color - for this to be used a material's [page:Material.vertexColors vertexColors] property
-		must be set to [page:Materials THREE.FaceColors].
-		</div>
-
-		<h3>[property:Array vertexNormals]</h3>
-		<div>
-		Array of 3 [page:Vector3 vertex normals].
-		</div>
-
-		<h3>[property:Array vertexColors]</h3>
-		<div>
-		Array of 3 vertex colors - for these to be used a material's [page:Material.vertexColors vertexColors] property
-		must be set to [page:Materials THREE.VertexColors].
-		</div>
-
-
-		<h3>[property:Integer materialIndex]</h3>
-		<div>
-		Material index (points to [page:MultiMaterial MultiMaterial.materials]). Default is *0*.
-		</div>
-
-		<h2>Methods</h2>
-
-		<h3>[method:Face3 clone]()</h3>
-		<div>Creates a new clone of the Face3 object.</div>
-
-		<h3>[method:Face3 copy]( [page:Face3 face3] )</h3>
-		<div>Copy the paramaters of another Face3 into this.</div>
-
-
-		<h2>Source</h2>
-
-		[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
-	</body>
-</html>
+		<base href="../../" />
+		<script src="list.js"></script>
+		<script src="page.js"></script>
+		<link type="text/css" rel="stylesheet" href="page.css" />
+	</head>
+	<body>
+		<h1>[name]</h1>
+
+		<div class="desc">
+		Triangular face used in [page:Geometry]. These are created automatically for all
+		standard geometry types, however if you are building a custom geometry you will have to
+		create them manually.
+		</div>
+
+
+		<h2>Examples</h2>
+
+		<div>[example:misc_ubiquity_test ubiquity / test ]</div>
+		<div>[example:svg_sandbox svg / sandbox ]</div>
+		<div>[example:webgl_exporter_obj WebGL / exporter / obj ]</div>
+		<div>[example:webgl_shaders_vector WebGL / shaders / vector ]</div>
+
+
+		<code>
+var material = new THREE.MeshStandardMaterial( { color : 0x00cc00 } );
+
+//create a triangular geometry
+var geometry = new THREE.Geometry();
+geometry.vertices.push( new THREE.Vector3( -50, -50, 0 ) );
+geometry.vertices.push( new THREE.Vector3(  50, -50, 0 ) );
+geometry.vertices.push( new THREE.Vector3(  50,  50, 0 ) );
+
+//create a new face using vertices 0, 1, 2
+var normal = new THREE.Vector3( 0, 1, 0 ); //optional
+var color = new THREE.Color( 0xffaa00 ); //optional
+var materialIndex = 0; //optional
+var face = new THREE.Face3( 0, 1, 2, normal, color, materialIndex );
+
+//add the face to the geometry's faces array
+geometry.faces.push( face );
+
+//the face normals and vertex normals can be calculated automatically if not supplied above
+geometry.computeFaceNormals();
+geometry.computeVertexNormals();
+
+scene.add( new THREE.Mesh( geometry, material ) );
+	</code>
+
+
+		<h2>Constructor</h2>
+
+		<h3>[name]( [page:Integer a], [page:Integer b], [page:Integer c], [page:Vector3 normal], [page:Color color], [page:Integer materialIndex] )</h3>
+		<div>
+		a — Vertex A index.<br />
+		b — Vertex B index.<br />
+		c — Vertex C index.<br /><br />
+
+		normal — (optional) Face normal ([page:Vector3 Vector3]) or array of vertex normals.
+		If a single vector is passed in, this sets [page:.normal], otherwise if an array of three
+		vectors is passed in this sets [page:.vertexNormals]<br /><br />
+
+		color — (optional) Face [page:Color color] or array of vertex [page:Color colors].
+		If a single vector is passed in, this sets [page:.color], otherwise if an array of three
+		vectors is passed in this sets [page:.vertexColors]<br /><br />
+
+		materialIndex — (optional) which index of an array of materials to associate
+		with the face.
+		</div>
+
+		<h2>Properties</h2>
+
+		<h3>[property:Integer a]</h3>
+		<div>
+		Vertex A index.
+		</div>
+
+		<h3>[property:Integer b]</h3>
+		<div>
+		Vertex B index.
+		</div>
+
+		<h3>[property:Integer c]</h3>
+		<div>
+		Vertex C index.
+		</div>
+
+		<h3>[property:Vector3 normal]</h3>
+		<div>
+		Face normal - vector showing the direction of the Face3. If calculated automatically
+		(using [page:Geometry.computeFaceNormals]), this is the normalized cross product of two edges of the
+		triangle. Default is *(0, 0, 0)*.
+		</div>
+
+		<h3>[property:Color color]</h3>
+		<div>
+		Face color - for this to be used a material's [page:Material.vertexColors vertexColors] property
+		must be set to [page:Materials THREE.FaceColors].
+		</div>
+
+		<h3>[property:Array vertexNormals]</h3>
+		<div>
+		Array of 3 [page:Vector3 vertex normals].
+		</div>
+
+		<h3>[property:Array vertexColors]</h3>
+		<div>
+		Array of 3 vertex colors - for these to be used a material's [page:Material.vertexColors vertexColors] property
+		must be set to [page:Materials THREE.VertexColors].
+		</div>
+
+
+		<h3>[property:Integer materialIndex]</h3>
+		<div>
+		Material index (points to an index in the associated array of materials). Default is *0*.
+		</div>
+
+		<h2>Methods</h2>
+
+		<h3>[method:Face3 clone]()</h3>
+		<div>Creates a new clone of the Face3 object.</div>
+
+		<h3>[method:Face3 copy]( [page:Face3 face3] )</h3>
+		<div>Copy the paramaters of another Face3 into this.</div>
+
+
+		<h2>Source</h2>
+
+		[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
+	</body>
+</html>

+ 4 - 1
docs/api/deprecated/DeprecatedList.html

@@ -411,7 +411,10 @@
 		</div>
 
 		<h3>[page:MeshFaceMaterial]</h3>
-		<div>MeshFaceMaterial has been removed. Use [page:MultiMaterial] instead.</div>
+		<div>MeshFaceMaterial has been removed. Use an array of materials instead.</div>
+
+		<h3>[page:MultiMaterial]</h3>
+		<div>MultiMaterial has been removed. Use an array of materials instead.</div>
 
 		<h3>[page:MeshPhongMaterial]</h3>
 		<div>MeshPhongMaterial.metal has been removed. Use [page:MeshStandardMaterial] instead.</div>

+ 1 - 1
docs/api/extras/SceneUtils.html

@@ -22,7 +22,7 @@
 		materials -- The materials for the object.
 		</div>
 		<div>
-		Creates a new Group that contains a new mesh for each material defined in materials. Beware that this is not the same as MultiMaterial which defines multiple material for 1 mesh.<br />
+		Creates a new Group that contains a new mesh for each material defined in materials. Beware that this is not the same as an array of materials which defines multiple materials for 1 mesh.<br />
 		This is mostly useful for objects that need both a material and a wireframe implementation.
 		</div>
 

+ 6 - 1
docs/api/loaders/JSONLoader.html

@@ -28,13 +28,18 @@
 
 		// load a resource
 		loader.load(
+
 			// resource URL
 			'models/animated/monster/monster.js',
+
 			// Function when resource is loaded
 			function ( geometry, materials ) {
-				var material = new THREE.MultiMaterial( materials );
+
+				var material = materials[ 0 ];
 				var object = new THREE.Mesh( geometry, material );
+
 				scene.add( object );
+
 			}
 		);
 		</code>

+ 2 - 2
docs/api/materials/Material.html

@@ -17,8 +17,8 @@
 		They are defined in a (mostly) renderer-independent way, so you don't have to
 		rewrite materials if you decide to use a different renderer.<br /><br />
 
-		With the exception of [page:MultiMaterial MultiMaterial], the following properties
-		and methods are inherited by all other material types (although they may have different defaults).
+		The following properties and methods are inherited by all other material types
+		(although they may have different defaults).
 		</div>
 
 		<h2>Constructor</h2>

+ 1 - 1
docs/examples/loaders/OBJLoader.html

@@ -67,7 +67,7 @@
 		<div>
 		Returns an [page:Object3D]. It contains the parsed meshes as [page:Mesh] and lines as [page:LineSegments].<br />
 		All geometry is created as [page:BufferGeometry]. Default materials are created as [page:MeshPhongMaterial].<br />
-		If an <em>obj</em> object or group uses multiple materials while declaring faces geometry groups and a [page:MultiMaterial] is used.
+		If an <em>obj</em> object or group uses multiple materials while declaring faces geometry groups and an array of materials are used.
 		</div>
 
 		<h2>Source</h2>