浏览代码

provide documentation

ranbuch 5 年之前
父节点
当前提交
4150348936
共有 2 个文件被更改,包括 20 次插入0 次删除
  1. 10 0
      docs/api/en/renderers/WebGLRenderer.html
  2. 10 0
      src/renderers/WebGLRenderer.d.ts

+ 10 - 0
docs/api/en/renderers/WebGLRenderer.html

@@ -471,6 +471,16 @@
 			scissor area will be affected by further renderer actions.
 		</p>
 
+		<h3>[method:null setOpaqueSort]( [param:Function method] )</h3>
+		<p>
+		Sets the costum opaque sort function for the WebGLRenderLists. Pass null to use the default painterSortStable function.
+		</p>
+
+		<h3>[method:null setTransparentSort]( [param:Function method] )</h3>
+		<p>
+		Sets the costum transparent sort function for the WebGLRenderLists. Pass null to use the default reversePainterSortStable function. In some cases the transparent materials sort may get rendered in the wrong order. This issue may cause materials to rendere behind other materials instead of the front of them and vice versa.
+		</p>
+
 		<h3>[method:null setSize]( [param:Integer width], [param:Integer height], [param:Boolean updateStyle] )</h3>
 		<p>
 		Resizes the output canvas to (width, height) with device pixel ratio taken into account,

+ 10 - 0
src/renderers/WebGLRenderer.d.ts

@@ -258,6 +258,16 @@ export class WebGLRenderer implements Renderer {
 	 */
 	setScissorTest( enable: boolean ): void;
 
+	/**
+	 * Sets the costum opaque sort function for the WebGLRenderLists. Pass null to use the default painterSortStable function.
+	 */
+	setOpaqueSort( method: Function ): void;
+
+	/**
+	 * Sets the costum transparent sort function for the WebGLRenderLists. Pass null to use the default reversePainterSortStable function.
+	 */
+	setTransparentSort( method: Function ): void;
+
 	/**
 	 * Returns a THREE.Color instance with the current clear color.
 	 */