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.2 to 0.10.3-webgl2.0

4

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

@@ -59,4 +59,4 @@ "repository": {

"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 && git clean -d -f"
"pub": "npm run build && npm run build:es5 && npm publish --tag beta && git clean -d -f"
}
}

@@ -32,2 +32,4 @@ /**

}).join('\n') + '\n' + this._code;
this._code = '#version 300 es\n' + this._code;
}

@@ -71,3 +73,5 @@

gl.compileShader(shader);
if (!gl.getShaderParameter(shader, gl.COMPILE_STATUS)) {
console.log(`Error compiling shader, here is code: \n${this._code}`);
throw new Error(gl.getShaderInfoLog(shader));

@@ -82,2 +86,2 @@ }

export default Shader;
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInNyYy9TaGFkZXIuanMiXSwibmFtZXMiOlsiU2hhZGVyIiwiY29uc3RydWN0b3IiLCJ0eXBlIiwiY29kZSIsImRlZmluaXRpb25zIiwiVmVydGV4IiwiRnJhZ21lbnQiLCJfY29kZSIsIkFycmF5IiwiaXNBcnJheSIsImpvaW4iLCJtYXAiLCJkZWYiLCJ2YWx1ZSIsInVuZGVmaW5lZCIsImdldCIsImdsIiwiX3NoYWRlciIsIl9jb21waWxlIiwicmVtb3ZlIiwiZGVsZXRlU2hhZGVyIiwiZ2xUeXBlIiwiVkVSVEVYX1NIQURFUiIsIkZSQUdNRU5UX1NIQURFUiIsInNoYWRlciIsImNyZWF0ZVNoYWRlciIsImlzQ29udGV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gIC8qKlxuICAgICAgICAgKiDQmtC+0LQg0YjQtdC50LTQtdGA0LBcbiAgICAgICAgICogQHR5cGUge1N0cmluZ31cbiAgICAgICAgICogQGlnbm9yZVxuICAgICAgICAgKi9cbiAgICAgICAgdGhpcy5fY29kZSA9IEFycmF5LmlzQXJyYXkoY29kZSkgPyBjb2RlLmpvaW4oJ1xcbicpIDogY29kZSB8fCAnJztcblxuICAgICAgICB0aGlzLl9jb2RlID1cbiAgICAgICAgICAgIGRlZmluaXRpb25zXG4gICAgICAgICAgICAgICAgLm1hcCgoZGVmKSA9PiB7XG4gICAgICAgICAgICAgICAgICAgIGlmIChkZWYudmFsdWUgIT09IHVuZGVmaW5lZCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICcjZGVmaW5lICcgKyBkZWYudHlwZSArICcgJyArIGRlZi52YWx1ZTtcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAnI2RlZmluZSAnICsgZGVmLnR5cGU7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9KVxuICAgICAgICAgICAgICAgIC5qb2luKCdcXG4nKSArXG4gICAgICAgICAgICAnXFxuJyArXG4gICAgICAgICAgICB0aGlzLl9jb2RlO1xuICAgIH1cblxuICAgIC8qKlxuICAgICAqINCS0L7Qt9Cy0YDQsNGJ0LDQtdGCIHdlYmdsINGI0LXQudC00LXRgCDQtNC70Y8g0YHQstGP0LfRi9Cy0LDQvdC40Y8g0YEg0L/RgNC+0LPRgNCw0LzQvNC+0LkuXG4gICAgICog0JXRgdC70Lgg0YjQtdC50LTQtdGAINC40YHQv9C+0LvRjNC30YPRjtC10YLRgdGPINC/0LXRgNCy0YvQuSDRgNCw0LcsINGC0L4g0LrQvtC80L/QuNC70LjRgNGD0LXRgiDQtdCz0L4uXG4gICAgICovXG4gICAgZ2V0KGdsKSB7XG4gICAgICAgIGlmICghdGhpcy5fc2hh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7XG5cbiAgICAgICAgLyoqXG4gICAgICAgICAqINCa0L7QtCDRiNC10LnQtNC10YDQsFxuICAgICAgICAgKiBAdHlwZSB7U3RyaW5nfVxuICAgICAgICAgKiBAaWdub3JlXG4gICAgICAgICAqL1xuICAgICAgICB0aGlzLl9jb2RlID0gQXJyYXkuaXNBcnJheShjb2RlKSA/IGNvZGUuam9pbignXFxuJykgOiBjb2RlIHx8ICcnO1xuXG4gICAgICAgIHRoaXMuX2NvZGUgPVxuICAgICAgICAgICAgZGVmaW5pdGlvbnNcbiAgICAgICAgICAgICAgICAubWFwKChkZWYpID0+IHtcbiAgICAgICAgICAgICAgICAgICAgaWYgKGRlZi52YWx1ZSAhPT0gdW5kZWZpbmVkKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJyNkZWZpbmUgJyArIGRlZi50eXBlICsgJyAnICsgZGVmLnZhbHVlO1xuICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICcjZGVmaW5lICcgKyBkZWYudHlwZTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH0pXG4gICAgICAgICAgICAgICAgLmpvaW4oJ1xcbicpICtcbiAgICAgICAgICAgICdcXG4nICtcbiAgICAgICAgICAgIHRoaXMuX2NvZGU7XG5cbiAgICAgICAgdGhpcy5fY29kZSA9ICcjdmVyc2lvbiAzMDAgZXNcXG4nICsgdGhpcy5fY29kZTtcbiAgICB9XG5cbiAgICAvKipcbiAgICAgKiDQktC+0LfQstGA0LDRidCw0LXRgiB3ZWJnbCDRiNC10LnQtNC10YAg0LTQu9GPINGB0LLRj9C30YvQstCw0L3QuNGPINGBINC/0YDQvtCz0YDQsNC80LzQvtC5LlxuICAgICAqINCV0YHQu9C4INGI0LXQudC00LXRgCDQuNGB0L/QvtC70YzQt9GD0Y7QtdGC0YHRjyDQv9C10YDQstGL0Lkg0YDQsNC3LCDRgtC+INC60L7QvNC/0LjQu9C40YDRg9C10YIg0LXQs9C+LlxuICAgICAqL1xuICAgIGdldChnbCkge1xuICAgICAgICBpZiAoIXRoaXMuX3NoYWRlcikge1xuICAgICAgICAgICAgdGhpcy5fY29tcGlsZShnbCk7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIHRoaXMuX3NoYWRlcjtcbiAgICB9XG5cbiAgICAvKipcbiAgICAgKiDQo9C00LDQu9GP0LXRgiDRiNC10LnQtNC10YAg0LjQtyDQstC40LTQtdC+0LrQsNGA0YLRi1xuICAgICAqIEBwYXJhbSAge1dlYkdMUmVuZGVyaW5nQ29udGV4dH0gZ2wg0JrQvtC90YLQtdC60YHRgiBXZWJHbFxuICAgICAqL1xuICAgIHJlbW92ZShnbCkge1xuICAgICAgICBpZiAodGhpcy5fc2hhZGVyKSB7XG4gICAgICAgICAgICBnbC5kZWxldGVTaGFkZXIodGhpcy5fc2hhZGVyKTtcbiAgICAgICAgfVxuICAgIH1cblxuICAgIC8qKlxuICAgICAqINCa0L7QvNC/0LjQu9C40YDRg9C10YIg0LTQsNC90L3Ri9C5INGI0LXQudC00LXRgFxuICAgICAqIEBwYXJhbSAge1dlYkdMUmVuZGVyaW5nQ29udGV4dH0gZ2wg0JrQvtC90YLQtdC60YHRgiBXZWJHTFxuICAgICAqIEBpZ25vcmVcbiAgICAgKi9cbiAgICBfY29tcGlsZShnbCkge1xuICAgICAgICBjb25zdCBnbFR5cGUgPSB0aGlzLnR5cGUgPT09IFNoYWRlci5WZXJ0ZXggPyBnbC5WRVJURVhfU0hBREVSIDogZ2wuRlJBR01FTlRfU0hBREVSO1xuICAgICAgICBjb25zdCBzaGFkZXIgPSAodGhpcy5fc2hhZGVyID0gZ2wuY3JlYXRlU2hhZGVyKGdsVHlwZSkpO1xuXG4gICAgICAgIGlmICghc2hhZGVyIHx8IGdsLmlzQ29udGV4dExvc3QoKSkge1xuICAgICAgICAgICAgdGhyb3cgbmV3IEVycm9yKFxuICAgICAgICAgICAgICAgIGBbMmdsXSBGYWlsZWQgdG8gY3JlYXRlIHNoYWRlci4gU2hhZGVyIGlzIG51bGw6ICR7IXNoYWRlcn0uIENvbnRleHQgaXMgbG9zdDogJHtnbC5pc0NvbnRleHRMb3N0KCl9YCxcbiAgICAgICAgICAgICk7XG4gICAgICAgIH1cblxuICAgICAgICBnbC5zaGFkZXJTb3VyY2Uoc2hhZGVyLCB0aGlzLl9jb2RlKTtcbiAgICAgICAgZ2wuY29tcGlsZVNoYWRlcihzaGFkZXIpOyAgICBcblxuICAgICAgICBpZiAoIWdsLmdldFNoYWRlclBhcmFtZXRlcihzaGFkZXIsIGdsLkNPTVBJTEVfU1RBVFVTKSkge1xuICAgICAgICAgICAgY29uc29sZS5sb2coYEVycm9yIGNvbXBpbGluZyBzaGFkZXIsIGhlcmUgaXMgY29kZTogXFxuJHt0aGlzLl9jb2RlfWApO1xuICAgICAgICAgICAgdGhyb3cgbmV3IEVycm9yKGdsLmdldFNoYWRlckluZm9Mb2coc2hhZGVyKSk7XG4gICAgICAgIH1cbiAgICB9XG59XG5cblNoYWRlci5WZXJ0ZXggPSAxO1xuU2hhZGVyLkZyYWdtZW50ID0gMjtcblxuZXhwb3J0IGRlZmF1bHQgU2hhZGVyO1xuIl19

@@ -37,2 +37,4 @@ /**

this._code;
this._code = '#version 300 es\n' + this._code;
}

@@ -77,4 +79,6 @@

gl.shaderSource(shader, this._code);
gl.compileShader(shader);
gl.compileShader(shader);
if (!gl.getShaderParameter(shader, gl.COMPILE_STATUS)) {
console.log(`Error compiling shader, here is code: \n${this._code}`);
throw new Error(gl.getShaderInfoLog(shader));

@@ -81,0 +85,0 @@ }

@@ -31,8 +31,9 @@ /**

if (ext) {
this._bind(state.gl, ext);
} else {
// В случае фоллбека - биндим атрибуты прямо из шейдерной программы
this._shaderProgram.bind(state.gl, null, this._attributes);
}
this._bind(state.gl, ext);
// if (ext) {
// } else {
// // В случае фоллбека - биндим атрибуты прямо из шейдерной программы
// this._shaderProgram.bind(state.gl, null, this._attributes);
// }

@@ -51,2 +52,5 @@ return this;

}
if (this._gl) {
this._gl.bindVertexArray(null);
}

@@ -61,3 +65,6 @@ return this;

if (this._vao) {
this._ext.deleteVertexArrayOES(this._vao);
if (this._gl) {
this._gl.deleteVertexArray(this._vao)
}
// this._ext.deleteVertexArrayOES(this._vao);
}

@@ -72,3 +79,4 @@

} else {
ext.bindVertexArrayOES(this._vao);
gl.bindVertexArray(this._vao);
// ext.bindVertexArrayOES(this._vao);
}

@@ -78,7 +86,13 @@ }

_prepare(gl, ext) {
this._gl = gl;
this._ext = ext;
this._vao = ext.createVertexArrayOES();
if (gl instanceof WebGL2RenderingContext) {
this._vao = gl.createVertexArray();
gl.bindVertexArray(this._vao);
} else {
this._vao = ext.createVertexArrayOES();
ext.bindVertexArrayOES(this._vao);
}
ext.bindVertexArrayOES(this._vao);
const shaderAttributes = this._shaderProgram.attributes;

@@ -85,0 +99,0 @@ const attributes = this._attributes;

@@ -31,9 +31,10 @@ /**

if (ext) {
this._bind(state.gl, ext);
} else {
// В случае фоллбека - биндим атрибуты прямо из шейдерной программы
this._shaderProgram.bind(state.gl, null, this._attributes);
}
this._bind(state.gl, ext);
// if (ext) {
// } else {
// // В случае фоллбека - биндим атрибуты прямо из шейдерной программы
// this._shaderProgram.bind(state.gl, null, this._attributes);
// }
return this;

@@ -51,2 +52,5 @@ }

}
if (this._gl) {
this._gl.bindVertexArray(null);
}

@@ -61,3 +65,6 @@ return this;

if (this._vao) {
this._ext.deleteVertexArrayOES(this._vao);
if (this._gl) {
this._gl.deleteVertexArray(this._vao);
}
// this._ext.deleteVertexArrayOES(this._vao);
}

@@ -72,3 +79,4 @@

} else {
ext.bindVertexArrayOES(this._vao);
gl.bindVertexArray(this._vao);
// ext.bindVertexArrayOES(this._vao);
}

@@ -78,6 +86,12 @@ }

_prepare(gl, ext) {
this._gl = gl;
this._ext = ext;
this._vao = ext.createVertexArrayOES();
ext.bindVertexArrayOES(this._vao);
if (gl instanceof WebGL2RenderingContext) {
this._vao = gl.createVertexArray();
gl.bindVertexArray(this._vao);
} else {
this._vao = ext.createVertexArrayOES();
ext.bindVertexArrayOES(this._vao);
}

@@ -99,2 +113,2 @@ const shaderAttributes = this._shaderProgram.attributes;

export default Vao;
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInNyYy9WYW8uanMiXSwibmFtZXMiOlsiVmFvIiwiY29uc3RydWN0b3IiLCJzaGFkZXJQcm9ncmFtIiwiYXR0cmlidXRlcyIsIl92YW8iLCJfYXR0cmlidXRlcyIsIl9zaGFkZXJQcm9ncmFtIiwiX2V4dCIsImJpbmQiLCJzdGF0ZSIsImV4dCIsImV4dGVuc2lvbnMiLCJPRVNfdmVydGV4X2FycmF5X29iamVjdCIsIl9iaW5kIiwiZ2wiLCJ1bmJpbmQiLCJiaW5kVmVydGV4QXJyYXlPRVMiLCJyZW1vdmUiLCJkZWxldGVWZXJ0ZXhBcnJheU9FUyIsIl9wcmVwYXJlIiwiY3JlYXRlVmVydGV4QXJyYXlPRVMiLCJzaGFkZXJBdHRyaWJ1dGVzIiwibmFtZSIsInNoYWRlckF0dHJpYnV0ZSIsImluZGV4IiwiZW5hYmxlVmVydGV4QXR0cmliQXJyYXkiLCJsb2NhdGlvbiJdLCJtYXBwaW5ncyI6IkFBQUE7Ozs7Ozs7OztBQVNBLE1BQU1BLEdBQU4sQ0FBVTtBQUNOQyxnQkFBWUMsYUFBWixFQUEyQkMsYUFBYSxFQUF4QyxFQUE0QztBQUN4QyxhQUFLQyxJQUFMLEdBQVksSUFBWjtBQUNBLGFBQUtDLFdBQUwsR0FBbUJGLFVBQW5CO0FBQ0EsYUFBS0csY0FBTCxHQUFzQkosYUFBdEI7O0FBRUE7Ozs7QUFJQSxhQUFLSyxJQUFMLEdBQVksSUFBWjtBQUNIOztBQUVEOzs7OztBQUtBQyxTQUFLQyxLQUFMLEVBQVk7QUFDUixjQUFNQyxNQUFNRCxNQUFNRSxV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L/QtdGA0LXQtNCw0L3QvdGL0LUg0LIg0LrQvtC90YHRgtGA0YPQutGC0L7RgCwg0LjRhSDQv9Cw0YDQsNC80LXRgtGA0Ysg0LHQtdGA0ZHQvCDQuNC3INGI0LXQudC00LXRgNC90L7QuSDQv9GA0L7Qs9GA0LDQvNC80YtcbiAgICAgICAgZm9yIChjb25zdCBuYW1lIGluIGF0dHJpYnV0ZXMpIHtcbiAgICAgICAgICAgIGNvbnN0IHNoYWRlckF0dHJpYnV0ZSA9IHNoYWRlckF0dHJpYnV0ZXNbbmFtZV07XG4gICAgICAgICAgICBpZiAoc2hhZGVyQXR0cmlidXRlLmluZGV4ICE9PSB0cnVlKSB7XG4gICAgICAgICAgICAgICAgZ2wuZW5hYmxlVmVydGV4QXR0cmliQXJyYXkoc2hhZGVyQXR0cmlidXRlLmxvY2F0aW9uKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGF0dHJpYnV0ZXNbbmFtZV0uYmluZChnbCwgc2hhZGVyQXR0cmlidXRlLmxvY2F0aW9uKTtcbiAgICAgICAgfVxuICAgIH1cbn1cblxuZXhwb3J0IGRlZmF1bHQgVmFvO1xuIl19

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