File tree Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -60,7 +60,8 @@ AFRAME.registerComponent('look-at', {
60
60
61
61
// Look at a position.
62
62
if ( typeof target === 'object' ) {
63
- return this . lookAt ( new THREE . Vector3 ( target . x , target . y , target . z ) ) ;
63
+ this . lookAt ( new THREE . Vector3 ( target . x , target . y , target . z ) ) ;
64
+ return this . endTracking ( ) ;
64
65
}
65
66
66
67
// Assume target is a string.
@@ -102,6 +103,10 @@ AFRAME.registerComponent('look-at', {
102
103
this . target3D = targetEl . object3D ;
103
104
} ,
104
105
106
+ endTracking : function ( ) {
107
+ this . target3D = null ;
108
+ } ,
109
+
105
110
cameraListener : function ( e ) {
106
111
if ( e . detail && e . detail . name === 'camera' ) {
107
112
this . update ( ) ;
Original file line number Diff line number Diff line change 28
28
},
29
29
"homepage" : " https://github.com/supermedium/superframe/tree/look-at#readme" ,
30
30
"devDependencies" : {
31
- "aframe" : " ^0.5 .0" ,
31
+ "aframe" : " ^1.2 .0" ,
32
32
"browserify" : " ^12.0.1" ,
33
33
"budo" : " ^7.1.0" ,
34
34
"shelljs" : " ^0.6.0" ,
You can’t perform that action at this time.
0 commit comments