Add WebGL compatibility

This commit is contained in:
schmelczerandras 2020-09-22 16:41:59 +02:00
commit 1d4980ae28

View file

@ -1,4 +1,5 @@
import { mat2d, vec2, vec3 } from 'gl-matrix';
import { UniversalRenderingContext } from '../graphics-library/universal-rendering-context';
export class UniformsProvider {
public ambientLight = vec3.fromValues(0.25, 0.15, 0.25);
@ -12,7 +13,7 @@ export class UniformsProvider {
private squareToAspectRatio = vec2.create();
private uvToWorld = mat2d.create();
public constructor(private gl: WebGL2RenderingContext) {}
public constructor(private gl: UniversalRenderingContext) {}
public getUniforms(uniforms: any): any {
return {