Browse Source

Merge pull request #5703 from TatumCreative/docs-materials

Material docs todos
Mr.doob 10 years ago
parent
commit
80ee86b407

+ 12 - 7
docs/api/materials/MeshLambertMaterial.html

@@ -103,21 +103,26 @@
 		<h3>[property:Boolean morphTargets]</h3>
 		<h3>[property:Boolean morphTargets]</h3>
 		<div>Define whether the material uses morphTargets. Default is *false*.</div>	
 		<div>Define whether the material uses morphTargets. Default is *false*.</div>	
 
 
+		<h3>[property:boolean wrapAround]</h3>
+		<div>
+			Define whether the diffuse lighting wraps around the model or not. This option adds a little more (tintable) light
+			onto the side of the object in relation to a light.
+		</div>
 
 
 		<h3>[property:Vector3 wrapRGB]</h3>
 		<h3>[property:Vector3 wrapRGB]</h3>
 		<div>
 		<div>
-		todo
+			Decide how much of the wrap around values get used if the wrapAround option is set. The x, y, z values correspond
+			to the r, g, b values respectively. The typical range is of each is from 0 to 1. For example setting all of the
+			vector values to 0.5 will add a moderate amount of light to the side of the model. Changing *b* to 1 will
+			tint the light on the side to be more blue. Defaults to *(1,1,1)*.
 		</div> 
 		</div> 
 
 
 		<h3>[property:boolean morphNormals]</h3>
 		<h3>[property:boolean morphNormals]</h3>
 		<div>
 		<div>
-		todo
-		</div> 
+			Defines whether the material uses morphNormals. Set as true to pass morphNormal attributes from the [page:Geometry]
+			to the shader. Default is *false*.
+		</div>
 
 
-		<h3>[property:boolean wrapAround]</h3>
-		<div>
-		todo
-		</div> 
 
 
 		<h2>Methods</h2>
 		<h2>Methods</h2>
 
 

+ 33 - 23
docs/api/materials/MeshPhongMaterial.html

@@ -117,45 +117,55 @@
 		<div>Define whether the material uses morphTargets. Default is *false*.</div>	
 		<div>Define whether the material uses morphTargets. Default is *false*.</div>	
 
 
 
 
-		<h3>[property:Vector2 normalScale]</h3>
+		<h3>[property:boolean wrapAround]</h3>
 		<div>
 		<div>
-		todo
-		</div> 
+			Define whether the diffuse lighting wraps around the model or not. This option adds a little more (tintable) light
+			onto the side of the object in relation to a light.
+		</div>
 
 
-		<h3>[property:boolean morphNormals]</h3>
+		<h3>[property:Vector3 wrapRGB]</h3>
 		<div>
 		<div>
-		todo
-		</div> 
+			Decide how much of the wrap around values get used if the wrapAround option is set. The x, y, z values correspond
+			to the r, g, b values respectively. The typical range is of each is from 0 to 1. For example setting all of the
+			vector values to 0.5 will add a moderate amount of light to the side of the model. Changing *b* to 1 will
+			tint the light on the side to be more blue. Defaults to (1,1,1).
+		</div>
 
 
-		<h3>[property:boolean metal]</h3>
+		<h3>[property:boolean morphNormals]</h3>
 		<div>
 		<div>
-		todo
-		</div> 
+			Defines whether the material uses morphNormals. Set as true to pass morphNormal attributes from the [page:Geometry]
+			to the shader. Default is *false*.
+		</div>
 
 
-		<h3>[property:number bumpScale]</h3>
+		<h3>[property:boolean metal]</h3>
 		<div>
 		<div>
-		todo
+			If set to true the shader multiplies the specular highlight by the underlying color of the object, making
+			it appear to be more metal-like and darker. If set to false the specular highlight is added ontop of the
+			underlying colors.
 		</div> 
 		</div> 
 
 
-		<h3>[property:boolean wrapAround]</h3>
+		<h3>[property:Texture normalMap]</h3>
 		<div>
 		<div>
-		todo
+			The texture to create a normal map. The RGB values affect the surface normal for each pixel fragment and change
+			the way the color is lit. Normal maps do not change the actual shape of the surface, only the lighting.
 		</div>
 		</div>
-
-		<h3>[property:object normalMap]</h3>
+		
+		<h3>[property:Vector2 normalScale]</h3>
 		<div>
 		<div>
-		todo
+			How much the normal map affects the material. Typical ranges are 0-1. Default is (1,1).
 		</div> 
 		</div> 
 
 
-		<h3>[property:object bumpMap]</h3>
+		<h3>[property:Texture bumpMap]</h3>
 		<div>
 		<div>
-		todo
-		</div> 
-
-		<h3>[property:Vector3 wrapRGB]</h3>
+			The texture to create a bump map. The black and white values map to the perceived depth in relation to the lights.
+			Bump doesn't actually affect the geometry of the object, only the lighting. If a normal map is defined this will
+			be ignored.
+		</div>
+		
+		<h3>[property:Float bumpScale]</h3>
 		<div>
 		<div>
-		todo
-		</div> 
+			How much the bump map affects the material. Typical ranges are 0-1. Default is 1.
+		</div>
 
 
 		<h2>Methods</h2>
 		<h2>Methods</h2>
 
 

+ 3 - 2
docs/api/materials/ShaderMaterial.html

@@ -275,9 +275,10 @@
 		Defines whether the material uses morphTargets; true morphTarget attributes to this shader
 		Defines whether the material uses morphTargets; true morphTarget attributes to this shader
 		</div>
 		</div>
 
 
-		<h3>[property:Boolean morphNormals]</h3>
+		<h3>[property:boolean morphNormals]</h3>
 		<div>
 		<div>
-		Defines whether the material uses morphNormals; true to pass morphNormal attributes to this shader
+			Defines whether the material uses morphNormals. Set as true to pass morphNormal attributes from the [page:Geometry]
+			to the shader. Default is *false*.
 		</div>
 		</div>
 
 
 		<h3>[property:Boolean wireframe]</h3>
 		<h3>[property:Boolean wireframe]</h3>

+ 11 - 10
docs/api/materials/SpriteCanvasMaterial.html

@@ -11,18 +11,19 @@
 
 
 		<h1>[name]</h1>
 		<h1>[name]</h1>
 
 
-		<div class="desc">todo</div>
+		<div class="desc">Create a material that can draw custom sprites using a 2d canvas.</div>
 
 
 
 
 		<h2>Constructor</h2>
 		<h2>Constructor</h2>
 
 
 
 
-		<h3>[name]([page:todo parameters])</h3>
+		<h3>[name]( [page:Object parameters] )</h3>
 		<div>
 		<div>
-		parameters -- todo
+		parameters is an object that can be used to set up the default properties
 		</div>
 		</div>
 		<div>
 		<div>
-		todo
+		color - the color of the sprite<br/>
+		program - the program used to draw the sprite
 		</div>
 		</div>
 
 
 
 
@@ -32,20 +33,20 @@
 
 
 		<h3>[property:Color color]</h3>
 		<h3>[property:Color color]</h3>
 		<div>
 		<div>
-		todo
-		</div> 
+		The color of the sprite. The material will set up the color for the context before calling the material's program.
+		</div>
 
 
 		<h2>Methods</h2>
 		<h2>Methods</h2>
 
 
 
 
 
 
-		<h3>[method:todo program]([page:todo context], [page:todo color])</h3>
+		<h3>[method:null program]([page:CanvasRenderingContext2D context], [page:Color color])</h3>
 		<div>
 		<div>
-		context -- todo <br />
-		color -- todo
+		context -- The canvas context <br />
+		color -- The color of the sprite
 		</div>
 		</div>
 		<div>
 		<div>
-		todo
+			Define a program that will use the context to draw the sprite.
 		</div>
 		</div>
 
 
 		<h2>Source</h2>
 		<h2>Source</h2>

+ 12 - 44
docs/api/materials/SpriteMaterial.html

@@ -11,70 +11,38 @@
 
 
 		<h1>[name]</h1>
 		<h1>[name]</h1>
 
 
-		<div class="desc">todo</div>
+		<div class="desc">A material for a [page:Sprite].</div>
 
 
 
 
 		<h2>Constructor</h2>
 		<h2>Constructor</h2>
 
 
 
 
-		<h3>[name]([page:todo parameters])</h3>
+		<h3>[name]( [page:Object parameters] )</h3>
 		<div>
 		<div>
-		parameters -- todo
+		parameters -- an object defining the the default properties
 		</div>
 		</div>
 		<div>
 		<div>
-		todo
+		map - the texture map<br/>
+		color - color of the sprite<br/>
+		fog - whether or not to use the scene fog<br/>
+		rotation - the rotation of the sprite
 		</div>
 		</div>
 
 
 
 
 		<h2>Properties</h2>
 		<h2>Properties</h2>
 
 
 
 
-
 		<h3>[property:Texture map]</h3>
 		<h3>[property:Texture map]</h3>
-		<div>
-		todo
-		</div> 
-
-		<h3>[property:Vector2 uvScale]</h3>
-		<div>
-		todo
-		</div> 
-
-		<h3>[property:boolean sizeAttenuation]</h3>
-		<div>
-		todo
-		</div> 
+		<div>The texture map. Default is null.</div> 
 
 
 		<h3>[property:Color color]</h3>
 		<h3>[property:Color color]</h3>
-		<div>
-		todo
-		</div> 
-
-		<h3>[property:Vector2 uvOffset]</h3>
-		<div>
-		todo
-		</div> 
+		<div>The texture is multiplied by this color. The default is 0xffffff</div> 
 
 
 		<h3>[property:boolean fog]</h3>
 		<h3>[property:boolean fog]</h3>
-		<div>
-		todo
-		</div> 
-
-		<h3>[property:boolean useScreenCoordinates]</h3>
-		<div>
-		todo
-		</div> 
-
-		<h3>[property:boolean scaleByViewport]</h3>
-		<div>
-		todo
-		</div> 
-
-		<h3>[property:Vector2 alignment]</h3>
-		<div>
-		todo
-		</div> 
+		<div>Whether or not this material affected by the scene's fog. Default is false</div>
 
 
+		<h3>[property:Radians rotation]</h3>
+		<div>The rotation of the sprite in radians. Default is 0.</div>
 
 
 		<h2>Source</h2>
 		<h2>Source</h2>