mirror of
https://github.com/overte-org/overte.git
synced 2025-04-19 13:43:49 +02:00
Renamed WebBuddy to WebTablet
This commit is contained in:
parent
eafae1fcf3
commit
af2c31f29b
2 changed files with 12 additions and 12 deletions
|
@ -1,5 +1,5 @@
|
|||
//
|
||||
// WebBuddy.js
|
||||
// WebTablet.js
|
||||
//
|
||||
// Created by Anthony J. Thibault on 8/8/2016
|
||||
// Copyright 2016 High Fidelity, Inc.
|
||||
|
@ -39,7 +39,7 @@ function calcSpawnInfo() {
|
|||
}
|
||||
|
||||
// ctor
|
||||
WebBuddy = function (url) {
|
||||
WebTablet = function (url) {
|
||||
|
||||
var ASPECT = 4.0 / 3.0;
|
||||
var WIDTH = 0.4;
|
||||
|
@ -99,13 +99,13 @@ WebBuddy = function (url) {
|
|||
Script.update.connect(this.updateFunc);
|
||||
};
|
||||
|
||||
WebBuddy.prototype.destroy = function () {
|
||||
WebTablet.prototype.destroy = function () {
|
||||
Entities.deleteEntity(this.webEntityID);
|
||||
Entities.deleteEntity(this.tabletEntityID);
|
||||
Script.update.disconnect(this.updateFunc);
|
||||
};
|
||||
|
||||
WebBuddy.prototype.update = function (dt) {
|
||||
WebTablet.prototype.update = function (dt) {
|
||||
|
||||
var props = Entities.getEntityProperties(this.tabletEntityID, ["position", "rotation", "parentID", "parentJointIndex"]);
|
||||
var entityWorldMat;
|
|
@ -8,8 +8,8 @@
|
|||
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
||||
//
|
||||
|
||||
/* global WebBuddy */
|
||||
Script.include("./libraries/WebBuddy.js");
|
||||
/* global WebTablet */
|
||||
Script.include("./libraries/WebTablet.js");
|
||||
|
||||
var toolIconUrl = Script.resolvePath("assets/images/tools/");
|
||||
|
||||
|
@ -26,17 +26,17 @@ var toolHeight = 50;
|
|||
var toolWidth = 50;
|
||||
var TOOLBAR_MARGIN_Y = 0;
|
||||
var marketplaceVisible = false;
|
||||
var marketplaceWebBuddy;
|
||||
var marketplaceWebTablet;
|
||||
|
||||
function shouldShowWebBuddyMarketplace() {
|
||||
function shouldShowWebTablet() {
|
||||
var rightPose = Controller.getPoseValue(Controller.Standard.RightHand);
|
||||
var leftPose = Controller.getPoseValue(Controller.Standard.LeftHand);
|
||||
return HMD.active && (leftPose.valid || rightPose.valid);
|
||||
}
|
||||
|
||||
function showMarketplace(marketplaceID) {
|
||||
if (shouldShowWebBuddyMarketplace()) {
|
||||
marketplaceWebBuddy = new WebBuddy("https://metaverse.highfidelity.com/marketplace");
|
||||
if (shouldShowWebTablet()) {
|
||||
marketplaceWebTablet = new WebTablet("https://metaverse.highfidelity.com/marketplace");
|
||||
} else {
|
||||
var url = MARKETPLACE_URL;
|
||||
if (marketplaceID) {
|
||||
|
@ -55,8 +55,8 @@ function hideMarketplace() {
|
|||
marketplaceWindow.setVisible(false);
|
||||
marketplaceWindow.setURL("about:blank");
|
||||
} else {
|
||||
marketplaceWebBuddy.destroy();
|
||||
marketplaceWebBuddy = null;
|
||||
marketplaceWebTablet.destroy();
|
||||
marketplaceWebTablet = null;
|
||||
}
|
||||
marketplaceVisible = false;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue