Working version
This commit is contained in:
parent
77bde04db3
commit
b2c2cfcb41
63 changed files with 203 additions and 8301 deletions
1
.gitattributes
vendored
1
.gitattributes
vendored
|
|
@ -1 +0,0 @@
|
|||
*.psd filter=lfs diff=lfs merge=lfs -text
|
||||
2
.gitignore
vendored
2
.gitignore
vendored
|
|
@ -1,3 +1,3 @@
|
|||
dist
|
||||
node_modules
|
||||
package-lock.json
|
||||
lib
|
||||
5
.npmignore
Normal file
5
.npmignore
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
.*
|
||||
**/tsconfig.json
|
||||
**/webpack.config.js
|
||||
node_modules
|
||||
src
|
||||
7839
build/main-bundle.js
7839
build/main-bundle.js
File diff suppressed because it is too large
Load diff
0
build/src/game.d.ts
vendored
0
build/src/game.d.ts
vendored
|
|
@ -1,7 +0,0 @@
|
|||
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
5
build/src/graphics/drawables/i-drawable.d.ts
vendored
|
|
@ -1,5 +0,0 @@
|
|||
import { vec2, mat2d } from 'gl-matrix';
|
||||
export interface IDrawable {
|
||||
distance(target: vec2): number;
|
||||
serializeToUniforms(uniforms: any, scale: number, transform: mat2d): void;
|
||||
}
|
||||
|
|
@ -1,14 +0,0 @@
|
|||
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;
|
||||
}
|
||||
|
|
@ -1,15 +0,0 @@
|
|||
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;
|
||||
}
|
||||
|
|
@ -1,2 +0,0 @@
|
|||
import { IDrawable } from '../i-drawable';
|
||||
export declare type ILight = IDrawable;
|
||||
|
|
@ -1 +0,0 @@
|
|||
export declare const checkProgram: (gl: WebGL2RenderingContext, program: WebGLProgram) => void;
|
||||
|
|
@ -1 +0,0 @@
|
|||
export declare const checkShader: (gl: WebGL2RenderingContext, shader: WebGLShader) => void;
|
||||
|
|
@ -1,3 +0,0 @@
|
|||
export declare const createProgram: (gl: WebGL2RenderingContext, vertexShaderSource: string, fragmentShaderSource: string, substitutions: {
|
||||
[name: string]: string;
|
||||
}) => Promise<WebGLProgram>;
|
||||
|
|
@ -1,3 +0,0 @@
|
|||
export declare const createShader: (gl: WebGL2RenderingContext, type: GLenum, source: string, substitutions: {
|
||||
[name: string]: string;
|
||||
}) => WebGLShader;
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
import { FrameBuffer } from './frame-buffer';
|
||||
export declare class DefaultFrameBuffer extends FrameBuffer {
|
||||
constructor(gl: WebGL2RenderingContext);
|
||||
setSize(): boolean;
|
||||
}
|
||||
|
|
@ -1,12 +0,0 @@
|
|||
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;
|
||||
}
|
||||
|
|
@ -1,10 +0,0 @@
|
|||
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;
|
||||
}
|
||||
|
|
@ -1,2 +0,0 @@
|
|||
export declare const tryEnableExtension: (gl: WebGL2RenderingContext, name: string) => any | null;
|
||||
export declare const enableExtension: (gl: WebGL2RenderingContext, name: string) => any;
|
||||
|
|
@ -1 +0,0 @@
|
|||
export declare const getWebGl2Context: (canvas: HTMLCanvasElement) => WebGL2RenderingContext;
|
||||
|
|
@ -1 +0,0 @@
|
|||
export declare const loadUniform: (gl: WebGL2RenderingContext, value: any, type: GLenum, location: WebGLUniformLocation) => any;
|
||||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue