webgl-framework
Advanced tools
Comparing version 2.0.4-beta to 2.0.5-beta
@@ -9,4 +9,4 @@ "use strict"; | ||
this.gl = gl; | ||
this.vertexShaderCode = ''; | ||
this.fragmentShaderCode = ''; | ||
this.vertexShaderCode = ""; | ||
this.fragmentShaderCode = ""; | ||
this.fillCode(); | ||
@@ -62,3 +62,3 @@ this.initShader(); | ||
if (this.program === undefined) { | ||
throw new Error('No program for shader.'); | ||
throw new Error("No program for shader."); | ||
} | ||
@@ -81,6 +81,6 @@ return this.gl.getAttribLocation(this.program, attrib); | ||
if (!this.gl.getProgramParameter(shaderProgram, this.gl.LINK_STATUS)) { | ||
console.warn(this.constructor.name + ': Could not initialise shader'); | ||
console.warn(this.constructor.name + ": Could not initialise shader"); | ||
} | ||
else { | ||
console.log(this.constructor.name + ': Initialised shader'); | ||
console.log(this.constructor.name + ": Initialised shader"); | ||
} | ||
@@ -87,0 +87,0 @@ this.gl.useProgram(shaderProgram); |
@@ -25,4 +25,4 @@ "use strict"; | ||
const dataStrides = await BinaryDataLoader_1.BinaryDataLoader.load(url + "-strides.bin"); | ||
console.log(`Loaded + ${url}-indices.bin: ${dataIndices.byteLength} bytes.`); | ||
console.log(`Loaded + ${url}-strides.bin: ${dataStrides.byteLength} bytes.`); | ||
console.log(`Loaded ${url}-indices.bin (${dataIndices.byteLength} bytes)`); | ||
console.log(`Loaded ${url}-strides.bin (${dataStrides.byteLength} bytes)`); | ||
this.bufferIndices = gl.createBuffer(); | ||
@@ -29,0 +29,0 @@ this.loadBuffer(gl, this.bufferIndices, gl.ELEMENT_ARRAY_BUFFER, dataIndices); |
@@ -8,3 +8,3 @@ "use strict"; | ||
if (texture === null) { | ||
reject("Error creating WebGL texture"); | ||
reject('Error creating WebGL texture'); | ||
return; | ||
@@ -33,3 +33,3 @@ } | ||
}; | ||
image.onerror = () => reject("Cannot load image"); | ||
image.onerror = () => reject('Cannot load image'); | ||
}); | ||
@@ -36,0 +36,0 @@ } |
@@ -74,3 +74,3 @@ class FullScreenUtils { | ||
if (texture === null) { | ||
reject("Error creating WebGL texture"); | ||
reject('Error creating WebGL texture'); | ||
return; | ||
@@ -99,3 +99,3 @@ } | ||
}; | ||
image.onerror = () => reject("Cannot load image"); | ||
image.onerror = () => reject('Cannot load image'); | ||
}); | ||
@@ -126,4 +126,4 @@ } | ||
const dataStrides = await BinaryDataLoader.load(url + "-strides.bin"); | ||
console.log(`Loaded + ${url}-indices.bin: ${dataIndices.byteLength} bytes.`); | ||
console.log(`Loaded + ${url}-strides.bin: ${dataStrides.byteLength} bytes.`); | ||
console.log(`Loaded ${url}-indices.bin (${dataIndices.byteLength} bytes)`); | ||
console.log(`Loaded ${url}-strides.bin (${dataStrides.byteLength} bytes)`); | ||
this.bufferIndices = gl.createBuffer(); | ||
@@ -160,4 +160,4 @@ this.loadBuffer(gl, this.bufferIndices, gl.ELEMENT_ARRAY_BUFFER, dataIndices); | ||
this.gl = gl; | ||
this.vertexShaderCode = ''; | ||
this.fragmentShaderCode = ''; | ||
this.vertexShaderCode = ""; | ||
this.fragmentShaderCode = ""; | ||
this.fillCode(); | ||
@@ -213,3 +213,3 @@ this.initShader(); | ||
if (this.program === undefined) { | ||
throw new Error('No program for shader.'); | ||
throw new Error("No program for shader."); | ||
} | ||
@@ -232,6 +232,6 @@ return this.gl.getAttribLocation(this.program, attrib); | ||
if (!this.gl.getProgramParameter(shaderProgram, this.gl.LINK_STATUS)) { | ||
console.warn(this.constructor.name + ': Could not initialise shader'); | ||
console.warn(this.constructor.name + ": Could not initialise shader"); | ||
} | ||
else { | ||
console.log(this.constructor.name + ': Initialised shader'); | ||
console.log(this.constructor.name + ": Initialised shader"); | ||
} | ||
@@ -238,0 +238,0 @@ this.gl.useProgram(shaderProgram); |
@@ -80,3 +80,3 @@ (function (global, factory) { | ||
if (texture === null) { | ||
reject("Error creating WebGL texture"); | ||
reject('Error creating WebGL texture'); | ||
return; | ||
@@ -105,3 +105,3 @@ } | ||
}; | ||
image.onerror = () => reject("Cannot load image"); | ||
image.onerror = () => reject('Cannot load image'); | ||
}); | ||
@@ -132,4 +132,4 @@ } | ||
const dataStrides = await BinaryDataLoader.load(url + "-strides.bin"); | ||
console.log(`Loaded + ${url}-indices.bin: ${dataIndices.byteLength} bytes.`); | ||
console.log(`Loaded + ${url}-strides.bin: ${dataStrides.byteLength} bytes.`); | ||
console.log(`Loaded ${url}-indices.bin (${dataIndices.byteLength} bytes)`); | ||
console.log(`Loaded ${url}-strides.bin (${dataStrides.byteLength} bytes)`); | ||
this.bufferIndices = gl.createBuffer(); | ||
@@ -166,4 +166,4 @@ this.loadBuffer(gl, this.bufferIndices, gl.ELEMENT_ARRAY_BUFFER, dataIndices); | ||
this.gl = gl; | ||
this.vertexShaderCode = ''; | ||
this.fragmentShaderCode = ''; | ||
this.vertexShaderCode = ""; | ||
this.fragmentShaderCode = ""; | ||
this.fillCode(); | ||
@@ -219,3 +219,3 @@ this.initShader(); | ||
if (this.program === undefined) { | ||
throw new Error('No program for shader.'); | ||
throw new Error("No program for shader."); | ||
} | ||
@@ -238,6 +238,6 @@ return this.gl.getAttribLocation(this.program, attrib); | ||
if (!this.gl.getProgramParameter(shaderProgram, this.gl.LINK_STATUS)) { | ||
console.warn(this.constructor.name + ': Could not initialise shader'); | ||
console.warn(this.constructor.name + ": Could not initialise shader"); | ||
} | ||
else { | ||
console.log(this.constructor.name + ': Initialised shader'); | ||
console.log(this.constructor.name + ": Initialised shader"); | ||
} | ||
@@ -244,0 +244,0 @@ this.gl.useProgram(shaderProgram); |
{ | ||
"name": "webgl-framework", | ||
"version": "2.0.4-beta", | ||
"version": "2.0.5-beta", | ||
"description": "Basic low-level WebGL framework", | ||
@@ -42,8 +42,2 @@ "author": "Oleksandr Popov (github.com/keaukraine/)", | ||
}, | ||
"lint-staged": { | ||
"{src,test}/**/*.ts": [ | ||
"prettier --write", | ||
"git add" | ||
] | ||
}, | ||
"config": { | ||
@@ -81,6 +75,2 @@ "commitizen": { | ||
}, | ||
"prettier": { | ||
"semi": false, | ||
"singleQuote": true | ||
}, | ||
"commitlint": { | ||
@@ -109,3 +99,2 @@ "extends": [ | ||
"lodash.camelcase": "^4.3.0", | ||
"prettier": "^1.14.3", | ||
"prompt": "^1.0.0", | ||
@@ -126,3 +115,2 @@ "replace-in-file": "^3.4.2", | ||
"tslint": "^5.11.0", | ||
"tslint-config-prettier": "^1.15.0", | ||
"tslint-config-standard": "^8.0.1", | ||
@@ -129,0 +117,0 @@ "typedoc": "^0.12.0", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
32
210468