Browse Source

Merge pull request #16300 from 0b01001101/dev

TypeScript: Add compile to WebGLRenderer
Mr.doob 6 năm trước cách đây
mục cha
commit
b48fbacf1c
1 tập tin đã thay đổi với 8 bổ sung0 xóa
  1. 8 0
      src/renderers/WebGLRenderer.d.ts

+ 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