Skip to content

Commit

Permalink
Fix deprecated Buffer API usage
Browse files Browse the repository at this point in the history
  • Loading branch information
1chandu committed May 30, 2019
1 parent ef39b90 commit 30f1270
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion modules/core/src/lib/transform.js
Expand Up @@ -585,7 +585,7 @@ export default class Transform {
array[index] = index;
});
if (!this.elementIDBuffer) {
this.elementIDBuffer = new Buffer(this.gl, {data: elementIds, size: 1});
this.elementIDBuffer = new Buffer(this.gl, {data: elementIds, accessor: {size: 1}});
} else {
this.elementIDBuffer.setData({data: elementIds});
}
Expand Down
2 changes: 1 addition & 1 deletion modules/core/test/lib/model.spec.js
Expand Up @@ -29,7 +29,7 @@ test('Model#construct/destruct', t => {
test('Model#setAttribute', t => {
const {gl} = fixture;

const buffer1 = new Buffer(gl, {size: 2, data: new Float32Array(4).fill(1)});
const buffer1 = new Buffer(gl, {accessor: {size: 2}, data: new Float32Array(4).fill(1)});
const buffer2 = new Buffer(gl, {data: new Float32Array(8)});

const initialActiveBuffers = stats.get('Buffers Active').count;
Expand Down

0 comments on commit 30f1270

Please sign in to comment.