瀏覽代碼

Merge branch 'dev' of https://github.com/gero3/three.js into dev

Mr.doob 11 年之前
父節點
當前提交
fe2a83df2b

+ 57 - 45
docs/api/renderers/CanvasRenderer.html

@@ -28,106 +28,118 @@
 		<h2>Constructor</h2>
 
 
-		<h3>[name]([page:todo parameters])</h3>
-		<div>
-		parameters -- todo
-		</div>
+		<h3>[name]([page:object parameters])</h3>
+        <div>parameters is an optional object with properties defining the renderer's behaviour. The constructor also accepts no parameters at all. In all cases, it will assume sane defaults when parameters are missing.</div>
+
 		<div>
-		todo
+		canvas — A [page:Canvas] where the renderer draws its output.<br />
+		devicePixelRatio — The device its pixelRatio.<br />
 		</div>
 
 
 		<h2>Properties</h2>
 
 
-		<h3>.[page:object info]</h3>
-		<div>
-		todo
-		</div> 
+        <h3>.[page:Object info]</h3>
 
-		<h3>.[page:object domElement]</h3>
+		<div>An object with a series of statistical information about the graphics board memory and the rendering process. Useful for debugging or just for the sake of curiosity. The object contains the following fields:</div>
 		<div>
-		todo
-		</div> 
+		<ul>
+			<li>render:
+				<ul>
+					<li>vertices</li>
+					<li>faces</li>
+				</ul>
+			</li>
+		</ul>
+		</div>
+
+        <h3>.[page:DOMElement domElement]</h3>
+
+		<div>A [page:Canvas] where the renderer draws its output.<br />
+		This is automatically created by the renderer in the constructor (if not provided already); you just need to add it to your page.</div>
 
 		<h3>.[page:number devicePixelRatio]</h3>
 		<div>
-		todo
+		The pixel ration of the devices.
 		</div> 
 
-		<h3>.[page:boolean autoClear]</h3>
+		<h3>.[page:Boolean autoClear]</h3>
 		<div>
-		todo
-		</div> 
+        Defines whether the renderer should automatically clear its output before rendering.
+        </div>
 
-		<h3>.[page:boolean sortObjects]</h3>
+		<h3>.[page:Boolean sortObjects]</h3>
 		<div>
-		todo
-		</div> 
+        Defines whether the renderer should sort objects. Default is true.
+        </div>
+		<div>
+        Note: Sorting is used to attempt to properly render objects that have some degree of transparency.  By definition, sorting objects may not work in all cases.  Depending on the needs of application, it may be neccessary to turn off sorting and use other methods to deal with transparency rendering e.g. manually determining the object rendering order.
+        </div>
 
 		<h3>.[page:boolean sortElements]</h3>
 		<div>
-		todo
+		Defines whether the renderer should sort the face of each object. Default is true.
 		</div> 
 
 		<h2>Methods</h2>
 
 
-		<h3>.getMaxAnisotropy() [page:todo]</h3>
+		<h3>.getMaxAnisotropy() [page:number]</h3>
 		<div>
-		todo
+		This returns the anisotropy level of the textures.
 		</div>
 
-		<h3>.render([page:todo scene], [page:todo camera]) [page:todo]</h3>
+		<h3>.render( [page:Scene scene], [page:Camera camera])</h3>
 		<div>
-		scene -- todo <br />
-		camera -- todo
+		scene -- The scene to render. <br />
+		camera -- the camera to view the scene.
 		</div>
 		<div>
-		todo
+        Render a scene using a camera.
 		</div>
 
-		<h3>.clear() [page:todo]</h3>
+		<h3>.clear()</h3>
 		<div>
-		todo
+		Tells the renderer to clear its color drawing buffer with the clearcolor.
 		</div>
 
-		<h3>.setClearColor([page:todo color], [page:todo alpha]) [page:todo]</h3>
+		<h3>.setClearColor([page:Color color], [page:number alpha])</h3>
 		<div>
-		color -- todo <br />
-		alpha -- todo
+		color -- The color to clear the canvas with. <br />
+		alpha -- The alpha channel to clear the canvas with.
 		</div>
 		<div>
-		todo
+		This set the clearColor and the clearAlpha.
 		</div>
 
-		<h3>.setFaceCulling() [page:todo]</h3>
+		<h3>.setFaceCulling() </h3>
 		<div>
-		todo
+		Empty function to keep compability with [page:WebglRenderer].
 		</div>
 
-		<h3>.supportsVertexTextures() [page:todo]</h3>
+		<h3>.supportsVertexTextures()</h3>
 		<div>
-		todo
+		Empty function to keep compability with [page:WebglRenderer].
 		</div>
 
-		<h3>.setSize([page:todo width], [page:todo height], [page:todo updateStyle]) [page:todo]</h3>
+		<h3>.setSize([page:Number width], [page:Number height], [page:boolean updateStyle])</h3>
 		<div>
-		width -- todo <br />
-		height -- todo <br />
-		updateStyle -- todo
+		width -- The width of the drawing canvas. <br />
+		height -- The height of the drawing canvas. <br />
+		updateStyle -- If set, update the css of the canvas too.
 		</div>
 		<div>
-		todo
+		This set the size of the drawing canvas and if updateStyle is set, then the css of the canvas is updated too.
 		</div>
 
-		<h3>.setClearColorHex([page:todo hex], [page:todo alpha]) [page:todo]</h3>
+		<h3>.setClearColorHex([page:number hex], [page:number alpha])</h3>
 		<div>
-		hex -- todo <br />
-		alpha -- todo
+		hex -- The the hexadecimal value of the color to clear the canvas with. <br />
+        alpha -- The alpha channel to clear the canvas with.
 		</div>
 		<div>
-		todo
+		This set the clearColor and the clearAlpha.
 		</div>
 
 		<h2>Source</h2>

+ 6 - 10
docs/api/renderers/WebGLRenderTarget.html

@@ -9,26 +9,22 @@
 	<body>
 		<h1>[name]</h1>
 
-		<div class="desc">todo</div>
+		<div class="desc">A render target is a buffer where the video card draws pixels for a scene that is being rendered in the background. It is used in different effects. </div>
 
 
 		<h2>Constructor</h2>
 
 
-		<h3>[name]([page:todo width], [page:todo height], [page:todo options])</h3>
+		<h3>[name]([page:Number width], [page:Number height], [page:Object options])</h3>
 		<div>
-		width -- todo <br />
-		height -- todo <br />
-		options -- todo
+		width -- The width of the renderTarget. <br />
+		height -- The height of the renderTarget. <br />
+		options -- The options of the renderTarget. They are alot like the options of a texture.
 		</div>
 		<div>
-		todo
+		Creates a new renderTarget with a certain width and height.
 		</div>
 
-
-		<h3>[name]()</h3>
-
-
 		<h2>Properties</h2>
 
 

+ 6 - 4
docs/api/renderers/WebGLRenderer.html

@@ -38,7 +38,7 @@
 		<div>A [page:Canvas] where the renderer draws its output.<br />
 		This is automatically created by the renderer in the constructor (if not provided already); you just need to add it to your page.</div>
 
-		<h3>.[page:todo context]</h3>
+		<h3>.[page:WebGLRenderingContext context]</h3>
 
 		<div>The HTML5 Canvas's 'webgl' context obtained from the canvas where the renderer will draw.</div>
 
@@ -111,7 +111,7 @@
 
 		<h3>.[page:Boolean shadowMapCascade]</h3>
 
-		<div>Default is false. TODO</div>
+		<div>Default is false. If Set, use cascaded shadowmaps. See [link:http://developer.download.nvidia.com/SDK/10.5/opengl/src/cascaded_shadow_maps/doc/cascaded_shadow_maps.pdf cascaded shadowmaps] for more information.</div>
 
 
 		<h3>.[page:Integer maxMorphTargets]</h3>
@@ -237,7 +237,9 @@
 		program — an instance of shaderProgram<br />
 		shading — an instance of Material<br />
 		</div>
-		<div>TODO.</div>
+		<div>
+        Render an immediate buffer. Gets called by renderImmediateObject.
+        </div>
 
 
 		<h3>.renderBufferDirect( [page:Camera camera], [page:Array lights], [page:Fog fog], [page:Material material], [page:Object geometryGroup], [page:Object3D object] )</h3>
@@ -255,7 +257,7 @@
         <div>Even with forceClear set to true you can prevent certain buffers being cleared by setting either the .autoClearColor, .autoClearStencil or .autoClearDepth properties to false.</div>
 
 		<h3>.renderImmediateObject( camera, lights, fog, material, object )</h3>
-		<div>TODO.</div>
+		<div>Renders an immediate Object using a camera.</div>
 
 
 		<h3>.initWebGLObjects( [page:Scene scene] )</h3>

+ 1 - 1
docs/api/textures/CompressedTexture.html

@@ -19,7 +19,7 @@
 		<h2>Constructor</h2>
 
 
-		<h3>[name]([page:todo mipmaps], [page:todo width], [page:todo height], [page:todo format], [page:todo type], [page:todo mapping], [page:todo wrapS], [page:todo wrapT], [page:todo magFilter], [page:todo minFilter], [page:todo anisotropy])</h3>
+		<h3>[name]([page:Array mipmaps], [page:Number width], [page:Number height], [page:Number format], [page:Number type], [page:Number mapping], [page:Number wrapS], [page:Number wrapT], [page:Number magFilter], [page:Number minFilter], [page:Number anisotropy])</h3>
 		<div>
 		mipmaps -- The mipmaps array should contains objects with data, width and height. The mipmaps should be from of the correct format and type. <br />
 		width -- The width of the biggest mipmap<br />