mirror of
https://github.com/JulianGro/overte.git
synced 2025-08-05 21:00:13 +02:00
Switch to the cool looking model instead
This commit is contained in:
parent
1acfe017e1
commit
2ddd46f30b
1 changed files with 18 additions and 39 deletions
|
@ -205,6 +205,8 @@ var CONTROLLER_STATE_MACHINE = {};
|
||||||
|
|
||||||
var mostRecentSearchingHand = RIGHT_HAND;
|
var mostRecentSearchingHand = RIGHT_HAND;
|
||||||
|
|
||||||
|
var DEFAULT_SPHERE_MODEL_URL = "http://hifi-content.s3.amazonaws.com/alan/dev/equip-Fresnel-3.fbx";
|
||||||
|
|
||||||
CONTROLLER_STATE_MACHINE[STATE_OFF] = {
|
CONTROLLER_STATE_MACHINE[STATE_OFF] = {
|
||||||
name: "off",
|
name: "off",
|
||||||
enterMethod: "offEnter",
|
enterMethod: "offEnter",
|
||||||
|
@ -602,47 +604,24 @@ EquipHotspotBuddy.prototype.updateHotspot = function(hotspot, timestamp) {
|
||||||
targetSize: 1,
|
targetSize: 1,
|
||||||
overlays: []
|
overlays: []
|
||||||
};
|
};
|
||||||
|
|
||||||
var diameter = hotspot.radius * 2;
|
var diameter = hotspot.radius * 2;
|
||||||
|
|
||||||
if (hotspot.modelURL) {
|
// override default sphere with a user specified model, if it exists.
|
||||||
// override default sphere with a user specified model
|
overlayInfoSet.overlays.push(Overlays.addOverlay("model", {
|
||||||
overlayInfoSet.overlays.push(Overlays.addOverlay("model", {
|
url: hotspot.modelURL ? hotspot.modelURL : DEFAULT_SPHERE_MODEL_URL,
|
||||||
url: hotspot.modelURL,
|
position: hotspot.worldPosition,
|
||||||
position: hotspot.worldPosition,
|
rotation: {
|
||||||
rotation: {
|
x: 0,
|
||||||
x: 0,
|
y: 0,
|
||||||
y: 0,
|
z: 0,
|
||||||
z: 0,
|
w: 1
|
||||||
w: 1
|
},
|
||||||
},
|
dimensions: diameter * EQUIP_SPHERE_SCALE_FACTOR,
|
||||||
dimensions: diameter * EQUIP_SPHERE_SCALE_FACTOR,
|
scale: hotspot.modelScale,
|
||||||
scale: hotspot.modelScale,
|
ignoreRayIntersection: true
|
||||||
ignoreRayIntersection: true
|
}));
|
||||||
}));
|
overlayInfoSet.type = "model";
|
||||||
overlayInfoSet.type = "model";
|
|
||||||
} else {
|
|
||||||
// default sphere overlay
|
|
||||||
overlayInfoSet.overlays.push(Overlays.addOverlay("sphere", {
|
|
||||||
position: hotspot.worldPosition,
|
|
||||||
rotation: {
|
|
||||||
x: 0,
|
|
||||||
y: 0,
|
|
||||||
z: 0,
|
|
||||||
w: 1
|
|
||||||
},
|
|
||||||
dimensions: diameter * EQUIP_SPHERE_SCALE_FACTOR,
|
|
||||||
color: EQUIP_SPHERE_COLOR,
|
|
||||||
alpha: EQUIP_SPHERE_ALPHA,
|
|
||||||
emissive: true,
|
|
||||||
solid: true,
|
|
||||||
visible: true,
|
|
||||||
ignoreRayIntersection: true,
|
|
||||||
drawInFront: false
|
|
||||||
}));
|
|
||||||
overlayInfoSet.type = "sphere";
|
|
||||||
}
|
|
||||||
|
|
||||||
this.map[hotspot.key] = overlayInfoSet;
|
this.map[hotspot.key] = overlayInfoSet;
|
||||||
} else {
|
} else {
|
||||||
overlayInfoSet.timestamp = timestamp;
|
overlayInfoSet.timestamp = timestamp;
|
||||||
|
|
Loading…
Reference in a new issue