浏览代码

Material.d.ts: Fix onBeforeCompile parameter.

Mugen87 5 年之前
父节点
当前提交
e85e5f8177
共有 1 个文件被更改,包括 3 次插入2 次删除
  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 { EventDispatcher } from './../core/EventDispatcher';
 import { WebGLRenderer } from './../renderers/WebGLRenderer';
+import { Shader } from './../renderers/shaders/ShaderLib';
 import {
 	BlendingDstFactor,
 	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.
-	 * @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
 	 */
-	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.