// // diorama.js // // Created by Alexia Mandeville on 10/26/2018 // Copyright 2017 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 // // Hackathon 2018 // Tom, Jess, Alexia (function() { var _entityID; var _this; var origScale; var tinyScale = 0.1; var Entity = function() { _this = this; }; Entity.prototype = { preload: function(entityID) { // runs when this script is refreshed or a // client connects to a domain where this entity is present _entityID = entityID; _this = this; }, clickDownOnEntity: function (entityID, pointerEvent) { var teleportTarget = Entities.findEntitiesByName("Teleport-Target", MyAvatar.position, 10, false); print(Entities.getEntityProperties(teleportTarget[0], ["position"])); MyAvatar.position = Entities.getEntityProperties(teleportTarget[0], ["position"]).position; }, }; return new Entity(); });