2018-03-24 16:21:26 +01:00
|
|
|
if (!this.entityLoaded) {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (!this.initialized) {
|
|
|
|
this.initialized = true;
|
|
|
|
}
|
2018-03-24 16:24:00 +01:00
|
|
|
|
2018-04-10 15:48:32 +02:00
|
|
|
R3.Event.Emit(R3.Event.MOUSE_UP);
|
2018-03-24 19:42:26 +01:00
|
|
|
/*
|
|
|
|
|
2018-03-24 16:28:45 +01:00
|
|
|
var touch = data;
|
|
|
|
var max = Math.max(touch.left, touch.right, touch.up, touch.down);
|
|
|
|
|
|
|
|
if (typeof max === 'number') {
|
|
|
|
|
|
|
|
if (max === touch.left) {
|
2018-04-10 15:48:32 +02:00
|
|
|
R3.Event.Emit(
|
|
|
|
R3.Event.KEY_DOWN,
|
2018-03-24 16:28:45 +01:00
|
|
|
{
|
2018-04-10 15:48:32 +02:00
|
|
|
keyCode : R3.System.Input.KEY_LEFT
|
2018-03-24 16:28:45 +01:00
|
|
|
}
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
if (max === touch.right) {
|
2018-04-10 15:48:32 +02:00
|
|
|
R3.Event.Emit(
|
|
|
|
R3.Event.KEY_DOWN,
|
2018-03-24 16:28:45 +01:00
|
|
|
{
|
2018-04-10 15:48:32 +02:00
|
|
|
keyCode : R3.System.Input.KEY_RIGHT
|
2018-03-24 16:28:45 +01:00
|
|
|
}
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
if (max === touch.up) {
|
2018-04-10 15:48:32 +02:00
|
|
|
R3.Event.Emit(
|
|
|
|
R3.Event.KEY_DOWN,
|
2018-03-24 16:28:45 +01:00
|
|
|
{
|
2018-04-10 15:48:32 +02:00
|
|
|
keyCode : R3.System.Input.KEY_UP
|
2018-03-24 16:28:45 +01:00
|
|
|
}
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
if (max === touch.down) {
|
2018-04-10 15:48:32 +02:00
|
|
|
R3.Event.Emit(
|
|
|
|
R3.Event.KEY_DOWN,
|
2018-03-24 16:29:02 +01:00
|
|
|
{
|
2018-04-10 15:48:32 +02:00
|
|
|
keyCode : R3.System.Input.KEY_DOWN
|
2018-03-24 16:28:45 +01:00
|
|
|
}
|
|
|
|
);
|
|
|
|
}
|
2018-03-24 16:29:02 +01:00
|
|
|
|
2018-03-24 16:28:45 +01:00
|
|
|
}
|
2018-03-24 19:42:26 +01:00
|
|
|
*/
|
2018-03-24 16:21:26 +01:00
|
|
|
//@ sourceURL=touchEnd.js
|