Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

2gl

Package Overview
Dependencies
Maintainers
6
Versions
51
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

2gl - npm Package Compare versions

Comparing version 0.10.3-webgl2.2 to 0.11.0

6

package.json
{
"name": "2gl",
"version": "0.10.3-webgl2.2",
"version": "0.11.0",
"description": "WebGL library for 2GIS projects",

@@ -33,3 +33,3 @@ "repository": {

"eslint": "^4.5.0",
"jsdoc": "git://github.com/jsdoc3/jsdoc.git",
"jsdoc": "^3.6.0",
"minami": "git://github.com/Trufi/minami.git",

@@ -60,4 +60,4 @@ "mocha": "^3.5.0",

"test:dev": "npm run build:shaders && ./node_modules/.bin/_mocha --require=test/babelRegister.js -w test/*.spec.js test/**/*.spec.js",
"pub": "npm run build && npm run build:es5 && npm publish --tag beta && git clean -d -f"
"pub": "npm run build && npm run build:es5 && npm publish && git clean -d -f"
}
}

@@ -85,4 +85,15 @@ /**

if (!gl.getShaderParameter(shader, gl.COMPILE_STATUS)) {
console.log(`Error compiling shader, here is code: \n${this._code}`);
throw new Error(gl.getShaderInfoLog(shader));
const infoLog = gl.getShaderInfoLog(shader);
const codeLines = (this._code || '').split('\n');
throw new Error(infoLog.replace(/^ERROR:\s*(\d+):(\d+):\s*(.*?)\n/,
// It's useful to inject erroneous line of code
// in the error message to concise what happened
function (wholeMatch, col, row, message) {
const line = codeLines[Number(row) - 1];
if (line) {
return `ERROR ${col}:${row}: ${message}\nErroneous line: <<${line}>>\n`;
} else {
return wholeMatch;
}
}));
}

@@ -96,2 +107,2 @@ }

export default Shader;
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInNyYy9TaGFkZXIuanMiXSwibmFtZXMiOlsiU2hhZGVyIiwiY29uc3RydWN0b3IiLCJ0eXBlIiwiY29kZSIsImRlZmluaXRpb25zIiwiVmVydGV4Iiw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uNC70LggZnJhZ21lbnRcbiAqIEBwYXJhbSB7U3RyaW5nIHwgU3RyaW5nW119IGNvZGUg0JrQvtC0INGI0LXQudC00LXRgNCwINC90LDQv9C40YHQsNC90L3Ri9C5INC90LAg0Y/Qt9GL0LrQtSBHTFNMLlxuICog0JzQvtC20L3QviDQv9C10YDQtdC00LDRgtGMINC90LXRgdC60L7Qu9GM0LrQviDRgdGC0YDQvtC6INCyINCy0LjQtNC1INC80LDRgdGB0LjQstCwLCDRgtC+0LPQtNCwINC/0LXRgNC10LQg0LrQvtC80L/QuNC70Y/RhtC40LXQuSDRgdGC0YDQvtC60Lgg0YHQu9C+0LbQsNGC0YHRjy5cbiAqIEBwYXJhbSB7T2JqZWN0W119IFtkZWZpbml0aW9ucz1bXV1cbiAqL1xuY2xhc3MgU2hhZGVyIHtcbiAgICBjb25zdHJ1Y3Rvcih0eXBlLCBjb2RlLCBkZWZpbml0aW9ucyA9IFtdKSB7XG4gICAgICAgIC8qKlxuICAgICAgICAgKiDQotC40L8g0YjQtdC50LTQtdGA0LBcbiAgICAgICAgICogQHR5cGUge1NoYWRlci5WZXJ0ZXggfCBTaGFkZXIuRnJhZ21lbnR9XG4gICAgICAgICAqL1xuICAgICAgICB0aGlzLnR5cGUgPSB0eXBlID09PSAndmVydGV4JyA/IFNoYWRlci5WZXJ0ZXggOiBTaGFkZXIuRnJhZ21lbnQ7XG5cbiAgICAgICAgY29uc3QgcmVzdWx0ID0gXG4gICAgICAgICAgICBkZWZpbml0aW9uc1xuICAgICAgICAgICAgICAgIC5tYXAoKGRlZikgPT4ge1xuICAgICAgICAgICAgICAgICAgICBpZiAoZGVmLnZhbHVlICE9PSB1bmRlZmluZWQpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAnI2RlZmluZSAnICsgZGVmLnR5cGUgKyAnICcgKyBkZWYudmFsdWU7XG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJyNkZWZpbmUgJyArIGRlZi50eXBlO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfSk7XG5cbiAgICAgICAgY29uc3QgbGluZXMgPSBBcnJheS5pc0FycmF5KGNvZGUpID8gY29kZSA6IFtjb2RlIHx8ICcnXTtcbiAgICAgICAgbGV0IGZpcnN0TGluZSA9IHRydWU7XG4gICAgICAgIGZvciAobGV0IGxpbmUgb2YgbGluZXMpIHtcbiAgICAgICAgICAgIC8vINCV0YHQu9C4INCyINGI0LXQudC00LXRgNCw0YUg0YPQutCw0LfQsNC90LAg0LLQtdGA0YHQuNGPLCDRgtC+INC10LUg0L3Rg9C20L3QviDQvtCx0Y/Qt9Cw0YLQtdC70YzQvdC+XG4gICAgICAgICAgICAvLyDQv9C+0LzQtdGB0YLQuNGC0Ywg0L/QtdGA0LLQvtC5INGB0YLRgNC+0LrQvtC5XG4gICAgICAgICAgICBpZiAoZmlyc3RMaW5lICYmIGxpbmUuaW5kZXhPZignI3ZlcnNpb24nKSAhPT0gLTEpIHtcbiAgICAgICAgICAgICAgICByZXN1bHQudW5zaGlmdChsaW5lKTtcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgcmVzdWx0LnB1c2gobGluZSlcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGZpcnN0TGluZSA9IGZhbHNlO1xuICAgICAgICB9XG5cbiAgICAgICAgLyoqXG4gICAgICAgICAqINCa0L7QtCDRiNC10LnQtNC10YDQsFxuICAgICAgICAgKiBAdHlwZSB7U3RyaW5nfVxuICAgICAgICAgKiBAaWdub3JlXG4gICAgICAgICAqL1xuICAgICAgICB0aGlzLl9jb2RlID0gcmVzdWx0LmpvaW4oJ1xcbicpXG4gICAgfVxuXG4gICAgLyoqXG4gICAgICog0JLQvtC30LLRgNCw0YnQsNC10YIgd2ViZ2wg0YjQtdC50LTQtdGAINC00LvRjyDRgdCy0Y/Qt9GL0LLQsNC90LjRjyDRgSDQ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XMuX3NoYWRlciA9IGdsLmNyZWF0ZVNoYWRlcihnbFR5cGUpKTtcblxuICAgICAgICBpZiAoIXNoYWRlciB8fCBnbC5pc0NvbnRleHRMb3N0KCkpIHtcbiAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcihcbiAgICAgICAgICAgICAgICBgWzJnbF0gRmFpbGVkIHRvIGNyZWF0ZSBzaGFkZXIuIFNoYWRlciBpcyBudWxsOiAkeyFzaGFkZXJ9LiBDb250ZXh0IGlzIGxvc3Q6ICR7Z2wuaXNDb250ZXh0TG9zdCgpfWAsXG4gICAgICAgICAgICApO1xuICAgICAgICB9XG5cbiAgICAgICAgZ2wuc2hhZGVyU291cmNlKHNoYWRlciwgdGhpcy5fY29kZSk7XG4gICAgICAgIGdsLmNvbXBpbGVTaGFkZXIoc2hhZGVyKTsgICAgXG5cbiAgICAgICAgaWYgKCFnbC5nZXRTaGFkZXJQYXJhbWV0ZXIoc2hhZGVyLCBnbC5DT01QSUxFX1NUQVRVUykpIHtcbiAgICAgICAgICAgIGNvbnNvbGUubG9nKGBFcnJvciBjb21waWxpbmcgc2hhZGVyLCBoZXJlIGlzIGNvZGU6IFxcbiR7dGhpcy5fY29kZX1gKTtcbiAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcihnbC5nZXRTaGFkZXJJbmZvTG9nKHNoYWRlcikpO1xuICAgICAgICB9XG4gICAgfVxufVxuXG5TaGFkZXIuVmVydGV4ID0gMTtcblNoYWRlci5GcmFnbWVudCA9IDI7XG5cbmV4cG9ydCBkZWZhdWx0IFNoYWRlcjtcbiJdfQ==
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInNyYy9TaGFkZXIuanMiXSwibmFtZXMiOlsiU2hhZGVyIiwiY29uc3RydWN0b3IiLCJ0eXBlIiwiY29kZSIsImRlZmluaXRpb25zIiwiVmVydGV4IiwiRnJhZ21lbnQiLCJyZXN1bHQiLCJtYXAiLCJkZWYiL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iAgICAgICAgICogQHR5cGUge1NoYWRlci5WZXJ0ZXggfCBTaGFkZXIuRnJhZ21lbnR9XG4gICAgICAgICAqL1xuICAgICAgICB0aGlzLnR5cGUgPSB0eXBlID09PSAndmVydGV4JyA/IFNoYWRlci5WZXJ0ZXggOiBTaGFkZXIuRnJhZ21lbnQ7XG5cbiAgICAgICAgY29uc3QgcmVzdWx0ID0gXG4gICAgICAgICAgICBkZWZpbml0aW9uc1xuICAgICAgICAgICAgICAgIC5tYXAoKGRlZikgPT4ge1xuICAgICAgICAgICAgICAgICAgICBpZiAoZGVmLnZhbHVlICE9PSB1bmRlZmluZWQpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAnI2RlZmluZSAnICsgZGVmLnR5cGUgKyAnICcgKyBkZWYudmFsdWU7XG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJyNkZWZpbmUgJyArIGRlZi50eXBlO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfSk7XG5cbiAgICAgICAgY29uc3QgbGluZXMgPSBBcnJheS5pc0FycmF5KGNvZGUpID8gY29kZSA6IFtjb2RlIHx8ICcnXTtcbiAgICAgICAgbGV0IGZpcnN0TGluZSA9IHRydWU7XG4gICAgICAgIGZvciAobGV0IGxpbmUgb2YgbGluZXMpIHtcbiAgICAgICAgICAgIC8vINCV0YHQu9C4INCyINGI0LXQudC00LXRgNCw0YUg0YPQutCw0LfQsNC90LAg0LLQtdGA0YHQuNGPLCDRgtC+INC10LUg0L3Rg9C20L3QviDQvtCx0Y/Qt9Cw0YLQtdC70YzQvdC+XG4gICAgICAgICAgICAvLyDQv9C+0LzQtdGB0YLQuNGC0Ywg0L/QtdGA0LLQvtC5INGB0YLRgNC+0LrQvtC5XG4gICAgICAgICAgICBpZiAoZmlyc3RMaW5lICYmIGxpbmUuaW5kZXhPZignI3ZlcnNpb24nKSAhPT0gLTEpIHt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Mb2cgPSBnbC5nZXRTaGFkZXJJbmZvTG9nKHNoYWRlcik7XG4gICAgICAgICAgICBjb25zdCBjb2RlTGluZXMgPSAodGhpcy5fY29kZSB8fCAnJykuc3BsaXQoJ1xcbicpO1xuICAgICAgICAgICAgdGhyb3cgbmV3IEVycm9yKGluZm9Mb2cucmVwbGFjZSgvXkVSUk9SOlxccyooXFxkKyk6KFxcZCspOlxccyooLio/KVxcbi8sIFxuICAgICAgICAgICAgICAgIC8vIEl0J3MgdXNlZnVsIHRvIGluamVjdCBlcnJvbmVvdXMgbGluZSBvZiBjb2RlXG4gICAgICAgICAgICAgICAgLy8gaW4gdGhlIGVycm9yIG1lc3NhZ2UgdG8gY29uY2lzZSB3aGF0IGhhcHBlbmVkXG4gICAgICAgICAgICAgICAgZnVuY3Rpb24gKHdob2xlTWF0Y2gsIGNvbCwgcm93LCBtZXNzYWdlKSB7XG4gICAgICAgICAgICAgICAgICAgIGNvbnN0IGxpbmUgPSBjb2RlTGluZXNbTnVtYmVyKHJvdykgLSAxXTtcbiAgICAgICAgICAgICAgICAgICAgaWYgKGxpbmUpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBgRVJST1IgJHtjb2x9OiR7cm93fTogJHttZXNzYWdlfVxcbkVycm9uZW91cyBsaW5lOiA8PCR7bGluZX0+PlxcbmA7XG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gd2hvbGVNYXRjaDtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH0pKTtcbiAgICAgICAgfVxuICAgIH1cbn1cblxuU2hhZGVyLlZlcnRleCA9IDE7XG5TaGFkZXIuRnJhZ21lbnQgPSAyO1xuXG5leHBvcnQgZGVmYXVsdCBTaGFkZXI7XG4iXX0=

@@ -89,4 +89,15 @@ /**

if (!gl.getShaderParameter(shader, gl.COMPILE_STATUS)) {
console.log(`Error compiling shader, here is code: \n${this._code}`);
throw new Error(gl.getShaderInfoLog(shader));
const infoLog = gl.getShaderInfoLog(shader);
const codeLines = (this._code || '').split('\n');
throw new Error(infoLog.replace(/^ERROR:\s*(\d+):(\d+):\s*(.*?)\n/,
// It's useful to inject erroneous line of code
// in the error message to concise what happened
function (wholeMatch, col, row, message) {
const line = codeLines[Number(row) - 1];
if (line) {
return `ERROR ${col}:${row}: ${message}\nErroneous line: <<${line}>>\n`;
} else {
return wholeMatch;
}
}));
}

@@ -93,0 +104,0 @@ }

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc