mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-04-28 09:25:50 +08:00
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:
4
three/index.d.ts
vendored
4
three/index.d.ts
vendored
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user