diff --git a/index.js b/index.js index d132241..b4f42b5 100644 --- a/index.js +++ b/index.js @@ -227,13 +227,13 @@ module.exports = function (THREE) { arrowGeometry.merge(mesh.geometry, mesh.matrix); var lineXGeometry = new THREE.BufferGeometry(); - lineXGeometry.addAttribute('position', new THREE.Float32BufferAttribute([0, 0, 0, 1, 0, 0], 3)); + lineXGeometry.setAttribute('position', new THREE.Float32BufferAttribute([0, 0, 0, 1, 0, 0], 3)); var lineYGeometry = new THREE.BufferGeometry(); - lineYGeometry.addAttribute('position', new THREE.Float32BufferAttribute([0, 0, 0, 0, 1, 0], 3)); + lineYGeometry.setAttribute('position', new THREE.Float32BufferAttribute([0, 0, 0, 0, 1, 0], 3)); var lineZGeometry = new THREE.BufferGeometry(); - lineZGeometry.addAttribute('position', new THREE.Float32BufferAttribute([0, 0, 0, 0, 0, 1], 3)); + lineZGeometry.setAttribute('position', new THREE.Float32BufferAttribute([0, 0, 0, 0, 0, 1], 3)); this.handleGizmos = { @@ -366,7 +366,7 @@ module.exports = function (THREE) { } - geometry.addAttribute('position', new THREE.Float32BufferAttribute(vertices, 3)); + geometry.setAttribute('position', new THREE.Float32BufferAttribute(vertices, 3)); return geometry; }; @@ -510,13 +510,13 @@ module.exports = function (THREE) { arrowGeometry.merge(mesh.geometry, mesh.matrix); var lineXGeometry = new THREE.BufferGeometry(); - lineXGeometry.addAttribute('position', new THREE.Float32BufferAttribute([0, 0, 0, 1, 0, 0], 3)); + lineXGeometry.setAttribute('position', new THREE.Float32BufferAttribute([0, 0, 0, 1, 0, 0], 3)); var lineYGeometry = new THREE.BufferGeometry(); - lineYGeometry.addAttribute('position', new THREE.Float32BufferAttribute([0, 0, 0, 0, 1, 0], 3)); + lineYGeometry.setAttribute('position', new THREE.Float32BufferAttribute([0, 0, 0, 0, 1, 0], 3)); var lineZGeometry = new THREE.BufferGeometry(); - lineZGeometry.addAttribute('position', new THREE.Float32BufferAttribute([0, 0, 0, 0, 0, 1], 3)); + lineZGeometry.setAttribute('position', new THREE.Float32BufferAttribute([0, 0, 0, 0, 0, 1], 3)); this.handleGizmos = { diff --git a/package.json b/package.json index 0541cb5..29439a6 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "three-transform-controls", - "version": "1.0.3", + "version": "1.0.4", "description": "Transform Controls as a NPM package", "main": "index.js", "scripts": {