Browse Source

Merge pull request #19966 from Mugen87/dev46

Material.d.ts: Fix onBeforeCompile parameter.
Mr.doob 5 years ago
parent
commit
6972df7cac
1 changed files with 3 additions and 2 deletions
  1. 3 2
      src/materials/Material.d.ts

+ 3 - 2
src/materials/Material.d.ts

@@ -1,6 +1,7 @@
 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 { WebGLRenderer } from './../renderers/WebGLRenderer';
+import { Shader } from './../renderers/shaders/ShaderLib';
 import {
 import {
 	BlendingDstFactor,
 	BlendingDstFactor,
 	BlendingEquation,
 	BlendingEquation,
@@ -321,10 +322,10 @@ export class Material extends EventDispatcher {
 
 
 	/**
 	/**
 	 * 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.
 	 * 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 shaderobject Represents the shader source code and program information.
+	 * @param shader Source code of the shader
 	 * @param renderer WebGLRenderer Context that is initializing the material
 	 * @param renderer WebGLRenderer Context that is initializing the material
 	 */
 	 */
-	onBeforeCompile ( shaderobject : object, renderer : WebGLRenderer ) : void;
+	onBeforeCompile ( shader : Shader, renderer : WebGLRenderer ) : void;
 
 
 	/**
 	/**
 	 * In case onBeforeCompile is used, this callback can be used to identify values of settings used in onBeforeCompile, so three.js can reuse a cached shader or recompile the shader as needed.
 	 * In case onBeforeCompile is used, this callback can be used to identify values of settings used in onBeforeCompile, so three.js can reuse a cached shader or recompile the shader as needed.