Browse Source

Add missing onBeforeCompile definition to Material.d.ts

Johannes Deml 6 years ago
parent
commit
2fed9a736a
1 changed files with 8 additions and 0 deletions
  1. 8 0
      src/materials/Material.d.ts

+ 8 - 0
src/materials/Material.d.ts

@@ -1,5 +1,6 @@
 import { Plane } from './../math/Plane';
 import { Plane } from './../math/Plane';
 import { EventDispatcher } from './../core/EventDispatcher';
 import { EventDispatcher } from './../core/EventDispatcher';
+import { WebGLRenderer } from './../renderers/WebGLRenderer';
 import {
 import {
   BlendingDstFactor,
   BlendingDstFactor,
   BlendingEquation,
   BlendingEquation,
@@ -266,6 +267,13 @@ export class Material extends EventDispatcher {
    */
    */
   dispose(): void;
   dispose(): void;
 
 
+  /**
+   * An optional callback that is executed immediately before the shader program is compiled. This function is called with the shader source code as a parameter. Useful for the modification of built-in materials. 
+   * @param shader Source code of the shader
+   * @param renderer WebGLRenderer Context that is initializing the material
+   */
+  onBeforeCompile ( shader : Object, renderer : WebGLRenderer ) : null
+
   /**
   /**
    * Sets the properties based on the values.
    * Sets the properties based on the values.
    * @param values A container with parameters.
    * @param values A container with parameters.