Explorar o código

First pass at documentation for WebGLProgram

paulmasson %!s(int64=11) %!d(string=hai) anos
pai
achega
617a06c0e1
Modificáronse 1 ficheiros con 40 adicións e 13 borrados
  1. 40 13
      docs/api/renderers/webgl/WebGLProgram.html

+ 40 - 13
docs/api/renderers/webgl/WebGLProgram.html

@@ -11,41 +11,68 @@
 
 		<div class="desc">Constructor for the GLSL program sent to vertex and fragment shaders, including default uniforms and attributes.</div>
 
-		<h2>Example</h2>
-
-		<code>todo</code>
-
 		<h2>Constructor</h2>
 
-
-		<h3>[name]( [page: renderer], [page: code], [page: material], [page:Object parameters] )</h3>
+		<h3>[name]( [page:WebGLRenderer renderer], [page:Object code], [page:Material material], [page:Object parameters] )</h3>
 		<div>For parameters see [page:WebGLRenderer WebGLRenderer]</div>
-
+		<div>Standard defaults for vertex shader:<br/><br/>
+		uniform mat4 modelMatrix;<br/>
+		uniform mat4 modelViewMatrix;<br/>
+		uniform mat4 projectionMatrix;<br/>
+		uniform mat4 viewMatrix;<br/>
+		uniform mat3 normalMatrix;<br/>
+		uniform vec3 cameraPosition;<br/><br/>
+		attribute vec3 position;<br/>
+		attribute vec3 normal;<br/>
+		attribute vec2 uv;<br/>
+		attribute vec2 uv2;</div>
+		
+		<div>Conditional defaults for vertex shader:<br/><br/>
+		attribute vec3 color;<br/><br/>
+		attribute vec3 morphTarget0;<br/>
+		attribute vec3 morphTarget1;<br/>
+		attribute vec3 morphTarget2;<br/>
+		attribute vec3 morphTarget3;<br/><br/>
+		attribute vec3 morphNormal0;<br/>
+		attribute vec3 morphNormal1;<br/>
+		attribute vec3 morphNormal2;<br/>
+		attribute vec3 morphNormal3;<br/><br/>
+		attribute vec3 morphTarget4;<br/>
+		attribute vec3 morphTarget5;<br/>
+		attribute vec3 morphTarget6;<br/>
+		attribute vec3 morphTarget7;<br/><br/>
+		attribute vec4 skinIndex;<br/>
+		attribute vec4 skinWeight;</div>
+		
+		<div>Standard defaults for fragment shader:<br/><br/>
+		uniform mat4 viewMatrix;<br/>
+		uniform vec3 cameraPosition;</div>
+		
 
 		<h2>Properties</h2>
 
-		<h3>.uniforms</h3>
+		<h3>.[page:Object uniforms]</h3>
 		<div></div> 
 
-		<h3>.attributes </h3>
+		<h3>.[page:Object attributes]</h3>
 		<div></div> 
 
 		<h3>.[page:Integer id]</h3>
 		<div></div> 
 
-		<h3>.code</h3>
+		<h3>.[page:Object code]</h3>
 		<div></div> 
 
 		<h3>.[page:Integer usedTimes]</h3>
 		<div></div> 
 
-		<h3>.program</h3>
+		<h3>.[page:Object program]</h3>
 		<div></div> 
 
-		<h3>.vertexShader</h3>
+		<h3>.[page:Object vertexShader]</h3>
 		<div></div> 
 
-		<h3>.fragmentShader</h3>
+		<h3>.[page:Object fragmentShader]</h3>
 		<div></div>