From b5067e42964b5ea1a5bf7eff09d36fd6c61260f0 Mon Sep 17 00:00:00 2001 From: Alezia Kurdis <60075796+AleziaKurdis@users.noreply.github.com> Date: Sun, 17 Dec 2023 22:48:14 -0500 Subject: [PATCH] Add "Calibration - Full Body Tracking" app This application adds a shortcut button in your tablet to open directly the Full Body Tracking 'Calibration' settings. This is mainly for people doing Full Body Tracking for whom it is a frequent use to do the calibration. --- applications/calibration/app-calibration.js | 58 ++++++++++++++++++++ applications/calibration/icon_active.png | Bin 0 -> 1547 bytes applications/calibration/icon_inactive.png | Bin 0 -> 1574 bytes applications/metadata.js | 9 +++ 4 files changed, 67 insertions(+) create mode 100644 applications/calibration/app-calibration.js create mode 100644 applications/calibration/icon_active.png create mode 100644 applications/calibration/icon_inactive.png diff --git a/applications/calibration/app-calibration.js b/applications/calibration/app-calibration.js new file mode 100644 index 0000000..0004b51 --- /dev/null +++ b/applications/calibration/app-calibration.js @@ -0,0 +1,58 @@ +// +// app-calibration.js +// +// Created by Alezia Kurdis, December 16th 2023. +// Copyright 2023 Overte e.V. +// +// Shortcut for Mocap Calibration. +// +// Distributed under the Apache License, Version 2.0. +// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html +// +(function() { + var jsMainFileName = "app-calibration.js"; + var ROOT = Script.resolvePath('').split(jsMainFileName)[0]; + + var APP_NAME = "CALIBRATE"; + var ICON_CAPTION_COLOR = "#FFFFFF"; + var APP_ICON_INACTIVE = ROOT + "icon_inactive.png"; + var APP_ICON_ACTIVE = ROOT + "icon_active.png"; + + var tablet = Tablet.getTablet("com.highfidelity.interface.tablet.system"); + + var button = tablet.addButton({ + "text": APP_NAME, + "icon": APP_ICON_INACTIVE, + "activeIcon": APP_ICON_ACTIVE, + "sortOrder": 3, + "captionColor": ICON_CAPTION_COLOR + }); + + function clicked(){ + button.editProperties({ + "isActive": true, + "captionColor": "#000000" + }); + calibration(); + } + + button.clicked.connect(clicked); + + function calibration() { + Menu.triggerOption("Controls..."); + Script.setTimeout(function () { + button.editProperties({ + "isActive": false, + "captionColor": ICON_CAPTION_COLOR + }); + }, 3000); + } + + + + function cleanup() { + tablet.removeButton(button); + } + + Script.scriptEnding.connect(cleanup); +}()); diff --git a/applications/calibration/icon_active.png b/applications/calibration/icon_active.png new file mode 100644 index 0000000000000000000000000000000000000000..1d9184c1419bdd54796b8405e367b3ea4fb48d2e GIT binary patch literal 1547 zcmXApTToL65QaD5kc5zg!%Y$h$w3qq1{DYt@xn=ngot1OK|mR7L=Ev;iWCI(L`6~s z!liWZQcXl8qG(Z6te0Aeh$uBWC<4WbMMpAVMGA!xN#{%-_GS0s+u8a4{az6(V>8{E z0Kk?*l^c#8iSP9WiqucntQ>*Bi?!Ee zK-DJYnW`mu6%-tvwtMqk+ACRPQ;;V&EO`hRp{kM%XeQ>JT=FJ*+jScR4G{EGl=)cF z-LC~f=y7Ue$gyS~DvTVxyA+FEo-l`Pip3unwG>cP{az(cNLsNhOkdh;XF8EQ@R#A! z4o$La^fTMMxwhIqO|^Z@Nn5Q>GPbIvzkIo3@_-p{u{aW-{LR2~3CqF@T(x=SCY&ax zG={DoqN4WVZfw^diVHN8RnN)gnCggRL|bJzY18juzBQBfd;v8$-A3C@OwdIibIXS4 ziDy^fQ#@@twwQ|%Ki}8-py`^h)9x1YIxIwUXd>dwnLrzL?o2d4!t;uU@4wC~P8~`O zwv+Q$$L*ym{je9dZWa<|VXD z=#xKFJDRZ@4LG0fI_Fx}rh{k8cC_sWigcLy)W&jdm-+Fd!qo$pBcem*8#jwB?#4tf zDuUWqc`%C=yM0BYYw${M4^b!2P}?I?dEHy-e}qDMGD&M-^yz0mS*-dplh$D$^t3a9 z6sV`9^^`(pmHKkC46bMVMB9SILBm^AdksurV5#G1v|;i!yQ%OaxBXA4J?Yie4N~5@ z;Ex`@A-38YqM6kYYWr5WSe?Q`@y>B=7gP1j4-CD2Vo?Q%EmMJ5&q;d!Aobd{2TDJXQRof589@_Grwbf)l?JNNaiI~;CLXX z^^T-Se!G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+~K&Nnv_dM*IOst;SEzV=I28ago`h!rT6Kj z#6ZMtmG$QOm)Ll!?UuG#cGb&abFCrLhzk;cN%O`55P}fW6=J~=k)X}%r(NZ~A642@L|3UI`N3*qgEM9qu@&hg& zvy(aD+VuyIIfo8!imD8X8RTF@!8Obw$Pm8UF=^SChPb1MSaq~sHF52rA(+F(oym3) z8$-z&+c#U2S4yJ1;q9iPy#sSj0S)%Dyi}3(f-4EgK7IzB z1bpEY+xN1xAlJ?{uwD`-?qKsT)Qb?0I=o z%h-=Y*05M!dlSifYQ7)D+*2L+!Hi_l^yfQ=b37AsLm8^nkmZ>#3`B+1Bd{eiGv3omeM18ug<& z`w(+Gm^yoGP0W4-W%_4t>{eXWzWTy9Pl>7I^TGMo_e%OZQS%qB$mNBOdb#1POkY?O zl6&@IRoJvNMlfX-eP{NBl(kPUThRD5)nCiUh=R?^t%SZx-}|pB{pHJXrezz1Svdk_ zz2Zi7WZ^%_lh1yiSHdSD-6L>udt=d3`9*8NI|9c}W{c>sDF7!M2E^e++3tf+jdJZH zOW7InQBYQIYG|H$U_rf&Qy#&g!5A9*#0jYBzVbH&4S>Hczm@sMQ2%xS0NpCR=HDwf GRQ(NCqj{bH literal 0 HcmV?d00001 diff --git a/applications/metadata.js b/applications/metadata.js index e8f6f7b..9d2f7fb 100644 --- a/applications/metadata.js +++ b/applications/metadata.js @@ -269,6 +269,15 @@ var metadata = { "applications": "jsfile": "inventory-app/dist/inventory.js", "icon": "inventory-app/dist/inventory-i.svg", "caption": "INVENTORY" + }, + { + "isActive": true, + "directory": "calibration", + "name": "Calibration - Full body Traking", + "description": "This adds a shortcut button in your tablet to open directly the Full Body Tracking 'Calibration' settings. This is mainly for people doing Full Body Tracking for whom it is a frequent use to do the calibration.", + "jsfile": "calibration/app-calibration.js", + "icon": "calibration/icon_inactive.png", + "caption": "CALIBRATE" } ] }; \ No newline at end of file