mirror of
https://github.com/overte-org/overte.git
synced 2025-04-13 03:42:10 +02:00
new location drop - unparent overlays
This commit is contained in:
parent
db41a1c16b
commit
db77cbcbc1
3 changed files with 25 additions and 25 deletions
|
@ -2,7 +2,7 @@
|
|||
"DataVersion": 0,
|
||||
"Paths":
|
||||
{
|
||||
"/": "/5.77,1.4,4.96/0,0.49544,0,0.868645"
|
||||
"/": "/2.3,0.4,2.89/0,0.49544,0,0.868645"
|
||||
},
|
||||
"Entities": [
|
||||
{
|
||||
|
|
|
@ -38,6 +38,7 @@
|
|||
var button = null;
|
||||
|
||||
var errorConnectingToDomain = false;
|
||||
var resettingError = false;
|
||||
|
||||
// Tips have a character limit of 69
|
||||
var userTips = [
|
||||
|
@ -190,17 +191,6 @@
|
|||
|
||||
var connectionToDomainFailed = false;
|
||||
|
||||
function getOopsText() {
|
||||
var error = Window.getLastDomainConnectionError();
|
||||
var errorMessageMapIndex = hardRefusalErrors.indexOf(error);
|
||||
if (errorMessageMapIndex >= 0) {
|
||||
return ERROR_MESSAGE_MAP[errorMessageMapIndex];
|
||||
} else {
|
||||
// some other text.
|
||||
return ERROR_MESSAGE_MAP[4];
|
||||
}
|
||||
}
|
||||
|
||||
function getAnchorLocalYOffset() {
|
||||
var loadingSpherePosition = Overlays.getProperty(loadingSphereID, "position");
|
||||
var loadingSphereOrientation = Overlays.getProperty(loadingSphereID, "rotation");
|
||||
|
@ -366,11 +356,10 @@
|
|||
Overlays.editOverlay(loadingBarPlacard, properties);
|
||||
Overlays.editOverlay(loadingBarProgress, loadingBarProperties);
|
||||
|
||||
if (errorConnectingToDomain) {
|
||||
Menu.setIsOptionChecked("Show Overlays", physicsEnabled);
|
||||
if (!HMD.active) {
|
||||
toolbar.writeProperty("visible", physicsEnabled);
|
||||
}
|
||||
Menu.setIsOptionChecked("Show Overlays", physicsEnabled);
|
||||
if (!HMD.active) {
|
||||
print("Show toolbar: " + physicsEnabled);
|
||||
toolbar.writeProperty("visible", physicsEnabled);
|
||||
}
|
||||
|
||||
resetValues();
|
||||
|
@ -391,6 +380,15 @@
|
|||
Overlays.editOverlay(anchorOverlay, { localPosition: localPosition });
|
||||
}
|
||||
|
||||
function sleep(milliseconds) {
|
||||
var start = new Date().getTime();
|
||||
for (var i = 0; i < 1e7; i++) {
|
||||
if ((new Date().getTime() - start) > milliseconds){
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function update() {
|
||||
var physicsEnabled = Window.isPhysicsEnabled();
|
||||
var thisInterval = Date.now();
|
||||
|
@ -424,6 +422,8 @@
|
|||
endAudio();
|
||||
currentDomain = "no domain";
|
||||
timer = null;
|
||||
sleep(300);
|
||||
toolbar.writeProperty("visible", true);
|
||||
return;
|
||||
} else if ((physicsEnabled && (currentProgress >= (TOTAL_LOADING_PROGRESS - EPSILON)))) {
|
||||
updateOverlays((physicsEnabled || connectionToDomainFailed));
|
||||
|
|
|
@ -26,10 +26,12 @@
|
|||
}
|
||||
};
|
||||
|
||||
var oopsDimensions = {x: 4.2, y: 1};
|
||||
|
||||
var redirectOopsText = Overlays.addOverlay("text3d", {
|
||||
name: "oopsText",
|
||||
localPosition: {x: 0.2691902160644531, y: 0.6403706073760986, z: 3.18358039855957},
|
||||
localRotation: Quat.fromPitchYawRollDegrees(0.0, 180.0, 0.0),
|
||||
position: {x: 0, y: 1.6763916015625, z: 1.45927095413208},
|
||||
rotation: {x: -4.57763671875e-05, y: 0.4957197904586792, z: -7.62939453125e-05, w: 0.8684672117233276},
|
||||
text: getOopsText(),
|
||||
textAlpha: 1,
|
||||
backgroundAlpha: 0,
|
||||
|
@ -39,15 +41,13 @@
|
|||
visible: false,
|
||||
emissive: true,
|
||||
ignoreRayIntersection: false,
|
||||
dimensions: {x: 4.2, y: 1},
|
||||
dimensions: oopsDimensions,
|
||||
grabbable: false,
|
||||
parentID: MyAvatar.SELF_ID,
|
||||
parentJointIndex: MyAvatar.getJointIndex("Head")
|
||||
});
|
||||
|
||||
var tryAgainImage = Overlays.addOverlay("image3d", {
|
||||
name: "tryAgainImage",
|
||||
localPosition: {x: -0.6, y: -0.4, z: 0.0},
|
||||
localPosition: {x: -0.6, y: -0.6, z: 0.0},
|
||||
url: Script.resourcesPath() + "images/interstitialPage/button_tryAgain.png",
|
||||
alpha: 1,
|
||||
visible: false,
|
||||
|
@ -60,7 +60,7 @@
|
|||
|
||||
var backImage = Overlays.addOverlay("image3d", {
|
||||
name: "backImage",
|
||||
localPosition: {x: 0.6, y: -0.4, z: 0.0},
|
||||
localPosition: {x: 0.6, y: -0.6, z: 0.0},
|
||||
url: Script.resourcesPath() + "images/interstitialPage/button_back.png",
|
||||
alpha: 1,
|
||||
visible: false,
|
||||
|
@ -103,7 +103,7 @@
|
|||
};
|
||||
|
||||
var textWidth = Overlays.textSize(redirectOopsText, oopsText).width;
|
||||
var textOverlayWidth = Overlays.getProperty(redirectOopsText, "dimensions").x;
|
||||
var textOverlayWidth = oopsDimensions.x;
|
||||
|
||||
var oopsTextProperties = {
|
||||
visible: overlaysVisible,
|
||||
|
|
Loading…
Reference in a new issue