Add files
This commit is contained in:
commit
77bde04db3
42 changed files with 10327 additions and 0 deletions
7839
build/main-bundle.js
Normal file
7839
build/main-bundle.js
Normal file
File diff suppressed because it is too large
Load diff
0
build/src/game.d.ts
vendored
Normal file
0
build/src/game.d.ts
vendored
Normal file
7
build/src/graphics/drawables/i-drawable-descriptor.d.ts
vendored
Normal file
7
build/src/graphics/drawables/i-drawable-descriptor.d.ts
vendored
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
import { IDrawable } from './i-drawable';
|
||||
export interface IDrawableDescriptor {
|
||||
uniformName: string;
|
||||
countMacroName: string;
|
||||
shaderCombinationSteps: Array<number>;
|
||||
readonly empty: IDrawable;
|
||||
}
|
||||
5
build/src/graphics/drawables/i-drawable.d.ts
vendored
Normal file
5
build/src/graphics/drawables/i-drawable.d.ts
vendored
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
import { vec2, mat2d } from 'gl-matrix';
|
||||
export interface IDrawable {
|
||||
distance(target: vec2): number;
|
||||
serializeToUniforms(uniforms: any, scale: number, transform: mat2d): void;
|
||||
}
|
||||
14
build/src/graphics/drawables/lights/circle-light.d.ts
vendored
Normal file
14
build/src/graphics/drawables/lights/circle-light.d.ts
vendored
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
import { mat2d, vec2, vec3 } from 'gl-matrix';
|
||||
import { IDrawableDescriptor } from '../i-drawable-descriptor';
|
||||
import { ILight } from './i-light';
|
||||
export declare class CircleLight implements ILight {
|
||||
center: vec2;
|
||||
lightDrop: number;
|
||||
color: vec3;
|
||||
lightness: number;
|
||||
static descriptor: IDrawableDescriptor;
|
||||
constructor(center: vec2, lightDrop: number, color: vec3, lightness: number);
|
||||
distance(_: vec2): number;
|
||||
serializeToUniforms(uniforms: any, scale: number, transform: mat2d): void;
|
||||
get value(): vec3;
|
||||
}
|
||||
15
build/src/graphics/drawables/lights/flashlight.d.ts
vendored
Normal file
15
build/src/graphics/drawables/lights/flashlight.d.ts
vendored
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
import { mat2d, vec2, vec3 } from 'gl-matrix';
|
||||
import { IDrawableDescriptor } from '../i-drawable-descriptor';
|
||||
import { ILight } from './i-light';
|
||||
export declare class Flashlight implements ILight {
|
||||
center: vec2;
|
||||
direction: vec2;
|
||||
lightDrop: number;
|
||||
color: vec3;
|
||||
lightness: number;
|
||||
static descriptor: IDrawableDescriptor;
|
||||
constructor(center: vec2, direction: vec2, lightDrop: number, color: vec3, lightness: number);
|
||||
distance(_: vec2): number;
|
||||
serializeToUniforms(uniforms: any, scale: number, transform: mat2d): void;
|
||||
get value(): vec3;
|
||||
}
|
||||
2
build/src/graphics/drawables/lights/i-light.d.ts
vendored
Normal file
2
build/src/graphics/drawables/lights/i-light.d.ts
vendored
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
import { IDrawable } from '../i-drawable';
|
||||
export declare type ILight = IDrawable;
|
||||
1
build/src/graphics/graphics-library/compiling/check-program.d.ts
vendored
Normal file
1
build/src/graphics/graphics-library/compiling/check-program.d.ts
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
export declare const checkProgram: (gl: WebGL2RenderingContext, program: WebGLProgram) => void;
|
||||
1
build/src/graphics/graphics-library/compiling/check-shader.d.ts
vendored
Normal file
1
build/src/graphics/graphics-library/compiling/check-shader.d.ts
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
export declare const checkShader: (gl: WebGL2RenderingContext, shader: WebGLShader) => void;
|
||||
3
build/src/graphics/graphics-library/compiling/create-program.d.ts
vendored
Normal file
3
build/src/graphics/graphics-library/compiling/create-program.d.ts
vendored
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
export declare const createProgram: (gl: WebGL2RenderingContext, vertexShaderSource: string, fragmentShaderSource: string, substitutions: {
|
||||
[name: string]: string;
|
||||
}) => Promise<WebGLProgram>;
|
||||
3
build/src/graphics/graphics-library/compiling/create-shader.d.ts
vendored
Normal file
3
build/src/graphics/graphics-library/compiling/create-shader.d.ts
vendored
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
export declare const createShader: (gl: WebGL2RenderingContext, type: GLenum, source: string, substitutions: {
|
||||
[name: string]: string;
|
||||
}) => WebGLShader;
|
||||
5
build/src/graphics/graphics-library/frame-buffer/default-frame-buffer.d.ts
vendored
Normal file
5
build/src/graphics/graphics-library/frame-buffer/default-frame-buffer.d.ts
vendored
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
import { FrameBuffer } from './frame-buffer';
|
||||
export declare class DefaultFrameBuffer extends FrameBuffer {
|
||||
constructor(gl: WebGL2RenderingContext);
|
||||
setSize(): boolean;
|
||||
}
|
||||
12
build/src/graphics/graphics-library/frame-buffer/frame-buffer.d.ts
vendored
Normal file
12
build/src/graphics/graphics-library/frame-buffer/frame-buffer.d.ts
vendored
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
import { vec2 } from 'gl-matrix';
|
||||
export declare abstract class FrameBuffer {
|
||||
protected gl: WebGL2RenderingContext;
|
||||
renderScale: number;
|
||||
enableHighDpiRendering: boolean;
|
||||
protected size: vec2;
|
||||
protected frameBuffer: WebGLFramebuffer | null;
|
||||
constructor(gl: WebGL2RenderingContext);
|
||||
bindAndClear(colorInput?: WebGLTexture): void;
|
||||
setSize(): boolean;
|
||||
getSize(): vec2;
|
||||
}
|
||||
10
build/src/graphics/graphics-library/frame-buffer/intermediate-frame-buffer.d.ts
vendored
Normal file
10
build/src/graphics/graphics-library/frame-buffer/intermediate-frame-buffer.d.ts
vendored
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
import { FrameBuffer } from './frame-buffer';
|
||||
export declare class IntermediateFrameBuffer extends FrameBuffer {
|
||||
private frameTexture;
|
||||
private floatLinearEnabled;
|
||||
constructor(gl: WebGL2RenderingContext);
|
||||
get colorTexture(): WebGLTexture;
|
||||
setSize(): boolean;
|
||||
private configureTexture;
|
||||
private configureFrameBuffer;
|
||||
}
|
||||
2
build/src/graphics/graphics-library/helper/enable-extension.d.ts
vendored
Normal file
2
build/src/graphics/graphics-library/helper/enable-extension.d.ts
vendored
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
export declare const tryEnableExtension: (gl: WebGL2RenderingContext, name: string) => any | null;
|
||||
export declare const enableExtension: (gl: WebGL2RenderingContext, name: string) => any;
|
||||
1
build/src/graphics/graphics-library/helper/get-webgl2-context.d.ts
vendored
Normal file
1
build/src/graphics/graphics-library/helper/get-webgl2-context.d.ts
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
export declare const getWebGl2Context: (canvas: HTMLCanvasElement) => WebGL2RenderingContext;
|
||||
1
build/src/graphics/graphics-library/helper/load-uniform.d.ts
vendored
Normal file
1
build/src/graphics/graphics-library/helper/load-uniform.d.ts
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
export declare const loadUniform: (gl: WebGL2RenderingContext, value: any, type: GLenum, location: WebGLUniformLocation) => any;
|
||||
11
build/src/graphics/graphics-library/helper/stopwatch.d.ts
vendored
Normal file
11
build/src/graphics/graphics-library/helper/stopwatch.d.ts
vendored
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
export declare class WebGlStopwatch {
|
||||
private gl;
|
||||
private timerExtension;
|
||||
private timerQuery?;
|
||||
private isReady;
|
||||
private resultsInNanoSeconds?;
|
||||
constructor(gl: WebGL2RenderingContext);
|
||||
start(): void;
|
||||
stop(): void;
|
||||
get resultsInMilliSeconds(): number;
|
||||
}
|
||||
11
build/src/graphics/graphics-library/program/fragment-shader-only-program.d.ts
vendored
Normal file
11
build/src/graphics/graphics-library/program/fragment-shader-only-program.d.ts
vendored
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
import Program from './program';
|
||||
export declare class FragmentShaderOnlyProgram extends Program {
|
||||
private vao?;
|
||||
constructor(gl: WebGL2RenderingContext, sources: [string, string], substitutions: {
|
||||
[name: string]: string;
|
||||
});
|
||||
initialize(): Promise<void>;
|
||||
bind(): void;
|
||||
draw(): void;
|
||||
private prepareScreenQuad;
|
||||
}
|
||||
10
build/src/graphics/graphics-library/program/i-program.d.ts
vendored
Normal file
10
build/src/graphics/graphics-library/program/i-program.d.ts
vendored
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
import { vec2 } from 'gl-matrix';
|
||||
export interface IProgram {
|
||||
initialize(): Promise<void>;
|
||||
setDrawingRectangleUV(bottomLeft: vec2, size: vec2): void;
|
||||
bindAndSetUniforms(values: {
|
||||
[name: string]: any;
|
||||
}): void;
|
||||
draw(): void;
|
||||
delete(): void;
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue