소스 검색

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.
 	 */