mirror of
https://github.com/overte-org/overte.git
synced 2025-08-08 18:16:45 +02:00
Update xylophoneKey.js
This commit is contained in:
parent
7ec97d8331
commit
bc33e45d0e
1 changed files with 15 additions and 5 deletions
|
@ -1,8 +1,18 @@
|
||||||
|
//
|
||||||
|
// xylophoneKey.js
|
||||||
|
//
|
||||||
|
// Created by Patrick Gosch on 03/28/2017
|
||||||
|
// 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
|
||||||
|
//
|
||||||
|
|
||||||
(function() {
|
(function() {
|
||||||
Script.include(Script.resolvePath("pUtils.js"));
|
Script.include(Script.resolvePath("pUtils.js"));
|
||||||
const TIMEOUT = 150;
|
var TIMEOUT = 150;
|
||||||
const TEXGRAY = Script.resolvePath("xylotex_bar_gray.png");
|
var TEXGRAY = Script.resolvePath("xylotex_bar_gray.png");
|
||||||
const TEXBLACK = Script.resolvePath("xylotex_bar_black.png");
|
var TEXBLACK = Script.resolvePath("xylotex_bar_black.png");
|
||||||
var _this;
|
var _this;
|
||||||
|
|
||||||
function XylophoneKey() {
|
function XylophoneKey() {
|
||||||
|
@ -43,7 +53,7 @@
|
||||||
var newPos = Vec3.sum(_this.homePos, {x:0,y:-0.025,z:0});
|
var newPos = Vec3.sum(_this.homePos, {x:0,y:-0.025,z:0});
|
||||||
Entities.editEntity(_this.entityID, {position: newPos});
|
Entities.editEntity(_this.entityID, {position: newPos});
|
||||||
_this.timeout();
|
_this.timeout();
|
||||||
};
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
timeout: function() {
|
timeout: function() {
|
||||||
|
@ -53,7 +63,7 @@
|
||||||
_this.isWaiting = false;
|
_this.isWaiting = false;
|
||||||
}, TIMEOUT);
|
}, TIMEOUT);
|
||||||
},
|
},
|
||||||
}
|
};
|
||||||
|
|
||||||
return new XylophoneKey();
|
return new XylophoneKey();
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue