diff --git a/index.js b/index.js index fb01791..b9d3552 100644 --- a/index.js +++ b/index.js @@ -18,16 +18,16 @@ module.exports = function createLineMesh (THREE) { opt = opt || {}; - this.addAttribute('position', new THREE.BufferAttribute(undefined, 3)); - this.addAttribute('lineNormal', new THREE.BufferAttribute(undefined, 2)); - this.addAttribute('lineMiter', new THREE.BufferAttribute(undefined, 1)); + this.setAttribute('position', new THREE.BufferAttribute(undefined, 3)); + this.setAttribute('lineNormal', new THREE.BufferAttribute(undefined, 2)); + this.setAttribute('lineMiter', new THREE.BufferAttribute(undefined, 1)); if (opt.distances) { - this.addAttribute('lineDistance', new THREE.BufferAttribute(undefined, 1)); + this.setAttribute('lineDistance', new THREE.BufferAttribute(undefined, 1)); } if (typeof this.setIndex === 'function') { this.setIndex(new THREE.BufferAttribute(undefined, 1)); } else { - this.addAttribute('index', new THREE.BufferAttribute(undefined, 1)); + this.setAttribute('index', new THREE.BufferAttribute(undefined, 1)); } this.update(path, opt.closed); } diff --git a/package.json b/package.json index 77b1461..860e909 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "three-line-2d", - "version": "1.1.6", + "version": "1.1.7", "description": "lines expanded in a vertex shader", "main": "index.js", "license": "MIT",