Skip to content

Commit 21314e9

Browse files
committed
Compatible with Three R123
1 parent 623c39e commit 21314e9

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/interactivemarkers/InteractiveMarker.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ ROS3D.InteractiveMarker.prototype.rotateAxis = function(control, origOrientation
212212

213213
// rotates from world to plane coords
214214
var orientationWorld = this.dragStart.orientationWorld.clone().multiply(orientation);
215-
var orientationWorldInv = orientationWorld.clone().inverse();
215+
var orientationWorldInv = orientationWorld.clone().invert();
216216

217217
// rotate original and current intersection into local coords
218218
intersection.sub(rotOrigin);

src/interactivemarkers/InteractiveMarkerControl.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ ROS3D.InteractiveMarkerControl = function(options) {
138138
var posInv = this.parent.position.clone().multiplyScalar(-1);
139139
switch (message.orientation_mode) {
140140
case ROS3D.INTERACTIVE_MARKER_INHERIT:
141-
rotInv = this.parent.quaternion.clone().inverse();
141+
rotInv = this.parent.quaternion.clone().invert();
142142
break;
143143
case ROS3D.INTERACTIVE_MARKER_FIXED:
144144
break;
@@ -231,7 +231,7 @@ ROS3D.InteractiveMarkerControl.prototype.updateMatrixWorld = function (force) {
231231
that.currentControlOri.normalize();
232232
break;
233233
case ROS3D.INTERACTIVE_MARKER_FIXED:
234-
that.quaternion.copy(that.parent.quaternion.clone().inverse());
234+
that.quaternion.copy(that.parent.quaternion.clone().invert());
235235
that.updateMatrix();
236236
that.matrixWorldNeedsUpdate = true;
237237
ROS3D.InteractiveMarkerControl.prototype.updateMatrixWorld.call(that, force);
@@ -247,7 +247,7 @@ ROS3D.InteractiveMarkerControl.prototype.updateMatrixWorld = function (force) {
247247
ros2Gl.makeRotationFromEuler(rv);
248248

249249
var worldToLocal = new THREE.Matrix4();
250-
worldToLocal.getInverse(that.parent.matrixWorld);
250+
worldToLocal.copy(that.parent.matrixWorld).invert();
251251

252252
cameraRot.multiplyMatrices(cameraRot, ros2Gl);
253253
cameraRot.multiplyMatrices(worldToLocal, cameraRot);

0 commit comments

Comments
 (0)