2
0
ranbuch 5 жил өмнө
parent
commit
4150348936

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

@@ -471,6 +471,16 @@
 			scissor area will be affected by further renderer actions.
 			scissor area will be affected by further renderer actions.
 		</p>
 		</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>
 		<h3>[method:null setSize]( [param:Integer width], [param:Integer height], [param:Boolean updateStyle] )</h3>
 		<p>
 		<p>
 		Resizes the output canvas to (width, height) with device pixel ratio taken into account,
 		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;
 	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.
 	 * Returns a THREE.Color instance with the current clear color.
 	 */
 	 */