mirror of
https://github.com/JulianGro/overte.git
synced 2025-04-29 19:02:55 +02:00
removed tabs and also remove script from host
This commit is contained in:
parent
f7df9a64b2
commit
8f36090884
3 changed files with 41 additions and 11 deletions
|
@ -98,20 +98,18 @@ WebTablet = function (url, width, dpi, location, clientOnly) {
|
||||||
|
|
||||||
this.createWebEntity(url);
|
this.createWebEntity(url);
|
||||||
|
|
||||||
|
|
||||||
this.homeButtonEntity = Entities.addEntity({
|
this.homeButtonEntity = Entities.addEntity({
|
||||||
name: "homeButton",
|
name: "homeButton",
|
||||||
type: "Sphere",
|
type: "Sphere",
|
||||||
localPosition: {x: 0, y: HOME_BUTTON_Y_OFFSET, z: 0},
|
localPosition: {x: 0, y: HOME_BUTTON_Y_OFFSET, z: 0},
|
||||||
dimensions: {x: 0.05, y: 0.05, z: 0.05},
|
dimensions: {x: 0.05, y: 0.05, z: 0.05},
|
||||||
parentID: this.tabletEntityID,
|
parentID: this.tabletEntityID,
|
||||||
script: "https://people.ucsc.edu/~druiz4/scripts/homeButton.js"
|
script: Script.resolvePath("../tablet-ui/HomeButton.js")
|
||||||
}, clientOnly);
|
}, clientOnly);
|
||||||
|
|
||||||
|
|
||||||
setEntityCustomData('grabbableKey', this.homeButtonEntity, {wantsTrigger: true});
|
setEntityCustomData('grabbableKey', this.homeButtonEntity, {wantsTrigger: true});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
this.receive = function (channel, senderID, senderUUID, localOnly) {
|
this.receive = function (channel, senderID, senderUUID, localOnly) {
|
||||||
if (_this.homeButtonEntity == senderID) {
|
if (_this.homeButtonEntity == senderID) {
|
||||||
if (_this.clicked) {
|
if (_this.clicked) {
|
||||||
|
|
32
scripts/system/tablet-ui/HomeButton.js
Normal file
32
scripts/system/tablet-ui/HomeButton.js
Normal file
|
@ -0,0 +1,32 @@
|
||||||
|
//
|
||||||
|
// HomeButton.js
|
||||||
|
//
|
||||||
|
// Created by Dante Ruiz on 12/6/2016
|
||||||
|
// Copyright 2016 High Fidelity, Inc.
|
||||||
|
//
|
||||||
|
// Distributed under the Apache License, Version 2.0.
|
||||||
|
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
||||||
|
//
|
||||||
|
|
||||||
|
(function(){
|
||||||
|
_this = this;
|
||||||
|
|
||||||
|
this.preload = function(entityID) {
|
||||||
|
print(entityID);
|
||||||
|
this.entityID = entityID;
|
||||||
|
}
|
||||||
|
|
||||||
|
this.clickDownOnEntity = function(entityID, mouseEvent) {
|
||||||
|
Messages.sendLocalMessage("home", _this.entityID);
|
||||||
|
}
|
||||||
|
|
||||||
|
this.startNearTrigger = function() {
|
||||||
|
Messages.sendLocalMessage("home", _this.entityID);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
this.startFarTrigger = function() {
|
||||||
|
Messages.sendLocalMessage("home", _this.entityID);
|
||||||
|
}
|
||||||
|
|
||||||
|
});
|
Loading…
Reference in a new issue