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

Change docs and definition for shader input variable to Shader instead of Object

Johannes Deml 6 жил өмнө
parent
commit
25d6dad903

+ 1 - 1
docs/api/en/materials/Material.html

@@ -295,7 +295,7 @@
 		These needs to be disposed by [page:Texture Texture].
 		These needs to be disposed by [page:Texture Texture].
 		</p>
 		</p>
 
 
-		<h3>[method:null onBeforeCompile]( [param:Object shader], [param:WebGLRenderer renderer] )</h3>
+		<h3>[method:null onBeforeCompile]( [param:Shader shader], [param:WebGLRenderer renderer] )</h3>
 		<p>
 		<p>
 		An optional callback that is executed immediately before the shader program is compiled.
 		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.
 		This function is called with the shader source code as a parameter. Useful for the modification of built-in materials.

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

@@ -1,4 +1,5 @@
 import { Plane } from './../math/Plane';
 import { Plane } from './../math/Plane';
+import { Shader } from './../renderers/shaders/ShaderLib'
 import { EventDispatcher } from './../core/EventDispatcher';
 import { EventDispatcher } from './../core/EventDispatcher';
 import { WebGLRenderer } from './../renderers/WebGLRenderer';
 import { WebGLRenderer } from './../renderers/WebGLRenderer';
 import {
 import {
@@ -272,7 +273,7 @@ export class Material extends EventDispatcher {
    * @param shader Source code of the shader
    * @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 ( shader : Object, renderer : WebGLRenderer ) : void;
+  onBeforeCompile ( shader : Shader, renderer : WebGLRenderer ) : void;
 
 
   /**
   /**
    * Sets the properties based on the values.
    * Sets the properties based on the values.