mirror of
https://github.com/JulianGro/overte.git
synced 2025-04-25 16:55:07 +02:00
editing the interstitial page
This commit is contained in:
parent
98dafa3b67
commit
2f9119529a
4 changed files with 20 additions and 21 deletions
|
@ -3488,14 +3488,11 @@ bool Application::isServerlessMode() const {
|
|||
}
|
||||
|
||||
bool Application::isInterstitialMode() const {
|
||||
bool interstitialModeEnabled = Menu::getInstance()->isOptionChecked("Enable Interstitial");
|
||||
return interstitialModeEnabled ? _interstitialMode : false;
|
||||
return _interstitialMode;
|
||||
}
|
||||
|
||||
void Application::setIsInterstitialMode(bool interstitialMode) {
|
||||
auto menu = Menu::getInstance();
|
||||
bool interstitialModeEnabled = menu->isOptionChecked("Enable Interstitial");
|
||||
if (_interstitialMode != interstitialMode && interstitialModeEnabled) {
|
||||
if (_interstitialMode != interstitialMode) {
|
||||
_interstitialMode = interstitialMode;
|
||||
emit interstitialModeChanged(_interstitialMode);
|
||||
}
|
||||
|
|
|
@ -787,7 +787,6 @@ Menu::Menu() {
|
|||
|
||||
// Developer > Show Overlays
|
||||
addCheckableActionToQMenuAndActionHash(developerMenu, MenuOption::Overlays, 0, true);
|
||||
addCheckableActionToQMenuAndActionHash(developerMenu, "Enable Interstitial", 0, false);
|
||||
|
||||
#if 0 /// -------------- REMOVED FOR NOW --------------
|
||||
addDisabledActionAndSeparator(navigateMenu, "History");
|
||||
|
|
|
@ -34,7 +34,8 @@ var DEFAULT_SCRIPTS_COMBINED = [
|
|||
"system/emote.js"
|
||||
];
|
||||
var DEFAULT_SCRIPTS_SEPARATE = [
|
||||
"system/controllers/controllerScripts.js"
|
||||
"system/controllers/controllerScripts.js",
|
||||
"system/interstitialPage.js"
|
||||
//"system/chat.js"
|
||||
];
|
||||
|
||||
|
|
|
@ -14,8 +14,9 @@
|
|||
|
||||
(function() {
|
||||
Script.include("/~/system/libraries/Xform.js");
|
||||
var DEBUG = false;
|
||||
var MAX_X_SIZE = 3.8;
|
||||
var DEBUG = true;
|
||||
var MIN_LOADING_PROGRESS = 3.6;
|
||||
var TOTAL_LOADING_PROGRESS = 3.8;
|
||||
var EPSILON = 0.01;
|
||||
var isVisible = false;
|
||||
var VOLUME = 0.4;
|
||||
|
@ -55,7 +56,7 @@
|
|||
"Tip: Log in to make friends, visit new domains, and save avatars!"
|
||||
];
|
||||
|
||||
var DEFAULT_DIMENSIONS = { x: 20, y: 20, z: 20 };
|
||||
var DEFAULT_DIMENSIONS = { x: 24, y: 24, z: 24 };
|
||||
|
||||
var loadingSphereID = Overlays.addOverlay("model", {
|
||||
name: "Loading-Sphere",
|
||||
|
@ -87,10 +88,10 @@
|
|||
var domainName = "";
|
||||
var domainNameTextID = Overlays.addOverlay("text3d", {
|
||||
name: "Loading-Destination-Card-Text",
|
||||
localPosition: { x: 0.0, y: 0.8, z: 0.0 },
|
||||
localPosition: { x: 0.0, y: 0.8, z: -0.001 },
|
||||
text: domainName,
|
||||
textAlpha: 1,
|
||||
backgroundAlpha: 0,
|
||||
backgroundAlpha: 1,
|
||||
lineHeight: 0.42,
|
||||
visible: isVisible,
|
||||
ignoreRayIntersection: true,
|
||||
|
@ -106,9 +107,10 @@
|
|||
localPosition: { x: 0.0, y: 0.32, z: 0.0 },
|
||||
text: domainText,
|
||||
textAlpha: 1,
|
||||
backgroundAlpha: 0,
|
||||
backgroundAlpha: 1,
|
||||
lineHeight: 0.13,
|
||||
visible: isVisible,
|
||||
backgroundAlpha: 0,
|
||||
ignoreRayIntersection: true,
|
||||
drawInFront: true,
|
||||
grabbable: false,
|
||||
|
@ -123,7 +125,7 @@
|
|||
localPosition: { x: 0.0 , y: -1.6, z: 0.0 },
|
||||
text: toolTip,
|
||||
textAlpha: 1,
|
||||
backgroundAlpha: 0,
|
||||
backgroundAlpha: 1,
|
||||
lineHeight: 0.13,
|
||||
visible: isVisible,
|
||||
ignoreRayIntersection: true,
|
||||
|
@ -248,7 +250,6 @@
|
|||
}
|
||||
|
||||
function domainChanged(domain) {
|
||||
print("domain changed: " + domain);
|
||||
if (domain !== currentDomain) {
|
||||
MyAvatar.restoreAnimation();
|
||||
var name = location.placename;
|
||||
|
@ -272,7 +273,6 @@
|
|||
if (data.status === "success") {
|
||||
var domainInfo = data.data;
|
||||
var domainDescriptionText = domainInfo.place.description;
|
||||
print("domainText: " + domainDescriptionText);
|
||||
var leftMargin = getLeftMargin(domainDescription, domainDescriptionText);
|
||||
var domainDescriptionProperties = {
|
||||
text: domainDescriptionText,
|
||||
|
@ -381,18 +381,18 @@
|
|||
|
||||
var domainLoadingProgressPercentage = Window.domainLoadingProgress();
|
||||
|
||||
var progress = MAX_X_SIZE * domainLoadingProgressPercentage;
|
||||
var progress = MIN_LOADING_PROGRESS * domainLoadingProgressPercentage;
|
||||
if (progress >= target) {
|
||||
target = progress;
|
||||
}
|
||||
|
||||
if ((physicsEnabled && (currentProgress < MAX_X_SIZE))) {
|
||||
target = MAX_X_SIZE;
|
||||
if ((physicsEnabled && (currentProgress < TOTAL_LOADING_PROGRESS))) {
|
||||
target = TOTAL_LOADING_PROGRESS;
|
||||
}
|
||||
|
||||
currentProgress = lerp(currentProgress, target, 0.2);
|
||||
var properties = {
|
||||
localPosition: { x: (1.85 - (currentProgress / 2) - (-0.029 * (currentProgress / MAX_X_SIZE))), y: -0.935, z: 0.0 },
|
||||
localPosition: { x: (1.85 - (currentProgress / 2) - (-0.029 * (currentProgress / TOTAL_LOADING_PROGRESS))), y: -0.935, z: 0.0 },
|
||||
dimensions: {
|
||||
x: currentProgress,
|
||||
y: 2.8
|
||||
|
@ -400,9 +400,10 @@
|
|||
};
|
||||
|
||||
Overlays.editOverlay(loadingBarProgress, properties);
|
||||
if ((physicsEnabled && (currentProgress >= (MAX_X_SIZE - EPSILON)))) {
|
||||
if ((physicsEnabled && (currentProgress >= (TOTAL_LOADING_PROGRESS - EPSILON)))) {
|
||||
updateOverlays((physicsEnabled || connectionToDomainFailed));
|
||||
endAudio();
|
||||
currentDomain = "no domain";
|
||||
timer = null;
|
||||
return;
|
||||
}
|
||||
|
@ -452,6 +453,7 @@
|
|||
renderViewTask.getConfig("LightingModel")["enableAmbientLight"] = true;
|
||||
renderViewTask.getConfig("LightingModel")["enableDirectionalLight"] = true;
|
||||
renderViewTask.getConfig("LightingModel")["enablePointLight"] = true;
|
||||
Menu.setIsOptionChecked("Show Overlays", physicsEnabled);
|
||||
if (!HMD.active) {
|
||||
toolbar.writeProperty("visible", true);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue