Make some more methods and attributes private
This commit is contained in:
parent
99767ce48d
commit
cae6e16416
|
@ -601,7 +601,7 @@ class PathfinderView {
|
||||||
this.setDirty();
|
this.setDirty();
|
||||||
}
|
}
|
||||||
|
|
||||||
initContext() {
|
private initContext() {
|
||||||
// Initialize the OpenGL context.
|
// Initialize the OpenGL context.
|
||||||
this.gl = expectNotNull(this.canvas.getContext('webgl', { antialias: false, depth: true }),
|
this.gl = expectNotNull(this.canvas.getContext('webgl', { antialias: false, depth: true }),
|
||||||
"Failed to initialize WebGL! Check that your browser supports it.");
|
"Failed to initialize WebGL! Check that your browser supports it.");
|
||||||
|
@ -632,8 +632,8 @@ class PathfinderView {
|
||||||
this.gl.bufferData(this.gl.ELEMENT_ARRAY_BUFFER, QUAD_ELEMENTS, this.gl.STATIC_DRAW);
|
this.gl.bufferData(this.gl.ELEMENT_ARRAY_BUFFER, QUAD_ELEMENTS, this.gl.STATIC_DRAW);
|
||||||
}
|
}
|
||||||
|
|
||||||
compileShaders(commonSource: string, shaderSources: ShaderMap<ShaderProgramSource>):
|
private compileShaders(commonSource: string, shaderSources: ShaderMap<ShaderProgramSource>):
|
||||||
ShaderMap<UnlinkedShaderProgram> {
|
ShaderMap<UnlinkedShaderProgram> {
|
||||||
let shaders: Partial<ShaderMap<Partial<UnlinkedShaderProgram>>> = {};
|
let shaders: Partial<ShaderMap<Partial<UnlinkedShaderProgram>>> = {};
|
||||||
const shaderKeys = Object.keys(SHADER_URLS) as Array<keyof ShaderMap<string>>;
|
const shaderKeys = Object.keys(SHADER_URLS) as Array<keyof ShaderMap<string>>;
|
||||||
|
|
||||||
|
@ -666,7 +666,8 @@ class PathfinderView {
|
||||||
return shaders as ShaderMap<UnlinkedShaderProgram>;
|
return shaders as ShaderMap<UnlinkedShaderProgram>;
|
||||||
}
|
}
|
||||||
|
|
||||||
linkShaders(shaders: ShaderMap<UnlinkedShaderProgram>): ShaderMap<PathfinderShaderProgram> {
|
private linkShaders(shaders: ShaderMap<UnlinkedShaderProgram>):
|
||||||
|
ShaderMap<PathfinderShaderProgram> {
|
||||||
let shaderProgramMap: Partial<ShaderMap<PathfinderShaderProgram>> = {};
|
let shaderProgramMap: Partial<ShaderMap<PathfinderShaderProgram>> = {};
|
||||||
for (const shaderName of Object.keys(shaders) as Array<keyof ShaderMap<string>>) {
|
for (const shaderName of Object.keys(shaders) as Array<keyof ShaderMap<string>>) {
|
||||||
shaderProgramMap[shaderName] = new PathfinderShaderProgram(this.gl,
|
shaderProgramMap[shaderName] = new PathfinderShaderProgram(this.gl,
|
||||||
|
@ -1135,8 +1136,8 @@ class PathfinderView {
|
||||||
atlasFramebuffer: WebGLFramebuffer;
|
atlasFramebuffer: WebGLFramebuffer;
|
||||||
atlasDepthTexture: WebGLTexture;
|
atlasDepthTexture: WebGLTexture;
|
||||||
|
|
||||||
pixelsPerUnit: number;
|
private pixelsPerUnit: number;
|
||||||
textGlyphCount: number;
|
private textGlyphCount: number;
|
||||||
|
|
||||||
glyphPositionsBuffer: WebGLBuffer;
|
glyphPositionsBuffer: WebGLBuffer;
|
||||||
glyphTexCoordsBuffer: WebGLBuffer;
|
glyphTexCoordsBuffer: WebGLBuffer;
|
||||||
|
@ -1146,7 +1147,7 @@ class PathfinderView {
|
||||||
|
|
||||||
appController: AppController;
|
appController: AppController;
|
||||||
|
|
||||||
dirty: boolean;
|
private dirty: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
class PathfinderShaderProgram {
|
class PathfinderShaderProgram {
|
||||||
|
|
Loading…
Reference in New Issue