43 lines
No EOL
1,011 B
JavaScript
43 lines
No EOL
1,011 B
JavaScript
//
|
|
// 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) {
|
|
origScale = MyAvatar.getAvatarScale();
|
|
print(origScale);
|
|
MyAvatar.setAvatarScale(tinyScale);
|
|
},
|
|
|
|
};
|
|
|
|
return new Entity();
|
|
}); |