Skip to content

Commit

Permalink
0.5.0 (tested)
Browse files Browse the repository at this point in the history
finalized RadixTree implementation & patched isWithinProximity method
  • Loading branch information
jakeee51 committed Dec 27, 2022
1 parent f34e63d commit b6bb4c5
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 14 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ plugins {
}

apply plugin: 'net.minecraftforge.gradle'
version = '1.19.2-0.4.8'
version = '1.19.2-0.5.0'
group = 'com.calicraft.vrjester' // http://maven.apache.org/guides/mini/guide-naming-conventions.html
archivesBaseName = 'VRJesterAPI'

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,11 @@ public static boolean matchesWith(List<GestureComponent> gesture, List<GestureCo
}

// Check if traced gesture has the same devices within proximity of the stored gesture
private static boolean isWithinProximity(Map<String, Integer> otherDevices, Map<String, Integer> devices) {
return Objects.equals(devices.keySet(), otherDevices.keySet());
private static boolean isWithinProximity(Map<String, Integer> devices, Map<String, Integer> otherDevices) {
if (devices.isEmpty())
return true;
else
return Objects.equals(devices.keySet(), otherDevices.keySet());
}

// Concatenate the 2 GestureComponent lists and return the new one
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/data/vrjester/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"READ_DATA": "true",
"WRITE_DATA": "false",
"DISPLAY_VOX": "false",
"VOX_LENGTH": "0.4",
"VOX_LENGTH": "0.3",
"GESTURES": {
"PUSH": {
"velocity": "1.0",
Expand Down
12 changes: 2 additions & 10 deletions src/main/resources/data/vrjester/gesture_store.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,7 @@
"vrDevice": "RC",
"movement": "forward",
"elapsedTime": 0,
"maxElapsedTime": 0,
"speed": 1000.0,
"maxSpeed": 0.0,
"direction": {
"f_82479_": 0.0,
"f_82480_": 0.0,
Expand All @@ -23,9 +21,7 @@
"vrDevice": "RC",
"movement": "back",
"elapsedTime": 0,
"maxElapsedTime": 0,
"speed": 500.0,
"maxSpeed": 0.0,
"speed": 0.0,
"direction": {
"f_82479_": 0.0,
"f_82480_": 0.0,
Expand All @@ -42,9 +38,7 @@
"vrDevice": "LC",
"movement": "forward",
"elapsedTime": 0,
"maxElapsedTime": 0,
"speed": 1000.0,
"maxSpeed": 0.0,
"direction": {
"f_82479_": 0.0,
"f_82480_": 0.0,
Expand All @@ -59,9 +53,7 @@
"vrDevice": "LC",
"movement": "back",
"elapsedTime": 0,
"maxElapsedTime": 0,
"speed": 500.0,
"maxSpeed": 0.0,
"speed": 0.0,
"direction": {
"f_82479_": 0.0,
"f_82480_": 0.0,
Expand Down

0 comments on commit b6bb4c5

Please sign in to comment.