Skip to content

Commit 25d6dad

Browse files
author
Johannes Deml
committed
Change docs and definition for shader input variable to Shader instead of Object
1 parent 3c2c015 commit 25d6dad

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

docs/api/en/materials/Material.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,7 @@ <h3>[method:null dispose]()</h3>
295295
These needs to be disposed by [page:Texture Texture].
296296
</p>
297297

298-
<h3>[method:null onBeforeCompile]( [param:Object shader], [param:WebGLRenderer renderer] )</h3>
298+
<h3>[method:null onBeforeCompile]( [param:Shader shader], [param:WebGLRenderer renderer] )</h3>
299299
<p>
300300
An optional callback that is executed immediately before the shader program is compiled.
301301
This function is called with the shader source code as a parameter. Useful for the modification of built-in materials.

src/materials/Material.d.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { Plane } from './../math/Plane';
2+
import { Shader } from './../renderers/shaders/ShaderLib'
23
import { EventDispatcher } from './../core/EventDispatcher';
34
import { WebGLRenderer } from './../renderers/WebGLRenderer';
45
import {
@@ -272,7 +273,7 @@ export class Material extends EventDispatcher {
272273
* @param shader Source code of the shader
273274
* @param renderer WebGLRenderer Context that is initializing the material
274275
*/
275-
onBeforeCompile ( shader : Object, renderer : WebGLRenderer ) : void;
276+
onBeforeCompile ( shader : Shader, renderer : WebGLRenderer ) : void;
276277

277278
/**
278279
* Sets the properties based on the values.

0 commit comments

Comments
 (0)