Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: mrdoob/three.js
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 1c097d9df74f2bc263006c0bd4d5d4335da126e9
Choose a base ref
...
head repository: mrdoob/three.js
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 6972df7cace4c23cbabab49e9857e771826e1685
Choose a head ref
  • 2 commits
  • 1 file changed
  • 2 contributors

Commits on Jul 30, 2020

  1. Verified

    This commit was signed with the committer’s verified signature. The key has expired.
    Brooooooklyn LongYinan
    Copy the full SHA
    e85e5f8 View commit details
  2. Merge pull request #19966 from Mugen87/dev46

    Material.d.ts: Fix onBeforeCompile parameter.
    mrdoob authored Jul 30, 2020

    Verified

    This commit was signed with the committer’s verified signature. The key has expired.
    Brooooooklyn LongYinan
    Copy the full SHA
    6972df7 View commit details
Showing with 3 additions and 2 deletions.
  1. +3 −2 src/materials/Material.d.ts
5 changes: 3 additions & 2 deletions src/materials/Material.d.ts
Original file line number Diff line number Diff line change
@@ -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.