mirror of
https://github.com/overte-org/overte.git
synced 2025-04-13 23:08:39 +02:00
Front-load interstitial scripts and resources
This commit is contained in:
parent
e2ae50362e
commit
cdae5cd03d
2 changed files with 19 additions and 7 deletions
|
@ -40,8 +40,8 @@ var DEFAULT_SCRIPTS_SEPARATE = [
|
||||||
];
|
];
|
||||||
|
|
||||||
if (Window.interstitialModeEnabled) {
|
if (Window.interstitialModeEnabled) {
|
||||||
DEFAULT_SCRIPTS_COMBINED.push("system/interstitialPage.js");
|
// Insert interstitial scripts at front so that they're started first.
|
||||||
DEFAULT_SCRIPTS_COMBINED.push("system/redirectOverlays.js");
|
DEFAULT_SCRIPTS_COMBINED.splice(0, 0, "system/interstitialPage.js", "system/redirectOverlays.js");
|
||||||
}
|
}
|
||||||
|
|
||||||
// add a menu item for debugging
|
// add a menu item for debugging
|
||||||
|
|
|
@ -62,11 +62,23 @@
|
||||||
|
|
||||||
var DEFAULT_DIMENSIONS = { x: 24, y: 24, z: 24 };
|
var DEFAULT_DIMENSIONS = { x: 24, y: 24, z: 24 };
|
||||||
|
|
||||||
|
var BLACK_SPHERE = Script.resolvePath("/~/system/assets/models/black-sphere.fbx");
|
||||||
|
var BUTTON = Script.resourcesPath() + "images/interstitialPage/button.png";
|
||||||
|
var BUTTON_HOVER = Script.resourcesPath() + "images/interstitialPage/button_hover.png";
|
||||||
|
var LOADING_BAR_PLACARD = Script.resourcesPath() + "images/loadingBar_placard.png";
|
||||||
|
var LOADING_BAR_PROGRESS = Script.resourcesPath() + "images/loadingBar_progress.png";
|
||||||
|
|
||||||
|
ModelCache.prefetch(BLACK_SPHERE);
|
||||||
|
TextureCache.prefetch(BUTTON);
|
||||||
|
TextureCache.prefetch(BUTTON_HOVER);
|
||||||
|
TextureCache.prefetch(LOADING_BAR_PLACARD);
|
||||||
|
TextureCache.prefetch(LOADING_BAR_PROGRESS);
|
||||||
|
|
||||||
var loadingSphereID = Overlays.addOverlay("model", {
|
var loadingSphereID = Overlays.addOverlay("model", {
|
||||||
name: "Loading-Sphere",
|
name: "Loading-Sphere",
|
||||||
position: Vec3.sum(Vec3.sum(MyAvatar.position, { x: 0.0, y: -1.0, z: 0.0 }), Vec3.multiplyQbyV(MyAvatar.orientation, { x: 0, y: 0.95, z: 0 })),
|
position: Vec3.sum(Vec3.sum(MyAvatar.position, { x: 0.0, y: -1.0, z: 0.0 }), Vec3.multiplyQbyV(MyAvatar.orientation, { x: 0, y: 0.95, z: 0 })),
|
||||||
orientation: Quat.multiply(Quat.fromVec3Degrees({ x: 0, y: 180, z: 0 }), MyAvatar.orientation),
|
orientation: Quat.multiply(Quat.fromVec3Degrees({ x: 0, y: 180, z: 0 }), MyAvatar.orientation),
|
||||||
url: Script.resolvePath("/~/system/assets/models/black-sphere.fbx"),
|
url: BLACK_SPHERE,
|
||||||
dimensions: DEFAULT_DIMENSIONS,
|
dimensions: DEFAULT_DIMENSIONS,
|
||||||
alpha: 1,
|
alpha: 1,
|
||||||
visible: isVisible,
|
visible: isVisible,
|
||||||
|
@ -157,7 +169,7 @@
|
||||||
var loadingToTheSpotID = Overlays.addOverlay("image3d", {
|
var loadingToTheSpotID = Overlays.addOverlay("image3d", {
|
||||||
name: "Loading-Destination-Card-GoTo-Image",
|
name: "Loading-Destination-Card-GoTo-Image",
|
||||||
localPosition: { x: 0.0, y: -1.75, z: -0.3 },
|
localPosition: { x: 0.0, y: -1.75, z: -0.3 },
|
||||||
url: Script.resourcesPath() + "images/interstitialPage/button.png",
|
url: BUTTON,
|
||||||
alpha: 1,
|
alpha: 1,
|
||||||
visible: isVisible,
|
visible: isVisible,
|
||||||
emissive: true,
|
emissive: true,
|
||||||
|
@ -171,7 +183,7 @@
|
||||||
var loadingToTheSpotHoverID = Overlays.addOverlay("image3d", {
|
var loadingToTheSpotHoverID = Overlays.addOverlay("image3d", {
|
||||||
name: "Loading-Destination-Card-GoTo-Image-Hover",
|
name: "Loading-Destination-Card-GoTo-Image-Hover",
|
||||||
localPosition: { x: 0.0, y: -1.75, z: -0.3 },
|
localPosition: { x: 0.0, y: -1.75, z: -0.3 },
|
||||||
url: Script.resourcesPath() + "images/interstitialPage/button_hover.png",
|
url: BUTTON_HOVER,
|
||||||
alpha: 1,
|
alpha: 1,
|
||||||
visible: false,
|
visible: false,
|
||||||
emissive: true,
|
emissive: true,
|
||||||
|
@ -185,7 +197,7 @@
|
||||||
var loadingBarPlacard = Overlays.addOverlay("image3d", {
|
var loadingBarPlacard = Overlays.addOverlay("image3d", {
|
||||||
name: "Loading-Bar-Placard",
|
name: "Loading-Bar-Placard",
|
||||||
localPosition: { x: 0.0, y: -0.99, z: 0.3 },
|
localPosition: { x: 0.0, y: -0.99, z: 0.3 },
|
||||||
url: Script.resourcesPath() + "images/loadingBar_placard.png",
|
url: LOADING_BAR_PLACARD,
|
||||||
alpha: 1,
|
alpha: 1,
|
||||||
dimensions: { x: 4, y: 2.8 },
|
dimensions: { x: 4, y: 2.8 },
|
||||||
visible: isVisible,
|
visible: isVisible,
|
||||||
|
@ -200,7 +212,7 @@
|
||||||
var loadingBarProgress = Overlays.addOverlay("image3d", {
|
var loadingBarProgress = Overlays.addOverlay("image3d", {
|
||||||
name: "Loading-Bar-Progress",
|
name: "Loading-Bar-Progress",
|
||||||
localPosition: { x: 0.0, y: -0.90, z: 0.0 },
|
localPosition: { x: 0.0, y: -0.90, z: 0.0 },
|
||||||
url: Script.resourcesPath() + "images/loadingBar_progress.png",
|
url: LOADING_BAR_PROGRESS,
|
||||||
alpha: 1,
|
alpha: 1,
|
||||||
dimensions: { x: 3.8, y: 2.8 },
|
dimensions: { x: 3.8, y: 2.8 },
|
||||||
visible: isVisible,
|
visible: isVisible,
|
||||||
|
|
Loading…
Reference in a new issue