Skip to content

Commit

Permalink
Merge pull request #736 from overte-org/fix/controller_performance
Browse files Browse the repository at this point in the history
Improve game rate by moving squeezeHands.js to a separate thread
  • Loading branch information
ksuprynowicz authored Nov 23, 2023
2 parents fadfdab + e05c79c commit 476cf0b
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
1 change: 1 addition & 0 deletions scripts/defaultScripts.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ var DEFAULT_SCRIPTS_COMBINED = [
];
var DEFAULT_SCRIPTS_SEPARATE = [
"system/controllers/controllerScripts.js",
"system/controllers/squeezeHands.js",
"communityScripts/notificationCore/notificationCore.js",
"simplifiedUI/ui/simplifiedNametag/simplifiedNametag.js",
{"stable": "system/more/app-more.js", "beta": "https://more.overte.org/more/app-more.js"},
Expand Down
4 changes: 3 additions & 1 deletion scripts/system/controllers/controllerDispatcher.js
Original file line number Diff line number Diff line change
Expand Up @@ -439,8 +439,10 @@ Script.include("/~/system/libraries/controllerDispatcherUtils.js");
}
}


// TODO: These are not used currently, but have severe impact on performace. They can be re-enabled when we have OpenXR support
// check for hand-tracking "click"
_this.checkForHandTrackingClick();
//_this.checkForHandTrackingClick();

// bundle up all the data about the current situation
var controllerData = {
Expand Down
9 changes: 5 additions & 4 deletions scripts/system/controllers/controllerScripts.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@
Script.include("controllerDispatcher.js");

var CONTOLLER_SCRIPTS = [
"squeezeHands.js",
"controllerDisplayManager.js",
"grab.js",
"toggleAdvancedMovementForHandControllers.js",
"handTouch.js",
// TODO: These are not used currently. It can be reworked re-enabled when we have OpenXR support
//"handTouch.js",
"mouseLook.js",
"controllerModules/nearParentGrabOverlay.js",
"controllerModules/stylusInput.js",
Expand All @@ -37,8 +37,9 @@ var CONTOLLER_SCRIPTS = [
"controllerModules/nearGrabEntity.js",
"controllerModules/farGrabEntity.js",
"controllerModules/pushToTalk.js",
"controllerModules/trackedHandWalk.js",
"controllerModules/trackedHandTablet.js"
// TODO: These are not used currently, but have severe impact on performace. They can be re-enabled when we have OpenXR support
//"controllerModules/trackedHandWalk.js",
//"controllerModules/trackedHandTablet.js"
];

//Script.include("../../developer/debugging/scriptMemoryReport.js");
Expand Down

0 comments on commit 476cf0b

Please sign in to comment.