use new-style hand-lasers for both hands

This commit is contained in:
Seth Alves 2017-03-02 10:01:08 -08:00
parent 7f6b803652
commit 93055a67a8

View file

@ -1001,9 +1001,7 @@ function MyController(hand) {
this.overlayLineOn = function(closePoint, farPoint, color, farParentID) { this.overlayLineOn = function(closePoint, farPoint, color, farParentID) {
if (this.overlayLine === null) { if (this.overlayLine === null) {
var lineProperties; var lineProperties = {
if (this.hand === RIGHT_HAND) {
lineProperties = {
glow: 1.0, glow: 1.0,
lineWidth: 5, lineWidth: 5,
start: closePoint, start: closePoint,
@ -1017,23 +1015,9 @@ function MyController(hand) {
parentJointIndex: this.controllerJointIndex, parentJointIndex: this.controllerJointIndex,
endParentID: farParentID endParentID: farParentID
}; };
} else {
lineProperties = {
glow: 1.0,
lineWidth: 5,
start: closePoint,
end: farPoint,
color: color,
ignoreRayIntersection: true, // always ignore this
drawInFront: true, // Even when burried inside of something, show it.
visible: true,
alpha: 1,
};
}
this.overlayLine = Overlays.addOverlay("line3d", lineProperties); this.overlayLine = Overlays.addOverlay("line3d", lineProperties);
} else { } else {
if (this.hand === RIGHT_HAND) {
if (farParentID && farParentID != NULL_UUID) { if (farParentID && farParentID != NULL_UUID) {
Overlays.editOverlay(this.overlayLine, { Overlays.editOverlay(this.overlayLine, {
color: color, color: color,
@ -1044,13 +1028,6 @@ function MyController(hand) {
color: color, color: color,
}); });
} }
} else {
Overlays.editOverlay(this.overlayLine, {
start: closePoint,
end: farPoint,
color: color,
});
}
} }
}; };