Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: THREE.BufferGeometry: .setAttribute() has been renamed to .setAttribute(). #1

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {

Expand Down Expand Up @@ -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;

};
Expand Down Expand Up @@ -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 = {

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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": {
Expand Down