removed tabs and also remove script from host

This commit is contained in:
Dante Ruiz 2016-12-16 21:45:53 +00:00
parent f7df9a64b2
commit 8f36090884
3 changed files with 41 additions and 11 deletions

View file

@ -98,20 +98,18 @@ WebTablet = function (url, width, dpi, location, clientOnly) {
this.createWebEntity(url);
this.homeButtonEntity = Entities.addEntity({
name: "homeButton",
type: "Sphere",
localPosition: {x: 0, y: HOME_BUTTON_Y_OFFSET, z: 0},
dimensions: {x: 0.05, y: 0.05, z: 0.05},
parentID: this.tabletEntityID,
script: "https://people.ucsc.edu/~druiz4/scripts/homeButton.js"
script: Script.resolvePath("../tablet-ui/HomeButton.js")
}, clientOnly);
setEntityCustomData('grabbableKey', this.homeButtonEntity, {wantsTrigger: true});
this.receive = function (channel, senderID, senderUUID, localOnly) {
if (_this.homeButtonEntity == senderID) {
if (_this.clicked) {

View 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);
}
});