mirror of
https://thingvellir.net/git/overte
synced 2025-03-27 23:52:03 +01:00
Marked places where 3D overlays need to be replaced with local entities
This commit is contained in:
parent
b52fe9a7d5
commit
26dd0c7d80
21 changed files with 34 additions and 1 deletions
|
@ -48,6 +48,7 @@
|
|||
|
||||
if (HMD.active) {
|
||||
// 3D overlay attached to avatar.
|
||||
//V8TODO: change to local entity
|
||||
hmdOverlay = Overlays.addOverlay("text3d", {
|
||||
text: recordingText,
|
||||
dimensions: { x: 3 * HMD_FONT_SIZE, y: HMD_FONT_SIZE },
|
||||
|
|
|
@ -19,6 +19,7 @@ Script.include("/~/system/libraries/controllers.js");
|
|||
|
||||
var isShowingOverlays = true;
|
||||
var debugOverlays = {};
|
||||
//V8TODO: change to local entity
|
||||
var textSizeOverlay = Overlays.addOverlay("text3d", {
|
||||
position: MyAvatar.position,
|
||||
lineHeight: 0.1,
|
||||
|
|
|
@ -31,6 +31,7 @@ function updateOverlay(entityID, queryAACube) {
|
|||
size: queryAACube.scale
|
||||
});
|
||||
} else {
|
||||
//V8TODO: change to local entity
|
||||
overlays[entityID] = Overlays.addOverlay("cube", {
|
||||
position: cubeCenter,
|
||||
size: queryAACube.scale,
|
||||
|
|
|
@ -11,6 +11,7 @@ var JOINT_NAME = HMD.active ? HAND_JOINT : 'Mouse';
|
|||
var UPDATE_MS = 1000/30;
|
||||
|
||||
// create tect3d overlay to display hover results
|
||||
//V8TODO: change to local entity
|
||||
var overlayID = Overlays.addOverlay('text3d', {
|
||||
text: 'hover',
|
||||
visible: false,
|
||||
|
|
|
@ -46,6 +46,7 @@ var entitySphere = Entities.addEntity({
|
|||
});
|
||||
|
||||
var overlaySpherePosition = Vec3.sum(tablePosition, {x: sphereDimensions.x, y: tableDimensions.y/2 + sphereDimensions.y/2, z: 0});
|
||||
//V8TODO: change to local entity
|
||||
var overlaySphere = Overlays.addOverlay("sphere", {
|
||||
position: overlaySpherePosition,
|
||||
size: 0.01,
|
||||
|
|
|
@ -23,7 +23,8 @@ SPAWNER = function (properties) {
|
|||
}
|
||||
|
||||
function makeObject(properties) {
|
||||
|
||||
|
||||
//V8TODO: change to local entity
|
||||
var overlay = Overlays.addOverlay("web3d", {
|
||||
name: "Web",
|
||||
url: "https://www.reddit.com/r/random",
|
||||
|
|
|
@ -41,6 +41,7 @@
|
|||
}
|
||||
|
||||
if (HMD.active) {
|
||||
//V8TODO: change to local entity
|
||||
warningOverlayID = Overlays.addOverlay("text3d", {
|
||||
name: "Muted-Warning",
|
||||
localPosition: { x: 0.0, y: -0.45, z: -1.0 },
|
||||
|
|
|
@ -27,6 +27,7 @@ var POSSIBLE_AC_AVATARS = [
|
|||
AvatarFinderBeacon = function(avatar) {
|
||||
var visible = false;
|
||||
var avatarSessionUUID = avatar.sessionUUID;
|
||||
//V8TODO: change to local entity
|
||||
this.overlay = Overlays.addOverlay('line3d', {
|
||||
color: BEAM_COLOR,
|
||||
dashed: false,
|
||||
|
|
|
@ -89,6 +89,7 @@ function stopAwayAnimation() {
|
|||
|
||||
// OVERLAY
|
||||
var overlay = Overlays.addOverlay("image", OVERLAY_DATA);
|
||||
//V8TODO: change to local entity
|
||||
var overlayHMD = Overlays.addOverlay("image3d", OVERLAY_DATA_HMD);
|
||||
|
||||
function showOverlay() {
|
||||
|
|
|
@ -21,6 +21,7 @@
|
|||
// Affects bubble height
|
||||
var BUBBLE_HEIGHT_SCALE = 0.15;
|
||||
// The bubble model itself
|
||||
//V8TODO: change to local entity
|
||||
var bubbleOverlay = Overlays.addOverlay("model", {
|
||||
url: Script.resolvePath("assets/models/Bubble-v14.fbx"), // If you'd like to change the model, modify this line (and the dimensions below)
|
||||
dimensions: { x: MyAvatar.sensorToWorldScale, y: 0.75 * MyAvatar.sensorToWorldScale, z: MyAvatar.sensorToWorldScale },
|
||||
|
|
|
@ -45,6 +45,7 @@
|
|||
var speechBubbleLineHeight = 0.05; // The height of a line of text in the speech bubble.
|
||||
var SPEECH_BUBBLE_MAX_WIDTH = 1; // meters
|
||||
|
||||
//V8TODO: change to local entity
|
||||
var textSizeOverlay = Overlays.addOverlay("text3d", {
|
||||
position: MyAvatar.position,
|
||||
lineHeight: speechBubbleLineHeight,
|
||||
|
|
|
@ -313,6 +313,7 @@ Script.include("/~/system/libraries/controllerDispatcherUtils.js");
|
|||
Overlays.editOverlay(this.grabSphereOverlays[h], { position: controllerLocations[h].position });
|
||||
} else {
|
||||
var grabSphereSize = findRadius * 2;
|
||||
//V8TODO: change to local entity
|
||||
this.grabSphereOverlays[h] = Overlays.addOverlay("sphere", {
|
||||
position: controllerLocations[h].position,
|
||||
dimensions: { x: grabSphereSize, y: grabSphereSize, z: grabSphereSize },
|
||||
|
|
|
@ -172,6 +172,7 @@ createControllerDisplay = function(config) {
|
|||
controller.naturalPosition = { x: 0, y: 0, z: 0 };
|
||||
}
|
||||
|
||||
//V8TODO: change to local entity
|
||||
var baseOverlayID = Overlays.addOverlay("model", {
|
||||
url: controller.modelURL,
|
||||
dimensions: Vec3.multiply(sensorScaleFactor, controller.dimensions),
|
||||
|
@ -206,6 +207,7 @@ createControllerDisplay = function(config) {
|
|||
properties.textures = textures;
|
||||
}
|
||||
|
||||
//V8TODO: change to local entity
|
||||
var overlayID = Overlays.addOverlay("model", properties);
|
||||
|
||||
if (part.type === "rotational") {
|
||||
|
|
|
@ -74,6 +74,7 @@ EquipHotspotBuddy.prototype.updateHotspot = function(hotspot, timestamp) {
|
|||
}
|
||||
|
||||
// override default sphere with a user specified model, if it exists.
|
||||
//V8TODO: change to local entity
|
||||
overlayInfoSet.overlays.push(Overlays.addOverlay("model", {
|
||||
name: "hotspot overlay",
|
||||
url: hotspot.indicatorURL ? hotspot.indicatorURL : DEFAULT_SPHERE_MODEL_URL,
|
||||
|
|
|
@ -142,6 +142,7 @@ WebTablet = function (url, width, dpi, hand, location, visible) {
|
|||
this.cleanUpOldTablets();
|
||||
cleanUpOldMaterialEntities();
|
||||
|
||||
//V8TODO: change to local entity
|
||||
this.tabletEntityID = Overlays.addOverlay("model", tabletProperties);
|
||||
|
||||
if (this.webOverlayID) {
|
||||
|
@ -152,6 +153,7 @@ WebTablet = function (url, width, dpi, hand, location, visible) {
|
|||
var WEB_ENTITY_Y_OFFSET = 1.25 * tabletScaleFactor;
|
||||
var screenWidth = 0.9367 * tabletWidth;
|
||||
var screenHeight = 0.9000 * tabletHeight;
|
||||
//V8TODO: change to local entity
|
||||
this.webOverlayID = Overlays.addOverlay("web3d", {
|
||||
name: "WebTablet Web",
|
||||
url: url,
|
||||
|
@ -172,6 +174,7 @@ WebTablet = function (url, width, dpi, hand, location, visible) {
|
|||
var HOME_BUTTON_X_OFFSET = 0.00079 * sensorScaleFactor;
|
||||
var HOME_BUTTON_Y_OFFSET = -1 * ((tabletHeight / 2) - (4.0 * tabletScaleFactor / 2));
|
||||
var HOME_BUTTON_Z_OFFSET = (tabletDepth / 1.9) * sensorScaleFactor;
|
||||
//V8TODO: change to local entity
|
||||
this.homeButtonID = Overlays.addOverlay("circle3d", {
|
||||
name: "homeButton",
|
||||
localPosition: { x: HOME_BUTTON_X_OFFSET, y: HOME_BUTTON_Y_OFFSET, z: -HOME_BUTTON_Z_OFFSET },
|
||||
|
@ -185,6 +188,7 @@ WebTablet = function (url, width, dpi, hand, location, visible) {
|
|||
parentJointIndex: -1
|
||||
});
|
||||
|
||||
//V8TODO: change to local entity
|
||||
this.homeButtonHighlightID = Overlays.addOverlay("circle3d", {
|
||||
name: "homeButtonHighlight",
|
||||
localPosition: { x: -HOME_BUTTON_X_OFFSET, y: HOME_BUTTON_Y_OFFSET, z: -HOME_BUTTON_Z_OFFSET },
|
||||
|
|
|
@ -12,6 +12,7 @@
|
|||
// OverlayGroup provides a way to create composite overlays and control their
|
||||
// position relative to a settable rootPosition and rootRotation.
|
||||
//
|
||||
//V8TODO: check if it uses 3D overlays
|
||||
OverlayGroup = function(opts) {
|
||||
var that = {};
|
||||
|
||||
|
|
|
@ -465,6 +465,7 @@
|
|||
}
|
||||
|
||||
function create() {
|
||||
//V8TODO: change to local entity
|
||||
miniOverlay = Overlays.addOverlay("model", {
|
||||
url: MINI_MODEL,
|
||||
dimensions: Vec3.multiply(MyAvatar.sensorToWorldScale, MINI_DIMENSIONS),
|
||||
|
@ -474,6 +475,7 @@
|
|||
drawInFront: false,
|
||||
visible: false
|
||||
});
|
||||
//V8TODO: change to local entity
|
||||
miniUIOverlay = Overlays.addOverlay("web3d", {
|
||||
url: handsAreTracked() ? MINI_HAND_UI_HTML : MINI_UI_HTML,
|
||||
parentID: miniOverlay,
|
||||
|
|
|
@ -134,6 +134,7 @@ function updateOverlays() {
|
|||
modOverlays[avatarID]=[newKickOverlay];
|
||||
|
||||
if (Users.canKick) {
|
||||
//V8TODO: change to local entity
|
||||
var newMuteOverlay = Overlays.addOverlay("image3d", {
|
||||
url: muteOverlayURL(),
|
||||
position: muteOverlayPosition,
|
||||
|
|
|
@ -77,6 +77,7 @@ function ExtendedOverlay(key, type, properties, selected, hasModel) { // A wrapp
|
|||
this.key = key;
|
||||
this.selected = selected || false; // not undefined
|
||||
this.hovering = false;
|
||||
//V8TODO: check if it uses 3d overlays
|
||||
this.activeOverlay = Overlays.addOverlay(type, properties); // We could use different overlays for (un)selected...
|
||||
}
|
||||
// Instance methods:
|
||||
|
@ -183,6 +184,7 @@ ExtendedOverlay.applyPickRay = function (pickRay, hit, noHit) {
|
|||
//
|
||||
function HighlightedEntity(id, entityProperties) {
|
||||
this.id = id;
|
||||
//V8TODO: change to local entity
|
||||
this.overlay = Overlays.addOverlay('cube', {
|
||||
position: entityProperties.position,
|
||||
rotation: entityProperties.rotation,
|
||||
|
|
|
@ -38,6 +38,7 @@
|
|||
|
||||
var oopsDimensions = {x: 4.2, y: 0.8};
|
||||
|
||||
//V8TODO: change to local entity
|
||||
var redirectOopsText = Overlays.addOverlay("text3d", {
|
||||
name: "oopsText",
|
||||
position: {x: 0, y: 1.6763916015625, z: 1.45927095413208},
|
||||
|
@ -55,6 +56,7 @@
|
|||
grabbable: false,
|
||||
});
|
||||
|
||||
//V8TODO: change to local entity
|
||||
var tryAgainImageNeutral = Overlays.addOverlay("image3d", {
|
||||
name: "tryAgainImage",
|
||||
localPosition: {x: -0.6, y: -0.6, z: 0.0},
|
||||
|
@ -68,6 +70,7 @@
|
|||
parentID: redirectOopsText
|
||||
});
|
||||
|
||||
//V8TODO: change to local entity
|
||||
var tryAgainImageHover = Overlays.addOverlay("image3d", {
|
||||
name: "tryAgainImageHover",
|
||||
localPosition: {x: -0.6, y: -0.6, z: 0.0},
|
||||
|
@ -81,6 +84,7 @@
|
|||
parentID: redirectOopsText
|
||||
});
|
||||
|
||||
//V8TODO: change to local entity
|
||||
var tryAgainText = Overlays.addOverlay("text3d", {
|
||||
name: "tryAgainText",
|
||||
localPosition: {x: -0.6, y: -0.962, z: 0.0},
|
||||
|
@ -96,6 +100,7 @@
|
|||
parentID: redirectOopsText
|
||||
});
|
||||
|
||||
//V8TODO: change to local entity
|
||||
var backImageNeutral = Overlays.addOverlay("image3d", {
|
||||
name: "backImage",
|
||||
localPosition: {x: 0.6, y: -0.6, z: 0.0},
|
||||
|
@ -109,6 +114,7 @@
|
|||
parentID: redirectOopsText
|
||||
});
|
||||
|
||||
//V8TODO: change to local entity
|
||||
var backImageHover = Overlays.addOverlay("image3d", {
|
||||
name: "backImageHover",
|
||||
localPosition: {x: 0.6, y: -0.6, z: 0.0},
|
||||
|
@ -122,6 +128,7 @@
|
|||
parentID: redirectOopsText
|
||||
});
|
||||
|
||||
//V8TODO: change to local entity
|
||||
var backText = Overlays.addOverlay("text3d", {
|
||||
name: "backText",
|
||||
localPosition: {x: 0.6, y: -0.962, z: 0.0},
|
||||
|
|
|
@ -249,6 +249,7 @@
|
|||
tabletShown = false;
|
||||
|
||||
// also cause the stylus model to be loaded
|
||||
//V8TODO: change to local entity
|
||||
var tmpStylusID = Overlays.addOverlay("model", {
|
||||
name: "stylus",
|
||||
url: Script.resourcesPath() + "meshes/tablet-stylus-fat.fbx",
|
||||
|
|
Loading…
Reference in a new issue