Add WebGL compatibility
This commit is contained in:
parent
3725f56c78
commit
1d4980ae28
1 changed files with 567 additions and 212 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Reference in a new issue