mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-08-10 07:12:50 +02:00
changes
This commit is contained in:
parent
1a46366557
commit
24832df14a
2 changed files with 26 additions and 12 deletions
|
@ -520,6 +520,8 @@ function MyController(hand) {
|
||||||
visible: true
|
visible: true
|
||||||
};
|
};
|
||||||
this.searchSphere = Overlays.addOverlay("sphere", sphereProperties);
|
this.searchSphere = Overlays.addOverlay("sphere", sphereProperties);
|
||||||
|
print('CREATED SEARCH OVERLAY : '+ this.searchSphere)
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
Overlays.editOverlay(this.searchSphere, {
|
Overlays.editOverlay(this.searchSphere, {
|
||||||
position: location,
|
position: location,
|
||||||
|
@ -527,6 +529,7 @@ function MyController(hand) {
|
||||||
color: color,
|
color: color,
|
||||||
visible: true
|
visible: true
|
||||||
});
|
});
|
||||||
|
print('EDITED SEARCH OVERLAY : '+ this.searchSphere)
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -762,10 +765,10 @@ function MyController(hand) {
|
||||||
};
|
};
|
||||||
|
|
||||||
this.overlayLineOff = function() {
|
this.overlayLineOff = function() {
|
||||||
if (this.overlayLine !== null) {
|
if (_this.overlayLine !== null) {
|
||||||
Overlays.deleteOverlay(this.overlayLine);
|
Overlays.deleteOverlay(this.overlayLine);
|
||||||
print('REMOVING OVERLAY LINE' + this.overlayLine)
|
print('REMOVING OVERLAY LINE' + this.overlayLine)
|
||||||
this.overlayLine = null;
|
_this.overlayLine = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
// print('overlay shoudl be null and is line is ' + this.overlayLine)
|
// print('overlay shoudl be null and is line is ' + this.overlayLine)
|
||||||
|
@ -933,6 +936,7 @@ function MyController(hand) {
|
||||||
overlay: overlay,
|
overlay: overlay,
|
||||||
type: "hand"
|
type: "hand"
|
||||||
});
|
});
|
||||||
|
print('ADDED HAND SPHERE OVERLAY : '+overlay)
|
||||||
|
|
||||||
// add larger blue sphere around the palm.
|
// add larger blue sphere around the palm.
|
||||||
overlay = Overlays.addOverlay("sphere", {
|
overlay = Overlays.addOverlay("sphere", {
|
||||||
|
@ -945,6 +949,8 @@ function MyController(hand) {
|
||||||
ignoreRayIntersection: true,
|
ignoreRayIntersection: true,
|
||||||
drawInFront: false
|
drawInFront: false
|
||||||
});
|
});
|
||||||
|
print('ADDED HAND SPHERE OVERLAY : '+overlay)
|
||||||
|
|
||||||
this.hotspotOverlays.push({
|
this.hotspotOverlays.push({
|
||||||
entityID: undefined,
|
entityID: undefined,
|
||||||
overlay: overlay,
|
overlay: overlay,
|
||||||
|
@ -973,6 +979,8 @@ function MyController(hand) {
|
||||||
ignoreRayIntersection: true,
|
ignoreRayIntersection: true,
|
||||||
drawInFront: false
|
drawInFront: false
|
||||||
});
|
});
|
||||||
|
print('ADDED GRAB BOX OVERLAY : '+ overlay)
|
||||||
|
|
||||||
_this.hotspotOverlays.push({
|
_this.hotspotOverlays.push({
|
||||||
entityID: entityID,
|
entityID: entityID,
|
||||||
overlay: overlay,
|
overlay: overlay,
|
||||||
|
@ -999,6 +1007,8 @@ function MyController(hand) {
|
||||||
ignoreRayIntersection: true,
|
ignoreRayIntersection: true,
|
||||||
drawInFront: false
|
drawInFront: false
|
||||||
});
|
});
|
||||||
|
print('ADDED SPHERE HOTSTPOT OVERLAY : '+ overlay)
|
||||||
|
|
||||||
_this.hotspotOverlays.push({
|
_this.hotspotOverlays.push({
|
||||||
entityID: hotspot.entityID,
|
entityID: hotspot.entityID,
|
||||||
overlay: overlay,
|
overlay: overlay,
|
||||||
|
@ -1032,6 +1042,8 @@ function MyController(hand) {
|
||||||
|
|
||||||
this.destroyHotspots = function() {
|
this.destroyHotspots = function() {
|
||||||
this.hotspotOverlays.forEach(function(overlayInfo) {
|
this.hotspotOverlays.forEach(function(overlayInfo) {
|
||||||
|
print('deleting overlay hotspot ' + overlayInfo.overlay)
|
||||||
|
|
||||||
Overlays.deleteOverlay(overlayInfo.overlay);
|
Overlays.deleteOverlay(overlayInfo.overlay);
|
||||||
});
|
});
|
||||||
this.hotspotOverlays = [];
|
this.hotspotOverlays = [];
|
||||||
|
@ -2220,8 +2232,8 @@ mapping.from([Controller.Standard.LB]).peek().to(leftController.secondaryPress);
|
||||||
mapping.from([Controller.Standard.LeftGrip]).peek().to(leftController.secondaryPress);
|
mapping.from([Controller.Standard.LeftGrip]).peek().to(leftController.secondaryPress);
|
||||||
mapping.from([Controller.Standard.RightGrip]).peek().to(rightController.secondaryPress);
|
mapping.from([Controller.Standard.RightGrip]).peek().to(rightController.secondaryPress);
|
||||||
|
|
||||||
mapping.from([Controller.Standard.LeftPrimaryThumb]).peek().to(leftController.thumbPress);
|
// mapping.from([Controller.Standard.LeftPrimaryThumb]).peek().to(leftController.thumbPress);
|
||||||
mapping.from([Controller.Standard.RightPrimaryThumb]).peek().to(rightController.thumbPress);
|
// mapping.from([Controller.Standard.RightPrimaryThumb]).peek().to(rightController.thumbPress);
|
||||||
|
|
||||||
Controller.enableMapping(MAPPING_NAME);
|
Controller.enableMapping(MAPPING_NAME);
|
||||||
|
|
||||||
|
@ -2243,25 +2255,26 @@ Messages.subscribe('Hifi-Hand-Grab');
|
||||||
Messages.subscribe('Hifi-Hand-RayPick-Blacklist');
|
Messages.subscribe('Hifi-Hand-RayPick-Blacklist');
|
||||||
Messages.subscribe('Hifi-Object-Manipulation');
|
Messages.subscribe('Hifi-Object-Manipulation');
|
||||||
|
|
||||||
|
|
||||||
var handleHandMessages = function(channel, message, sender) {
|
var handleHandMessages = function(channel, message, sender) {
|
||||||
var data;
|
var data;
|
||||||
if (sender === MyAvatar.sessionUUID) {
|
if (sender === MyAvatar.sessionUUID) {
|
||||||
if (channel === 'Hifi-Hand-Disabler') {
|
if (channel === 'Hifi-Hand-Disabler') {
|
||||||
if (message === 'left') {
|
if (message === 'left') {
|
||||||
leftController.turnOffVisualizations('left');
|
leftController.turnOffVisualizations('left');
|
||||||
handToDisable = LEFT_HAND;
|
handToDisable = LEFT_HAND;
|
||||||
}
|
}
|
||||||
if (message === 'right') {
|
if (message === 'right') {
|
||||||
rightController.turnOffVisualizations('right');
|
rightController.turnOffVisualizations('right');
|
||||||
handToDisable = RIGHT_HAND;
|
handToDisable = RIGHT_HAND;
|
||||||
}
|
}
|
||||||
if (message === "both") {
|
if (message === "both") {
|
||||||
print('disable both')
|
print('disable both')
|
||||||
leftController.turnOffVisualizations('left');
|
leftController.turnOffVisualizations('left');
|
||||||
rightController.turnOffVisualizations('right');
|
rightController.turnOffVisualizations('right');
|
||||||
}
|
}
|
||||||
if (message === 'both' || message === 'none') {
|
if (message === 'both' || message === 'none') {
|
||||||
handToDisable = message;
|
// handToDisable = message;
|
||||||
}
|
}
|
||||||
} else if (channel === 'Hifi-Hand-Grab') {
|
} else if (channel === 'Hifi-Hand-Grab') {
|
||||||
try {
|
try {
|
||||||
|
|
|
@ -447,7 +447,8 @@ function Teleporter() {
|
||||||
color: color,
|
color: color,
|
||||||
visible: true,
|
visible: true,
|
||||||
ignoreRayIntersection: true, // always ignore this
|
ignoreRayIntersection: true, // always ignore this
|
||||||
alpha: 1
|
alpha: 1,
|
||||||
|
glow: 1.0
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue