-
Notifications
You must be signed in to change notification settings - Fork 502
/
Copy pathcloseButton.js
36 lines (30 loc) · 948 Bytes
/
closeButton.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
//
// closeButton.js
//
// Created by James Pollack @imgntn on 12/15/2015
// Copyright 2015 High Fidelity, Inc.
//
// Entity script that closes sliders when interacted with.
//
// Distributed under the Apache License, Version 2.0.
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
//
(function() {
function CloseButton() {
return this;
}
CloseButton.prototype = {
preload: function(entityID) {
this.entityID = entityID;
var entityProperties = Entities.getEntityProperties(this.entityID, "userData");
this.initialProperties = entityProperties
this.userData = JSON.parse(entityProperties.userData);
},
startNearGrab: function() {
},
startFarTrigger: function() {
Messages.sendMessage('Hifi-Light-Modifier-Cleanup', 'callCleanup')
}
};
return new CloseButton();
});