Przeglądaj źródła

Updated LineBasicMaterial doc

looeee 8 lat temu
rodzic
commit
aa5e4fe7b9

+ 65 - 21
docs/api/materials/LineBasicMaterial.html

@@ -14,48 +14,92 @@
 
 
 		<div class="desc">A material for drawing wireframe-style geometries.</div>
 		<div class="desc">A material for drawing wireframe-style geometries.</div>
 
 
+		<h2>Examples</h2>
 
 
-		<h2>Constructor</h2>
+		<div>
+			[example:webgl_buffergeometry_drawcalls WebGL / buffergeometry / drawcalls]<br />
+			[example:webgl_buffergeometry_lines WebGL / buffergeometry / lines]<br />
+			[example:webgl_buffergeometry_lines_indexed WebGL / buffergeometry / lines / indexed]<br />
+			[example:webgl_decals WebGL / decals]<br />
+			[example:webgl_geometry_nurbs WebGL / geometry / nurbs]<br />
+			[example:webgl_geometry_shapes WebGL / geometry / shapes]<br />
+			[example:webgl_geometry_spline_editor WebGL / geometry / spline / editor]<br />
+			[example:webgl_interactive_buffergeometry WebGL / interactive / buffergeometry]<br />
+			[example:webgl_interactive_voxelpainter WebGL / interactive / voxelpainter]<br />
+			[example:webgl_lines_colors WebGL / lines / colors]<br />
+			[example:webgl_lines_cubes WebGL / lines / cubes]<br />
+			[example:webgl_lines_dashed WebGL / lines / dashed]<br />
+			[example:webgl_lines_sphere WebGL / lines / sphere]<br />
+			[example:webgl_lines_splines WebGL / lines / splines]<br />
+			[example:webgl_materials WebGL / materials]<br />
+			[example:webgl_physics_rope WebGL / phyics / rope]
+		</div>
 
 
+		<code>
+var line_material = new THREE.LineBasicMaterial( {
+	color: 0x303030,
+	lineWidth: 1,
+	linecap: 'round', //ignored by WebGLRenderer
+	linejoin:  'round' //ignored by WebGLRenderer
+} );
+		</code>
+
+		<h2>Constructor</h2>
 
 
 		<h3>[name]( [page:Object parameters] )</h3>
 		<h3>[name]( [page:Object parameters] )</h3>
 
 
-		<div>parameters is an object with one or more properties defining the material's appearance.</div>
 		<div>
 		<div>
-		color — Line color in hexadecimal. Default is 0xffffff.<br />
-		linewidth — Line thickness. Default is 1.<br />
-		linecap — Define appearance of line ends. Default is 'round'.<br />
-		linejoin — Define appearance of line joints. Default is 'round'.<br />
-		vertexColors — Define how the vertices gets colored. Default is THREE.NoColors.<br />
-		fog — Define whether the material color is affected by global fog settings. Default is false.
+		[page:Object parameters] - (optional) an object with one or more properties defining the material's appearance.
+		Any property of the material (including any property inherited from [page:Material]) can be passed in here.
 		</div>
 		</div>
 
 
 		<h2>Properties</h2>
 		<h2>Properties</h2>
 		<div>See the base [page:Material] class for common properties.</div>
 		<div>See the base [page:Material] class for common properties.</div>
 
 
 		<h3>[property:Integer color]</h3>
 		<h3>[property:Integer color]</h3>
-		<div>Sets the color of the line. Default is 0xffffff.</div>
+		<div>Color of the line. Default is 0xffffff.</div>
+
+		<h3>[property:Boolean isLineBasicMaterial]</h3>
+		<div>
+			Used to check whether this or derived classes are line basic materials. Default is *true*.<br /><br />
+
+			You should not change this, as it used internally for optimisation.
+		</div>
+
+		<h3>[property:Boolean lights]</h3>
+		<div>Whether the material is affected by lights. Default is *false*.</div>
 
 
 		<h3>[property:Float linewidth]</h3>
 		<h3>[property:Float linewidth]</h3>
-		<div>Controls line thickness. Default is 1.</div>
-		<div>Due to limitations in the <a href="https://code.google.com/p/angleproject/" target="_blank">ANGLE layer</a>, with the [page:WebGLRenderer WebGL] renderer on Windows platforms linewidth will always be 1 regardless of the set value.</div>
+		<div>
+			Controls line thickness. Default is 1.<br /><br />
+
+			Due to limitations in the [link:https://code.google.com/p/angleproject ANGLE layer],
+			with the [page:WebGLRenderer WebGL] renderer on Windows platforms linewidth will
+			always be 1 regardless of the set value.
+		</div>
 
 
 		<h3>[property:String linecap]</h3>
 		<h3>[property:String linecap]</h3>
-		<div>Define appearance of line ends. Possible values are "butt", "round" and "square". Default is 'round'.</div>
-		<div>This setting might not have any effect when used with certain renderers. For example, it is ignored with the [page:WebGLRenderer WebGL] renderer, but does work with the [page:CanvasRenderer Canvas] renderer.</div>
+		<div>
+			Define appearance of line ends. Possible values are 'butt', 'round' and 'square'.
+			Default is 'round'.<br /><br />
+
+			This setting might not have any effect when used with certain renderers.
+			For example, it is ignored with the [page:WebGLRenderer WebGL] renderer,
+			but does work with the [page:CanvasRenderer Canvas] renderer.
+		</div>
 
 
 		<h3>[property:String linejoin]</h3>
 		<h3>[property:String linejoin]</h3>
-		<div>Define appearance of line joints. Possible values are "round", "bevel" and "miter". Default is 'round'.</div>
-		<div>This setting might not have any effect when used with certain renderers. For example, it is ignored with the [page:WebGLRenderer WebGL] renderer, but does work with the [page:CanvasRenderer Canvas] renderer.</div>
+		<div>
+			Define appearance of line joints. Possible values are 'round', 'bevel' and 'miter'. Default is 'round'. <br /><br />
 
 
-		<h3>[property:Integer vertexColors]</h3>
-		<div>Define how the vertices gets colored. Possible values are THREE.NoColors, THREE.FaceColors and THREE.VertexColors. Default is THREE.NoColors.</div>
-		<div>This setting might not have any effect when used with certain renderers.</div>
+			This setting might not have any effect when used with certain renderers.
+			For example, it is ignored with the [page:WebGLRenderer WebGL] renderer,
+			but does work with the [page:CanvasRenderer Canvas] renderer.
+		</div>
 
 
-		<h3>[property:Boolean fog]</h3>
-		<div>Define whether the material color is affected by global fog settings.</div>
-		<div>This setting might not have any effect when used with certain renderers. For example, it is ignored with the [page:CanvasRenderer Canvas] renderer, but does work with the [page:WebGLRenderer WebGL] renderer.</div>
 
 
+		<h2>Methods</h2>
+		<div>See the base [page:Material] class for common methods.</div>
 
 
 		<h2>Source</h2>
 		<h2>Source</h2>
 
 

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

@@ -11,13 +11,14 @@
 		<h1>[name]</h1>
 		<h1>[name]</h1>
 
 
 		<div class="desc">
 		<div class="desc">
+		Abstract base class for materials.<br /><br />
+
 		Materials describe the appearance of [page:Object objects].
 		Materials describe the appearance of [page:Object objects].
 		They are defined in a (mostly) renderer-independent way, so you don't have to
 		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 />
 		rewrite materials if you decide to use a different renderer.<br /><br />
 
 
 		With the exception of [page:MultiMaterial MultiMaterial], the following properties
 		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).
 		and methods are inherited by all other material types (although they may have different defaults).
-		</P>
 		</div>
 		</div>
 
 
 		<h2>Constructor</h2>
 		<h2>Constructor</h2>
@@ -158,8 +159,6 @@
 		*0.5* tends to give good results across browsers. Default is *0*.
 		*0.5* tends to give good results across browsers. Default is *0*.
 		</div>
 		</div>
 
 
-
-
 		<h3>[property:Boolean polygonOffset]</h3>
 		<h3>[property:Boolean polygonOffset]</h3>
 		<div>
 		<div>
 		Whether to use polygon offset. Default is *false*. This corresponds to the *GL_POLYGON_OFFSET_FILL* WebGL feature.
 		Whether to use polygon offset. Default is *false*. This corresponds to the *GL_POLYGON_OFFSET_FILL* WebGL feature.