2
0
Эх сурвалжийг харах

Merge pull request #16300 from 0b01001101/dev

TypeScript: Add compile to WebGLRenderer
Mr.doob 6 жил өмнө
parent
commit
b48fbacf1c

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

@@ -330,6 +330,14 @@ export class WebGLRenderer implements Renderer {
    */
   animate(callback: Function): void;
 
+  /**
+   * Compiles all materials in the scene with the camera. This is useful to precompile shaders before the first rendering.
+   */
+  compile(
+    scene: Scene,
+    camera: Camera
+  ): void;
+
   /**
    * Render a scene using a camera.
    * The render is done to a previously specified {@link WebGLRenderTarget#renderTarget .renderTarget} set by calling