Skip to content

Commit ea305fb

Browse files
committed
Ensure Controls set properties with pushFromThree
Prevents automatic resync by syntToThreeObj as response to change notification.
1 parent ac691c0 commit ea305fb

File tree

3 files changed

+16
-10
lines changed

3 files changed

+16
-10
lines changed

js/src/controls/FlyControls.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,11 @@ var FlyControlsModel = FlyControlsAutogen.FlyControlsModel.extend({
4848
var pos = controlling.obj.position;
4949
var qat = controlling.obj.quaternion;
5050
controlling.set({
51-
position: [pos.x, pos.y, pos.z],
52-
quaternion: [qat._x, qat._y, qat._z, qat._w],
53-
});
51+
position: [pos.x, pos.y, pos.z],
52+
quaternion: [qat._x, qat._y, qat._z, qat._w],
53+
},
54+
'pushFromThree'
55+
);
5456
},
5557

5658
});

js/src/controls/OrbitControls.js

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,12 @@ var OrbitControlsModel = OrbitControlsAutogen.OrbitControlsModel.extend({
3030
var pos = controlling.obj.position;
3131
var qat = controlling.obj.quaternion;
3232
controlling.set({
33-
position: [pos.x, pos.y, pos.z],
34-
quaternion: [qat._x, qat._y, qat._z, qat._w],
35-
zoom: controlling.obj.zoom,
36-
});
33+
position: [pos.x, pos.y, pos.z],
34+
quaternion: [qat._x, qat._y, qat._z, qat._w],
35+
zoom: controlling.obj.zoom,
36+
},
37+
'pushFromThree'
38+
);
3739
},
3840

3941
});

js/src/controls/TrackballControls.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,11 @@ var TrackballControlsModel = TrackballControlsAutogen.TrackballControlsModel.ext
2828
var pos = controlling.obj.position;
2929
var qat = controlling.obj.quaternion;
3030
controlling.set({
31-
position: [pos.x, pos.y, pos.z],
32-
quaternion: [qat._x, qat._y, qat._z, qat._w],
33-
});
31+
position: [pos.x, pos.y, pos.z],
32+
quaternion: [qat._x, qat._y, qat._z, qat._w],
33+
},
34+
'pushFromThree'
35+
);
3436
},
3537

3638
});

0 commit comments

Comments
 (0)