|
@@ -1,5 +1,7 @@
|
|
|
import { Plane } from './../math/Plane';
|
|
|
+import { Shader } from './../renderers/shaders/ShaderLib'
|
|
|
import { EventDispatcher } from './../core/EventDispatcher';
|
|
|
+import { WebGLRenderer } from './../renderers/WebGLRenderer';
|
|
|
import {
|
|
|
BlendingDstFactor,
|
|
|
BlendingEquation,
|
|
@@ -266,6 +268,13 @@ export class Material extends EventDispatcher {
|
|
|
*/
|
|
|
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 : Shader, renderer : WebGLRenderer ) : void;
|
|
|
+
|
|
|
/**
|
|
|
* Sets the properties based on the values.
|
|
|
* @param values A container with parameters.
|