Comparing version 0.11.0 to 0.11.2-instancing.0
305
Buffer.js
@@ -10,168 +10,172 @@ /** | ||
class Buffer { | ||
constructor(initData, options) { | ||
this._initData = initData; | ||
constructor(initData, options) { | ||
this._initData = initData; | ||
/** | ||
* Размер данных в буфере в байтах | ||
* @type {Number} | ||
*/ | ||
this.byteLength = initData.byteLength !== undefined ? initData.byteLength : initData; | ||
/** | ||
* Тип буфера. Буфер может использоваться для передачи массива данных, | ||
* так и для передачи индексов элементов из данных. | ||
* @type {Buffer.ArrayBuffer | Buffer.ElementArrayBuffer} | ||
*/ | ||
this.type = Buffer.ArrayBuffer; | ||
/** | ||
* Параметры для связывания буфера | ||
* @type {BufferBindOptions} | ||
* @ignore | ||
*/ | ||
this.options = Object.assign({}, Buffer.defaultOptions, options); | ||
/** | ||
* Указывает, как часто данные буфера будут изменяться. | ||
* @type {Buffer.StaticDraw | Buffer.DynamicDraw} | ||
*/ | ||
this.drawType = this.options.instanceDivisor ? Buffer.dynamicDraw : Buffer.StaticDraw; | ||
/** | ||
* Исходный WebGL буфер | ||
* @type {?WebGLBuffer} | ||
* @ignore | ||
*/ | ||
this._glBuffer = null; | ||
/** | ||
* Контекст WebGL, в котором был инициализирован буфер. | ||
* Используется только для удаления буфера, подумать хорошо, прежде чем использовать для чего-то ещё. | ||
* @type {?WebGLRenderingContext} | ||
* @ignore | ||
*/ | ||
this._glContext = null; | ||
} | ||
/** | ||
* Размер данных в буфере в байтах | ||
* @type {Number} | ||
* Связывает данные с контекстом WebGL. | ||
* | ||
* В случае Buffer.ArrayBuffer связывает с атрибутами шейдера. | ||
* А в случае Buffer.ElementArrayBuffer связывает массив индексов. | ||
* | ||
* Если используется первый раз, добавляет данные в контекст WebGL. | ||
* | ||
* @param {WebGLRenderingContext} gl | ||
* @param {?Number} location Положение аттрибута для связывания данных с переменными в шейдере | ||
* @param {?BufferBindOptions} options Параметры передаваемые в функцию vertexAttribPointer, если их нет, | ||
* то используются параметры конкретного буфера. Параметры должны быть переданы все. | ||
*/ | ||
this.byteLength = initData.byteLength !== undefined ? initData.byteLength : initData; | ||
bind(gl, location, options) { | ||
if (!this._glBuffer) { | ||
this.prepare(gl); | ||
} | ||
if (this.type === Buffer.ArrayBuffer) { | ||
gl.bindBuffer(gl.ARRAY_BUFFER, this._glBuffer); | ||
options = options || this.options; | ||
gl.vertexAttribPointer(location, options.itemSize, this._toGlParam(gl, options.dataType), options.normalized, options.stride, options.offset); | ||
if (options.instanceDivisor) { | ||
gl.vertexAttribDivisor(location, options.instanceDivisor); | ||
} | ||
} else if (this.type === Buffer.ElementArrayBuffer) { | ||
gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, this._glBuffer); | ||
} | ||
return this; | ||
} | ||
/** | ||
* Тип буфера. Буфер может использоваться для передачи массива данных, | ||
* так и для передачи индексов элементов из данных. | ||
* @type {Buffer.ArrayBuffer | Buffer.ElementArrayBuffer} | ||
* Удаляет данные из контекста WebGL. | ||
*/ | ||
this.type = Buffer.ArrayBuffer; | ||
remove() { | ||
this._unprepare(); | ||
return this; | ||
} | ||
/** | ||
* Указывает, как часто данные буфера будут изменяться. | ||
* @type {Buffer.StaticDraw | Buffer.DynamicDraw} | ||
* Заменяет часть буфера новыми данными и отправляет их в видеокарту | ||
* @param {WebGLRenderingContext} gl | ||
* @param {Number} index Индекс, с которого начать замену | ||
* @param {TypedArray} data Новые данные | ||
*/ | ||
this.drawType = Buffer.StaticDraw; | ||
subData(gl, index, data) { | ||
gl.bindBuffer(this._toGlParam(gl, this.type), this._glBuffer); | ||
gl.bufferSubData(this._toGlParam(gl, this.type), index, data); | ||
return this; | ||
} | ||
/** | ||
* Параметры для связывания буфера | ||
* @type {BufferBindOptions} | ||
* Кладёт данные в видеокарту | ||
* @param {WebGLRenderingContext} gl | ||
* @ignore | ||
*/ | ||
this.options = Object.assign({}, Buffer.defaultOptions, options); | ||
prepare(gl) { | ||
this._glContext = gl; | ||
this._glBuffer = gl.createBuffer(); | ||
gl.bindBuffer(this._toGlParam(gl, this.type), this._glBuffer); | ||
gl.bufferData(this._toGlParam(gl, this.type), this._initData, this._toGlParam(gl, this.drawType)); | ||
this._initData = null; | ||
return this; | ||
} | ||
/** | ||
* Исходный WebGL буфер | ||
* @type {?WebGLBuffer} | ||
* Удаляет данные из видеокарты | ||
* @ignore | ||
*/ | ||
this._glBuffer = null; | ||
_unprepare() { | ||
if (this._glBuffer) { | ||
this._glContext.deleteBuffer(this._glBuffer); | ||
this._glBuffer = null; | ||
this._glContext = null; | ||
} | ||
} | ||
/** | ||
* Контекст WebGL, в котором был инициализирован буфер. | ||
* Используется только для удаления буфера, подумать хорошо, прежде чем использовать для чего-то ещё. | ||
* @type {?WebGLRenderingContext} | ||
* Преобразовывает параметры буфера в параметры WebGL | ||
* @param {WebGLRenderingContext} gl | ||
* @param {Buffer.ArrayBuffer | Buffer.ElementArrayBuffer} param | ||
* @ignore | ||
*/ | ||
this._glContext = null; | ||
} | ||
/** | ||
* Связывает данные с контекстом WebGL. | ||
* | ||
* В случае Buffer.ArrayBuffer связывает с атрибутами шейдера. | ||
* А в случае Buffer.ElementArrayBuffer связывает массив индексов. | ||
* | ||
* Если используется первый раз, добавляет данные в контекст WebGL. | ||
* | ||
* @param {WebGLRenderingContext} gl | ||
* @param {?Number} location Положение аттрибута для связывания данных с переменными в шейдере | ||
* @param {?BufferBindOptions} options Параметры передаваемые в функцию vertexAttribPointer, если их нет, | ||
* то используются параметры конкретного буфера. Параметры должны быть переданы все. | ||
*/ | ||
bind(gl, location, options) { | ||
if (!this._glBuffer) { | ||
this.prepare(gl); | ||
_toGlParam(gl, param) { | ||
if (param === Buffer.ArrayBuffer) { | ||
return gl.ARRAY_BUFFER; | ||
} | ||
if (param === Buffer.ElementArrayBuffer) { | ||
return gl.ELEMENT_ARRAY_BUFFER; | ||
} | ||
if (param === Buffer.StaticDraw) { | ||
return gl.STATIC_DRAW; | ||
} | ||
if (param === Buffer.DynamicDraw) { | ||
return gl.DYNAMIC_DRAW; | ||
} | ||
if (param === Buffer.Byte) { | ||
return gl.BYTE; | ||
} | ||
if (param === Buffer.Short) { | ||
return gl.SHORT; | ||
} | ||
if (param === Buffer.Int) { | ||
return gl.INT; | ||
} | ||
if (param === Buffer.Float) { | ||
return gl.FLOAT; | ||
} | ||
if (param === Buffer.UnsignedByte) { | ||
return gl.UNSIGNED_BYTE; | ||
} | ||
if (param === Buffer.UnsignedShort) { | ||
return gl.UNSIGNED_SHORT; | ||
} | ||
if (param === Buffer.UnsignedInt) { | ||
return gl.UNSIGNED_INT; | ||
} | ||
return null; | ||
} | ||
if (this.type === Buffer.ArrayBuffer) { | ||
gl.bindBuffer(gl.ARRAY_BUFFER, this._glBuffer); | ||
options = options || this.options; | ||
gl.vertexAttribPointer(location, options.itemSize, this._toGlParam(gl, options.dataType), options.normalized, options.stride, options.offset); | ||
} else if (this.type === Buffer.ElementArrayBuffer) { | ||
gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, this._glBuffer); | ||
} | ||
return this; | ||
} | ||
/** | ||
* Удаляет данные из контекста WebGL. | ||
*/ | ||
remove() { | ||
this._unprepare(); | ||
return this; | ||
} | ||
/** | ||
* Заменяет часть буфера новыми данными и отправляет их в видеокарту | ||
* @param {WebGLRenderingContext} gl | ||
* @param {Number} index Индекс, с которого начать замену | ||
* @param {TypedArray} data Новые данные | ||
*/ | ||
subData(gl, index, data) { | ||
gl.bindBuffer(this._toGlParam(gl, this.type), this._glBuffer); | ||
gl.bufferSubData(this._toGlParam(gl, this.type), index, data); | ||
return this; | ||
} | ||
/** | ||
* Кладёт данные в видеокарту | ||
* @param {WebGLRenderingContext} gl | ||
* @ignore | ||
*/ | ||
prepare(gl) { | ||
this._glContext = gl; | ||
this._glBuffer = gl.createBuffer(); | ||
gl.bindBuffer(this._toGlParam(gl, this.type), this._glBuffer); | ||
gl.bufferData(this._toGlParam(gl, this.type), this._initData, this._toGlParam(gl, this.drawType)); | ||
this._initData = null; | ||
return this; | ||
} | ||
/** | ||
* Удаляет данные из видеокарты | ||
* @ignore | ||
*/ | ||
_unprepare() { | ||
if (this._glBuffer) { | ||
this._glContext.deleteBuffer(this._glBuffer); | ||
this._glBuffer = null; | ||
this._glContext = null; | ||
} | ||
} | ||
/** | ||
* Преобразовывает параметры буфера в параметры WebGL | ||
* @param {WebGLRenderingContext} gl | ||
* @param {Buffer.ArrayBuffer | Buffer.ElementArrayBuffer} param | ||
* @ignore | ||
*/ | ||
_toGlParam(gl, param) { | ||
if (param === Buffer.ArrayBuffer) { | ||
return gl.ARRAY_BUFFER; | ||
} | ||
if (param === Buffer.ElementArrayBuffer) { | ||
return gl.ELEMENT_ARRAY_BUFFER; | ||
} | ||
if (param === Buffer.StaticDraw) { | ||
return gl.STATIC_DRAW; | ||
} | ||
if (param === Buffer.DynamicDraw) { | ||
return gl.DYNAMIC_DRAW; | ||
} | ||
if (param === Buffer.Byte) { | ||
return gl.BYTE; | ||
} | ||
if (param === Buffer.Short) { | ||
return gl.SHORT; | ||
} | ||
if (param === Buffer.Int) { | ||
return gl.INT; | ||
} | ||
if (param === Buffer.Float) { | ||
return gl.FLOAT; | ||
} | ||
if (param === Buffer.UnsignedByte) { | ||
return gl.UNSIGNED_BYTE; | ||
} | ||
if (param === Buffer.UnsignedShort) { | ||
return gl.UNSIGNED_SHORT; | ||
} | ||
if (param === Buffer.UnsignedInt) { | ||
return gl.UNSIGNED_INT; | ||
} | ||
return null; | ||
} | ||
} | ||
@@ -194,7 +198,8 @@ | ||
Buffer.defaultOptions = { | ||
itemSize: 3, | ||
dataType: Buffer.Float, | ||
stride: 0, | ||
offset: 0, | ||
normalized: false | ||
itemSize: 3, | ||
dataType: Buffer.Float, | ||
stride: 0, | ||
offset: 0, | ||
normalized: false, | ||
instanceDivisor: 0 | ||
}; | ||
@@ -215,2 +220,2 @@ | ||
*/ | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInNyYy9CdWZmZXIuanMiXSwibmFtZXMiOlsi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I6IDBcbn07XG5cbmV4cG9ydCBkZWZhdWx0IEJ1ZmZlcjtcblxuLyoqXG4gKiDQn9Cw0YDQsNC80LXRgtGA0Ysg0L/QtdGA0LXQtNCw0LLQsNC10LzRi9C1INCyINGE0YPQvdC60YbQuNGOIHZlcnRleEF0dHJpYlBvaW50ZXIuXG4gKlxuICogQHR5cGVkZWYge09iamVjdH0gQnVmZmVyQmluZE9wdGlvbnNcbiAqIEBwcm9wZXJ0eSB7TnVtYmVyfSBpdGVtU2l6ZSDQoNCw0LfQvNC10YDQvdC+0YHRgtGMINGN0LvQtdC80LXQvdGC0L7QsiDQsiDQsdGD0YTQtdGA0LVcbiAqIEBwcm9wZXJ0eSB7QnVmZmVyLkZsb2F0IHwgQnVmZmVyLlVuc2lnbmVkQnl0ZX0gZGF0YVR5cGUg0KLQuNC/INC00LDQvdC90YvRhSDQsiDQsdGD0YTQtdGA0LVcbiAqIEBwcm9wZXJ0eSB7Qm9vbGVhbn0gbm9ybWFsaXplZCDQmNGB0L/QvtC70YzQt9GD0LXRgtGB0Y8g0LTQu9GPINGG0LXQu9C+0YfQuNGB0LvQtdC90L3Ri9GFINGC0LjQv9C+0LIuINCV0YHQu9C4INCy0YvRgdGC0LDQstC70LXQvSDQsiB0cnVlLCDRgtC+XG4gKiDQt9C90LDRh9C10L3QuNGPINC40LzQtdGO0YnQuNC1INGC0LjQvyBCWVRFINC+0YIgLTEyOCDQtNC+IDEyOCDQsdGD0LTRg9GCINC/0LXRgNC10LLQtdC00LXQvdGLINC+0YIgLTEuMCDQtNC+IDEuMC5cbiAqIEBwcm9wZXJ0eSB7TnVtYmVyfSBzdHJpZGVcbiAqIEBwcm9wZXJ0eSB7TnVtYmVyfSBvZmZzZXRcbiAqL1xuIl19 |
@@ -55,2 +55,3 @@ /// <reference types="@2gis/gl-matrix" /> | ||
offset: number; | ||
instanceDivisor: number; | ||
} | ||
@@ -236,2 +237,3 @@ | ||
public bind(state: RendererState): this; | ||
public setAttribute(name: string, buffer: Buffer | BufferChannel): this; | ||
public unbind(): this; | ||
@@ -238,0 +240,0 @@ public remove(): this; |
{ | ||
"name": "2gl", | ||
"version": "0.11.0", | ||
"version": "0.11.2-instancing.0", | ||
"description": "WebGL library for 2GIS projects", | ||
@@ -33,3 +33,3 @@ "repository": { | ||
"eslint": "^4.5.0", | ||
"jsdoc": "^3.6.0", | ||
"jsdoc": "git://github.com/jsdoc3/jsdoc.git", | ||
"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 && git clean -d -f" | ||
"pub": "npm run build && npm run build:es5 && npm publish --tag beta && git clean -d -f" | ||
} | ||
} |
@@ -27,8 +27,2 @@ /** | ||
/** | ||
* Указывает, как часто данные буфера будут изменяться. | ||
* @type {Buffer.StaticDraw | Buffer.DynamicDraw} | ||
*/ | ||
this.drawType = Buffer.StaticDraw; | ||
/** | ||
* Параметры для связывания буфера | ||
@@ -41,2 +35,8 @@ * @type {BufferBindOptions} | ||
/** | ||
* Указывает, как часто данные буфера будут изменяться. | ||
* @type {Buffer.StaticDraw | Buffer.DynamicDraw} | ||
*/ | ||
this.drawType = this.options.instanceDivisor ? Buffer.dynamicDraw : Buffer.StaticDraw; | ||
/** | ||
* Исходный WebGL буфер | ||
@@ -82,3 +82,6 @@ * @type {?WebGLBuffer} | ||
options.normalized, options.stride, options.offset); | ||
if (options.instanceDivisor) { | ||
gl.vertexAttribDivisor(location, options.instanceDivisor); | ||
} | ||
} else if (this.type === Buffer.ElementArrayBuffer) { | ||
@@ -122,3 +125,7 @@ gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, this._glBuffer); | ||
gl.bindBuffer(this._toGlParam(gl, this.type), this._glBuffer); | ||
gl.bufferData(this._toGlParam(gl, this.type), this._initData, this._toGlParam(gl, this.drawType)); | ||
gl.bufferData( | ||
this._toGlParam(gl, this.type), | ||
this._initData, | ||
this._toGlParam(gl, this.drawType) | ||
); | ||
this._initData = null; | ||
@@ -181,3 +188,4 @@ return this; | ||
offset: 0, | ||
normalized: false | ||
normalized: false, | ||
instanceDivisor: 0 | ||
}; | ||
@@ -184,0 +192,0 @@ |
@@ -47,2 +47,6 @@ /** | ||
setAttribute(name, buffer) { | ||
this._attributes[name] = buffer; | ||
} | ||
/** | ||
@@ -84,3 +88,3 @@ * Удаляет vao. | ||
} | ||
attributes[name].bind(gl, shaderAttribute.location); | ||
attributes[name].bind(gl, shaderAttribute.location, undefined); | ||
} | ||
@@ -87,0 +91,0 @@ } |
@@ -47,2 +47,6 @@ /** | ||
setAttribute(name, buffer) { | ||
this._attributes[name] = buffer; | ||
} | ||
/** | ||
@@ -84,3 +88,3 @@ * Удаляет vao. | ||
} | ||
attributes[name].bind(gl, shaderAttribute.location); | ||
attributes[name].bind(gl, shaderAttribute.location, undefined); | ||
} | ||
@@ -124,2 +128,2 @@ } | ||
export default Vao; | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInNyYy9WYW8uanMiXSwibmFtZXMiOlsiVmFvIiwiY29uc3RydWN0b3IiLCJzaGFkZXJQcm9ncmFtIiwiYXR0cmlidXRlcyIsIl92YW8iLCJfYXR0cmlidXRlcyIsIl9zaGFkZXJQcm9ncmFtIiwiX2V4dCIsImJpbmQiLCJzdGF0ZSIsImV4dCIsImV4dGVuc2lvbnMiLCJPRVNfdmVydGV4X2FycmF5X29iamVjdCIsIl9iaW5kIiwiZ2wiLCJ1bmJpbmQiLCJfZ2xCaW5kVmVydGV4QXJyYXkiLCJyZW1vdmUiLCJfZ2xEZWxldGVWZXJ0ZXhBcnJheSIsInVuZGVmaW5lZCIsIl9wcmVwYXJlIiwiX2dsIiwiX2dsQ3JlYXRlVmVydGV4QXJyYXkiLCJzaGFkZXJBdHRyaWJ1dGVzI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JpbmdDb250ZXh0KSB7XG4gICAgICAgICAgICBnbC5iaW5kVmVydGV4QXJyYXkodmFvKTtcbiAgICAgICAgfSBlbHNlIGlmIChleHQpIHtcbiAgICAgICAgICAgIGV4dC5iaW5kVmVydGV4QXJyYXlPRVModmFvKTtcbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIC8vINCSINGB0LvRg9GH0LDQtSDRhNC+0LvQu9Cx0LXQutCwIC0g0LHQuNC90LTQuNC8INCw0YLRgNC40LHRg9GC0Ysg0L/RgNGP0LzQviDQuNC3INGI0LXQudC00LXRgNC90L7QuSDQv9GA0L7Qs9GA0LDQvNC80YtcbiAgICAgICAgICAgIHRoaXMuX3NoYWRlclByb2dyYW0uYmluZChnbCwgbnVsbCwgdGhpcy5fYXR0cmlidXRlcyk7XG4gICAgICAgIH1cbiAgICB9XG5cbiAgICBfZ2xEZWxldGVWZXJ0ZXhBcnJheSh2YW8pIHtcbiAgICAgICAgY29uc3QgZ2wgPSB0aGlzLl9nbDtcbiAgICAgICAgY29uc3QgZXh0ID0gdGhpcy5fZXh0O1xuICAgICAgICBpZiAoZ2wgaW5zdGFuY2VvZiBXZWJHTDJSZW5kZXJpbmdDb250ZXh0KSB7XG4gICAgICAgICAgICBnbC5kZWxldGVWZXJ0ZXhBcnJheSh2YW8pO1xuICAgICAgICB9IGVsc2UgaWYgKGV4dCkge1xuICAgICAgICAgICAgZXh0LmRlbGV0ZVZlcnRleEFycmF5T0VTKHZhbyk7XG4gICAgICAgIH1cbiAgICB9XG59XG5cbmV4cG9ydCBkZWZhdWx0IFZhbztcbiJdfQ== | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInNyYy9WYW8uanMiXSwibmFtZXMiOlsiVmFvIiwiY29uc3RydWN0b3IiLCJzaGFkZXJQcm9ncmFtIiwiYXR0cmlidXRlcyIsIl92YW8iLCJfYXR0cmlidXRlcyIsIl9zaGFkZXJQcm9nc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5KHZhbykge1xuICAgICAgICBjb25zdCBnbCA9IHRoaXMuX2dsO1xuICAgICAgICBjb25zdCBleHQgPSB0aGlzLl9leHQ7XG4gICAgICAgIGlmIChnbCBpbnN0YW5jZW9mIFdlYkdMMlJlbmRlcmluZ0NvbnRleHQpIHtcbiAgICAgICAgICAgIGdsLmRlbGV0ZVZlcnRleEFycmF5KHZhbyk7XG4gICAgICAgIH0gZWxzZSBpZiAoZXh0KSB7XG4gICAgICAgICAgICBleHQuZGVsZXRlVmVydGV4QXJyYXlPRVModmFvKTtcbiAgICAgICAgfVxuICAgIH1cbn1cblxuZXhwb3J0IGRlZmF1bHQgVmFvO1xuIl19 |
Sorry, the diff of this file is too big to display
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
1775945
8188