three: Fix typing for shader uniforms

The 'uniforms' property on shader parameters is an
  object containing string->{value:any} mappings.

Signed-off-by: David Li <jiawei.davidli@gmail.com>
This commit is contained in:
David Li
2016-11-18 23:06:07 -08:00
parent a666820ef2
commit 1ba13bf7e8

4
three/index.d.ts vendored
View File

@@ -2737,7 +2737,7 @@ declare namespace THREE {
constructor(parameters?: ShaderMaterialParameters);
defines: any;
uniforms: any; // type should be { [uniform: string]: { value: any }; }; but gives "Index signature is missing in type" error during compilation
uniforms: { [uniform: string]: IUniform };
vertexShader: string;
fragmentShader: string;
linewidth: number;
@@ -5115,7 +5115,7 @@ declare namespace THREE {
};
export interface Shader {
uniforms: IUniform;
uniforms: { [uniform: string]: IUniform };
vertexShader: string;
fragmentShader: string;
}