@@ -49,7 +49,7 @@ export default class Gizmo extends Object3D {
4949 this . scaleHandleGeometry = new BoxBufferGeometry ( 0.125 , 0.125 , 0.125 ) ;
5050
5151 this . lineGeometry = new BufferGeometry ( ) ;
52- this . lineGeometry . addAttribute ( 'position' , new Float32BufferAttribute ( [ 0 , 0 , 0 , 1 , 0 , 0 ] , 3 ) ) ;
52+ this . lineGeometry . setAttribute ( 'position' , new Float32BufferAttribute ( [ 0 , 0 , 0 , 1 , 0 , 0 ] , 3 ) ) ;
5353
5454 // Make unique material for each axis/color
5555 this . matInvisible = this . gizmoMaterial . clone ( ) ;
@@ -152,7 +152,7 @@ export default class Gizmo extends Object3D {
152152 vertices . push ( 0 , Math . cos ( i / 32 * Math . PI ) * radius , Math . sin ( i / 32 * Math . PI ) * radius ) ;
153153 }
154154
155- geometry . addAttribute ( 'position' , new Float32BufferAttribute ( vertices , 3 ) ) ;
155+ geometry . setAttribute ( 'position' , new Float32BufferAttribute ( vertices , 3 ) ) ;
156156
157157 return geometry ;
158158 }
@@ -161,7 +161,7 @@ export default class Gizmo extends Object3D {
161161
162162 const geometry = new BufferGeometry ( )
163163
164- geometry . addAttribute ( 'position' , new Float32BufferAttribute ( [ 0 , 0 , 0 , 1 , 1 , 1 ] , 3 ) ) ;
164+ geometry . setAttribute ( 'position' , new Float32BufferAttribute ( [ 0 , 0 , 0 , 1 , 1 , 1 ] , 3 ) ) ;
165165
166166 return geometry ;
167167 }
@@ -424,7 +424,7 @@ export default class Gizmo extends Object3D {
424424 object . updateMatrix ( ) ;
425425
426426 var tempGeometry = object . geometry . clone ( ) ;
427- tempGeometry . applyMatrix ( object . matrix ) ;
427+ tempGeometry . applyMatrix4 ( object . matrix ) ;
428428 object . geometry = tempGeometry ;
429429
430430 object . position . set ( 0 , 0 , 0 ) ;
0 commit comments