Compare commits

...
Author SHA1 Message Date
Uriel 4782aeff68 Merge branch 'main' into kotlin-warnings-fix 2024-03-29 23:50:46 -03:00
Uriel 1aa8679c08 fix known devices not saving (#969) 2024-03-29 22:38:20 -04:00
Uriel 3d51d77e27 Make ktmath object-less (#959) 2024-03-29 01:26:56 -03:00
Uriel 8c74e98187 Automatic SteamVR tracker switching (#947) 2024-03-29 00:57:05 -03:00
Uriel aefaa6598d Use tauri store for GUI config (#923) 2024-03-28 11:53:46 -03:00
Erimel f391b558c9 Tpose down fix (#967) 2024-03-28 03:17:08 -03:00
Uriel ea28baeef9 Improve autobone GUI steps (#960) 2024-03-28 03:09:16 -03:00
Butterscotch! f5f40f496b Make mounting reset follow headset rotation (#953) 2024-03-25 22:56:34 -03:00
297022fb3f Connect one tracker at a time text adjustment (#965)
Co-authored-by: Erimel <[email protected]>
Co-authored-by: Uriel <[email protected]>
2024-03-23 20:46:17 -04:00
UrielandErimel f402b22d74 Allow multiple servers in the same network (#900)
Co-authored-by: Erimel <[email protected]>
2024-03-14 21:42:49 -03:00
Uriel a8557474cb Update Kotlin and gradle plugins (#957) 2024-03-14 23:00:38 +03:00
Uriel d53de4a793 Fix macOS bundling giving an error (#943) 2024-03-14 22:53:50 +03:00
Butterscotch! 81aacdde83 Fix NaN rotation on reset with a zero quaternion (#950) 2024-03-14 16:02:37 -03:00
Butterscotch! 762290b1e3 fastSeek is not available on most browsers, use currentTime (#954) 2024-03-14 15:58:52 -03:00
Uriel 3425be64ac Fix state bug on tray exit (#944) 2024-03-13 20:08:24 -03:00
Uriel 673344baf9 Add an error boundary for WebGL (#942) 2024-03-13 18:45:54 -03:00
sctanf ee7d6a8bc0 Sleep if no HID device present (#956) 2024-03-09 19:28:36 -03:00
sctanf 552451cb98 Remove changing acceleration space in hid tracker (#945) 2024-02-19 22:34:57 -03:00
unlogisch04 a74d5aa273 Add Serial Console Wifi Scan (#930) 2024-02-16 19:20:43 -03:00
Uriel 21576aff63 Migrate to pnpm (#893) 2024-02-16 15:52:44 -03:00
908e220b23 Fixing small bugs (#924)
Co-authored-by: Butterscotch! <[email protected]>
Co-authored-by: ZRock35 <[email protected]>
2024-02-16 01:52:14 -03:00
Erimel 7d0d64418d move biAlign into Quaternion.kt (#940) 2024-02-16 01:00:19 -03:00
Uriel d96f93a7db try removing kotlin warnings 2024-02-15 21:57:16 -03:00
Butterscotch! f80ca11947 Add pause tracking toggle to user action packet (#922) 2024-02-15 21:40:57 -03:00
Markus 7f75f4a44c allow to set the socket dir via SLIMEVR_SOCKET_DIR (#909) 2024-02-15 21:33:55 -03:00
Butterscotch! 1dd1d14d16 Change mounting position/rotation/direction to mounting orientation (#939) 2024-02-15 21:28:59 -03:00
Erimel d3f90b8404 show drift compensation in tracker preview (#937) 2024-02-15 21:23:54 -03:00
UrielandErimel d9955d10e3 Add tray support (#897)
Co-authored-by: Erimel <[email protected]>
2024-02-09 21:44:28 -03:00
Uriel a9b1df8851 Update appstream metadata info (#892) 2024-02-09 21:20:53 -03:00
UrielandEiren Rain 7b04f536d0 Remove Futura from CODEOWNERS (#935)
Co-authored-by: Eiren Rain <[email protected]>
2024-02-07 23:19:44 +03:00
Uriel fcef02e8f2 Add linux files for CODEOWNERS (#936) 2024-02-07 23:18:27 +03:00
Erimel 694d3fa363 don't send packets of bones we don't have (#932) 2024-02-04 22:00:20 -03:00
sctanfandUriel 3f6a26f7d8 Add initial HID trackers support (#913)
Co-authored-by: Uriel <[email protected]>
2024-01-31 22:11:24 -03:00
unlogisch04andButterscotch! 990cd1d6f2 Update FirmwareConstants.kt (#927)
Co-authored-by: Butterscotch! <[email protected]>
2024-01-31 18:28:07 -03:00
Uriel 6ac320352b Update CODEOWNERS for SolarXR (#928) 2024-01-29 19:52:41 +03:00
Erimel ae1b60da5d Prevent smoothing rollback (#921) 2024-01-06 23:46:38 -05:00
VocalFanandErimel aaa5c2ba48 Complete TODO of replacing quatToXyzAngles with toEulerAngles (#915)
Co-authored-by: Erimel <[email protected]>
2024-01-06 23:39:43 -05:00
Erimel 5ff5f81a88 New Pontoon translations (#912) 2023-12-21 19:29:06 -05:00
Kamilake 99f71088ec Pontoon: Update Korean (ko) localization of GUI
Co-authored-by: Kamilake <[email protected]>
2023-12-21 21:23:46 -03:00
fcdcac1ed2 Pontoon: Update German (de) localization of GUI
Co-authored-by: eric.voigt.1 <[email protected]>
Co-authored-by: Ise_Kaey <[email protected]>
Co-authored-by: Yasu3D <[email protected]>
Co-authored-by: Piranja <[email protected]>
Co-authored-by: unlogisch <[email protected]>
Co-authored-by: Ninsbean <[email protected]>
Co-authored-by: Levi <[email protected]>
2023-12-21 21:22:59 -03:00
Allan 37b57bea1f Pontoon: Update Vietnamese (vi) localization of GUI
Co-authored-by: Allan <[email protected]>
2023-12-21 21:22:59 -03:00
namakeingoandriccardomariatassan 77285787ec Pontoon: Update Italian (it) localization of GUI
Co-authored-by: namakeingo <[email protected]>
Co-authored-by: riccardomariatassan <[email protected]>
2023-12-21 21:22:54 -03:00
VyolexandSmeltie 2f5d2b214e Pontoon: Update Dutch (nl) localization of GUI
Co-authored-by: Vyolex <[email protected]>
Co-authored-by: Smeltie <[email protected]>
2023-12-21 21:22:51 -03:00
Meow Wei 319344254d Pontoon: Update Traditional Chinese (zh-Hant) localization of GUI
Co-authored-by: Meow Wei <[email protected]>
2023-12-21 21:22:50 -03:00
MaxEvil 86011f323b Pontoon: Update Latinamerican Spanish (es-419) localization of GUI
Co-authored-by: MaxEvil <[email protected]>
2023-12-21 21:22:50 -03:00
Butterscotch! f9a8384369 Pontoon: Update Engwish (en-x-owo) localization of GUI
Co-authored-by: Butterscotch! <[email protected]>
2023-12-21 21:22:46 -03:00
Erimel 90ced8cacf Pontoon: Update French (fr) localization of GUI
Co-authored-by: Erimel <[email protected]>
2023-12-19 05:00:09 +00:00
Uriel 8253110130 decrease amount of retries to 1 in serial provisioning (#911) 2023-12-17 04:21:17 -03:00
Uriel 563713e788 New Pontoon translations (#904) 2023-12-16 01:22:55 -03:00
Meow Wei 93c319ce68 Pontoon: Update Traditional Chinese (zh-Hant) localization of GUI
Co-authored-by: Meow Wei <[email protected]>
2023-12-15 23:40:28 -03:00
Meow Wei abaf8a19ae Pontoon: Update Simplified Chinese (zh-Hans) localization of GUI
Co-authored-by: Meow Wei <[email protected]>
2023-12-15 23:40:28 -03:00
Mama-Gen 49becc4f08 Pontoon: Update Portuguese (pt-BR) localization of GUI
Co-authored-by: Mama-Gen <[email protected]>
2023-12-15 23:40:28 -03:00
ReDoXandUriel 24f6fdacae Pontoon: Update Polish (pl) localization of GUI
Co-authored-by: Uriel <[email protected]>
Co-authored-by: ReDoX <[email protected]>
2023-12-15 23:40:28 -03:00
c54b0d4044 Pontoon: Update Italian (it) localization of GUI
Co-authored-by: namakeingo <[email protected]>
Co-authored-by: qHiyokop <[email protected]>
Co-authored-by: Etch9 <[email protected]>
2023-12-15 23:40:23 -03:00
Iris bec4d74ccf Pontoon: Update Finnish (fi) localization of GUI
Co-authored-by: Iris <[email protected]>
2023-12-15 23:40:19 -03:00
adriangoldenhero 583629d8e0 Pontoon: Update Spain Spanish (es-ES) localization of GUI
Co-authored-by: adriangoldenhero <[email protected]>
2023-12-15 23:40:19 -03:00
Uriel 60535bda30 Pontoon: Update Latinamerican Spanish (es-419) localization of GUI
Co-authored-by: Uriel <[email protected]>
2023-12-15 23:40:19 -03:00
3675213820 Pontoon: Update German (de) localization of GUI
Co-authored-by: Ise_Kaey <[email protected]>
Co-authored-by: Zeidurth <[email protected]>
Co-authored-by: Ninsbean <[email protected]>
Co-authored-by: Piranja <[email protected]>
Co-authored-by: unlogisch <[email protected]>
2023-12-15 23:40:05 -03:00
infopcgoodandKamilake 900a5d30f7 Pontoon: Update Korean (ko) localization of GUI
Co-authored-by: infopcgood <[email protected]>
Co-authored-by: Kamilake <[email protected]>
2023-12-15 23:39:59 -03:00
Butterscotch! 4d21b61549 Clarify headset wording and update AutoBone requirements (#910) 2023-12-15 17:19:00 -05:00
193 changed files with 16665 additions and 19902 deletions

No files matched your search

+12 -4
View File
@@ -1,16 +1,20 @@
# Global code owner
* @Eirenliel
# Make everyone be able to approve SolarXR submodule changes
/solarxr-protocol @ButterscotchV @Louka3000 @ImUrX
# Make Loucas and Uriel the owners of all GUI stuff
/gui/ @loucass003 @ImUrX
/package-lock.json @loucass003 @ImUrX
/gui/ @ImUrX
/pnpm-lock.yaml @ImUrX
/pnpm-workspace.yaml @ImUrX
# Uriel and Erimel responsible for i18n
/gui/public/i18n/ @ImUrX @Louka3000
/gui/src/i18n/ @ImUrX @Louka3000
/l10n.toml @ImUrX @Louka3000
/gui/src/components/settings/ @Louka3000 @loucass003 @ImUrX
/gui/src/components/settings/ @Louka3000 @ImUrX
# Rust part of the GUI
/gui/src-tauri/ @ImUrX
@@ -27,4 +31,8 @@
/server/src/main/java/dev/slimevr/tracking/processor/ @Louka3000
/server/src/main/java/dev/slimevr/filtering/ @Louka3000
server/src/main/java/dev/slimevr/config/ @loucass003
# Linux files
*.nix @ImUrX
/flake.lock @ImUrX
/dev.slimevr.SlimeVR.metainfo.xml @ImUrX
/.envrc @ImUrX
+10 -8
View File
@@ -25,17 +25,18 @@ jobs:
with:
submodules: recursive
- name: Use Node.js ${{ matrix.node-version }}
- uses: pnpm/action-setup@v2
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version-file: '.node-version'
cache: 'npm'
cache: 'pnpm'
- name: Build
run: |
npm ci
pnpm i
cd gui
npm run lint
pnpm run lint
build:
strategy:
@@ -71,16 +72,17 @@ jobs:
with:
shared-key: "${{ matrix.os }}"
- name: Use Node.js ${{ matrix.node-version }}
- uses: pnpm/action-setup@v2
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version-file: '.node-version'
cache: 'npm'
cache: 'pnpm'
- name: Build
run: |
npm ci
npm run skipbundler
pnpm i
pnpm run skipbundler
- if: matrix.os == 'windows-latest'
name: Upload a Build Artifact (Windows)
+21 -16
View File
@@ -105,16 +105,17 @@ jobs:
- name: Setup Gradle
uses: gradle/gradle-build-action@v2
- uses: pnpm/action-setup@v2
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version-file: '.node-version'
cache: 'npm'
cache: 'pnpm'
- name: Build GUI
run: |
npm ci
cd gui && npm run build
pnpm i
cd gui && pnpm run build
- name: Build with Gradle
run: ./gradlew :server:android:assembleDebug
@@ -172,16 +173,17 @@ jobs:
with:
shared-key: "ubuntu-22.04"
- uses: pnpm/action-setup@v2
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version-file: '.node-version'
cache: 'npm'
cache: 'pnpm'
- name: Build
run: |
npm ci
npm run tauri build
pnpm i
pnpm run tauri build
- uses: actions/[email protected]
with:
@@ -244,20 +246,22 @@ jobs:
with:
shared-key: "macos-latest"
- uses: pnpm/action-setup@v2
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version-file: '.node-version'
cache: 'npm'
cache: 'pnpm'
- name: Build
run: |
npm ci
npm run tauri build -- "--target universal-apple-darwin"
rustup target add aarch64-apple-darwin
pnpm i
pnpm run tauri build --target universal-apple-darwin
- name: Modify Application
run: |
cd target/release/bundle/macos/slimevr.app/Contents/MacOS
cd target/universal-apple-darwin/release/bundle/macos/slimevr.app/Contents/MacOS
cp $( git rev-parse --show-toplevel )/server/desktop/build/libs/slimevr.jar ./
cd ../../../../dmg/
./bundle_dmg.sh --volname slimevr --icon slimevr 180 170 --app-drop-link 480 170 \
@@ -268,17 +272,17 @@ jobs:
- uses: actions/[email protected]
with:
name: SlimeVR-GUI-MacApp
path: target/release/bundle/macos/slimevr*.app
path: target/universal-apple-darwin/release/bundle/macos/slimevr*.app
- uses: actions/[email protected]
with:
name: SlimeVR-GUI-MacDmg
path: target/release/bundle/dmg/slimevr.dmg
path: target/universal-apple-darwin/release/bundle/dmg/slimevr.dmg
- name: Prepare for release
if: startsWith(github.ref, 'refs/tags/')
run: |
cp target/release/bundle/dmg/slimevr.dmg ./SlimeVR-mac.dmg
cp target/universal-apple-darwin/release/bundle/dmg/slimevr.dmg ./SlimeVR-mac.dmg
- name: Upload to draft release
uses: softprops/action-gh-release@v1
@@ -309,16 +313,17 @@ jobs:
with:
shared-key: "windows-latest"
- uses: pnpm/action-setup@v2
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version-file: '.node-version'
cache: 'npm'
cache: 'pnpm'
- name: Build
run: |
npm ci
npm run skipbundler
pnpm i
pnpm run skipbundler
- name: Bundle to zips
shell: bash
+1
View File
@@ -11,6 +11,7 @@
"bradlc.vscode-tailwindcss",
"EditorConfig.EditorConfig",
"macabeus.vscode-fluent",
"redhat.vscode-yaml"
],
// List of extensions recommended by VS Code that should not be recommended for users of this workspace.
"unwantedRecommendations": []
+7 -6
View File
@@ -6,7 +6,7 @@ This document describes essential knowledge required to contribute to the SlimeV
- [Git](https://git-scm.com/downloads)
- [Java v17+](https://adoptium.net/temurin/releases/)
- [Node.js v16+](https://nodejs.org) (We recommend the use of `nvm` instead of installing Node.js directly)
- [Node.js v16.9+](https://nodejs.org) (We recommend the use of `nvm` instead of installing Node.js directly)
- [Microsoft Edge WebView2](https://developer.microsoft.com/en-us/microsoft-edge/webview2/#download-section) or `webkit2gtk` for Linux
- [Rust](https://rustup.rs)
@@ -34,9 +34,10 @@ be at `server/build/libs/slimevr.jar` (you can ignore `server.jar`).
### Tauri (gui)
- Run `npm install` in your IDE's terminal to download and install dependencies.
- To launch the GUI in dev mode, run `npm run gui`.
- Finally, to compile for production, run `npm run tauri build`. The result
- Activate corepack (included with Node.JS) via `corepack enable` (might require administrator permissions)
- Run `pnpm i` in your IDE's terminal to download and install dependencies.
- To launch the GUI in dev mode, run `pnpm gui`.
- Finally, to compile for production, run `pnpm run tauri build`. The result
will be at `target/release/slimevr.exe`.
## Code style
@@ -87,8 +88,8 @@ Eclipse will only do a subset of the checks in `spotless`, so you may still want
We use ESLint and Prettier to format GUI code.
- First, go into the GUI's directory with your terminal by running `cd gui`.
- To check code formatting, run `npm run lint`.
- To fix code formatting, run `npm run lint:fix` and `npm run format`
- To check code formatting, run `pnpm run lint`.
- To fix code formatting, run `pnpm run lint:fix` and `pnpm run format`
Don't forget to run `cd ..` to return to the root directory.
Generated
+30 -5
View File
@@ -379,9 +379,9 @@ checksum = "7f30e7476521f6f8af1a1c4c0b8cc94f0bee37d91763d0ca2665f299b6cd8aec"
[[package]]
name = "bytemuck"
version = "1.14.0"
version = "1.13.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "374d28ec25809ee0e23827c2ab573d729e293f281dfe393500e7ad618baa61c6"
checksum = "17febce684fd15d89027105661fec94afb475cb995fbc59d2865198446ba2eea"
[[package]]
name = "byteorder"
@@ -1769,9 +1769,9 @@ dependencies = [
[[package]]
name = "image"
version = "0.24.7"
version = "0.24.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6f3dfdbdd72063086ff443e297b61695500514b1e41095b6fb9a5ab48a70a711"
checksum = "527909aa81e20ac3a44803521443a765550f09b5130c2c2fa1ea59c2f8f50a3a"
dependencies = [
"bytemuck",
"byteorder",
@@ -1817,6 +1817,15 @@ dependencies = [
"cfb",
]
[[package]]
name = "infer"
version = "0.15.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "cb33622da908807a06f9513c19b3c1ad50fab3e4137d82a78107d502075aa199"
dependencies = [
"cfb",
]
[[package]]
name = "instant"
version = "0.1.12"
@@ -3386,6 +3395,7 @@ dependencies = [
"tauri-plugin-fs",
"tauri-plugin-os",
"tauri-plugin-shell",
"tauri-plugin-store",
"tauri-plugin-window",
"tauri-runtime",
"tempfile",
@@ -3639,6 +3649,7 @@ dependencies = [
"gtk",
"heck",
"http",
"infer 0.15.0",
"jni",
"libc",
"log",
@@ -3647,6 +3658,7 @@ dependencies = [
"objc",
"once_cell",
"percent-encoding",
"png",
"rand 0.8.5",
"raw-window-handle",
"reqwest",
@@ -3798,6 +3810,19 @@ dependencies = [
"thiserror",
]
[[package]]
name = "tauri-plugin-store"
version = "2.0.0-alpha.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4b24bb0b43ca27e21e8071e63e6f0a78fc69bccf83e49e78dcaeba17951c6cfa"
dependencies = [
"log",
"serde",
"serde_json",
"tauri",
"thiserror",
]
[[package]]
name = "tauri-plugin-window"
version = "2.0.0-alpha.2"
@@ -3863,7 +3888,7 @@ dependencies = [
"glob",
"heck",
"html5ever",
"infer",
"infer 0.12.0",
"json-patch",
"kuchikiki",
"memchr",
+1 -1
View File
@@ -1,3 +1,3 @@
plugins {
id("org.ajoberstar.grgit") version "5.2.0"
id("org.ajoberstar.grgit")
}
+24 -10
View File
@@ -24,6 +24,7 @@ work. If not, see <http://creativecommons.org/publicdomain/zero/1.0/>.
<url type="homepage">https://slimevr.dev/</url>
<url type="bugtracker">https://github.com/SlimeVR/SlimeVR-Server/issues</url>
<url type="faq">https://docs.slimevr.dev/slimevr101.html</url>
<url type="donation">https://github.com/sponsors/SlimeVR</url>
<url type="vcs-browser">https://github.com/SlimeVR/SlimeVR-Server</url>
<url type="translate">https://i18n.slimevr.dev</url>
<url type="help">https://docs.slimevr.dev/server-setup/slimevr-setup.html</url>
@@ -57,23 +58,36 @@ work. If not, see <http://creativecommons.org/publicdomain/zero/1.0/>.
<image>https://raw.githubusercontent.com/SlimeVR/SlimeVR-Server/main/assets/img/onboarding.png</image>
</screenshot>
</screenshots>
<provides>
<binary>slimevr</binary>
</provides>
<releases>
<release version="0.11.0" date="2023-12-23"><url>https://github.com/SlimeVR/SlimeVR-Server/releases/tag/v0.11.0</url></release>
<release version="0.11.0~rc.2" type="development" date="2023-12-08"><url>https://github.com/SlimeVR/SlimeVR-Server/releases/tag/v0.11.0-rc.2</url></release>
<release version="0.11.0~rc.1" type="development" date="2023-11-23"><url>https://github.com/SlimeVR/SlimeVR-Server/releases/tag/v0.11.0-rc.1</url></release>
<release version="0.10.1" date="2023-09-30"><url>https://github.com/SlimeVR/SlimeVR-Server/releases/tag/v0.10.1</url></release>
<release version="0.10.1~rc.1" type="development" date="2023-09-29"><url>https://github.com/SlimeVR/SlimeVR-Server/releases/tag/v0.10.1-rc.1</url></release>
<release version="0.10.0" date="2023-09-22"><url>https://github.com/SlimeVR/SlimeVR-Server/releases/tag/v0.10.0</url></release>
<release version="0.10.0~rc.2" type="development" date="2023-09-15"><url>https://github.com/SlimeVR/SlimeVR-Server/releases/tag/v0.10.0-rc.2</url></release>
<release version="0.10.0~rc.1" type="development" date="2023-09-02"><url>https://github.com/SlimeVR/SlimeVR-Server/releases/tag/v0.10.0-rc.1</url></release>
<release version="0.9.1" date="2023-08-30"><url>https://github.com/SlimeVR/SlimeVR-Server/releases/tag/v0.9.1</url></release>
<release version="0.9.1-rc.4" type="development" date="2023-08-28"><url>https://github.com/SlimeVR/SlimeVR-Server/releases/tag/v0.9.1-rc.4</url></release>
<release version="0.9.1-rc.3" type="development" date="2023-08-19"><url>https://github.com/SlimeVR/SlimeVR-Server/releases/tag/v0.9.1-rc.3</url></release>
<release version="0.9.1-rc.2" type="development" date="2023-08-15"><url>https://github.com/SlimeVR/SlimeVR-Server/releases/tag/v0.9.1-rc.2</url></release>
<release version="0.9.1-rc.1" type="development" date="2023-08-13"><url>https://github.com/SlimeVR/SlimeVR-Server/releases/tag/v0.9.1-rc.1</url></release>
<release version="0.9.1~rc.4" type="development" date="2023-08-28"><url>https://github.com/SlimeVR/SlimeVR-Server/releases/tag/v0.9.1-rc.4</url></release>
<release version="0.9.1~rc.3" type="development" date="2023-08-19"><url>https://github.com/SlimeVR/SlimeVR-Server/releases/tag/v0.9.1-rc.3</url></release>
<release version="0.9.1~rc.2" type="development" date="2023-08-15"><url>https://github.com/SlimeVR/SlimeVR-Server/releases/tag/v0.9.1-rc.2</url></release>
<release version="0.9.1~rc.1" type="development" date="2023-08-13"><url>https://github.com/SlimeVR/SlimeVR-Server/releases/tag/v0.9.1-rc.1</url></release>
<release version="0.9.0" date="2023-08-05"><url>https://github.com/SlimeVR/SlimeVR-Server/releases/tag/v0.9.0</url></release>
<release version="0.9.0-rc.2" type="development" date="2023-08-02"><url>https://github.com/SlimeVR/SlimeVR-Server/releases/tag/v0.9.0-rc.2</url></release>
<release version="0.9.0-rc.1" type="development" date="2023-07-31"><url>https://github.com/SlimeVR/SlimeVR-Server/releases/tag/v0.9.0-rc.1</url></release>
<release version="0.9.0~rc.2" type="development" date="2023-08-02"><url>https://github.com/SlimeVR/SlimeVR-Server/releases/tag/v0.9.0-rc.2</url></release>
<release version="0.9.0~rc.1" type="development" date="2023-07-31"><url>https://github.com/SlimeVR/SlimeVR-Server/releases/tag/v0.9.0-rc.1</url></release>
<release version="0.8.3" date="2023-07-09"><url>https://github.com/SlimeVR/SlimeVR-Server/releases/tag/v0.8.3</url></release>
<release version="0.8.2" date="2023-07-09"><url>https://github.com/SlimeVR/SlimeVR-Server/releases/tag/v0.8.2</url></release>
<release version="0.8.2-rc.1" type="development" date="2023-07-07"><url>https://github.com/SlimeVR/SlimeVR-Server/releases/tag/v0.8.2-rc.1</url></release>
<release version="0.8.2~rc.1" type="development" date="2023-07-07"><url>https://github.com/SlimeVR/SlimeVR-Server/releases/tag/v0.8.2-rc.1</url></release>
<release version="0.8.1" date="2023-07-04"><url>https://github.com/SlimeVR/SlimeVR-Server/releases/tag/v0.8.1</url></release>
<release version="0.8.0" date="2023-06-22"><url>https://github.com/SlimeVR/SlimeVR-Server/releases/tag/v0.8.0</url></release>
<release version="0.8.0-rc.3" type="development" date="2023-06-20"><url>https://github.com/SlimeVR/SlimeVR-Server/releases/tag/v0.8.0-rc.3</url></release>
<release version="0.8.0-rc.2" type="development" date="2023-06-15"><url>https://github.com/SlimeVR/SlimeVR-Server/releases/tag/v0.8.0-rc.2</url></release>
<release version="0.8.0-rc.1" type="development" date="2023-06-01"><url>https://github.com/SlimeVR/SlimeVR-Server/releases/tag/v0.8.0-rc.1</url></release>
<release version="0.8.0~rc.3" type="development" date="2023-06-20"><url>https://github.com/SlimeVR/SlimeVR-Server/releases/tag/v0.8.0-rc.3</url></release>
<release version="0.8.0~rc.2" type="development" date="2023-06-15"><url>https://github.com/SlimeVR/SlimeVR-Server/releases/tag/v0.8.0-rc.2</url></release>
<release version="0.8.0~rc.1" type="development" date="2023-06-01"><url>https://github.com/SlimeVR/SlimeVR-Server/releases/tag/v0.8.0-rc.1</url></release>
<release version="0.7.1" date="2023-04-14"><url>https://github.com/SlimeVR/SlimeVR-Server/releases/tag/v0.7.1</url></release>
<release version="0.7.0" date="2023-04-11"><url>https://github.com/SlimeVR/SlimeVR-Server/releases/tag/v0.7.0</url></release>
<release version="0.6.3" date="2023-02-22"><url>https://github.com/SlimeVR/SlimeVR-Server/releases/tag/v0.6.3</url></release>
Generated
+24 -25
View File
@@ -8,11 +8,11 @@
"pre-commit-hooks": "pre-commit-hooks"
},
"locked": {
"lastModified": 1697058441,
"narHash": "sha256-gjtW+nkM9suMsjyid63HPmt6WZQEvuVqA5cOAf4lLM0=",
"lastModified": 1699541523,
"narHash": "sha256-Rv0ryuBC5KtA/3YqwIEe58Tabu71qSGnGcGRd67mMUY=",
"owner": "cachix",
"repo": "devenv",
"rev": "55294461a62d90c8626feca22f52b0d3d0e18e39",
"rev": "14fdefc0bb80c3d6f3a18a491e33429b4064c371",
"type": "github"
},
"original": {
@@ -27,11 +27,11 @@
"rust-analyzer-src": "rust-analyzer-src"
},
"locked": {
"lastModified": 1695709315,
"narHash": "sha256-XKzbb4NqYmUVlORwjCT//RGeQiJa+6LuGYllpaLP5lQ=",
"lastModified": 1699683614,
"narHash": "sha256-XT2tIoIiiv0AxRs9g76nuRhfQf7KU1dE3ho8BL5CYM4=",
"owner": "nix-community",
"repo": "fenix",
"rev": "f5845b16d889d8bf9930fe1098820074da4cbce9",
"rev": "ca6415d87d2e1b5975d59b2a68ae19029de1759c",
"type": "github"
},
"original": {
@@ -61,11 +61,11 @@
"nixpkgs-lib": "nixpkgs-lib"
},
"locked": {
"lastModified": 1696343447,
"narHash": "sha256-B2xAZKLkkeRFG5XcHHSXXcP7To9Xzr59KXeZiRf4vdQ=",
"lastModified": 1698882062,
"narHash": "sha256-HkhafUayIqxXyHH1X8d9RDl1M2CkFgZLjKD3MzabiEo=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "c9afaba3dfa4085dbd2ccb38dfade5141e33d9d4",
"rev": "8c9fa2545007b49a5db5f650ae91f227672c3877",
"type": "github"
},
"original": {
@@ -260,11 +260,11 @@
"nixpkgs-lib": {
"locked": {
"dir": "lib",
"lastModified": 1696019113,
"narHash": "sha256-X3+DKYWJm93DRSdC5M6K5hLqzSya9BjibtBsuARoPco=",
"lastModified": 1698611440,
"narHash": "sha256-jPjHjrerhYDy3q9+s5EAsuhyhuknNfowY6yt6pjn9pc=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "f5892ddac112a1e9b3612c39af1b72987ee5783a",
"rev": "0cbe9f69c234a7700596e943bfae7ef27a31b735",
"type": "github"
},
"original": {
@@ -309,11 +309,11 @@
},
"nixpkgs_2": {
"locked": {
"lastModified": 1695360818,
"narHash": "sha256-JlkN3R/SSoMTa+CasbxS1gq+GpGxXQlNZRUh9+LIy/0=",
"lastModified": 1699099776,
"narHash": "sha256-X09iKJ27mGsGambGfkKzqvw5esP1L/Rf8H3u3fCqIiU=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "e35dcc04a3853da485a396bdd332217d0ac9054f",
"rev": "85f1ba3e51676fa8cc604a3d863d729026a6b8eb",
"type": "github"
},
"original": {
@@ -325,27 +325,26 @@
},
"nixpkgs_3": {
"locked": {
"lastModified": 1695360818,
"narHash": "sha256-JlkN3R/SSoMTa+CasbxS1gq+GpGxXQlNZRUh9+LIy/0=",
"lastModified": 1660551188,
"narHash": "sha256-a1LARMMYQ8DPx1BgoI/UN4bXe12hhZkCNqdxNi6uS0g=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "e35dcc04a3853da485a396bdd332217d0ac9054f",
"rev": "441dc5d512153039f19ef198e662e4f3dbb9fd65",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_4": {
"locked": {
"lastModified": 1697456312,
"narHash": "sha256-roiSnrqb5r+ehnKCauPLugoU8S36KgmWraHgRqVYndo=",
"lastModified": 1699099776,
"narHash": "sha256-X09iKJ27mGsGambGfkKzqvw5esP1L/Rf8H3u3fCqIiU=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "ca012a02bf8327be9e488546faecae5e05d7d749",
"rev": "85f1ba3e51676fa8cc604a3d863d729026a6b8eb",
"type": "github"
},
"original": {
@@ -397,11 +396,11 @@
"rust-analyzer-src": {
"flake": false,
"locked": {
"lastModified": 1695642814,
"narHash": "sha256-xR1+YaPcutqXN7BYYCyHPU8VVh/gjW+bVFTfA+vHpv0=",
"lastModified": 1699629149,
"narHash": "sha256-oDxT2FTYLRnwBRgxgWMApbgvNsbsPV4EeH4TZtp70F0=",
"owner": "rust-lang",
"repo": "rust-analyzer",
"rev": "d3cc3bc00e310ff49268ce0c593eaa6bf4724bbd",
"rev": "11a87c917943dac5a568579f799c2d7458324103",
"type": "github"
},
"original": {
+2
View File
@@ -94,6 +94,8 @@
librsvg
freetype
expat
libayatana-appindicator
libusb1
])
++ lib.optionals pkgs.stdenv.isDarwin [
pkgs.darwin.apple_sdk.frameworks.Security
+4 -3
View File
@@ -13,7 +13,8 @@ android.useAndroidX=true
android.nonTransitiveRClass=true
org.gradle.unsafe.configuration-cache=false
kotlinVersion=1.9.0-RC
spotlessVersion=6.12.0
kotlinVersion=1.9.23
spotlessVersion=6.25.0
shadowJarVersion=8.1.1
buildconfigVersion=3.1.0
buildconfigVersion=5.3.5
grgitVersion=5.2.2
+3 -3
View File
@@ -1,5 +1,5 @@
export default {
"**/*.{ts,tsx}": () => "tsc -p tsconfig.json --noEmit",
"**/*.{js,jsx,ts,tsx}": "eslint --max-warnings=0 --cache --fix",
"**/*.{js,jsx,ts,tsx,css,md,json}": "prettier --write"
'**/*.{ts,tsx}': () => 'tsc -p tsconfig.json --noEmit',
'**/*.{js,jsx,ts,tsx}': 'eslint --max-warnings=0 --cache --fix',
'**/*.{js,jsx,ts,tsx,css,md,json}': 'prettier --write',
};
+4 -1
View File
@@ -15,6 +15,7 @@
"@tauri-apps/plugin-fs": "=2.0.0-alpha.1",
"@tauri-apps/plugin-os": "=2.0.0-alpha.2",
"@tauri-apps/plugin-shell": "=2.0.0-alpha.1",
"@tauri-apps/plugin-store": "=2.0.0-alpha.1",
"@tauri-apps/plugin-window": "=2.0.0-alpha.1",
"@vitejs/plugin-react": "^3.0.0",
"browser-fs-access": "^0.34.1",
@@ -32,6 +33,7 @@
"react": "^18.0.0",
"react-dev-utils": "^12.0.0",
"react-dom": "^18.0.0",
"react-error-boundary": "^4.0.12",
"react-helmet": "^6.1.0",
"react-hook-form": "^7.29.0",
"react-modal": "^3.15.1",
@@ -50,7 +52,7 @@
"skipbundler": "tauri build -b none",
"tauri": "tauri",
"lint": "tsc --noEmit && eslint --max-warnings=0 \"src/**/*.{js,jsx,ts,tsx,json}\" && prettier --check \"src/**/*.{js,jsx,ts,tsx,css,md,json}\"",
"lint:fix": "tsc --noEmit && eslint --fix --max-warnings=0 \"src/**/*.{js,jsx,ts,tsx,json}\" && npm run format",
"lint:fix": "tsc --noEmit && eslint --fix --max-warnings=0 \"src/**/*.{js,jsx,ts,tsx,json}\" && pnpm run format",
"format": "prettier --write \"src/**/*.{js,jsx,ts,tsx,css,md,json}\"",
"preview-vite": "vite preview",
"javaversion-build": "cd src-tauri/src/ && javac JavaVersion.java && jar cvfe JavaVersion.jar JavaVersion JavaVersion.class"
@@ -81,6 +83,7 @@
"@types/react-dom": "^18.0.5",
"@types/react-helmet": "^6.1.6",
"@types/react-modal": "3.13.1",
"@types/semver": "^7.5.4",
"@types/three": "^0.155.0",
"@typescript-eslint/eslint-plugin": "^5.60.1",
"@typescript-eslint/parser": "^5.60.1",
+70
View File
@@ -124,6 +124,7 @@ widget-drift_compensation-clear = Driftkompensation zurücksetzen
## Widget: Clear Reset Mounting
widget-clear_mounting = Befestigungs-Reset zurücksetzen
## Widget: Developer settings
@@ -143,6 +144,11 @@ widget-imu_visualizer-rotation_raw = Rohe Drehung
widget-imu_visualizer-rotation_preview = Vorschau
widget-imu_visualizer-rotation_hide = Ausblenden
## Widget: Skeleton Visualizer
widget-skeleton_visualizer-preview = Skelett Vorschau
widget-skeleton_visualizer-hide = Ausblenden
## Tracker status
tracker-status-none = Kein Status
@@ -151,6 +157,7 @@ tracker-status-error = Fehler
tracker-status-disconnected = Getrennt
tracker-status-occluded = Verdeckt
tracker-status-ok = Verbunden
tracker-status-timed_out = Zeitüberschreitung
## Tracker status columns
@@ -241,6 +248,7 @@ tracker_selection_menu-RIGHT_UPPER_LEG = { -tracker_selection-part } dem rechten
tracker_selection_menu-RIGHT_LOWER_LEG = { -tracker_selection-part } dem rechten Unterschenkel zugewiesen werden?
tracker_selection_menu-RIGHT_FOOT = { -tracker_selection-part } dem rechten Fuß zugewiesen werden?
tracker_selection_menu-RIGHT_CONTROLLER = { -tracker_selection-part } dem rechten Controller zugewiesen werden?
tracker_selection_menu-UPPER_CHEST = { -tracker_selection-part } obere Brust?
tracker_selection_menu-CHEST = { -tracker_selection-part } der Brust zugewiesen werden?
tracker_selection_menu-WAIST = { -tracker_selection-part } der Taille zugewiesen werden?
tracker_selection_menu-HIP = { -tracker_selection-part } der Hüfte zugewiesen werden?
@@ -346,14 +354,36 @@ settings-general-fk_settings-leg_tweak-floor_clip-description = Bodenclip kann d
settings-general-fk_settings-leg_tweak-toe_snap-description = Zehen-Ausrichtung versucht, die Rotation Ihrer Füße zu erraten, wenn keine Fuß-Tracker verwendet werden.
settings-general-fk_settings-leg_tweak-foot_plant-description = Fußkorrektur richtet Ihre Füße parallel zum Boden aus, wenn sie den Boden berühren.
settings-general-fk_settings-leg_fk = Beintracking
settings-general-fk_settings-leg_fk-reset_mounting_feet-description = Aktiviert das Zurücksetzen der Fußausrichtung, indem Sie auf die Zehenspitzen stehen.
settings-general-fk_settings-leg_fk-reset_mounting_feet = Fußausrichtung zurücksetzen
settings-general-fk_settings-arm_fk = Arm-Tracking
settings-general-fk_settings-arm_fk-description = Ändern Sie die Art und Weise, wie die Arme berechnet werden.
settings-general-fk_settings-arm_fk-force_arms = Arme vom VR-Headset erzwingen
settings-general-fk_settings-arm_fk-reset_mode-description = Ändern Sie, welche Armhaltung für den Befestigungs-Reset erwartet wird.
settings-general-fk_settings-arm_fk-back = nach Hinten
settings-general-fk_settings-arm_fk-back-description = Der Standardmodus, bei dem die Oberarme nach hinten und die Unterarme nach vorne gehen.
settings-general-fk_settings-arm_fk-tpose_up = T-Pose (oben)
settings-general-fk_settings-arm_fk-tpose_up-description = Erwartet, dass deine Arme während des vollständigen Zurücksetzens seitlich nach unten gerichtet sind und während des Befestigungs-Reset um 90 Grad nach außen gerichtet sind.
settings-general-fk_settings-arm_fk-tpose_down = T-Pose (unten)
settings-general-fk_settings-arm_fk-tpose_down-description = Erwartet, dass deine Arme während des vollständigen Zurücksetzens um 90 Grad nach außen gerichtet sind und während des Befestigungs-Reset seitlich nach unten.
settings-general-fk_settings-arm_fk-forward = Vorwärts
settings-general-fk_settings-arm_fk-forward-description = Erwartet, dass deine Arme um 90 Grad nach vorne gerichtet sind. Nützlich für VTubing.
settings-general-fk_settings-skeleton_settings-toggles = Skelett-Schalter
settings-general-fk_settings-skeleton_settings-description = Schalten Sie Skeletteinstellungen ein oder aus. Es wird empfohlen, diese eingeschaltet zu lassen.
settings-general-fk_settings-skeleton_settings-extended_spine_model = Erweitertes Wirbelsäulen-Modell
settings-general-fk_settings-skeleton_settings-extended_pelvis_model = Erweitertes Pelvis-Modell
settings-general-fk_settings-skeleton_settings-extended_knees_model = Erweitertes Knie-Modell
settings-general-fk_settings-skeleton_settings-ratios = Skelettverhältnisse
settings-general-fk_settings-skeleton_settings-ratios-description = Ändert die Werte der Skeletteinstellungen. Nachdem Sie diese geändert haben, müssen Sie möglicherweise Ihre Proportionen anpassen.
settings-general-fk_settings-skeleton_settings-impute_waist_from_chest_hip = Taille aus Brust zu Hüfte berechnen
settings-general-fk_settings-skeleton_settings-impute_waist_from_chest_legs = Taille von Brust zu Beine berechnen
settings-general-fk_settings-skeleton_settings-impute_hip_from_chest_legs = Hüfte von Brust zu Beine berechnen
settings-general-fk_settings-skeleton_settings-impute_hip_from_waist_legs = Hüfte von Taille zu Beine berechnen
settings-general-fk_settings-skeleton_settings-interp_hip_legs = Interpolieren der horizontalen und Torsionsrotation der Hüfte mit denen der Beine
settings-general-fk_settings-skeleton_settings-interp_knee_tracker_ankle = Interpolation der horizontalen und Torsionsrotationen der Knietracker mit denen der Fußgelenke
settings-general-fk_settings-skeleton_settings-interp_knee_ankle = Interpolation der horizontalen und Torsionsrotationen der Knie mit denen der Fußgelenke
settings-general-fk_settings-self_localization-title = Motion-Capture-Modus
settings-general-fk_settings-self_localization-description = Der Motion-Capture-Modus ermöglicht es dem Skelett, ungefähr die eigene Position ohne Headset oder Tracker zu verfolgen. Beachten Sie, dass diese Funktion Fuß- und Kopf-Tracker benötigt und noch experimentell ist.
settings-general-fk_settings-vive_emulation-title = Vive-Simulierung
settings-general-fk_settings-vive_emulation-description = Simuliere die Tracking-Probleme, welche bei Vive-Trackern auftreten. Dies ist ein Scherz und verschlechtert das Tracking.
settings-general-fk_settings-vive_emulation-label = Vive-Simulierung
@@ -388,6 +418,7 @@ settings-general-gesture_control-mountingResetDelay = Befestigungs-Reset-Verzög
settings-general-gesture_control-mountingResetTaps = Anzahl für Befestigungs-Reset
# The number of trackers that can have higher acceleration before a tap is rejected
settings-general-gesture_control-numberTrackersOverThreshold = Tracker über Schwellwert
settings-general-gesture_control-numberTrackersOverThreshold-description = Erhöhen Sie diesen Wert wenn Tipp-Erkennung nicht funktioniert. Setzen Sie den Wert nicht höher als benötigt, da dies Fehlauslöser verursachen kann.
## Appearance settings
@@ -406,6 +437,7 @@ settings-interface-appearance-font-placeholder = Standard-Schriftart
settings-interface-appearance-font-os_font = Betriebssystem-Schriftart
settings-interface-appearance-font-slime_font = Standard-Schriftart
settings-interface-appearance-font_size = Standard-Schriftgröße
settings-interface-appearance-font_size-description = Verändert die Schriftgröße der gesamten Oberfläche außer diesem Einstellungs-Panel.
## Notification settings
@@ -417,6 +449,9 @@ settings-general-interface-feedback_sound = Feedback-Geräusch
settings-general-interface-feedback_sound-description = Diese Option wird ein Geräusch abspielen, wenn ein Reset ausgeführt wurde.
settings-general-interface-feedback_sound-label = Feedback-Geräusch
settings-general-interface-feedback_sound-volume = Feedback-Sound-Lautstärke
settings-general-interface-connected_trackers_warning = Warnung zu verbundenen Trackern
settings-general-interface-connected_trackers_warning-description = Diese Option zeigt jedes Mal ein Pop-up-Fenster an, wenn Sie versuchen, SlimeVR zu beenden, während ein oder mehrere Tracker verbunden sind. Es erinnert Sie daran, die Tracker auszuschalten, um die Akkulaufzeit zu verlängern.
settings-general-interface-connected_trackers_warning-label = Warnung vor verbundenen Trackern beim Verlassen
## Serial settings
@@ -568,6 +603,13 @@ onboarding-reset_tutorial-1 =
Sie müssen dafür in einer I-Pose stehen. Es gibt eine Verzögerung von 3 Sekunden (konfigurierbar), bevor der Reset tatsächlich durchgeführt wird.
Dadurch werden die Position und Rotation aller Ihrer Tracker vollständig zurückgesetzt. Dies sollte die meisten Probleme beheben.
# Cares about multiline
onboarding-reset_tutorial-2 =
Tippen Sie { $taps } mal auf den markierten Tracker um einen Befestigungs-Reset auszulösen.
Ein Befestigungs-Reset hilft dabei, die Tracker neu auszurichten, so wie diese tatsächlich an Ihnen angebracht sind. Zum Beispiel, wenn Sie ein Tracker versehentlich verschoben haben und dessen Orientierung sich stark verändert hat.
Sie müssen sich in einer "Skifahren"-Pose, wie im Befestigungs-Assistenten gezeigt wird, befinden. Nach dem Auslösen wird der Reset nach 3 Sekunden (konfigurierbar) durchgeführt.
## Setup start
@@ -633,6 +675,8 @@ onboarding-assignment_tutorial = So bereiten Sie einen SlimeVR-Tracker vor, bevo
onboarding-assignment_tutorial-first_step = 1. Platzieren Sie einen Körperteilaufkleber (falls vorhanden) auf dem Tracker Ihrer Wahl
# This text has a character limit of around 11 characters, so please keep it short
onboarding-assignment_tutorial-sticker = Aufkleber
onboarding-assignment_tutorial-second_step-v2 = 2. Befestigen Sie den Riemen an ihrem Tracker, wobei die Klettseite des Riemens in dieselbe Richtung zeigt wie das SlimeVR Logo Ihres Trackers:
onboarding-assignment_tutorial-second_step-continuation-v2 = Die Klettseite für den Erweiterungstracker sollte nach oben zeigen, wie in der folgenden Abbildung:
onboarding-assignment_tutorial-done = Ich habe Aufkleber und Bänder angebracht!
## Tracker assignment setup
@@ -732,6 +776,13 @@ onboarding-choose_mounting-manual_mounting = Manuelle Befestigungsposition
# Italized text
onboarding-choose_mounting-manual_mounting-label = Empfohlen
onboarding-choose_mounting-manual_mounting-description = Auf diese Weise können Sie die Montagerichtung für jeden Tracker manuell auswählen
# Multiline text
onboarding-choose_mounting-manual_modal-title =
Sind Sie sich sicher, dass Sie
die automatische Tracker-Ausrichtung durchführen möchten?
onboarding-choose_mounting-manual_modal-description = <b>Die manuelle Tracker-Ausrichtung wird für neue Benutzer empfohlen</b>, da die Posen der automatischen Tracker-Ausrichtung anfangs schwer zu treffen sind und möglicherweise etwas Übung erfordern.
onboarding-choose_mounting-manual_modal-confirm = Ich bin mir sicher, was ich tue
onboarding-choose_mounting-manual_modal-cancel = Abbruch
## Tracker manual mounting setup
@@ -769,8 +820,13 @@ onboarding-choose_proportions-auto_proportions = Automatische Proportionen
# Italized text
onboarding-choose_proportions-auto_proportions-subtitle = Empfohlen
onboarding-choose_proportions-manual_proportions = Manuelle Körperproportionen
# Italized text
onboarding-choose_proportions-manual_proportions-subtitle = Für kleine Anpassungen
onboarding-choose_proportions-manual_proportions-description = Auf diese Weise können Sie Ihre Proportionen manuell anpassen, indem Sie diese direkt ändern
onboarding-choose_proportions-export = Proportionen exportieren
onboarding-choose_proportions-import = Proportionen importieren
onboarding-choose_proportions-import-success = Importiert
onboarding-choose_proportions-import-failed = Fehlgeschlagen
onboarding-choose_proportions-file_type = Körperproportions-Datei
## Tracker manual proportions setup
@@ -803,6 +859,14 @@ onboarding-automatic_proportions-start_recording-next = Aufnahme starten
onboarding-automatic_proportions-recording-title = Aufnahme
onboarding-automatic_proportions-recording-description-p0 = Aufnahme läuft...
onboarding-automatic_proportions-recording-description-p1 = Machen Sie die unten beschriebenen Bewegungen:
# Each line of text is a different list item
onboarding-automatic_proportions-recording-steps =
Stehen Sie aufrecht und drehen Sie den Kopf im Kreis.
Beugen Sie den Rücken nach vorne und gehen Sie in die Hocke. Schauen Sie in der Hocke erst nach links, dann nach rechts.
Drehen Sie Ihren Oberkörper nach links (gegen den Uhrzeigersinn), dann strecken Sie sich nach unten zum Boden.
Drehen Sie Ihren Oberkörper nach rechts (im Uhrzeigersinn) und strecken Sie ihn dann nach unten zum Boden.
Rollen Sie Ihre Hüften in einer kreisförmigen Bewegung, als ob Sie einen Hula-Hoop-Reifen benutzen würden.
Wenn die Aufnahme noch nicht zu Ende ist, können Sie diese Schritte wiederholen, bis sie zu Ende ist.
onboarding-automatic_proportions-recording-processing = Aufnahme wird verarbeitet...
# $time (Number) - Seconds left for the automatic calibration recording to finish (max 20)
onboarding-automatic_proportions-recording-timer =
@@ -818,11 +882,17 @@ onboarding-automatic_proportions-verify_results-redo = Aufnahme wiederholen
onboarding-automatic_proportions-verify_results-confirm = Ergebnisse sind korrekt
onboarding-automatic_proportions-done-title = Körper gemessen und gespeichert.
onboarding-automatic_proportions-done-description = Ihre Körperproportionen-Kalibrierung ist abgeschlossen!
onboarding-automatic_proportions-error_modal-confirm = Verstanden!
## Home
home-no_trackers = Keine Tracker erkannt oder zugewiesen
## Trackers Still On notification
trackers_still_on-modal-confirm = SlimeVR beenden
trackers_still_on-modal-cancel = Bitte warten...
## Status system
status_system-StatusTrackerReset = Es wird empfohlen, einen vollständigen Reset durchzuführen, da ein oder mehrere Tracker nicht kalibriert sind.
+51 -12
View File
@@ -144,6 +144,11 @@ widget-imu_visualizer-rotation_raw = waw
widget-imu_visualizer-rotation_preview = pwewiew
widget-imu_visualizer-rotation_hide = hoide
## Widget: Skeleton Visualizer
widget-skeleton_visualizer-preview = Skeweton pweview
widget-skeleton_visualizer-hide = hoide
## Tracker status
tracker-status-none = no stawtus
@@ -152,6 +157,7 @@ tracker-status-error = ewwow
tracker-status-disconnected = disconnyected
tracker-status-occluded = occwuded
tracker-status-ok = oki
tracker-status-timed_out = Timed owt
## Tracker status columns
@@ -348,9 +354,20 @@ settings-general-fk_settings-leg_tweak-floor_clip-description = fwoow-cwip can r
settings-general-fk_settings-leg_tweak-toe_snap-description = toe-snap atempts to gwess da wotation of ur fweet if fweet tracker thingys arewnt in use
settings-general-fk_settings-leg_tweak-foot_plant-description = pawb-pwant wotates youw feet to be pawawwew to the gwound wen in cawntact.
settings-general-fk_settings-leg_fk = leg twacking
settings-general-fk_settings-leg_fk-reset_mounting_feet-description = Enyabwe pawb Meownting Weset by tiptoeing.
settings-general-fk_settings-leg_fk-reset_mounting_feet = Pawb Meownting Weset
settings-general-fk_settings-arm_fk = awm twacking
settings-general-fk_settings-arm_fk-description = chawnge teh way teh awms awe twacked.
settings-general-fk_settings-arm_fk-force_arms = fowce awms fwom hmd
settings-general-fk_settings-arm_fk-reset_mode-description = Change which awm pose is expected fow meownting weset.
settings-general-fk_settings-arm_fk-back = bak
settings-general-fk_settings-arm_fk-back-description = The defauwt mode, wit da uppew awms going back and wowew awms going fowwawd.
settings-general-fk_settings-arm_fk-tpose_up = T-pose (up)
settings-general-fk_settings-arm_fk-tpose_up-description = Expects youw awms to be down on the sides duwing Fuww Weset, and 90 degwees up to the sides duwing Meownting Weset.
settings-general-fk_settings-arm_fk-tpose_down = T-pose (down)
settings-general-fk_settings-arm_fk-tpose_down-description = Expects youw awms to be 90 degwees up to the sides duwing Fuww Weset, and down on the sides duwing Meownting Weset.
settings-general-fk_settings-arm_fk-forward = Fowwawd
settings-general-fk_settings-arm_fk-forward-description = Expects youw awms to be up 90 degwees fowwawd. Usefuw fow VTubing.
settings-general-fk_settings-skeleton_settings-toggles = skeweton toggews
settings-general-fk_settings-skeleton_settings-description = toggwe skeweton sewttings on owow off. is wowcommended to weawve these on~
settings-general-fk_settings-skeleton_settings-extended_spine_model = extwended spine modew
@@ -364,6 +381,7 @@ settings-general-fk_settings-skeleton_settings-impute_hip_from_chest_legs = impu
settings-general-fk_settings-skeleton_settings-impute_hip_from_waist_legs = impute hip fwom waist to wegs
settings-general-fk_settings-skeleton_settings-interp_hip_legs = awewage da hip's yaw and woll wiff da legs'
settings-general-fk_settings-skeleton_settings-interp_knee_tracker_ankle = awewage da knee twackews' yaw and woll wiff da ankews'
settings-general-fk_settings-skeleton_settings-interp_knee_ankle = Avewage the knees' yaw and woww with the ankews'
settings-general-fk_settings-self_localization-title = mocap mowd
settings-general-fk_settings-self_localization-description = mocap mowd awwows da skeweton to wuffly twack is own posishun without a hedset or other twackews. note dat dis wequiwes feet and hed twackews to wowk and is stiwll expewimentaw.
settings-general-fk_settings-vive_emulation-title = vive emuwation
@@ -431,6 +449,9 @@ settings-general-interface-feedback_sound = feeback sownd
settings-general-interface-feedback_sound-description = dis awptshun wiww pway a sownd wen a weset is twiggered (meow~!)
settings-general-interface-feedback_sound-label = feeback sownd
settings-general-interface-feedback_sound-volume = feedback sownd volyume
settings-general-interface-connected_trackers_warning = Connected twackews wawning
settings-general-interface-connected_trackers_warning-description = This option wiww show a pop-up evewy time you twy exiting SwimeVR whiwe having one ow mowe connected twackews. It weminds you to tuwn off youw twackews when you awe done to pwesewve battewy wife.
settings-general-interface-connected_trackers_warning-label = Connected twackews wawning on exit
## Serial settings
@@ -513,7 +534,7 @@ settings-osc-vmc = viwtuaw motion captuwe
# This cares about multilines
settings-osc-vmc-description =
change settings specific to the vmc (viwtuaw motion captuwe) pwotocow
to send swimevr's twacking data and weceive twacking data fwom othew apps.
to send SwimeVR's twacking data and weceive twacking data fwom othew apps.
settings-osc-vmc-enable = enaybwe
settings-osc-vmc-enable-description = toggle teh sending awnd wweceiving of data
settings-osc-vmc-enable-label = enaybwe
@@ -597,7 +618,7 @@ onboarding-reset_tutorial-2 =
## Setup start
onboarding-home = wewcome to swimevr
onboarding-home = wewcome to SwimeVR
onboarding-home-start = wets get set up!
## Enter VR part of setup
@@ -760,6 +781,13 @@ onboarding-choose_mounting-manual_mounting = manyul meownting
# Italized text
onboarding-choose_mounting-manual_mounting-label = wecommended
onboarding-choose_mounting-manual_mounting-description = dis will let u chose da meownting diwecshun manuwawwy fow eech twackew
# Multiline text
onboarding-choose_mounting-manual_modal-title =
Awe you suwe you want to do
the automatic mounting cawibwation?
onboarding-choose_mounting-manual_modal-description = <b>The manuaw mounting cawibwation is wecommended fow new usews</b>, as the automatic mounting cawibwation's poses can be hawd to get wight fiwst and may wequiwe some pwactice.
onboarding-choose_mounting-manual_modal-confirm = I'm suwe of what I'm doing
onboarding-choose_mounting-manual_modal-cancel = cancew :o
## Tracker manual mounting setup
@@ -800,15 +828,18 @@ onboarding-choose_proportions-description =
onboarding-choose_proportions-auto_proportions = awtomatic pwopowtions
# Italized text
onboarding-choose_proportions-auto_proportions-subtitle = wecommended
onboarding-choose_proportions-auto_proportions-descriptionv2 =
dis wiww guess youw pwopowshuns by wecowding a sampwe of youw movement and passing it thru an algowithm.
onboarding-choose_proportions-auto_proportions-descriptionv3 =
This wiww guess youw pwopowtions by wecowding a sampwe of youw movements and passing it thwough an awgowithm.
<b>dis wequiwes having youw hmd connected to SwimeVR!</b>
<b>This wequiwes having youw headset (HMD) connected to SwimeVR and on youw head!</b>
onboarding-choose_proportions-manual_proportions = manuwal pwopowtions
# Italized text
onboarding-choose_proportions-manual_proportions-subtitle = fow smol touchies
onboarding-choose_proportions-manual_proportions-description = dis will let u ajust ur pwopowtions manuwally by modifying dem diwectwy
onboarding-choose_proportions-export = expowt pawpowshuns
onboarding-choose_proportions-import = Impowt pwopowtions
onboarding-choose_proportions-import-success = Impowted
onboarding-choose_proportions-import-failed = Faiwed
onboarding-choose_proportions-file_type = body pawpowshuns file
## Tracker manual proportions setup
@@ -831,13 +862,12 @@ onboarding-automatic_proportions-put_trackers_on-description = to cawybwate yowu
onboarding-automatic_proportions-put_trackers_on-next = i have awl my twackaws on
onboarding-automatic_proportions-requirements-title = wequiyements
# Each line of text is a different list item
onboarding-automatic_proportions-requirements-description =
u have at weast enyough twackews to twack youw pawbs (genyewawwy 5 twackews).
u have youw twackews and headset on.
u awe weawing youw twackews and headset.
ur twackews and headset awe connyected to da SwimeVR sewvew.
ur twackews and headset awe wowking pwopewwy within the SwimeVR sewvew.
ur headset is wepowting positionyaw data to the SwimeVR sewvew (this genyewawwy wenyewawwy means having SteamVR wunnying and connyected to SwimeVR using SwimeVR's SteamVR dwivew).
onboarding-automatic_proportions-requirements-descriptionv2 =
You have at weast enough twackews to twack youw pawbs (genewawwy 5 twackews).
You have youw twackews and headset on and awe weawing them.
Youw twackews and headset awe connected to the SwimeVR sewvew and awe wowking pwopewwy (ex. no stuttewing, disconnecting, etc).
Youw headset is wepowting positionaw data to the SwimeVR sewvew (this genewawwy means having SteamVR wunning and connected to SwimeVR using SwimeVR's SteamVR dwivew).
Youw twacking is wowking and is accuwatewy wepwesenting youw movements (ex. you have pewfowmed a fuww weset and they move the wight diwection when kicking, bending ovew, sitting, etc).
onboarding-automatic_proportions-requirements-next = i have wed da wequiwemens
onboarding-automatic_proportions-check_height-title = check youw height
onboarding-automatic_proportions-check_height-description = we use youw height as a basis of ouw measuwements by using da hmd's height as an appwoximashun of youw actuwaw height, but is better to check if they are right youwsewf!
@@ -889,6 +919,15 @@ onboarding-automatic_proportions-error_modal-confirm = undewstood!
home-no_trackers = no twackaws detecyted owo wowigned
## Trackers Still On notification
trackers_still_on-modal-title = Twackews stiww on
trackers_still_on-modal-description =
One ow mowe twackews awe stiww on.
Do you stiww want to exit SwimeVR?
trackers_still_on-modal-confirm = Exit SwimeVR
trackers_still_on-modal-cancel = Howd on...
## Status system
status_system-StatusTrackerReset = it wecommended to pewfowm a fuwl weset as one or mowe twackews awe unadjussed. -w-
+64 -22
View File
@@ -19,6 +19,8 @@ tips-find_tracker = Not sure which tracker is which? Shake a tracker and it will
tips-do_not_move_heels = Ensure your heels do not move during recording!
tips-file_select = Drag & drop files to use, or <u>browse</u>.
tips-tap_setup = You can slowly tap 2 times your tracker to choose it instead of selecting it from the menu.
tips-turn_on_tracker = Using official SlimeVR trackers? Remember to <b><em>turn on your tracker</em></b> after connecting it to the PC!
tips-failed_webgl = Failed to initialize WebGL.
## Body parts
body_part-NONE = Unassigned
@@ -117,7 +119,7 @@ widget-developer_mode = Developer Mode
widget-developer_mode-high_contrast = High contrast
widget-developer_mode-precise_rotation = Precise rotation
widget-developer_mode-fast_data_feed = Fast data feed
widget-developer_mode-filter_slimes_and_hmd = Filter slimes and HMD
widget-developer_mode-filter_slimes_and_hmd = Filter Slimes and HMD
widget-developer_mode-sort_by_name = Sort by name
widget-developer_mode-raw_slime_rotation = Raw rotation
widget-developer_mode-more_info = More info
@@ -182,7 +184,7 @@ tracker-settings-title = Tracker settings
tracker-settings-assignment_section = Assignment
tracker-settings-assignment_section-description = What part of the body the tracker is assigned to.
tracker-settings-assignment_section-edit = Edit assignment
tracker-settings-mounting_section = Mounting position
tracker-settings-mounting_section = Mounting orientation
tracker-settings-mounting_section-description = Where is the tracker mounted?
tracker-settings-mounting_section-edit = Edit mounting
tracker-settings-drift_compensation_section = Allow drift compensation
@@ -193,6 +195,9 @@ tracker-settings-drift_compensation_section-edit = Allow drift compensation
tracker-settings-name_section = Tracker name
tracker-settings-name_section-description = Give it a cute nickname :)
tracker-settings-name_section-placeholder = NightyBeast's left leg
tracker-settings-forget = Forget tracker
tracker-settings-forget-description = Removes the tracker from the SlimeVR Server and prevent it from connecting to it until the server is restarted. The configuration of the tracker won't be lost.
tracker-settings-forget-label = Forget tracker
## Tracker part card info
tracker-part_card-no_name = No name
@@ -282,6 +287,13 @@ settings-general-steamvr-trackers-feet = Feet
settings-general-steamvr-trackers-knees = Knees
settings-general-steamvr-trackers-elbows = Elbows
settings-general-steamvr-trackers-hands = Hands
settings-general-steamvr-trackers-tracker_toggling = Automatic tracker assignment
settings-general-steamvr-trackers-tracker_toggling-description = Automatically handles toggling SteamVR trackers on or off depending on your current tracker assignments
settings-general-steamvr-trackers-tracker_toggling-label = Automatic tracker assignment
settings-general-steamvr-trackers-hands-warning = <b>Warning:</b> hand trackers will override your controllers.
Are you sure?
settings-general-steamvr-trackers-hands-warning-cancel = Cancel
settings-general-steamvr-trackers-hands-warning-done = Yes
## Tracker mechanics
settings-general-tracker_mechanics = Tracker mechanics
@@ -330,7 +342,7 @@ settings-general-fk_settings-leg_fk = Leg tracking
settings-general-fk_settings-leg_fk-reset_mounting_feet-description = Enable feet Mounting Reset by tiptoeing.
settings-general-fk_settings-leg_fk-reset_mounting_feet = Feet Mounting Reset
settings-general-fk_settings-arm_fk = Arm tracking
settings-general-fk_settings-arm_fk-description = Force arms to be tracked from the HMD even if positional hand data is available.
settings-general-fk_settings-arm_fk-description = Force arms to be tracked from the headset (HMD) even if positional hand data is available.
settings-general-fk_settings-arm_fk-force_arms = Force arms from HMD
settings-general-fk_settings-arm_fk-reset_mode-description = Change which arm pose is expected for mounting reset.
settings-general-fk_settings-arm_fk-back = Back
@@ -422,6 +434,9 @@ settings-general-interface-feedback_sound-volume = Feedback sound volume
settings-general-interface-connected_trackers_warning = Connected trackers warning
settings-general-interface-connected_trackers_warning-description = This option will show a pop-up every time you try exiting SlimeVR while having one or more connected trackers. It reminds you to turn off your trackers when you are done to preserve battery life.
settings-general-interface-connected_trackers_warning-label = Connected trackers warning on exit
settings-general-interface-use_tray = Minimize to system tray
settings-general-interface-use_tray-description = Lets you close the window without closing the SlimeVR Server so you can continue using it without having the GUI bothering you.
settings-general-interface-use_tray-label = Minimize to system tray
## Serial settings
settings-serial = Serial Console
@@ -442,6 +457,7 @@ settings-serial-factory_reset-warning-cancel = Cancel
settings-serial-get_infos = Get Infos
settings-serial-serial_select = Select a serial port
settings-serial-auto_dropdown_item = Auto
settings-serial-get_wifi_scan = Get WiFi Scan
## OSC router settings
settings-osc-router = OSC router
@@ -471,7 +487,7 @@ settings-osc-router-network-address-placeholder = IPV4 address
settings-osc-vrchat = VRChat OSC Trackers
# This cares about multilines
settings-osc-vrchat-description =
Change VRChat-specific settings to receive HMD data and send
Change VRChat-specific settings to receive headset (HMD) data and send
tracker data for FBT without SteamVR (ex. Quest standalone).
settings-osc-vrchat-enable = Enable
settings-osc-vrchat-enable-description = Toggle the sending and receiving of data.
@@ -562,7 +578,7 @@ onboarding-reset_tutorial-skip = Skip step
# Cares about multiline
onboarding-reset_tutorial-0 = Tap { $taps } times the highlighted tracker for triggering yaw reset.
This will make the trackers face the same direction as your HMD.
This will make the trackers face the same direction as your headset (HMD).
# Cares about multiline
onboarding-reset_tutorial-1 = Tap { $taps } times the highlighted tracker for triggering full reset.
@@ -593,8 +609,8 @@ onboarding-done-close = Close setup
## Tracker connection setup
onboarding-connect_tracker-back = Go Back to Wi-Fi credentials
onboarding-connect_tracker-title = Connect trackers
onboarding-connect_tracker-description-p0 = Now onto the fun part, connecting all the trackers!
onboarding-connect_tracker-description-p1 = Simply connect all that aren't connected yet, through a USB port.
onboarding-connect_tracker-description-p0-v1 = Now onto the fun part, connecting trackers!
onboarding-connect_tracker-description-p1-v1 = Connect each tracker one at a time through a USB port.
onboarding-connect_tracker-issue-serial = I'm having trouble connecting!
onboarding-connect_tracker-usb = USB Tracker
onboarding-connect_tracker-connection_status-none = Looking for trackers
@@ -649,6 +665,7 @@ onboarding-assign_trackers-assigned = { $assigned } of { $trackers ->
} assigned
onboarding-assign_trackers-advanced = Show advanced assign locations
onboarding-assign_trackers-next = I assigned all the trackers
onboarding-assign_trackers-mirror_view = Mirror view
## Tracker assignment warnings
# Note for devs, number is used for representing boolean states per bit.
@@ -716,11 +733,11 @@ onboarding-choose_mounting-description = Mounting orientation corrects for the p
onboarding-choose_mounting-auto_mounting = Automatic mounting
# Italized text
onboarding-choose_mounting-auto_mounting-label = Experimental
onboarding-choose_mounting-auto_mounting-description = This will automatically detect the mounting directions for all of your trackers from 2 poses
onboarding-choose_mounting-auto_mounting-description = This will automatically detect the mounting orientations for all of your trackers from 2 poses
onboarding-choose_mounting-manual_mounting = Manual mounting
# Italized text
onboarding-choose_mounting-manual_mounting-label = Recommended
onboarding-choose_mounting-manual_mounting-description = This will let you choose the mounting direction manually for each tracker
onboarding-choose_mounting-manual_mounting-description = This will let you choose the mounting orientation manually for each tracker
# Multiline text
onboarding-choose_mounting-manual_modal-title = Are you sure you want to do
the automatic mounting calibration?
@@ -738,35 +755,36 @@ onboarding-manual_mounting-next = Next step
## Tracker automatic mounting setup
onboarding-automatic_mounting-back = Go Back to Enter VR
onboarding-automatic_mounting-title = Mounting Calibration
onboarding-automatic_mounting-description = For SlimeVR trackers to work, we need to assign a mounting rotation to your trackers to align them with your physical tracker mounting.
onboarding-automatic_mounting-description = For SlimeVR trackers to work, we need to assign a mounting orientation to your trackers to align them with your physical tracker mounting.
onboarding-automatic_mounting-manual_mounting = Manual mounting
onboarding-automatic_mounting-next = Next step
onboarding-automatic_mounting-prev_step = Previous step
onboarding-automatic_mounting-done-title = Mounting rotations calibrated.
onboarding-automatic_mounting-done-title = Mounting orientations calibrated.
onboarding-automatic_mounting-done-description = Your mounting calibration is complete!
onboarding-automatic_mounting-done-restart = Try again
onboarding-automatic_mounting-mounting_reset-title = Mounting Reset
onboarding-automatic_mounting-mounting_reset-step-0 = 1. Squat in a "skiing" pose with your legs bent, your upper body tilted forwards, and your arms bent.
onboarding-automatic_mounting-mounting_reset-step-1 = 2. Press the "Reset Mounting" button and wait for 3 seconds before the trackers' mounting rotations will reset.
onboarding-automatic_mounting-mounting_reset-step-1 = 2. Press the "Reset Mounting" button and wait for 3 seconds before the trackers' mounting orientations will reset.
onboarding-automatic_mounting-preparation-title = Preparation
onboarding-automatic_mounting-preparation-step-0 = 1. Stand upright with your arms to your sides.
onboarding-automatic_mounting-preparation-step-1 = 2. Press the "Full Reset" button and wait for 3 seconds before the trackers will reset.
onboarding-automatic_mounting-put_trackers_on-title = Put on your trackers
onboarding-automatic_mounting-put_trackers_on-description = To calibrate mounting rotations, we're gonna use the trackers you just assigned. Put on all your trackers, you can see which are which in the figure to the right.
onboarding-automatic_mounting-put_trackers_on-description = To calibrate mounting orientations, we're gonna use the trackers you just assigned. Put on all your trackers, you can see which are which in the figure to the right.
onboarding-automatic_mounting-put_trackers_on-next = I have all my trackers on
## Tracker proportions method choose
onboarding-choose_proportions = What proportion calibration method to use?
# Multiline string
onboarding-choose_proportions-description = Body proportions are used to know the measurements of your body. They're required to calculate the trackers' positions.
onboarding-choose_proportions-description-v1 = Body proportions are used to know the measurements of your body. They're required to calculate the trackers' positions.
When proportions of your body don't match the ones saved, your tracking precision will be worse and you will notice things like skating or sliding, or your body not matching your avatar well.
<b>You only need to measure your body once!</b> Unless they are wrong or your body has changed, then you don't need to do them again.
onboarding-choose_proportions-auto_proportions = Automatic proportions
# Italized text
onboarding-choose_proportions-auto_proportions-subtitle = Recommended
onboarding-choose_proportions-auto_proportions-descriptionv2 =
onboarding-choose_proportions-auto_proportions-descriptionv3 =
This will guess your proportions by recording a sample of your movements and passing it through an algorithm.
<b>This requires having your HMD connected to SlimeVR!</b>
<b>This requires having your headset (HMD) connected to SlimeVR and on your head!</b>
onboarding-choose_proportions-manual_proportions = Manual proportions
# Italized text
onboarding-choose_proportions-manual_proportions-subtitle = For small touches
@@ -795,18 +813,19 @@ onboarding-automatic_proportions-put_trackers_on-description = To calibrate your
onboarding-automatic_proportions-put_trackers_on-next = I have all my trackers on
onboarding-automatic_proportions-requirements-title = Requirements
# Each line of text is a different list item
onboarding-automatic_proportions-requirements-description =
onboarding-automatic_proportions-requirements-descriptionv2 =
You have at least enough trackers to track your feet (generally 5 trackers).
You have your trackers and headset on.
You are wearing your trackers and headset.
Your trackers and headset are connected to the SlimeVR server.
Your trackers and headset are working properly within the SlimeVR server.
You have your trackers and headset on and are wearing them.
Your trackers and headset are connected to the SlimeVR server and are working properly (ex. no stuttering, disconnecting, etc).
Your headset is reporting positional data to the SlimeVR server (this generally means having SteamVR running and connected to SlimeVR using SlimeVR's SteamVR driver).
Your tracking is working and is accurately representing your movements (ex. you have performed a full reset and they move the right direction when kicking, bending over, sitting, etc).
onboarding-automatic_proportions-requirements-next = I have read the requirements
onboarding-automatic_proportions-check_height-title = Check your height
onboarding-automatic_proportions-check_height-description = We use your height as a basis of our measurements by using the HMD's height as an approximation of your actual height, but it's better to check if they are right yourself!
onboarding-automatic_proportions-check_height-description = We use your height as a basis of our measurements by using the headset's (HMD) height as an approximation of your actual height, but it's better to check if they are right yourself!
# All the text is in bold!
onboarding-automatic_proportions-check_height-calculation_warning = Please press the button while standing <u>upright</u> to calculate your height. You have 3 seconds after you press the button!
onboarding-automatic_proportions-check_height-guardian_tip = If you are using a standalone VR headset, make sure to have your guardian/
boundary turned on so that your height is correct!
onboarding-automatic_proportions-check_height-fetch_height = I'm standing!
# Context is that the height is unknown
onboarding-automatic_proportions-check_height-unknown = Unknown
@@ -866,3 +885,26 @@ status_system-StatusSteamVRDisconnected = { $type ->
[steamvr_feeder] Currently not connected to the SlimeVR Feeder App.
}
status_system-StatusTrackerError = The { $trackerName } tracker has an error.
## Tray Menu
tray_menu-show = Show
tray_menu-hide = Hide
tray_menu-quit = Quit
## First exit modal
tray_or_exit_modal-title = What should the close button do?
# Multiline text
tray_or_exit_modal-description = This lets you choose whether you want to exit the server or to minimize it to the tray when pressing the close button.
You can change this later in the interface settings!
tray_or_exit_modal-radio-exit = Exit on close
tray_or_exit_modal-radio-tray = Minimize to system tray
tray_or_exit_modal-submit = Save
tray_or_exit_modal-cancel = Cancel
## Unknown device modal
unknown_device-modal-title = A new tracker was found!
unknown_device-modal-description = There is a new tracker with MAC address <b>{$deviceId}</b>.
Do you want to connect it to SlimeVR?
unknown_device-modal-confirm = Sure!
unknown_device-modal-forget = Ignore it
+20 -10
View File
@@ -157,6 +157,7 @@ tracker-status-error = Error
tracker-status-disconnected = Desconectado
tracker-status-occluded = Ocluido
tracker-status-ok = Conectado
tracker-status-timed_out = Conexión interrumpida
## Tracker status columns
@@ -362,7 +363,9 @@ settings-general-fk_settings-arm_fk-reset_mode-description = Cambiar que pose de
settings-general-fk_settings-arm_fk-back = Detrás
settings-general-fk_settings-arm_fk-back-description = El modo predeterminado, con el brazo yendo por detrás y el antebrazo yendo para adelante.
settings-general-fk_settings-arm_fk-tpose_up = T-pose (arriba)
settings-general-fk_settings-arm_fk-tpose_up-description = Espera que tus brazos estén abajo hacia los lados durante un reinicio completo, y 90 grados hacia los lados durante un reinicio de montura.
settings-general-fk_settings-arm_fk-tpose_down = T-pose (abajo)
settings-general-fk_settings-arm_fk-tpose_down-description = Espera que tus brazos estén 90 grados arriba hacia los lados durante un reinicio completo, y abajo hacia los lados durante un reinicio de montura.
settings-general-fk_settings-arm_fk-forward = Delante
settings-general-fk_settings-arm_fk-forward-description = Espera que tus brazos estén 90 grados para delante. Útil para VTubing.
settings-general-fk_settings-skeleton_settings-toggles = Interruptores del esqueleto
@@ -778,6 +781,13 @@ onboarding-choose_mounting-manual_mounting = Montura manual
# Italized text
onboarding-choose_mounting-manual_mounting-label = Recomendado
onboarding-choose_mounting-manual_mounting-description = Esto te permitirá elegir la dirección de montura manualmente para cada tracker.
# Multiline text
onboarding-choose_mounting-manual_modal-title =
¿Está seguro de que quiere
hacer la calibración automática de montura?
onboarding-choose_mounting-manual_modal-description = <b>Está recomendado para nuevos usuarios el uso de la calibración manual de montura</b>, ya que las poses de la calibración automática pueden ser difíciles de hacer correctamente en el primer intento y requieran un poco de práctica.
onboarding-choose_mounting-manual_modal-confirm = Estoy seguro de lo que hago
onboarding-choose_mounting-manual_modal-cancel = Cancelar
## Tracker manual mounting setup
@@ -818,9 +828,10 @@ onboarding-choose_proportions-description =
onboarding-choose_proportions-auto_proportions = Proporciones automáticas
# Italized text
onboarding-choose_proportions-auto_proportions-subtitle = Recomendado
onboarding-choose_proportions-auto_proportions-descriptionv2 =
Esto adivinará tus proporciones grabando una muestra de tus movimientos y pasándola por un algoritmo.
<b>¡Esto requiere tener tu VR conectado a SlimeVR!</b>
onboarding-choose_proportions-auto_proportions-descriptionv3 =
Esto estimará tus proporciones grabando una muestra de tus movimientos y pasándolos a través de un algoritmo.
<b>¡Esto requiere tener tu visor (HMD) conectado a SlimeVR y en tu cabeza!</b>
onboarding-choose_proportions-manual_proportions = Proporciones manuales
# Italized text
onboarding-choose_proportions-manual_proportions-subtitle = Para toques pequeños
@@ -851,13 +862,12 @@ onboarding-automatic_proportions-put_trackers_on-description = Para calibrar tus
onboarding-automatic_proportions-put_trackers_on-next = Tengo puestos todos mis sensores
onboarding-automatic_proportions-requirements-title = Requisitos
# Each line of text is a different list item
onboarding-automatic_proportions-requirements-description =
Tienes al menos suficientes trackers para rastrear tus pies (generalmente 5 trackers).
Tienes tus trackers y VR encendidos.
Tienes tus trackers y VR puestos.
Tus trackers y VR están conectados al servidor de SlimeVR.
Tus trackers y VR están funcionando correctamente con el servidor de SlimeVR.
Tu VR está reportando datos posicionales al servidor de SlimeVR (esto generalmente implica que SteamVR esté corriendo y conectado a SlimeVR usando el driver de SlimeVR para SteamVR).
onboarding-automatic_proportions-requirements-descriptionv2 =
Tienes suficientes sensores para mover tus pies (generalmente 5 sensores).
Tienes tus sensores y visor encendidos y los tienes puestos.
Tus sensores y visor están conectados al servidor de SlimeVR y están funcionando correctamente (ej: no se congela, no se desconecta, etc).
Tu visor esta reportando datos posicionales al servidor de SlimeVR (esto generalmente significa tener SteamVR abierto y conectado a SlimeVR usando el driver de SlimeVR para SteamVR).
Tus sensores están funcionando y están representando tus movimientos con precisión (ej: Realizaste un reinicio completo y se mueven en la dirección correcta cuando pateas, te agachas, te sientas, etc).
onboarding-automatic_proportions-requirements-next = He leído los requisitos
onboarding-automatic_proportions-check_height-title = Compruebe su altura
onboarding-automatic_proportions-check_height-description = Utilizamos tu altura como base de nuestras mediciones utilizando la altura del VR como aproximación a tu altura real, ¡Pero es mejor que compruebes tú mismo si son correctas!
+43 -18
View File
@@ -36,7 +36,7 @@ body_part-RIGHT_HAND = Mano derecha
body_part-RIGHT_UPPER_LEG = Muslo derecho
body_part-RIGHT_LOWER_LEG = Tobillo derecho
body_part-RIGHT_FOOT = Pie derecho
body_part-UPPER_CHEST = Abdomen superior
body_part-UPPER_CHEST = Torso superior
body_part-CHEST = Pecho
body_part-WAIST = Cintura
body_part-HIP = Cadera
@@ -60,26 +60,26 @@ skeleton_bone-CHEST = Longitud del pecho
skeleton_bone-WAIST = Longitud de cintura
skeleton_bone-HIP = Longitud de cadera
skeleton_bone-HIP_OFFSET = Compensacion de cadera
skeleton_bone-HIPS_WIDTH = Ancho de la Cadera
skeleton_bone-leg_group = Largo de las piernas
skeleton_bone-UPPER_LEG = Largo de la zona alta de las piernas
skeleton_bone-LOWER_LEG = Largo de la zona baja de las piernas
skeleton_bone-FOOT_LENGTH = Largo del pie
skeleton_bone-HIPS_WIDTH = Ancho de la cadera
skeleton_bone-leg_group = Longitud de la espinilla
skeleton_bone-UPPER_LEG = Longitud del muslo
skeleton_bone-LOWER_LEG = Longitud de la espinilla
skeleton_bone-FOOT_LENGTH = Longitud del pie
skeleton_bone-FOOT_SHIFT = Desplazamiento del pie
skeleton_bone-SKELETON_OFFSET = Compensacion del esqueleto
skeleton_bone-SHOULDERS_DISTANCE = Distancia de los hombros
skeleton_bone-SHOULDERS_WIDTH = Ancho de los hombros
skeleton_bone-arm_group = Largo del brazo
skeleton_bone-UPPER_ARM = Largo de la zona alta del brazo
skeleton_bone-LOWER_ARM = Largo del antebrazo
skeleton_bone-HAND_Y = Distancia de la mano Y
skeleton_bone-HAND_Z = Distancia de la mano Z
skeleton_bone-SHOULDERS_DISTANCE = Distancia de hombros
skeleton_bone-SHOULDERS_WIDTH = Ancho de hombros
skeleton_bone-arm_group = Longitud del brazo
skeleton_bone-UPPER_ARM = Longitud del brazo
skeleton_bone-LOWER_ARM = Longitud del antebrazo
skeleton_bone-HAND_Y = Distancia Y de la mano
skeleton_bone-HAND_Z = Distancia Z de la mano
skeleton_bone-ELBOW_OFFSET = Compensacion de los codos
## Tracker reset buttons
reset-reset_all = Reiniciar todas las proporciones
reset-full = Reiniciar
reset-full = Reinicio completo
reset-mounting = Reiniciar montura
reset-yaw = Restablecimiento horizontal
@@ -96,7 +96,7 @@ serial_detection-close = Cerrar
## Navigation bar
navbar-home = Inicio
navbar-body_proportions = Proporciones corporales
navbar-body_proportions = Proporciones físicas
navbar-trackers_assign = Asignación de trackers
navbar-mounting = Calibración de montura
navbar-onboarding = Asistente de Configuración
@@ -130,6 +130,7 @@ widget-drift_compensation-clear = Eliminar compensacion del drift
widget-developer_mode = Modo de desarrollador
widget-developer_mode-high_contrast = Contraste alto
widget-developer_mode-precise_rotation = Rotación precisa
widget-developer_mode-fast_data_feed = Flujo de datos rápido
widget-developer_mode-filter_slimes_and_hmd = Filtrar Slimes y HMD
widget-developer_mode-sort_by_name = Ordenar por nombre
widget-developer_mode-raw_slime_rotation = Rotación sin filtrar
@@ -144,6 +145,8 @@ widget-imu_visualizer-rotation_hide = Ocultar
## Widget: Skeleton Visualizer
widget-skeleton_visualizer-preview = Previsualización del esqueleto
widget-skeleton_visualizer-hide = Ocultar
## Tracker status
@@ -178,6 +181,7 @@ tracker-rotation-back = Trasero
tracker-rotation-back_left = Trasero-Izquierdo
tracker-rotation-back_right = Trasero-Derecho
tracker-rotation-custom = Personalizado
tracker-rotation-overriden = (anulado por el reinicio de montura)
## Tracker information
@@ -241,6 +245,8 @@ tracker_selection_menu-RIGHT_HAND = { -tracker_selection-part } mano derecha?
tracker_selection_menu-RIGHT_UPPER_LEG = { -tracker_selection-part } muslo derecho?
tracker_selection_menu-RIGHT_LOWER_LEG = { -tracker_selection-part } tobillo derecho?
tracker_selection_menu-RIGHT_FOOT = { -tracker_selection-part } pie derecho?
tracker_selection_menu-RIGHT_CONTROLLER = { -tracker_selection-part } mando derecho?
tracker_selection_menu-UPPER_CHEST = { -tracker_selection-part } torso superior?
tracker_selection_menu-CHEST = { -tracker_selection-part } pecho?
tracker_selection_menu-WAIST = { -tracker_selection-part } cintura?
tracker_selection_menu-HIP = { -tracker_selection-part } cadera?
@@ -264,7 +270,7 @@ tracker_selection_menu-neck_warning-cancel = Cancelar
## Mounting menu
mounting_selection_menu = ¿Dónde quieres que esté este tracker?
mounting_selection_menu = ¿Dónde quieres colocar el tracker?
mounting_selection_menu-close = Cerrar
## Sidebar settings
@@ -276,6 +282,7 @@ settings-sidebar-fk_settings = Configuración del tracking
settings-sidebar-gesture_control = Control de los gestos
settings-sidebar-interface = Interfaz
settings-sidebar-osc_router = Router OSC
settings-sidebar-osc_trackers = VRChat OSC Trackers
settings-sidebar-utils = Utilidades
settings-sidebar-serial = Consola serial
settings-sidebar-appearance = Apariencia
@@ -318,6 +325,7 @@ settings-general-tracker_mechanics-filtering-amount = Cantidad
settings-general-tracker_mechanics-drift_compensation = Compensación en la desviación
settings-general-tracker_mechanics-drift_compensation-enabled-label = Compensación en la desviación
settings-general-tracker_mechanics-drift_compensation-amount-label = Cantidad de compensación
settings-general-tracker_mechanics-drift_compensation-max_resets-label = Usar los últimos X reinicios.
## FK/Tracking settings
@@ -325,7 +333,7 @@ settings-general-fk_settings = Configuración de FK Tracking
# Floor clip:
# why the name - came from the idea of noclip in video games, but is the opposite where clipping to the floor is a desired feature
# definition - Prevents the foot trackers from going lower than they where when a reset was performed
settings-general-fk_settings-leg_tweak-floor_clip = Floor clip
settings-general-fk_settings-leg_tweak-floor_clip = Anclado al suelo
# Skating correction:
# why the name - without this enabled the feet will often slide across the ground as if your skating across the ground,
# since this largely prevents this it corrects for it hence skating correction (note this may be renamed to sliding correction)
@@ -333,21 +341,25 @@ settings-general-fk_settings-leg_tweak-floor_clip = Floor clip
settings-general-fk_settings-leg_tweak-skating_correction = Corrección del patinaje
settings-general-fk_settings-leg_tweak-foot_plant = Planta del pie
settings-general-fk_settings-leg_tweak-skating_correction-amount = Intensidad de la corrección del patinaje
settings-general-fk_settings-leg_tweak-skating_correction-description = Corrección del patinaje corrige el deslizamiento en el suelo, pero puede disminuir la precisión en ciertos movimientos. Activar esta opción requerirá realizar un reinicio general y recalibrar en el juego.
settings-general-fk_settings-leg_fk = Tracking de piernas
settings-general-fk_settings-arm_fk = Tracking de brazos
settings-general-fk_settings-arm_fk-description = Forzar el seguimiento de los brazos desde el HMD incluso si hay datos de posición de la mano disponibles.
settings-general-fk_settings-arm_fk-force_arms = Forzar brazos desde el HMD
settings-general-fk_settings-arm_fk-back = Parte posterior del brazo
settings-general-fk_settings-arm_fk-back-description = El modo predeterminado, con la parte superior de los brazos hacia atrás y la parte inferior hacia adelante.
settings-general-fk_settings-arm_fk-back-description = Modo predeterminado, con los brazos hacia atrás y los antebrazos hacia adelante.
settings-general-fk_settings-arm_fk-tpose_up = T-pose (arriba)
settings-general-fk_settings-arm_fk-tpose_up-description = Se espera que tus brazos esten relajados, perpendicular a tu cuerpo durante el reinicio completo y 90 grados respecto a tu cuerpo durante el reinicio de montaje.
settings-general-fk_settings-arm_fk-tpose_down = T-pose (abajo)
settings-general-fk_settings-arm_fk-tpose_down-description = Se espera que tus brazos estén a 90 grados respecto a tu cuerpo durante el reinicio completo y relajados, perpendicular a tu cuerpo durante el reinicio del montaje.
settings-general-fk_settings-arm_fk-forward = Siguiente
settings-general-fk_settings-arm_fk-forward-description = Espera que tus brazos estén 90 grados hacia adelante. Útil para VTubing.
settings-general-fk_settings-skeleton_settings-description = Activa o desactiva la configuración del esqueleto. Se recomienda dejar esta opción activada.
settings-general-fk_settings-skeleton_settings-extended_spine_model = Modelo de columna extendida
settings-general-fk_settings-skeleton_settings-extended_pelvis_model = Modelo de pelvis extendida
settings-general-fk_settings-skeleton_settings-extended_knees_model = Modelo de rodilla extendida
settings-general-fk_settings-skeleton_settings-ratios = Proporciones del esqueleto
settings-general-fk_settings-skeleton_settings-ratios-description = Cambia los valores de la configuración del esqueleto. Es posible que debas ajustar tus proporciones de nuevo.
settings-general-fk_settings-skeleton_settings-impute_waist_from_chest_hip = Atribuye la cintura desde el pecho hasta la cadera
settings-general-fk_settings-skeleton_settings-impute_waist_from_chest_legs = Atribuye la cintura desde el pecho hasta las piernas
settings-general-fk_settings-skeleton_settings-impute_hip_from_chest_legs = Atribuye la cadera desde el pecho hasta las piernas
@@ -426,6 +438,7 @@ settings-serial-auto_dropdown_item = Automático
## OSC router settings
settings-osc-router = Router OSC
settings-osc-router-enable = Habilitar
settings-osc-router-enable-description = Activar el reenvío de mensajes
settings-osc-router-enable-label = Habilitar
@@ -439,6 +452,7 @@ settings-osc-vrchat-enable = Habilitar
settings-osc-vrchat-enable-description = Alternar el envío y la recepción de datos
settings-osc-vrchat-enable-label = Habilitar
settings-osc-vrchat-network = Puertos de red
settings-osc-vrchat-network-description = Configura los puertos para escuchar y enviar datos a VRChat.
settings-osc-vrchat-network-address = Dirección de red
settings-osc-vrchat-network-address-placeholder = Dirección IP de VRChat
settings-osc-vrchat-network-trackers = Trackers
@@ -452,12 +466,14 @@ settings-osc-vrchat-network-trackers-elbows = Codos
settings-osc-vmc = Captura de movimiento virtual
settings-osc-vmc-enable = Habilitar
settings-osc-vmc-enable-description = Alterna el envío y recepción de datos.
settings-osc-vmc-enable-label = Habilitar
settings-osc-vmc-network = Puertos de red
settings-osc-vmc-network-address = Dirección de red
settings-osc-vmc-network-address-placeholder = Dirección IPV4
settings-osc-vmc-vrm-model_unloaded = No hay modelo cargado
settings-osc-vmc-anchor_hip = Anclar a la cadera
settings-osc-vmc-anchor_hip-description = Ancla el tracking a la cadera, útil para VTubing sentado. Si se deshabilita, carga un modelo VRM.
settings-osc-vmc-anchor_hip-label = Anclar a la cadera
## Setup/onboarding menu
@@ -604,18 +620,25 @@ onboarding-automatic_mounting-preparation-title = Preparación
## Tracker proportions method choose
# Multiline string
onboarding-choose_proportions-description =
Las proporciones físicas se usan para saber las medidas de tu cuerpo. Son requeridas para calculas la posición de los trackers.
Si las proporciones guardadas no coinciden con las reales, la calidad de tu tracking será peor y notaras fallos como deslizamiento, desplazamiento o tu cuerpo no coincidirá con tu avatar.
onboarding-choose_proportions-auto_proportions = Proporciones automáticas
# Italized text
onboarding-choose_proportions-auto_proportions-subtitle = Recomendado
onboarding-choose_proportions-manual_proportions = Proporciones manuales
onboarding-choose_proportions-export = Exportar proporciones
onboarding-choose_proportions-file_type = Archivo de proporciones físicas
## Tracker manual proportions setup
onboarding-manual_proportions-title = Proporciones físicas manuales
onboarding-manual_proportions-auto = Proporciones automáticas
## Tracker automatic proportions setup
onboarding-automatic_proportions-title = Mide tu cuerpo
onboarding-automatic_proportions-prev_step = Paso anterior
onboarding-automatic_proportions-requirements-title = Requisitos
onboarding-automatic_proportions-requirements-next = He leído los requisitos
@@ -623,6 +646,8 @@ onboarding-automatic_proportions-recording-title = REC
onboarding-automatic_proportions-recording-processing = Procesando los resultados
onboarding-automatic_proportions-verify_results-title = Verificar resultados
onboarding-automatic_proportions-verify_results-processing = Procesando los resultados
onboarding-automatic_proportions-done-title = Proporciones medidas y guardadas.
onboarding-automatic_proportions-done-description = ¡Calibración de las proporciones físicas completada!
## Home
+34
View File
@@ -144,6 +144,11 @@ widget-imu_visualizer-rotation_raw = Käsittelemätön
widget-imu_visualizer-rotation_preview = Esikatselu
widget-imu_visualizer-rotation_hide = Piilota
## Widget: Skeleton Visualizer
widget-skeleton_visualizer-preview = Luurangon esikatselu
widget-skeleton_visualizer-hide = Piilota
## Tracker status
tracker-status-none = Ei tilaa
@@ -152,6 +157,7 @@ tracker-status-error = Virhe
tracker-status-disconnected = Katkaistu
tracker-status-occluded = Peittynyt
tracker-status-ok = OK
tracker-status-timed_out = Aikakatkaistiin
## Tracker status columns
@@ -348,9 +354,14 @@ settings-general-fk_settings-leg_tweak-floor_clip-description = Floor clip voi v
settings-general-fk_settings-leg_tweak-toe_snap-description = Toe snap yrittää arvata varpaiden asennon jos jalkaterän jäljitintä ei ole käytössä.
settings-general-fk_settings-leg_tweak-foot_plant-description = Foot plant asettaa jalkateräsi yhdensuuntaisesti maan kanssa kosketuksessa.
settings-general-fk_settings-leg_fk = Jalkojen jäljitys
settings-general-fk_settings-leg_fk-reset_mounting_feet = Jalkojen asennuksen nollaus
settings-general-fk_settings-arm_fk = Käsivarsien jäljitys
settings-general-fk_settings-arm_fk-description = Muuta tapaa, jolla käsivarsia jäljitetään.
settings-general-fk_settings-arm_fk-force_arms = Pakota kädet HMD:ltä
settings-general-fk_settings-arm_fk-back = Takaisin
settings-general-fk_settings-arm_fk-tpose_up = T-asento (ylös)
settings-general-fk_settings-arm_fk-tpose_down = T-asento (alas)
settings-general-fk_settings-arm_fk-forward = Eteenpäin
settings-general-fk_settings-skeleton_settings-toggles = Luurankoasetuksia
settings-general-fk_settings-skeleton_settings-description = Ota tai poista käytöstä luurankoasetukset. On suositeltavaa jättää nämä päälle.
settings-general-fk_settings-skeleton_settings-extended_spine_model = Laajennettu selkärankamalli
@@ -659,6 +670,7 @@ onboarding-assignment_tutorial = Kuinka valmistellaan Slime-jäljitin ennen käy
onboarding-assignment_tutorial-first_step = 1. Aseta kehonosatarra (jos sinulla on) jäljittimeen valintasi mukaan
# This text has a character limit of around 11 characters, so please keep it short
onboarding-assignment_tutorial-sticker = Tarra
onboarding-assignment_tutorial-second_step-v2 = 2. Kiinnitä hihna jäljittimeen pitäen hihnan tarranauhaa samaan suuntaan kuin jäljittimen etupuoli:
onboarding-assignment_tutorial-second_step-continuation-v2 = Jatkeen tarranauhapuolen tulee olla ylöspäin seuraavan kuvan mukaisesti:
onboarding-assignment_tutorial-done = Laitoin tarrat ja hihnat!
@@ -759,6 +771,8 @@ onboarding-choose_mounting-manual_mounting = Manuaalinen asennus
# Italized text
onboarding-choose_mounting-manual_mounting-label = Suositeltu
onboarding-choose_mounting-manual_mounting-description = Näin voit valita asennussuunnan manuaalisesti kullekin jäljittimelle
onboarding-choose_mounting-manual_modal-confirm = Tiedän mitä teen
onboarding-choose_mounting-manual_modal-cancel = Peruuta
## Tracker manual mounting setup
@@ -794,6 +808,8 @@ onboarding-automatic_mounting-put_trackers_on-next = Minulla on kaikki jäljitti
onboarding-choose_proportions = Mitä kalibrointimenetelmää käytetään?
onboarding-choose_proportions-auto_proportions = Automaattiset mittasuhteet
onboarding-choose_proportions-manual_proportions = Manuaaliset mittasuhteet
onboarding-choose_proportions-import-failed = Epäonnistui
onboarding-choose_proportions-file_type = Kehon mittasuhteet -tiedosto
## Tracker manual proportions setup
@@ -812,6 +828,9 @@ onboarding-automatic_proportions-put_trackers_on-next = Minulla on kaikki jälji
onboarding-automatic_proportions-requirements-title = Vaatimukset
onboarding-automatic_proportions-requirements-next = Olen lukenut vaatimukset
onboarding-automatic_proportions-check_height-title = Tarkista pituutesi
onboarding-automatic_proportions-check_height-description = Käytämme pituuttasi mittaustemme perustana käyttämällä HMD:n pituutta likiarvona todellisesta pituudestasi, mutta on parempi tarkistaa itse, ovatko ne oikein!
# All the text is in bold!
onboarding-automatic_proportions-check_height-calculation_warning = Paina painiketta <u>pystyasennossa</u> laskeaksesi pituutesi. Sinulla on 3 sekuntia painikkeen painamisen jälkeen!
onboarding-automatic_proportions-check_height-fetch_height = Seison
# Context is that the height is unknown
onboarding-automatic_proportions-check_height-unknown = Tuntematon
@@ -821,7 +840,9 @@ onboarding-automatic_proportions-check_height-hmd_height1 = HMD-korkeus on
onboarding-automatic_proportions-check_height-height1 = Joten todellinen pituutesi on
onboarding-automatic_proportions-check_height-next_step = Ne ovat hyvät
onboarding-automatic_proportions-start_recording-title = Valmistaudu liikkumaan
onboarding-automatic_proportions-start_recording-description = Aiomme nyt tallentaa joitain tiettyä asentoja ja liikkeitä. Näitä kysytään seuraavassa näytössä. Ole valmis aloittamaan, kun painat nappia!
onboarding-automatic_proportions-start_recording-next = Aloita tallennus
onboarding-automatic_proportions-recording-title = REC
onboarding-automatic_proportions-recording-description-p0 = Tallennus käynnissä...
onboarding-automatic_proportions-recording-description-p1 = Tee alla esitetyt liikkeet:
onboarding-automatic_proportions-recording-processing = Käsitellään tuloksia
@@ -835,15 +856,28 @@ onboarding-automatic_proportions-verify_results-title = Vahvista tulokset
onboarding-automatic_proportions-verify_results-description = Tarkista alla olevat tulokset, näyttävätkö ne oikeilta?
onboarding-automatic_proportions-verify_results-results = Tallennuksen tulokset
onboarding-automatic_proportions-verify_results-processing = Käsitellään tuloksia
onboarding-automatic_proportions-verify_results-redo = Tee tallennus uudelleen
onboarding-automatic_proportions-verify_results-confirm = Nämä ovat oikein
onboarding-automatic_proportions-done-title = Keho mitattu ja tallennettu.
onboarding-automatic_proportions-done-description = Kehosi mittasuhteiden kalibrointi on valmis!
onboarding-automatic_proportions-error_modal =
<b>Varoitus:</b> Mittasuhteita arvioitaessa havaittiin virhe!
<docs>Tarkista dokumentit</docs> tai liity <discord>Discordiin</discord> saadaksesi apua ^_^
onboarding-automatic_proportions-error_modal-confirm = Ymmäretty!
## Home
home-no_trackers = Jäjittimiä ei havaittu tai määritetty
## Trackers Still On notification
trackers_still_on-modal-title = Jäljittimet ovat vielä päällä
trackers_still_on-modal-description =
Yksi tai useampi jäljitin on edelleen päällä.
Haluatko silti poistua SlimeVR:stä?
trackers_still_on-modal-confirm = Poistu SlimeVR:stä
trackers_still_on-modal-cancel = Odota...
## Status system
status_system-StatusTrackerReset = On suositeltavaa suorittaa täydellinen nollaus, koska yhtä tai useampaa jäljitintä ei ole säädetty.
+15 -8
View File
@@ -157,6 +157,7 @@ tracker-status-error = Erreur
tracker-status-disconnected = Déconnecté
tracker-status-occluded = Obstrué
tracker-status-ok = OK
tracker-status-timed_out = Délai expiré
## Tracker status columns
@@ -780,6 +781,13 @@ onboarding-choose_mounting-manual_mounting = Alignement manuel
# Italized text
onboarding-choose_mounting-manual_mounting-label = Recommendée
onboarding-choose_mounting-manual_mounting-description = Ceci vous permettra de choisir la direction de chaque capteur manuellement
# Multiline text
onboarding-choose_mounting-manual_modal-title =
Êtes-vous sûr de vouloir faire
la calibration automatique de l'alignement ?
onboarding-choose_mounting-manual_modal-description = <b>La calibration manuel de l'alignement est recommandé pour les nouveaux utilisateurs</b>, car les poses de calibration automatique de l'alignement peuvent être difficiles à reproduire au départ et peuvent nécessiter un peu de pratique.
onboarding-choose_mounting-manual_modal-confirm = Je suis sûr de ce que je fais
onboarding-choose_mounting-manual_modal-cancel = Annuler
## Tracker manual mounting setup
@@ -820,10 +828,10 @@ onboarding-choose_proportions-description =
onboarding-choose_proportions-auto_proportions = Proportions automatiques
# Italized text
onboarding-choose_proportions-auto_proportions-subtitle = Recommendée
onboarding-choose_proportions-auto_proportions-descriptionv2 =
onboarding-choose_proportions-auto_proportions-descriptionv3 =
Cela permettra d'estimer vos proportions en enregistrant un échantillon de vos mouvements et en le faisant passer par un algorithme.
<b>Cela nécessite d’avoir votre casque VR connecté à SlimeVR !</b>
<b>Cela nécessite d’avoir votre casque VR connecté à SlimeVR et sur votre tête !</b>
onboarding-choose_proportions-manual_proportions = Proportions manuelles
# Italized text
onboarding-choose_proportions-manual_proportions-subtitle = Pour les retouches
@@ -854,13 +862,12 @@ onboarding-automatic_proportions-put_trackers_on-description = Pour calibrer vos
onboarding-automatic_proportions-put_trackers_on-next = J'ai tous mes capteurs
onboarding-automatic_proportions-requirements-title = Exigences
# Each line of text is a different list item
onboarding-automatic_proportions-requirements-description =
onboarding-automatic_proportions-requirements-descriptionv2 =
Vous avez au moins assez de capteurs pour capturer vos pieds (généralement 5 capteurs).
Vos capteurs et votre casque VR sont allumés.
Vous portez vos capteurs et votre casque VR.
Vos capteurs et votre casque VR sont connectés au serveur SlimeVR.
Vos capteurs et votre casque VR fonctionnent correctement au sein du serveur SlimeVR.
Votre casque envoie sa position au serveur SlimeVR (cela signifie généralement que SteamVR est ouvert et connecté à SlimeVR en utilisant le driver SteamVR de SlimeVR).
Vos capteurs et votre casque VR sont allumés et sur vous.
Vos capteurs et votre casque VR sont connectés au serveur SlimeVR et fonctionnent correctement (ex. pas de lag, déconnexions, etc).
Votre casque envoie sa position au serveur SlimeVR (cela signifie généralement que SteamVR est ouvert et connecté à SlimeVR en utilisant le pilote SteamVR de SlimeVR).
La capture des mouvements fonctionne et représente correctement vos mouvements (ex. vous avez effectué une réinitialisation complète des capteurs et ils bougent dans le bon sens lorsque vous donnez des coups de pieds, vous penchez, vous assoyez, etc).
onboarding-automatic_proportions-requirements-next = J'ai lu les exigences
onboarding-automatic_proportions-check_height-title = Vérifiez votre taille
onboarding-automatic_proportions-check_height-description = Nous utilisons votre taille comme la base de nos mesures en utilisant la hauteur de votre casque comme approximation de votre taille réelle, mais il est préférable de vérifier si elles sont correctes vous-même !
+34 -8
View File
@@ -110,13 +110,13 @@ bvh-recording = Registrazione in corso...
## Tracking pause
tracking-unpaused = Pausa il tracking
tracking-paused = Riprendio il tracking
tracking-paused = Riprendi il tracking
## Widget: Overlay settings
widget-overlay = Overlay
widget-overlay-is_visible_label = Mostra Overlay in SteamVR
widget-overlay-is_mirrored_label = Includi uno specchio nel Overlay
widget-overlay-is_mirrored_label = Mostra Overlay come specchio
## Widget: Drift compensation
@@ -144,6 +144,11 @@ widget-imu_visualizer-rotation_raw = Non processato
widget-imu_visualizer-rotation_preview = Anteprima
widget-imu_visualizer-rotation_hide = Nascondi
## Widget: Skeleton Visualizer
widget-skeleton_visualizer-preview = Anteprima dello scheletro
widget-skeleton_visualizer-hide = Nascondi
## Tracker status
tracker-status-none = Nessuno stato
@@ -152,6 +157,7 @@ tracker-status-error = Errore
tracker-status-disconnected = Disconnesso
tracker-status-occluded = Ostruito
tracker-status-ok = OK
tracker-status-timed_out = Tempo esaurito
## Tracker status columns
@@ -442,6 +448,9 @@ settings-general-interface-feedback_sound = Suono di feedback
settings-general-interface-feedback_sound-description = Questa opzione riprodurrà un suono quando viene effettuato un reset
settings-general-interface-feedback_sound-label = Suono di feedback
settings-general-interface-feedback_sound-volume = Volume del suono di feedback
settings-general-interface-connected_trackers_warning = Avviso di tracker connessi
settings-general-interface-connected_trackers_warning-description = Questa opzione mostrerà un pop-up ogni volta che proverai ad uscire da SmileVR mentre uno o più tracker sono connessi. Ció ti permetterà di ricordarti di spegnere i tuoi tracker per preservarne la durata delle batterie.
settings-general-interface-connected_trackers_warning-label = Avviso di tracker connessi alla chiusura dell'applicazione
## Serial settings
@@ -771,6 +780,13 @@ onboarding-choose_mounting-manual_mounting = Posizionamento manuale
# Italized text
onboarding-choose_mounting-manual_mounting-label = Raccomandato
onboarding-choose_mounting-manual_mounting-description = Questo processo ti lascerá scegliere manualmente le direzioni per la posizione di montaggio di tutti i tracker
# Multiline text
onboarding-choose_mounting-manual_modal-title =
Sei sicuro di voler fare
la calibrazione automatica di posizionamento?
onboarding-choose_mounting-manual_modal-description = <b>La calibrazione manuale è raccomandata per i nuovi utenti</b>, considerando che le pose necessarie per la calibrazione automatica di posizionamento possono risultare complicate al primo tentativo e potrebbero richiedere un po' di pratica.
onboarding-choose_mounting-manual_modal-confirm = Sono sicurə di ciò che sto facendo.
onboarding-choose_mounting-manual_modal-cancel = Annulla
## Tracker manual mounting setup
@@ -811,10 +827,10 @@ onboarding-choose_proportions-description =
onboarding-choose_proportions-auto_proportions = Proporzioni automatiche
# Italized text
onboarding-choose_proportions-auto_proportions-subtitle = Raccomandato
onboarding-choose_proportions-auto_proportions-descriptionv2 =
onboarding-choose_proportions-auto_proportions-descriptionv3 =
Questo indovinerà le tue proporzioni registrando un campione dei tuoi movimenti e passandolo attraverso un algoritmo.
<b>Ciò richiede che il tuo HMD sia collegato a SlimeVR!</b>
<b>Ciò richiede che il tuo visore (HMD) sia collegato a SlimeVR e indossato correttaments sulla tua testa</b>
onboarding-choose_proportions-manual_proportions = Proporzioni manuali
# Italized text
onboarding-choose_proportions-manual_proportions-subtitle = Per piccole modifiche
@@ -845,12 +861,13 @@ onboarding-automatic_proportions-put_trackers_on-description = Per calibrare le
onboarding-automatic_proportions-put_trackers_on-next = Sto indossando tutti i miei tracker
onboarding-automatic_proportions-requirements-title = Requisiti
# Each line of text is a different list item
onboarding-automatic_proportions-requirements-description =
onboarding-automatic_proportions-requirements-descriptionv2 =
Hai almeno abbastanza tracker per tracciare i tuoi piedi (generalmente 5 tracker).
Hai indossato i tuoi tracker e il visore.
I tuoi tracker e il visore sono connessi al server di SlimeVR.
I tuoi tracker e il visore stanno funzionando correttamente con il server di SlimeVR.
Hai i tuoi tracker e il visore accessi e li stai indossando.
I tuoi tracker e il visore sono connessi al server di SlimeVR e stanno funzionando correttamente (e.g. non si bloccano, disconnettono, etc.)
Il tuo visore sta riportando dati di posizione al server di SlimeVR (ciò significa generalmente avere SteamVR in esecuzione e connesso a SlimeVR usando il driver di SlimeVR per SteamVR).
Il tuo visore sta riportando dati di posizione al server di SlimeVR (ciò significa generalmente avere SteamVR in esecuzione e connesso a SlimeVR usando il driver di SlimeVR per SteamVR).
Il tuo tracciamento funziona e rappresenta accuratamente i tuoi movimenti (e.g. hai eseguito un reset completo e i traker si muovono nella giusta direzione quando calci, ti pieghi, ti siedi, ecc.).
onboarding-automatic_proportions-requirements-next = Ho letto i requisiti.
onboarding-automatic_proportions-check_height-title = Controlla la tua altezza
onboarding-automatic_proportions-check_height-description = Usiamo la tua altezza come base delle nostre misurazioni utilizzando l'altezza dell'HMD come approssimazione della tua altezza effettiva, ma è meglio controllare se il valore è giusto!
@@ -902,6 +919,15 @@ onboarding-automatic_proportions-error_modal-confirm = Ho capito!
home-no_trackers = Nessun tracker rilevato o assegnato
## Trackers Still On notification
trackers_still_on-modal-title = I tracker sono ancora accesi
trackers_still_on-modal-description =
Uno o più tracker ancora accesi.
Vuoi uscire comunque da SmileVR?
trackers_still_on-modal-confirm = Chiudi SlimeVR
trackers_still_on-modal-cancel = Attendi un momento...
## Status system
status_system-StatusTrackerReset = É consigliato eseguire un reset completo poiché uno o più tracker non sono regolati.
+94 -16
View File
@@ -144,6 +144,11 @@ widget-imu_visualizer-rotation_raw = Raw
widget-imu_visualizer-rotation_preview = 미리보기
widget-imu_visualizer-rotation_hide = 숨기기
## Widget: Skeleton Visualizer
widget-skeleton_visualizer-preview = 골격 비율 미리보기
widget-skeleton_visualizer-hide = 숨기기
## Tracker status
tracker-status-none = 알 수 없음
@@ -152,6 +157,7 @@ tracker-status-error = 오류
tracker-status-disconnected = 연결되지 않음
tracker-status-occluded = 사용할 수 없음
tracker-status-ok = 연결됨
tracker-status-timed_out = 시간 초과
## Tracker status columns
@@ -330,7 +336,7 @@ settings-general-tracker_mechanics-drift_compensation-max_resets-label = 보정
## FK/Tracking settings
settings-general-fk_settings = FK 설정
settings-general-fk_settings = 트래킹 설정
# Floor clip:
# why the name - came from the idea of noclip in video games, but is the opposite where clipping to the floor is a desired feature
# definition - Prevents the foot trackers from going lower than they where when a reset was performed
@@ -348,12 +354,34 @@ settings-general-fk_settings-leg_tweak-floor_clip-description = 플로어 클립
settings-general-fk_settings-leg_tweak-toe_snap-description = 토 스냅은 발 트래커가 없을 때, 발 트래커가 있는 것처럼 예측해서 움직여주는 기능이에요.
settings-general-fk_settings-leg_tweak-foot_plant-description = 풋 플랜트는 발이 바닥에 닿았을 때 바닥과 평평하게 회전시켜 줘요.
settings-general-fk_settings-leg_fk = 발 트래킹
settings-general-fk_settings-arm_fk = 팔 운동학
settings-general-fk_settings-arm_fk-description = 팔이 추적되는 방식을 변경할 수 있어요.
settings-general-fk_settings-leg_fk-reset_mounting_feet-description = 까치발을 들어 발 트래커의 착용 방향 정렬을 활성화하기
settings-general-fk_settings-leg_fk-reset_mounting_feet = 발 트래커 착용 방향 정렬
settings-general-fk_settings-arm_fk = 팔 트래킹
settings-general-fk_settings-arm_fk-description = 손 컨트롤러 위치 데이터를 사용할 수 없는 경우에도 VR 헤드셋(HMD)으로부터 팔을 추적하도록 할 수 있어요.
settings-general-fk_settings-arm_fk-force_arms = 팔을 HMD에서만 받아오기
settings-general-fk_settings-arm_fk-reset_mode-description = 착용 방향 정렬에 사용되는 팔 자세 설정
settings-general-fk_settings-arm_fk-back = 뒤쪽
settings-general-fk_settings-arm_fk-back-description = 기본값. 위쪽 팔은 뒤를 향하고 아래쪽 팔은 앞을 향하게 하는 자세.
settings-general-fk_settings-arm_fk-tpose_up = T-포즈(올리기)
settings-general-fk_settings-arm_fk-tpose_up-description = 전체 정렬을 수행할 때에는 팔을 차렷 자세로 내리고, 착용 방향 정렬 중에는 팔을 좌우로 나란히 동작으로 펼치는 자세.
settings-general-fk_settings-arm_fk-tpose_down = T-포즈(내리기)
settings-general-fk_settings-arm_fk-tpose_down-description = 전체 정렬에서는 좌우로 나란히 자세, 착용 방향 정렬에서는 팔을 차렷 동작으로 내리는 자세
settings-general-fk_settings-arm_fk-forward = 앞쪽
settings-general-fk_settings-arm_fk-forward-description = 앞으로 나란히 자세. 앉아있거나 버튜버 활동 등에서 유용해요.
settings-general-fk_settings-skeleton_settings-toggles = 골격 설정 제어
settings-general-fk_settings-skeleton_settings-description = 골격 설정을 설정하거나 해제해요. 이것들은 켜두는 게 좋아요.
settings-general-fk_settings-skeleton_settings-extended_spine_model = 확장된 척추 모델
settings-general-fk_settings-skeleton_settings-extended_pelvis_model = 확장된 골반 모델
settings-general-fk_settings-skeleton_settings-extended_knees_model = 확장된 무릎 모델
settings-general-fk_settings-skeleton_settings-ratios = 골격 비율
settings-general-fk_settings-skeleton_settings-ratios-description = 골격 비율을 변경하면 신체 비율 설정을 다시 조절해야 할 수 있어요.
settings-general-fk_settings-skeleton_settings-impute_waist_from_chest_hip = 가슴, 골반으로부터 추측한 허리 데이터
settings-general-fk_settings-skeleton_settings-impute_waist_from_chest_legs = 가슴, 다리로부터 추측한 허리 데이터
settings-general-fk_settings-skeleton_settings-impute_hip_from_chest_legs = 다리로부터 추측한 골반 데이터
settings-general-fk_settings-skeleton_settings-impute_hip_from_waist_legs = 허리, 다리로부터 추측한 골반 데이터
settings-general-fk_settings-skeleton_settings-interp_hip_legs = 골반 각도를 계산할 때 다리 각도를 합산
settings-general-fk_settings-skeleton_settings-interp_knee_tracker_ankle = 무릎 트래커 각도를 계산할 때 발목 각도를 합산
settings-general-fk_settings-skeleton_settings-interp_knee_ankle = 무릎 각도를 계산할 때 발목 각도를 합산
settings-general-fk_settings-self_localization-title = Mocap 모드
settings-general-fk_settings-self_localization-description = Mocap 모드에서는 헤드셋이나 다른 트래커 없이 골격이 자신의 위치를 대략적으로 추적할 수 있어요. 발과 머리 트래커가 필요하고 아직 실험적이에요.
settings-general-fk_settings-vive_emulation-title = VIVE 에뮬레이션
@@ -416,6 +444,9 @@ settings-general-interface-feedback_sound = 피드백 사운드
settings-general-interface-feedback_sound-description = 이 옵션을 켜면 트래커를 정렬할 때 효과음을 재생해요
settings-general-interface-feedback_sound-label = 피드백 사운드
settings-general-interface-feedback_sound-volume = 피드백 사운드 음량
settings-general-interface-connected_trackers_warning = 작동 중인 트래커 경고
settings-general-interface-connected_trackers_warning-description = 이 옵션은 트래커가 연결되어 있는 채로 SlimeVR을 종료하려고 할 때 팝업을 표시합니다. 그렇게 하면 실수로 트래커를 끄지 않아 배터리가 방전되는 일을 예방할 수 있어요.
settings-general-interface-connected_trackers_warning-label = 종료 시 작동 중인 트래커 경고 활성화
## Serial settings
@@ -634,7 +665,11 @@ onboarding-calibration_tutorial-subtitle = 트래커 틀어짐을 줄이는 데
onboarding-calibration_tutorial-description =
매번 트래커의 전원을 켤 때마다 평평한 바닥에 트래커를 두고 잠시 기다려서 보정을 수행해야 해요. <b>(트래커를 움직이지 마세요!)</b>
어떻게 하면 되는지 "{ onboarding-calibration_tutorial-calibrate }"를 눌러 같이 따라해보죠!
onboarding-calibration_tutorial-calibrate = 트래커들을 책상에 올려놓았습니다
onboarding-calibration_tutorial-status-waiting = 대기 중
onboarding-calibration_tutorial-status-calibrating = 캘리브레이팅
onboarding-calibration_tutorial-status-success = 좋아요!
onboarding-calibration_tutorial-status-error = 트래커가 움직였습니다
## Tracker assignment tutorial
@@ -642,6 +677,8 @@ onboarding-assignment_tutorial = 슬라임 트래커를 착용하기 전에 준
onboarding-assignment_tutorial-first_step = 1. 신체 부위가 적힌 스티커를 가지고 있다면 트래커에 붙여보세요
# This text has a character limit of around 11 characters, so please keep it short
onboarding-assignment_tutorial-sticker = 스티커
onboarding-assignment_tutorial-second_step-v2 = 스트랩의 벨크로 접착면이 Slime 얼굴 그림 쪽을 향하게 끼워주세요:
onboarding-assignment_tutorial-second_step-continuation-v2 = 확장 모듈의 벨크로 접착면이 다음 이미지처럼 위를 바라봐야 합니다:
onboarding-assignment_tutorial-done = 스트랩과 스티커를 트래커에 잘 부착했어요!
## Tracker assignment setup
@@ -730,9 +767,18 @@ onboarding-choose_mounting = 착용 방향을 정렬하기 위해 어떤 방법
# Multiline text
onboarding-choose_mounting-description = 착용 방향 정렬은 트래커가 몸에 착용된 방향을 찾아 수정하도록 도와줘요.
onboarding-choose_mounting-auto_mounting = 자동으로 방향 설정
# Italized text
onboarding-choose_mounting-auto_mounting-label = 실험적
onboarding-choose_mounting-auto_mounting-description = 이렇게 하면 두 가지 자세로 모든 트래커의 착용 방향을 자동으로 설정할 수 있어요
onboarding-choose_mounting-manual_mounting = 수동으로 방향 설정
# Italized text
onboarding-choose_mounting-manual_mounting-label = 권장됨
onboarding-choose_mounting-manual_mounting-description = 이렇게 하면 각 트래커의 착용 방향을 직접 고를 수 있어요
# Multiline text
onboarding-choose_mounting-manual_modal-title = 자동으로 착용 방향을 설정하시겠어요?
onboarding-choose_mounting-manual_modal-description = 자동 착용 방향 정렬은 복잡한 자세와 올바르게 설정된 트래커가 필요하기 때문에 처음 사용하시는 분에게는 조금 어려울 수 있어요. 그래서 <b>수동 착용 방향 정렬을 추천드려요!</b>
onboarding-choose_mounting-manual_modal-confirm = 네, 알고 있어요!
onboarding-choose_mounting-manual_modal-cancel = 취소
## Tracker manual mounting setup
@@ -766,14 +812,25 @@ onboarding-automatic_mounting-put_trackers_on-next = 모든 트래커를 착용
## Tracker proportions method choose
onboarding-choose_proportions = 신체 비율을 설정하기 위해 어떤 방법을 사용할래요?
# Multiline string
onboarding-choose_proportions-description =
신체 비율은 신체 각 부분의 길이를 파악하는데 사용됩니다. 이 값은 트래커의 위치를 정확히 계산하기 위해 필수적입니다.
신체 비율이 저장된 비율과 일치하지 않으면 추적 정밀도가 떨어지고 스케이트를 타거나 미끄러지는 것처럼 보이고 아바타와 실제 몸이 잘 일치하지 않을 수 있어요.
onboarding-choose_proportions-auto_proportions = 자동으로 비율 설정
# Italized text
onboarding-choose_proportions-auto_proportions-subtitle = 권장
onboarding-choose_proportions-auto_proportions-descriptionv3 =
몸을 이리저리 움직여 샘플을 기록한 다음 알고리즘을 통해 연산하는 방식으로 신체 비율을 추산합니다.
<b>사용하기 위해서는 VR 헤드셋이 SlimeVR과 연결되어 있어야 해요</b>
onboarding-choose_proportions-manual_proportions = 수동으로 비율 설정
# Italized text
onboarding-choose_proportions-manual_proportions-subtitle = 정밀하게 설정하고 싶다면
onboarding-choose_proportions-manual_proportions-description = 이렇게 하면 신체 비율을 직접 수정하여 수동으로 조절할 수 있어요
onboarding-choose_proportions-manual_proportions-description = 이 옵션을 사용하면 신체 비율을 직접 입력해 수동으로 조절할 수 있어요.
onboarding-choose_proportions-export = 다른 이름으로 저장
onboarding-choose_proportions-import = 신체 비율 가져오기
onboarding-choose_proportions-import-success = 가져오기 완료
onboarding-choose_proportions-import-failed = 가져오기 실패
onboarding-choose_proportions-file_type = 신체 비율 파일
## Tracker manual proportions setup
@@ -792,18 +849,29 @@ onboarding-automatic_proportions-manual = 수동 신체 비율 설정
onboarding-automatic_proportions-prev_step = 뒤로
onboarding-automatic_proportions-put_trackers_on-title = 트래커를 착용하세요
onboarding-automatic_proportions-put_trackers_on-description = 비율을 조정하기 위해 방금 할당한 트래커를 사용할 거예요. 모든 트래커를 착용하면 오른쪽 그림에서 어떤 것이 있는지 알 수 있어요.
onboarding-automatic_proportions-put_trackers_on-next = 트래커를 다 착용했어요
onboarding-automatic_proportions-put_trackers_on-next = 트래커를 모두 착용했어요
onboarding-automatic_proportions-requirements-title = 요구사항
# Each line of text is a different list item
onboarding-automatic_proportions-requirements-description =
발까지 추적할 수 있는 적어도 5개의 트래커가 있어야 해요.
전원이 켜진 트래커와 헤드셋이 필요해요.
트래커와 헤드셋을 착용하고 있어야 해요.
트래커와 헤드셋이 SlimeVR 서버와 연결되어 있어야 해요.
트래커와 헤드셋이 SlimeVR 서버에서 제대로 작동하고 있어야 해요.
헤드셋이 SlimeVR 서버에 위치 데이터를 보고하고 있어야 해요. (SteamVR이 실행 중이고 SlimeVR의 SteamVR 드라이버를 사용하여 SlimeVR에 연결되어 있어야 해요).
onboarding-automatic_proportions-requirements-descriptionv2 =
다리를 추적하기 위해 최소 5개 이상의 트래커를 착용하세요.
VR 헤드셋을 착용하세요.
VR 헤드셋과 컨트롤러의 위치 정보가 SlimeVR 서버에 실시간으로 표시되는지 확인하세요.
SlimeVR 서버에 연결된 트래커와 VR 헤드셋이 끊김이나 렉 없이 제대로 표시되는지 확인하세요. (이것은 SteamVR이 실행 중이며 SlimeVR의 SteamVR 드라이버를 사용하여 SlimeVR에 올바르게 연결되어 있다는 것을 의미합니다)
트래커의 제대로 작동하고 나의 움직임을 올바르게 반영중인지 확인하세요. (예: 전체 정렬을 수행했으며 발차기, 허리 숙이기, 앉기 등 올바른 방향으로 움직임)
onboarding-automatic_proportions-requirements-next = 요구사항을 모두 읽었어요
onboarding-automatic_proportions-start_recording-title = 움직일 준비
onboarding-automatic_proportions-check_height-title = 키를 확인하세요
onboarding-automatic_proportions-check_height-description = 이 과정에서는 VR 헤드셋(HMD)의 높이를 사용하여 실제 키의 대략적인 값으로 삼고, 이를 측정의 기준으로 활용합니다. 하지만 직접 확인하는 것이 더 정확해요!
# All the text is in bold!
onboarding-automatic_proportions-check_height-calculation_warning = 버튼을 누른 후 3초 이내에 <u>바르게 서서</u> 키를 측정해 주세요!
onboarding-automatic_proportions-check_height-fetch_height = 서 있어요!
# Context is that the height is unknown
onboarding-automatic_proportions-check_height-unknown = 알 수 없음
# Shows an element below it
onboarding-automatic_proportions-check_height-hmd_height1 = VR 헤드셋(HMD) 높이
# Shows an element below it
onboarding-automatic_proportions-check_height-height1 = 실제 키
onboarding-automatic_proportions-check_height-next_step = 괜찮아 보여요
onboarding-automatic_proportions-start_recording-title = 움직일 준비를 해요
onboarding-automatic_proportions-start_recording-description = 이제 몇 가지 특정 포즈와 동작을 기록할 거예요. 다음 화면에서 메시지가 표시되면 버튼을 눌러서 시작하세요!
onboarding-automatic_proportions-start_recording-next = 기록 시작하기
onboarding-automatic_proportions-recording-title = REC
@@ -831,18 +899,28 @@ onboarding-automatic_proportions-verify_results-redo = 다시 기록하기
onboarding-automatic_proportions-verify_results-confirm = 정확해요!
onboarding-automatic_proportions-done-title = 몸을 측정하고 저장했어요
onboarding-automatic_proportions-done-description = 신체 비율 보정이 완료되었어요!
onboarding-automatic_proportions-error_modal =
<b>경고:</b> 신체 비율을 계산하는 동안 오류가 발생했습니다!
<docs>도움말</docs>을 확인하거나 <discord>디스코드</discord> 서버에서 도움을 받으세요 ^_^
onboarding-automatic_proportions-error_modal-confirm = 이해했어요!
## Home
home-no_trackers = 감지되거나 할당된 트래커가 없어요.
## Trackers Still On notification
trackers_still_on-modal-title = 트래커가 아직 켜져 있어요!
trackers_still_on-modal-description = 하나 이상의 트래커가 여전히 켜져 있는 것으로 보여요. SlimeVR을 종료할까요?
trackers_still_on-modal-confirm = SlimeVR 종료
trackers_still_on-modal-cancel = 돌아가기
## Status system
status_system-StatusTrackerReset = 아직 정렬되지 않은 트래커가 있어서 전체 정렬을 수행해주세요.
status_system-StatusTrackerReset = 전체 정렬을 수행해 아직 정렬되지 않은 트래커를 정렬해주세요.
status_system-StatusSteamVRDisconnected =
{ $type ->
[steamvr_feeder] SlimeVR 피더와 통신할 수 없어요.
*[other] SlimeVR 드라이버를 통해 SteamVR과 통신할 수 없어요.
[steamvr_feeder] SlimeVR 피더와 연결되지 않음
*[other] SlimeVR 드라이버가 SteamVR과 연결되지 않음
}
status_system-StatusTrackerError = { $trackerName } 트래커에 문제가 발생했어요.
+19 -11
View File
@@ -144,6 +144,11 @@ widget-imu_visualizer-rotation_raw = Rauw
widget-imu_visualizer-rotation_preview = Preview
widget-imu_visualizer-rotation_hide = Verbergen
## Widget: Skeleton Visualizer
widget-skeleton_visualizer-preview = Skelet voorbeeld
widget-skeleton_visualizer-hide = Verbergen
## Tracker status
tracker-status-none = Geen status
@@ -152,6 +157,7 @@ tracker-status-error = Fout
tracker-status-disconnected = Verbinding verbroken
tracker-status-occluded = Verborgen
tracker-status-ok = OK
tracker-status-timed_out = Timed Out
## Tracker status columns
@@ -445,6 +451,8 @@ settings-general-interface-feedback_sound = Feedback geluid
settings-general-interface-feedback_sound-description = Speelt een geluid telkens de reset wordt uitgevoerd
settings-general-interface-feedback_sound-label = Feedback geluid
settings-general-interface-feedback_sound-volume = Feedback geluid volume
settings-general-interface-connected_trackers_warning = Waarschuwing voor verbonden trackers
settings-general-interface-connected_trackers_warning-label = Waarschuwing voor verbonden trackers bij het afsluiten
## Serial settings
@@ -774,6 +782,8 @@ onboarding-choose_mounting-manual_mounting = Handmatige bevestiging
# Italized text
onboarding-choose_mounting-manual_mounting-label = Aanbevolen
onboarding-choose_mounting-manual_mounting-description = Hiermee kunt u de montagerichting handmatig kiezen voor elke tracker
onboarding-choose_mounting-manual_modal-confirm = Ik weet zeker wat ik doe
onboarding-choose_mounting-manual_modal-cancel = Annuleren
## Tracker manual mounting setup
@@ -812,9 +822,6 @@ onboarding-choose_proportions-description = Lichaamsverhoudingen worden gebruikt
onboarding-choose_proportions-auto_proportions = Automatische verhoudingen
# Italized text
onboarding-choose_proportions-auto_proportions-subtitle = Aanbevolen
onboarding-choose_proportions-auto_proportions-descriptionv2 =
Dit zal je proporties gokken met jouw bewegingen op basis van een opname, waarna deze door een algoritme gehaald worden.
<b>Hiervoor moet een HMD verbonden zijn aan SlimeVR!</b>
onboarding-choose_proportions-manual_proportions = Handmatige lichaamsverhoudingen
# Italized text
onboarding-choose_proportions-manual_proportions-subtitle = Voor kleine details
@@ -844,14 +851,6 @@ onboarding-automatic_proportions-put_trackers_on-title = Doe je trackers aan
onboarding-automatic_proportions-put_trackers_on-description = Om je verhoudingen te kalibreren, gaan we gebruik maken van de trackers die je net hebt toegewezen. Doe al je trackers aan, je kunt zien welke trackers welke zijn in de figuur rechts.
onboarding-automatic_proportions-put_trackers_on-next = Ik heb al mijn trackers aan
onboarding-automatic_proportions-requirements-title = Vereisten
# Each line of text is a different list item
onboarding-automatic_proportions-requirements-description =
Je hebt in ieder geval genoeg trackers om je voeten te volgen (over het algemeen 5 trackers).
Je hebt je trackers en headset op.
Je draagt je trackers en headset.
Je trackers en headset zijn verbonden met de SlimeVR server.
Je trackers en headset werken goed binnen de SlimeVR server.
Je headset rapporteert positiegegevens aan de SlimeVR-server (dit betekent over het algemeen dat SteamVR wordt uitgevoerd en verbonden met SlimeVR met behulp van SlimeVR's SteamVR-stuurprogramma).
onboarding-automatic_proportions-requirements-next = Ik heb de vereisten gelezen
onboarding-automatic_proportions-check_height-title = Controleer je lengte
onboarding-automatic_proportions-check_height-description =
@@ -905,6 +904,15 @@ onboarding-automatic_proportions-error_modal-confirm = Begrepen!
home-no_trackers = Geen trackers gedetecteerd of toegewezen
## Trackers Still On notification
trackers_still_on-modal-title = Trackers staan nog steeds aan
trackers_still_on-modal-description =
Een of meer trackers staan nog aan.
Wil je SlimeVR toch afsluiten?
trackers_still_on-modal-confirm = SlimeVR afsluiten
trackers_still_on-modal-cancel = Wacht even...
## Status system
status_system-StatusTrackerReset = Het wordt aanbevolen om een volledige reset uit te voeren omdat een of meer trackers niet zijn aangepast.
+24
View File
@@ -144,6 +144,11 @@ widget-imu_visualizer-rotation_raw = Raw
widget-imu_visualizer-rotation_preview = Podgląd
widget-imu_visualizer-rotation_hide = Ukryj
## Widget: Skeleton Visualizer
widget-skeleton_visualizer-preview = Podgląd szkieletu
widget-skeleton_visualizer-hide = Ukryj
## Tracker status
tracker-status-none = Brak Statusu
@@ -447,6 +452,9 @@ settings-general-interface-feedback_sound = Dźwięk Informacji
settings-general-interface-feedback_sound-description = Ta opcja odtworzy dźwięk, gdy reset zostanie uruchomiony
settings-general-interface-feedback_sound-label = Dźwięk Informacji
settings-general-interface-feedback_sound-volume = Poziom głośności sprzężenia zwrotnego
settings-general-interface-connected_trackers_warning = Ostrzeżenie o podłączonych trackerach
settings-general-interface-connected_trackers_warning-description = Ta opcja wyświetli wyskakujące okienko za każdym razem, gdy spróbujesz wyjść ze SlimeVR, mając jeden lub więcej podłączonych trackerów. Przypomina o wyłączeniu trackerów, gdy skończysz, aby wydłużyć żywotność baterii.
settings-general-interface-connected_trackers_warning-label = Ostrzeżenie o podłączonych trackerach przy wyjściu
## Serial settings
@@ -780,6 +788,13 @@ onboarding-choose_mounting-manual_mounting = Montaż ręczny
# Italized text
onboarding-choose_mounting-manual_mounting-label = Zalecany
onboarding-choose_mounting-manual_mounting-description = Umożliwi to ręczne wybranie kierunku montażu dla każdego trackera
# Multiline text
onboarding-choose_mounting-manual_modal-title =
Czy na pewno chcesz to zrobić
automatyczna kalibracja montażu?
onboarding-choose_mounting-manual_modal-description = <b> Ręczna kalibracja montażu jest zalecana dla nowych użytkowników </b> , ponieważ prawidłowe ustawienie pozycji automatycznej kalibracji montażu może być trudne i może wymagać pewnej praktyki.
onboarding-choose_mounting-manual_modal-confirm = Jestem pewien tego, co robię
onboarding-choose_mounting-manual_modal-cancel = Anuluj
## Tracker manual mounting setup
@@ -914,6 +929,15 @@ onboarding-automatic_proportions-error_modal-confirm = Zrozumiano!
home-no_trackers = Nie wykryto trackerów
## Trackers Still On notification
trackers_still_on-modal-title = Trackery nadal włączone
trackers_still_on-modal-description =
Jeden lub więcej modułów śledzących jest nadal włączonych.
Czy nadal chcesz wyjść ze SlimeVR?
trackers_still_on-modal-confirm = Wyjdź ze SlimeVR
trackers_still_on-modal-cancel = Poczekaj!
## Status system
status_system-StatusTrackerReset = Zaleca się wykonanie pełnego resetu, ponieważ jeden lub więcej trackerów nie jest wyregulowanych.
+23 -11
View File
@@ -36,6 +36,7 @@ body_part-RIGHT_HAND = Mão Direita
body_part-RIGHT_UPPER_LEG = Coxa direita
body_part-RIGHT_LOWER_LEG = Canela direita
body_part-RIGHT_FOOT = Pé direito
body_part-UPPER_CHEST = Peito Superior
body_part-CHEST = Peito
body_part-WAIST = Cintura
body_part-HIP = Quadril
@@ -52,12 +53,15 @@ body_part-LEFT_FOOT = Pé esquerdo
skeleton_bone-NONE = Nada
skeleton_bone-HEAD = Deslocamento da Cabeça
skeleton_bone-NECK = Tamanho do Pescoço
skeleton_bone-CHEST = Chest Length
skeleton_bone-torso_group = Tamanho do Tronco
skeleton_bone-UPPER_CHEST = Tamanho do Peito Superior
skeleton_bone-CHEST_OFFSET = Chest Offset
skeleton_bone-CHEST = Chest Length
skeleton_bone-WAIST = Waist Length
skeleton_bone-HIP = Hip Length
skeleton_bone-HIP_OFFSET = Compensação do Quadril
skeleton_bone-HIPS_WIDTH = Largura do Quadril
skeleton_bone-leg_group = Tamanho da Perna
skeleton_bone-UPPER_LEG = Upper Leg Length
skeleton_bone-LOWER_LEG = Lower Leg Length
skeleton_bone-FOOT_LENGTH = Tamanho do Pé
@@ -65,6 +69,7 @@ skeleton_bone-FOOT_SHIFT = Compensação do Pé
skeleton_bone-SKELETON_OFFSET = Compensação do Esqueleto
skeleton_bone-SHOULDERS_DISTANCE = Distância dos Ombros
skeleton_bone-SHOULDERS_WIDTH = Largura dos Ombros
skeleton_bone-arm_group = Tamanho do Braço
skeleton_bone-UPPER_ARM = Tamanho do Braço Superior
skeleton_bone-LOWER_ARM = Distância do Antebraço
skeleton_bone-HAND_Y = Distância da mão Y
@@ -114,6 +119,9 @@ widget-overlay-is_mirrored_label = Mostrar Overlay como espelho
widget-drift_compensation-clear = Refazer compensação de drift
## Widget: Clear Reset Mounting
## Widget: Developer settings
widget-developer_mode = Modo de desenvolvedor
@@ -131,6 +139,9 @@ widget-imu_visualizer = Rotation
widget-imu_visualizer-rotation_raw = Raw
widget-imu_visualizer-rotation_preview = Preview
## Widget: Skeleton Visualizer
## Tracker status
tracker-status-none = Sem Status
@@ -258,6 +269,7 @@ settings-sidebar-interface = Interface
settings-sidebar-osc_router = Roteador OSC
settings-sidebar-utils = Utilidades
settings-sidebar-serial = Console Serial
settings-sidebar-notifications = Notificações
## SteamVR settings
@@ -318,11 +330,7 @@ settings-general-fk_settings-leg_tweak-skating_correction-amount = Força da cor
settings-general-fk_settings-arm_fk = Opções do Braço
settings-general-fk_settings-arm_fk-description = Muda o jeito que os braços são rastreados.
settings-general-fk_settings-arm_fk-force_arms = Forçar braços do HMD
settings-general-fk_settings-skeleton_settings = Opções do esqueleto
settings-general-fk_settings-skeleton_settings-description = Ligar ou desligar opções do esqueleto. É recomendado deixar eles ligados.
settings-general-fk_settings-skeleton_settings-extended_spine = Estender coluna
settings-general-fk_settings-skeleton_settings-extended_pelvis = Estender pélvis
settings-general-fk_settings-skeleton_settings-extended_knees = Estender joelho
settings-general-fk_settings-vive_emulation-title = Emulação de Vive
settings-general-fk_settings-vive_emulation-description = Emule o problema de tracker da cintura que o Vive tracker tem. Isso é uma piada e faz o tracking ficar pior.
settings-general-fk_settings-vive_emulation-label = Ativar emulação de Vive
@@ -343,19 +351,21 @@ settings-general-gesture_control-mountingResetEnabled = Toques para o reset de p
settings-general-gesture_control-mountingResetDelay = Delay do reset de posição
settings-general-gesture_control-mountingResetTaps = Toques para o reset de posição
## Interface settings
## Appearance settings
settings-general-interface = Interface
settings-general-interface-dev_mode = Modo de desenvolvedor
settings-general-interface-dev_mode-description = Este modo pode ser útil se precisar de dados específicos ou para interagir com trackers conectados a um nível mais avançado
settings-general-interface-dev_mode-label = Modo de desenvolvedor
settings-general-interface-serial_detection = Detecção de dispositivo serial
settings-general-interface-serial_detection-description = Esta opção mostrará um pop-up toda vez que você conectar um novo dispositivo serial que pode ser um tracker. Ajuda a melhorar o processo de configuração de um tracker
settings-general-interface-serial_detection-label = Detecção de dispositivo serial
settings-general-interface-lang = Selecione o idioma
settings-general-interface-lang-description = Alterar o idioma padrão que pretende utilizar
settings-general-interface-lang-placeholder = Selecione o idioma que vai usar
## Notification settings
settings-general-interface-serial_detection = Detecção de dispositivo serial
settings-general-interface-serial_detection-description = Esta opção mostrará um pop-up toda vez que você conectar um novo dispositivo serial que pode ser um tracker. Ajuda a melhorar o processo de configuração de um tracker
settings-general-interface-serial_detection-label = Detecção de dispositivo serial
## Serial settings
settings-serial = Console Serial
@@ -460,7 +470,6 @@ onboarding-wifi_creds-password =
onboarding-reset_tutorial-back = Voltar para a Calibragem de Posição
onboarding-reset_tutorial = Resetar Tutorial
onboarding-reset_tutorial-description = Esse recurso não está concluído, apenas aperte continue
## Setup start
@@ -677,5 +686,8 @@ onboarding-automatic_proportions-done-description = Sua calibragem de proporçã
home-no_trackers = Nenhum tracker detectado ou atribuído
## Trackers Still On notification
## Status system
+98
View File
@@ -53,6 +53,8 @@ body_part-LEFT_FOOT = Bàn chân trái
skeleton_bone-NONE = Chưa được gán
skeleton_bone-HEAD = Sai số đầu
skeleton_bone-NECK = Chiều dài cổ
skeleton_bone-torso_group = Độ dài thân
skeleton_bone-UPPER_CHEST = Độ dài ngực trên
skeleton_bone-CHEST_OFFSET = Sai số ngực
skeleton_bone-CHEST = Khoảng cách ngực
skeleton_bone-WAIST = Khoảng cách eo
@@ -70,6 +72,8 @@ skeleton_bone-SHOULDERS_WIDTH = Chiều rộng vai
skeleton_bone-arm_group = Chiều dài cánh tay
skeleton_bone-UPPER_ARM = Chiều dài bắp tay
skeleton_bone-LOWER_ARM = Chiều dài cẳng tay
skeleton_bone-HAND_Y = Khoảng cách tay Y
skeleton_bone-HAND_Z = Khoảng cách tay Z
skeleton_bone-ELBOW_OFFSET = Sai số khuỷu tay
## Tracker reset buttons
@@ -77,6 +81,7 @@ skeleton_bone-ELBOW_OFFSET = Sai số khuỷu tay
reset-reset_all = Đặt lại tất cả bộ phận
reset-full = Đặt lại
reset-mounting = Đặt lại hướng gắn tracker
reset-yaw = Reset Yaw
## Serial detection stuff
@@ -139,6 +144,11 @@ widget-imu_visualizer-rotation_raw = Gốc
widget-imu_visualizer-rotation_preview = Qua xử lí
widget-imu_visualizer-rotation_hide = Ẩn
## Widget: Skeleton Visualizer
widget-skeleton_visualizer-preview = Xem trước khung xương
widget-skeleton_visualizer-hide = Ẩn
## Tracker status
tracker-status-none = Không có trạng thái
@@ -147,6 +157,7 @@ tracker-status-error = Lỗi
tracker-status-disconnected = Đã ngắt kết nối
tracker-status-occluded = Nghẽn
tracker-status-ok = Đã kết nối
tracker-status-timed_out = Hết thời gian chờ
## Tracker status columns
@@ -164,10 +175,15 @@ tracker-table-column-url = Đường dẫn
## Tracker rotation
tracker-rotation-front = Trước
tracker-rotation-front_left = Phía trước-Bên trái
tracker-rotation-front_right = Phía trước-Bên phải
tracker-rotation-left = Trái
tracker-rotation-right = Phải
tracker-rotation-back = Sau
tracker-rotation-back_left = Phía sau-Bên trái
tracker-rotation-back_right = Phía sau-Bên phải
tracker-rotation-custom = Tùy chọn
tracker-rotation-overriden = (được ghi đè bởi reset hướng gắn tracker)
## Tracker information
@@ -231,6 +247,7 @@ tracker_selection_menu-RIGHT_UPPER_LEG = { -tracker_selection-part } bắp chân
tracker_selection_menu-RIGHT_LOWER_LEG = { -tracker_selection-part } cẳng chân phải?
tracker_selection_menu-RIGHT_FOOT = { -tracker_selection-part } bàn chân phải?
tracker_selection_menu-RIGHT_CONTROLLER = { -tracker_selection-part } tay cầm bên phải?
tracker_selection_menu-UPPER_CHEST = { -tracker_selection-part } ngực trên?
tracker_selection_menu-CHEST = { -tracker_selection-part } ngực?
tracker_selection_menu-WAIST = { -tracker_selection-part } eo?
tracker_selection_menu-HIP = { -tracker_selection-part } hông?
@@ -245,6 +262,11 @@ tracker_selection_menu-LEFT_CONTROLLER = { -tracker_selection-part } tay cầm b
tracker_selection_menu-unassigned = Chưa gắn vị trí
tracker_selection_menu-assigned = Đã gán vị trí
tracker_selection_menu-dont_assign = Không gắn
# This line cares about multilines.
# <b>text</b> means that the text should be bold.
tracker_selection_menu-neck_warning =
<b>Cảnh báo:</b> Tracker ở cổ rất nguy hiểm và có thể gây tử vong nếu điều chỉnh quá chặt,
Dây đeo có thể cắt lưu thông máu đến đầu của bạn!
tracker_selection_menu-neck_warning-done = Tôi hiểu những rủi ro
tracker_selection_menu-neck_warning-cancel = Hủy
@@ -265,6 +287,7 @@ settings-sidebar-osc_router = Router OSC
settings-sidebar-osc_trackers = Trình theo dõi VRChat OSC
settings-sidebar-utils = Công cụ
settings-sidebar-serial = Cổng Serial
settings-sidebar-appearance = Giao diện
settings-sidebar-notifications = Thông báo
## SteamVR settings
@@ -322,10 +345,26 @@ settings-general-fk_settings-leg_tweak-floor_clip = Ngăn xuyên sàn
# since this largely prevents this it corrects for it hence skating correction (note this may be renamed to sliding correction)
# definition - Guesses when each foot is in contact with the ground and uses that information to improve tracking
settings-general-fk_settings-leg_tweak-skating_correction = Sửa trượt
settings-general-fk_settings-leg_tweak-toe_snap = Đoán hướng xoay chân
settings-general-fk_settings-leg_tweak-skating_correction-amount = Mức độ sửa
settings-general-fk_settings-leg_tweak-skating_correction-description = Sửa trượt sẽ điều chỉnh nhằm giảm thiểu hiện tượng trượt băng nhưng có thể làm giảm độ chính xác trong một vài kiểu chuyển động nhất định. Khi bật tính năng này, vui lòng đảm bảo thực hiện thao tác đặt lại hoàn toàn và hiệu chỉnh lại trong trò chơi.
settings-general-fk_settings-leg_tweak-floor_clip-description = Ngăn xuyên sàn có thể giảm hoặc loại bỏ khả năng tracker của bạn đi xuyên sàn nhà. Khi bật tính năng này, vui lòng đảm bảo thực hiện thao tác đặt lại hoàn toàn và hiệu chỉnh lại trong trò chơi.
settings-general-fk_settings-leg_tweak-toe_snap-description = Đoán hướng xoay chân sẽ đoán hướng xoay của chân đồng thời khóa ngón chân của bạn vào mặt sàn bạn nếu bạn không sử dụng tracker cho chân.
settings-general-fk_settings-leg_fk = Track chân
settings-general-fk_settings-leg_fk-reset_mounting_feet-description = Đặt lại hướng gắn tracker bàn chân bằng cách nhón chân.
settings-general-fk_settings-leg_fk-reset_mounting_feet = Đặt lại hướng gắn tracker bàn chân
settings-general-fk_settings-arm_fk = Track cánh tay
settings-general-fk_settings-arm_fk-description = Thay đổi cách cánh tay được track
settings-general-fk_settings-arm_fk-force_arms = Lấy dữ liệu cánh tay từ kính
settings-general-fk_settings-arm_fk-reset_mode-description = Thay đổi tư thế cánh tay để đặt lại hướng gắn tracker.
settings-general-fk_settings-arm_fk-back = Khuỷu tay ra sau
settings-general-fk_settings-arm_fk-back-description = Chế độ mặc định, với cánh tay trên trỏ về phía sau và cánh tay dưới hướng về phía trước.
settings-general-fk_settings-arm_fk-tpose_up = T-pose
settings-general-fk_settings-arm_fk-tpose_up-description = Hai tay của bạn sẽ hướng xuống ở hai bên khi đặt lại hoàn toàn, và đưa lên 90 độ sang hai bên khi đặt lại hướng gắn tracker.
settings-general-fk_settings-arm_fk-tpose_down = T-pose (ngược lại)
settings-general-fk_settings-arm_fk-tpose_down-description = Hai tay của bạn sẽ đưa lên 90 độ sang hai bên khi đặt lại hoàn toàn, và hai tay hướng xuống hai bên khi đặt lại hướng gắn tracker.
settings-general-fk_settings-arm_fk-forward = Hai tay ra trước
settings-general-fk_settings-arm_fk-forward-description = Hai cánh tay của bạn nâng lên 90 độ về phía trước. Hữu dụng cho việc VTubing.
settings-general-fk_settings-skeleton_settings-description = Bật hoặc tắt các cài đặt về khung cơ thể. Các lựa chọn này nên được giữ bật
settings-general-fk_settings-self_localization-title = Chế độ Mocap
settings-general-fk_settings-vive_emulation-title = Giả lập tracker Vive
@@ -353,6 +392,7 @@ settings-general-gesture_control-mountingResetTaps = Số lần chạm cho đặ
## Appearance settings
settings-interface-appearance = Giao diện
settings-general-interface-dev_mode = Chế độ nhà phát triển
settings-general-interface-dev_mode-description = Hữu dụng nếu cần thêm thông tin chi tiết của tracker hay can thiệp sâu hơn vào tracker
settings-general-interface-dev_mode-label = Chế độ nhà phát triển
@@ -360,6 +400,8 @@ settings-general-interface-theme = Màu giao diện
settings-general-interface-lang = Thay đổi ngôn ngữ (Change language)
settings-general-interface-lang-description = Đổi ngôn ngữ hiển thị (Change the default language you want to use)
settings-general-interface-lang-placeholder = Chọn ngôn ngữ để sử dụng (Select the language to use)
# Keep the font name untranslated
settings-interface-appearance-font = Phông chữ cho GUI
settings-interface-appearance-font-placeholder = Phông chữ mặc định
settings-interface-appearance-font-os_font = Phông chữ hệ điều hành
settings-interface-appearance-font-slime_font = Phông chữ mặc định
@@ -447,6 +489,7 @@ settings-osc-vrchat-network-trackers-elbows = Khuỷu tay
settings-osc-vmc-enable = Bật
settings-osc-vmc-enable-description = Cho phép nhận và gửi dữ liệu OSC
settings-osc-vmc-enable-label = Chuyển tiếp dữ liệu OSC
settings-osc-vmc-vrm = Model VRM
## Setup/onboarding menu
@@ -564,6 +607,9 @@ onboarding-assign_trackers-next = Hoàn thành
## Tracker mounting method choose
# Italized text
onboarding-choose_mounting-auto_mounting-label = Thử nghiệm
onboarding-choose_mounting-manual_modal-cancel = Hủy
## Tracker manual mounting setup
@@ -596,6 +642,22 @@ onboarding-automatic_mounting-put_trackers_on-next = Tiếp tục
## Tracker proportions method choose
onboarding-choose_proportions-auto_proportions = Đo kích thước cơ thể tự động
# Italized text
onboarding-choose_proportions-auto_proportions-subtitle = Khuyến khích dùng
onboarding-choose_proportions-auto_proportions-descriptionv3 =
Tính năng này sẽ đoán tỷ lệ cơ thể của bạn bằng cách ghi lại một mẫu chuyển động của bạn và chuyển nó qua một thuật toán.
<b>Tính năng này sẽ yêu cầu headset của bạn (HMD) được kết nối với SlimeVR và đang nằm ở trên đầu của bạn!</b>
onboarding-choose_proportions-manual_proportions = Đo kích thước cơ thể thủ công
# Italized text
onboarding-choose_proportions-manual_proportions-subtitle = Cho chính xác
onboarding-choose_proportions-manual_proportions-description = Tính năng này sẽ cho phép bạn điều chỉnh tỉ lệ cơ thể của mình theo cách thủ công bằng cách chỉnh sửa các con số một cách trực tiếp
onboarding-choose_proportions-export = Xuất tỉ lệ cơ thể
onboarding-choose_proportions-import = Nhập tỉ lệ cơ thể
onboarding-choose_proportions-import-success = Đã được nhập
onboarding-choose_proportions-import-failed = Thất bại
onboarding-choose_proportions-file_type = File tỉ lệ cơ thể
## Tracker manual proportions setup
@@ -615,16 +677,40 @@ onboarding-automatic_proportions-put_trackers_on-title = Đeo tracker lên ngư
onboarding-automatic_proportions-put_trackers_on-description = Để đo kích thước cơ thể, SlimeVR sẽ sử dụng một thuật toán để dự đoán kích thước của các bộ phận, hãy đeo tracker theo đúng vị trí đã thiết lập như hình bên
onboarding-automatic_proportions-put_trackers_on-next = Tiếp tục
onboarding-automatic_proportions-requirements-title = Yêu cầu
# Each line of text is a different list item
onboarding-automatic_proportions-requirements-descriptionv2 =
Bạn có ít nhất đủ tracker để theo dõi bàn chân của mình (thường là 5 tracker).
Bạn đã bật tracker và headset và đang đeo chúng.
Tracker và headset của bạn được kết nối với máy chủ SlimeVR và đang hoạt động bình thường (ví dụ: không bị lag, ngắt kết nối, v.v.).
Headset của bạn đang báo cáo dữ liệu vị trí cho máy chủ SlimeVR (điều này thường có nghĩa là SteamVR đang chạy và kết nối với SlimeVR bằng driver SteamVR của SlimeVR).
Tracking của bạn đang hoạt động và thể hiện chính xác các chuyển động của bạn (ví dụ: bạn đã thực hiện thiết đặt lại hoàn toàn và chúng di chuyển đúng hướng khi đá, cúi xuống, ngồi, v.v.).
onboarding-automatic_proportions-requirements-next = Tôi đã đọc các yêu cầu
onboarding-automatic_proportions-check_height-title = Kiểm tra chiều cao của bạn
onboarding-automatic_proportions-check_height-description = Chúng tôi sử dụng chiều cao của bạn làm cơ sở cho các phép đo của chúng tôi bằng cách sử dụng chiều cao của headset (HMD) làm chiều cao ước tính thực tế của bạn, nhưng tốt hơn hết bạn nên tự kiểm tra xem chúng có đúng không!
# All the text is in bold!
onboarding-automatic_proportions-check_height-calculation_warning = Vui lòng nhấn nút trong khi đứng <u>thẳng</u> để tính chiều cao của bạn. Bạn có 3 giây sau khi nhấn nút!
onboarding-automatic_proportions-check_height-fetch_height = Tôi đang đứng!
# Context is that the height is unknown
onboarding-automatic_proportions-check_height-unknown = Không rõ
# Shows an element below it
onboarding-automatic_proportions-check_height-hmd_height1 = Chiều cao của HMD là
# Shows an element below it
onboarding-automatic_proportions-check_height-height1 = vậy chiều cao thật của bạn là
onboarding-automatic_proportions-check_height-next_step = Những chỉ số này là đúng
onboarding-automatic_proportions-start_recording-title = Chuẩn bị đo
onboarding-automatic_proportions-start_recording-description = Phần mềm sẽ đo một số chuyển động, cử chỉ cụ thể, hãy chuẩn bị cho việc di chuyển theo yêu cầu trong phần tiếp theo
onboarding-automatic_proportions-start_recording-next = Bắt đầu
onboarding-automatic_proportions-recording-title = REC
onboarding-automatic_proportions-recording-description-p0 = Đang ghi...
onboarding-automatic_proportions-recording-description-p1 = Thực hiện các thao tác sau:
# Each line of text is a different list item
onboarding-automatic_proportions-recording-steps =
Đứng thẳng, xoay đầu một vòng tròn.
Cong lưng về phía trước và ngồi xổm. Trong khi ngồi xổm, nhìn sang trái, sau đó sang phải.
Xoay phần thân trên của bạn sang trái (ngược chiều kim đồng hồ), sau đó đưa tay xuống đất.
Xoay phần thân trên của bạn sang phải (theo chiều kim đồng hồ), sau đó với tay xuống đất.
Xoay hông của bạn theo chuyển động tròn như thể bạn đang xoay vòng hula.
Nếu còn thời gian, bạn có thể lặp lại các bước này cho đến khi kết thúc.
onboarding-automatic_proportions-recording-processing = Đang xử lí kết quả...
# $time (Number) - Seconds left for the automatic calibration recording to finish (max 20)
onboarding-automatic_proportions-recording-timer =
@@ -640,12 +726,24 @@ onboarding-automatic_proportions-verify_results-redo = Thử lại
onboarding-automatic_proportions-verify_results-confirm = Kết quả tương đối chính xác
onboarding-automatic_proportions-done-title = Đã lưu chỉ số đo
onboarding-automatic_proportions-done-description = Quá trình đo đã hoàn tất
onboarding-automatic_proportions-error_modal =
<b>Cảnh báo:</b> Một lỗi đã được tìm thấy trong khi ước tính tỷ lệ cơ thể!
Vui lòng <docs>kiểm tra tài liệu</docs> hoặc tham gia <discord>Discord</discord> của chúng tôi để được trợ giúp ^_^
onboarding-automatic_proportions-error_modal-confirm = Đã hiểu!
## Home
home-no_trackers = Không tìm thấy tracker / Tracker chưa được gán
## Trackers Still On notification
trackers_still_on-modal-title = Tracker vẫn còn bật
trackers_still_on-modal-description =
Vẫn còn một hoặc nhiều tracker vẫn đang bật.
Bạn vẫn muốn thoát khỏi SlimeVR?
trackers_still_on-modal-confirm = Thoát SlimeVR
trackers_still_on-modal-cancel = Vui lòng đợi...
## Status system
status_system-StatusTrackerReset = Bạn nên thực hiện thiết lập lại toàn bộ vì một hoặc nhiều trình theo dõi không được điều chỉnh.
+22
View File
@@ -144,6 +144,11 @@ widget-imu_visualizer-rotation_raw = 原始旋转
widget-imu_visualizer-rotation_preview = 预览
widget-imu_visualizer-rotation_hide = 隐藏
## Widget: Skeleton Visualizer
widget-skeleton_visualizer-preview = 骨架预览
widget-skeleton_visualizer-hide = 隐藏
## Tracker status
tracker-status-none = 无状态
@@ -438,6 +443,9 @@ settings-general-interface-feedback_sound = 声音反馈
settings-general-interface-feedback_sound-description = 开启此选项会在触发重置时发出提示音
settings-general-interface-feedback_sound-label = 声音反馈
settings-general-interface-feedback_sound-volume = 提示音音量
settings-general-interface-connected_trackers_warning = 已连接追踪器警告
settings-general-interface-connected_trackers_warning-description = 启用本选项后,每次当退出 SlimeVR 时仍有追踪器连接着会显示通知,提醒你在使用完毕时关闭追踪器电源来节省电池电量。
settings-general-interface-connected_trackers_warning-label = 退出时,有追踪器连接中则显示警告
## Serial settings
@@ -762,6 +770,11 @@ onboarding-choose_mounting-manual_mounting = 手动设置佩戴方向
# Italized text
onboarding-choose_mounting-manual_mounting-label = 推荐
onboarding-choose_mounting-manual_mounting-description = 这将需要你手动选择每个追踪器的佩戴方向
# Multiline text
onboarding-choose_mounting-manual_modal-title = 确定要进行自动佩戴校准?
onboarding-choose_mounting-manual_modal-description = <b>我们建议新手使用手动佩戴校准</b>,因为自动佩戴校准的姿势要一次做正确比较困难,可能需要一些练习。
onboarding-choose_mounting-manual_modal-confirm = 我已知晓
onboarding-choose_mounting-manual_modal-cancel = 取消
## Tracker manual mounting setup
@@ -890,6 +903,15 @@ onboarding-automatic_proportions-error_modal-confirm = 了解!
home-no_trackers = 未检测到或未分配追踪器
## Trackers Still On notification
trackers_still_on-modal-title = 有追踪器的电源还开着
trackers_still_on-modal-description =
至少有一个追踪器的电源还开着。
确定要退出 SlimeVR 吗?
trackers_still_on-modal-confirm = 退出 SlimeVR
trackers_still_on-modal-cancel = 等会…
## Status system
status_system-StatusTrackerReset = 建议执行完整重置,因为有至少一个追踪器未被调整。
+25 -7
View File
@@ -146,6 +146,8 @@ widget-imu_visualizer-rotation_hide = 隱藏
## Widget: Skeleton Visualizer
widget-skeleton_visualizer-preview = 骨架預覽
widget-skeleton_visualizer-hide = 隱藏
## Tracker status
@@ -155,6 +157,7 @@ tracker-status-error = 錯誤
tracker-status-disconnected = 連線中斷
tracker-status-occluded = 被遮擋
tracker-status-ok = 已連線
tracker-status-timed_out = 已逾時
## Tracker status columns
@@ -441,6 +444,9 @@ settings-general-interface-feedback_sound = 聲音回饋
settings-general-interface-feedback_sound-description = 啟用本選項後,觸發重置時會發出提示音。
settings-general-interface-feedback_sound-label = 聲音回饋
settings-general-interface-feedback_sound-volume = 聲音回饋音量
settings-general-interface-connected_trackers_warning = 已連接追蹤器警告
settings-general-interface-connected_trackers_warning-description = 啟用本選項後,每次當退出 SlimeVR 時仍有追蹤器連接著會顯示通知,提醒你在使用完畢時關閉追蹤器電源來節省電池電量。
settings-general-interface-connected_trackers_warning-label = 當退出程式時,有追蹤器連接中則顯示警告
## Serial settings
@@ -763,6 +769,11 @@ onboarding-choose_mounting-manual_mounting = 手動配戴校正
# Italized text
onboarding-choose_mounting-manual_mounting-label = 推薦使用
onboarding-choose_mounting-manual_mounting-description = 本選項可以讓你選擇每個追蹤器的配戴方位
# Multiline text
onboarding-choose_mounting-manual_modal-title = 確定要進行自動配戴校正?
onboarding-choose_mounting-manual_modal-description = <b>我們建議新手使用手動配戴校正</b>,因為自動配戴校正的姿勢要一次做正確比較困難,可能需要一些練習。
onboarding-choose_mounting-manual_modal-confirm = 我確定要這樣做
onboarding-choose_mounting-manual_modal-cancel = 取消
## Tracker manual mounting setup
@@ -803,10 +814,10 @@ onboarding-choose_proportions-description =
onboarding-choose_proportions-auto_proportions = 自動軀幹比例校正
# Italized text
onboarding-choose_proportions-auto_proportions-subtitle = 推薦使用
onboarding-choose_proportions-auto_proportions-descriptionv2 =
onboarding-choose_proportions-auto_proportions-descriptionv3 =
本選項會從您的身體動作錄製一段樣本,並通過演算法來推算您的軀幹比例。
<b>使用本功能需要連接頭戴顯示器到 SlimeVR!</b>
<b>使用本功能需要連接頭戴顯示器到 SlimeVR,並且配戴在頭部!</b>
onboarding-choose_proportions-manual_proportions = 手動軀幹比例校正
# Italized text
onboarding-choose_proportions-manual_proportions-subtitle = 適合進行微調
@@ -837,13 +848,14 @@ onboarding-automatic_proportions-put_trackers_on-description = 為了校準你
onboarding-automatic_proportions-put_trackers_on-next = 我所有的追蹤器都戴好了!
onboarding-automatic_proportions-requirements-title = 使用需求
# Each line of text is a different list item
onboarding-automatic_proportions-requirements-description =
onboarding-automatic_proportions-requirements-descriptionv2 =
你需要足夠的追蹤器以進行足部追蹤(通常為 5 個)。
你已經打開追蹤器與頭戴顯示器的電源。
追蹤器的電源已經打開並已經穿著在身上。
你需要穿戴上追蹤器與頭戴顯示器。
你的追蹤器與頭戴顯示器都已經連接到 SlimeVR 伺服器。
你的追蹤器與頭戴顯示器在 SlimeVR 伺服器中運作正常。
你的頭戴顯示器會回報定位資料給 SlimeVR 伺服器(通常為執行 SteamVR 並透過 SlimeVR 的 SteamVR 驅動程式來連接 SlimeVR)。
追蹤器與頭戴顯示器都已經連接到 SlimeVR 伺服器,並且正常運作(亦即沒有卡頓或斷線等狀況)。
追蹤器與頭戴顯示器在 SlimeVR 伺服器中運作正常。
頭戴顯示器會回報定位資料給 SlimeVR 伺服器(通常為執行 SteamVR 並透過 SlimeVR 的 SteamVR 驅動程式來連接 SlimeVR)。
追蹤狀態正常且能反映你的移動姿態(例如,進行完全重置後,踢腿、彎曲、坐下時的肢體方向是正確的)。
onboarding-automatic_proportions-requirements-next = 我已閱讀使用需求
onboarding-automatic_proportions-check_height-title = 檢查您的身高
onboarding-automatic_proportions-check_height-description = 我們會透過頭戴顯示器回報的高度來推算您的實際身高,但我們仍建議您檢查一下數值是否正確。
@@ -893,6 +905,12 @@ home-no_trackers = 未偵測到或未分配追蹤器
## Trackers Still On notification
trackers_still_on-modal-title = 有追蹤器的電源還開著
trackers_still_on-modal-description =
至少有一個追蹤器的電源還開著。
確定要退出 SlimeVR 嗎?
trackers_still_on-modal-confirm = 退出 SlimeVR
trackers_still_on-modal-cancel = 先不要…
## Status system
Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.
+3
View File
@@ -0,0 +1,3 @@
export default {
'**/*.rs': 'cargo fmt --',
};
+2 -1
View File
@@ -28,12 +28,13 @@ shadow-rs = "0.23"
[dependencies]
serde_json = "1"
serde = { version = "1", features = ["derive"] }
tauri = { version = "2.0.0-alpha", features = ["devtools"] }
tauri = { version = "2.0.0-alpha", features = ["tray-icon", "devtools", "icon-png"] }
tauri-runtime = "1.0.0-alpha"
tauri-plugin-dialog = "2.0.0-alpha"
tauri-plugin-fs = "2.0.0-alpha"
tauri-plugin-os = "2.0.0-alpha"
tauri-plugin-shell = "2.0.0-alpha"
tauri-plugin-store = "=2.0.0-alpha.1"
tauri-plugin-window = { version = "2.0.0-alpha", features = ["devtools"] }
flexi_logger = "0.25"
log-panics = { version = "2", features = ["with-backtrace"] }
Binary file not shown.

After

Width:  |  Height:  |  Size: 922 B

+12 -4
View File
@@ -11,9 +11,7 @@ use std::time::Instant;
use clap::Parser;
use color_eyre::Result;
use state::WindowState;
use tauri::Manager;
use tauri::RunEvent;
use tauri::WindowEvent;
use tauri::{Manager, RunEvent, WindowEvent};
use tauri_plugin_shell::process::CommandChild;
use crate::util::{
@@ -21,6 +19,7 @@ use crate::util::{
};
mod state;
mod tray;
mod util;
#[tauri::command]
@@ -170,12 +169,15 @@ fn main() -> Result<()> {
.plugin(tauri_plugin_fs::init())
.plugin(tauri_plugin_os::init())
.plugin(tauri_plugin_shell::init())
.plugin(tauri_plugin_store::Builder::default().build())
.plugin(tauri_plugin_window::init())
.invoke_handler(tauri::generate_handler![
update_window_state,
logging,
erroring,
warning
warning,
tray::update_translations,
tray::update_tray_text
])
.setup(move |app| {
let window_state =
@@ -200,6 +202,12 @@ fn main() -> Result<()> {
window_state.update_window(&window, false)?;
}
#[cfg(desktop)]
{
let handle = app.handle();
tray::create_tray(&handle)?;
}
app.manage(Mutex::new(window_state));
if let Some((java_bin, p)) = server_info {
+119
View File
@@ -0,0 +1,119 @@
use std::{collections::HashMap, sync::Mutex};
use tauri::{
menu::{Menu, MenuItem, MenuItemKind},
tray::{ClickType, TrayIconBuilder},
AppHandle, Icon, Manager, Runtime, State,
};
pub struct TrayMenu<R: Runtime>(Menu<R>);
pub struct TrayTranslations {
store: Mutex<HashMap<String, String>>,
}
impl TrayTranslations {
fn get(&self, key: &str) -> String {
let lock = self.store.lock().unwrap();
lock.get(key)
.map_or_else(|| key.to_string(), |v| v.to_string())
}
}
#[tauri::command]
pub fn update_translations<R: Runtime>(
app: AppHandle<R>,
i18n: State<TrayTranslations>,
menu: State<TrayMenu<R>>,
new_i18n: HashMap<String, String>,
) -> color_eyre::Result<(), String> {
{
let mut lock = i18n.store.lock().map_err(|e| e.to_string())?;
for (new_key, new_value) in new_i18n {
lock.insert(new_key, new_value);
}
}
update_tray_text(app, i18n, menu)?;
Ok(())
}
#[tauri::command]
pub fn update_tray_text<R: Runtime>(
app: AppHandle<R>,
i18n: State<TrayTranslations>,
menu: State<TrayMenu<R>>,
) -> color_eyre::Result<(), String> {
if let Some((window, MenuItemKind::MenuItem(toggle_i))) =
app.get_window("main").zip(menu.0.get("toggle"))
{
let new_title = if window.is_visible().unwrap_or_default() {
i18n.get("tray_menu-hide")
} else {
i18n.get("tray_menu-show")
};
toggle_i.set_text(new_title).map_err(|e| e.to_string())?;
}
if let Some(MenuItemKind::MenuItem(quit_i)) = menu.0.get("quit") {
quit_i
.set_text(i18n.get("tray_menu-quit"))
.map_err(|e| e.to_string())?;
}
Ok(())
}
pub fn create_tray<R: Runtime>(app: &tauri::AppHandle<R>) -> tauri::Result<()> {
let toggle_i = MenuItem::with_id(app, "toggle", "Hide", true, None);
let quit_i = MenuItem::with_id(app, "quit", "Quit", true, None);
let menu1 = Menu::with_items(app, &[&toggle_i, &quit_i])?;
let _ = TrayIconBuilder::with_id("tray-1")
.menu(&menu1)
.title("SlimeVR")
.tooltip("SlimeVR")
.icon_as_template(true)
.menu_on_left_click(false)
.icon(if cfg!(target_os = "macos") {
Icon::Raw(include_bytes!("../icons/appleTrayIcon.png").to_vec())
} else {
Icon::Raw(include_bytes!("../icons/128x128.png").to_vec())
})
.on_menu_event(move |app, event| match event.id.as_ref() {
"quit" => app.emit_all("try-close", "tray").unwrap(),
"toggle" => {
let i18n = app.state::<TrayTranslations>();
if let Some(window) = app.get_window("main") {
let new_title = if window.is_visible().unwrap_or_default() {
let _ = window.hide();
i18n.get("tray_menu-show")
} else {
let _ = window.show();
let _ = window.set_focus();
i18n.get("tray_menu-hide")
};
toggle_i.set_text(new_title).unwrap();
}
}
_ => {}
})
.on_tray_event(|tray, event| {
if event.click_type == ClickType::Left {
let app = tray.app_handle();
if let Some(window) = app.get_window("main") {
let _ = window.show();
let _ = window.set_focus();
}
}
})
.build(app)?;
app.manage(TrayMenu(menu1));
app.manage(TrayTranslations {
store: Default::default(),
});
Ok(())
}
+2 -2
View File
@@ -6,8 +6,8 @@
"build": {
"distDir": "../dist",
"devPath": "http://localhost:5173",
"beforeDevCommand": "npm run start",
"beforeBuildCommand": "npm run build"
"beforeDevCommand": "pnpm run start",
"beforeBuildCommand": "pnpm run build"
},
"plugins": {
"shell": {
+3 -2
View File
@@ -53,6 +53,7 @@ import { InterfaceSettings } from './components/settings/pages/InterfaceSettings
import { error, log } from './utils/logging';
import { AppLayout } from './AppLayout';
import { Preload } from './components/Preload';
import { UnknownDeviceModal } from './components/UnknownDeviceModal';
export const GH_REPO = 'SlimeVR/SlimeVR-Server';
export const VersionContext = createContext('');
@@ -66,6 +67,7 @@ function Layout() {
<>
<SerialDetectionModal></SerialDetectionModal>
<VersionUpdateModal></VersionUpdateModal>
<UnknownDeviceModal></UnknownDeviceModal>
<Routes>
<Route element={<AppLayout />}>
<Route
@@ -227,8 +229,7 @@ export default function App() {
}
);
return () => {
// eslint-disable-next-line @typescript-eslint/no-empty-function
unlisten.then(() => {});
unlisten.then((fn) => fn());
};
}, []);
}
+2
View File
@@ -8,6 +8,8 @@ export function Preload() {
<link rel="preload" href="/images/reset-pose.webp" as="image" />
<link rel="preload" href="/images/slimes.webp" as="image" />
<link rel="preload" href="/videos/autobone.webm" as="video" />
<link
rel="preload"
href="/sounds/quick-reset-started-sound.mp3"
+60 -14
View File
@@ -25,6 +25,8 @@ import { invoke } from '@tauri-apps/api';
import { useTrackers } from '@/hooks/tracker';
import { TrackersStillOnModal } from './TrackersStillOnModal';
import { useConfig } from '@/hooks/config';
import { listen } from '@tauri-apps/api/event';
import { TrayOrExitModal } from './TrayOrExitModal';
export function VersionTag() {
return (
@@ -55,18 +57,52 @@ export function TopBar({
const { useRPCPacket, sendRPCPacket } = useWebsocketAPI();
const { useConnectedIMUTrackers } = useTrackers();
const connectedIMUTrackers = useConnectedIMUTrackers();
const { config } = useConfig();
const { config, setConfig } = useConfig();
const version = useContext(VersionContext);
const [localIp, setLocalIp] = useState<string | null>(null);
const [showConnectedTrackersWarning, setConnectedTrackerWarning] =
useState(false);
const [showTrayOrExitModal, setShowTrayOrExitModal] = useState(false);
const doesMatchSettings = useMatch({
path: '/settings/*',
});
const closeApp = async () => {
await invoke('update_window_state');
getCurrent().close();
await getCurrent().close();
};
const tryCloseApp = async (dontTray = false) => {
if (isTauri && config?.useTray === null) {
setShowTrayOrExitModal(true);
return;
}
if (config?.useTray && !dontTray) {
await getCurrent().hide();
await invoke('update_tray_text');
} else if (
config?.connectedTrackersWarning &&
connectedIMUTrackers.filter(
(t) => t.tracker.status !== TrackerStatus.TIMED_OUT
).length > 0
) {
setConnectedTrackerWarning(true);
} else {
await closeApp();
}
};
useEffect(() => {
const unlisten = listen('try-close', async () => {
const window = getCurrent();
await window.show();
await window.setFocus();
await invoke('update_tray_text');
await tryCloseApp(true);
});
return () => {
unlisten.then((fn) => fn());
};
}, [config?.useTray, config?.connectedTrackersWarning]);
useEffect(() => {
sendRPCPacket(RpcMessage.ServerInfosRequest, new ServerInfosRequestT());
@@ -210,18 +246,7 @@ export function TopBar({
</div>
<div
className="flex items-center justify-center hover:bg-background-60 rounded-full w-7 h-7"
onClick={() => {
if (
config?.connectedTrackersWarning &&
connectedIMUTrackers.filter(
(t) => t.tracker.status !== TrackerStatus.TIMED_OUT
).length > 0
) {
setConnectedTrackerWarning(true);
} else {
closeApp();
}
}}
onClick={() => tryCloseApp()}
>
<CloseIcon></CloseIcon>
</div>
@@ -235,6 +260,27 @@ export function TopBar({
</div>
)}
</div>
<TrayOrExitModal
isOpen={showTrayOrExitModal}
accept={async (useTray) => {
await setConfig({ useTray });
setShowTrayOrExitModal(false);
// Doing this in here just in case config doesn't get updated in time
if (useTray) {
await getCurrent().hide();
await invoke('update_tray_text');
} else if (
config?.connectedTrackersWarning &&
connectedIMUTrackers.length > 0
) {
setConnectedTrackerWarning(true);
} else {
await closeApp();
}
}}
cancel={() => setShowTrayOrExitModal(false)}
/>
<TrackersStillOnModal
isOpen={showConnectedTrackersWarning}
accept={() => closeApp()}
+78
View File
@@ -0,0 +1,78 @@
import { useLocalization } from '@fluent/react';
import { BaseModal } from './commons/BaseModal';
import { Button } from './commons/Button';
import { Typography } from './commons/Typography';
import { useForm } from 'react-hook-form';
import { Radio } from './commons/Radio';
interface TrayOrExitForm {
exitType: string;
}
export function TrayOrExitModal({
isOpen = true,
cancel,
accept,
}: {
/**
* Is the parent/sibling component opened?
*/
isOpen: boolean;
/**
* Function to trigger when you still want to close the app
* @param tray If asked for close to tray
*/
accept: (tray: boolean) => void;
/**
* Function to trigger when cancelling app close
*/
cancel?: () => void;
}) {
const { l10n } = useLocalization();
const { control, handleSubmit } = useForm<TrayOrExitForm>({
defaultValues: {
exitType: '0',
},
});
return (
<BaseModal isOpen={isOpen} onRequestClose={cancel}>
<form
className="flex flex-col gap-3 w-[27rem]"
onSubmit={handleSubmit((form) => accept(form.exitType === '1'))}
>
<div className="flex flex-col items-center gap-3 fill-accent-background-20">
<div className="flex flex-col items-center gap-2">
<Typography variant="main-title">
{l10n.getString('tray_or_exit_modal-title')}
</Typography>
<div>
<Typography variant="standard" whitespace="whitespace-pre-line">
{l10n.getString('tray_or_exit_modal-description')}
</Typography>
</div>
</div>
<Radio
control={control}
name="exitType"
label={l10n.getString('tray_or_exit_modal-radio-exit')}
value="0"
></Radio>
<Radio
control={control}
name="exitType"
label={l10n.getString('tray_or_exit_modal-radio-tray')}
value="1"
></Radio>
</div>
<Button type="submit" variant="primary">
{l10n.getString('tray_or_exit_modal-submit')}
</Button>
<Button variant="tertiary" onClick={cancel}>
{l10n.getString('tray_or_exit_modal-cancel')}
</Button>
</form>
</BaseModal>
);
}
+104
View File
@@ -0,0 +1,104 @@
import { useState } from 'react';
import { BaseModal } from './commons/BaseModal';
import { Typography } from './commons/Typography';
import { Button } from './commons/Button';
import { Localized, useLocalization } from '@fluent/react';
import { useWebsocketAPI } from '@/hooks/websocket-api';
import { useLocation } from 'react-router-dom';
import {
AddUnknownDeviceRequestT,
RpcMessage,
UnknownDeviceHandshakeNotificationT,
} from 'solarxr-protocol';
import { useDebouncedEffect } from '@/hooks/timeout';
import { useAppContext } from '@/hooks/app';
export function UnknownDeviceModal() {
const { l10n } = useLocalization();
const [open, setOpen] = useState(0);
const { pathname } = useLocation();
const { state, dispatch } = useAppContext();
const [currentTracker, setCurrentTracker] = useState<string | null>(null);
const { useRPCPacket, sendRPCPacket } = useWebsocketAPI();
useRPCPacket(
RpcMessage.UnknownDeviceHandshakeNotification,
({ macAddress }: UnknownDeviceHandshakeNotificationT) => {
if (
['/onboarding/connect-trackers'].includes(pathname) ||
state.ignoredTrackers.has(macAddress as string) ||
(currentTracker !== null && currentTracker !== macAddress)
)
return;
setCurrentTracker(macAddress as string);
setOpen((old) => old + 1);
}
);
useDebouncedEffect(
() => {
setOpen(0);
setCurrentTracker(null);
},
[open],
3000
);
const closeModal = () => {
setCurrentTracker(null);
setOpen(0);
};
return (
<BaseModal isOpen={open !== 0}>
<div className="flex flex-col gap-3">
<div className="flex flex-col items-center gap-3 fill-accent-background-20">
<div className="flex flex-col items-center gap-2">
<Typography variant="main-title">
{l10n.getString('unknown_device-modal-title')}
</Typography>
<Localized
id="unknown_device-modal-description"
elems={{ b: <b></b> }}
vars={{ deviceId: currentTracker ?? 'ERROR' }}
>
<Typography
variant="standard"
textAlign="text-center"
whitespace="whitespace-pre-line"
>
There is a new device in here!
</Typography>
</Localized>
</div>
</div>
<Button
variant="primary"
onClick={() => {
sendRPCPacket(
RpcMessage.AddUnknownDeviceRequest,
new AddUnknownDeviceRequestT(currentTracker)
);
closeModal();
}}
>
{l10n.getString('unknown_device-modal-confirm')}
</Button>
<Button
variant="tertiary"
onClick={() => {
dispatch({
type: 'ignoreTracker',
value: currentTracker as string,
});
closeModal();
}}
>
{l10n.getString('unknown_device-modal-forget')}
</Button>
</div>
</BaseModal>
);
}
@@ -12,6 +12,7 @@ export function BodyInteractions({
width = 228,
dotsSize = 15,
variant = 'tracker-select',
mirror,
onSelectRole,
}: {
leftControls?: ReactNode;
@@ -22,6 +23,7 @@ export function BodyInteractions({
assignedRoles: BodyPart[];
onSelectRole: (role: BodyPart) => void;
highlightedRoles: BodyPart[];
mirror: boolean;
}) {
const { isMobile } = useBreakpoint('mobile');
@@ -166,7 +168,7 @@ export function BodyInteractions({
variant === 'tracker-select' && 'mobile:mx-0 xs:mx-10'
)}
>
<PersonFrontIcon width={width}></PersonFrontIcon>
<PersonFrontIcon width={width} mirror={mirror}></PersonFrontIcon>
{slotsButtonsPos.map(
({ top, left, height, width, id, hidden, buttonOffset }) => (
<div
+5 -2
View File
@@ -47,7 +47,7 @@ export function CheckBox({
className={classNames(
{
'rounded-lg': outlined,
'text-background-30': !outlined,
'text-background-30': !outlined || disabled,
'bg-background-60': outlined && color === 'primary',
'bg-background-70': outlined && color === 'secondary',
'bg-background-50': outlined && color === 'tertiary',
@@ -71,12 +71,14 @@ export function CheckBox({
name={name}
className={classes.checkbox}
type="checkbox"
disabled={disabled}
{...props}
/>
{variant === 'toggle' && (
<div
className={classNames(classes.toggle, {
'bg-accent-background-30': value,
'bg-accent-background-30': value && !disabled,
'bg-accent-background-50': value && disabled,
'bg-background-50':
(!value && color == 'primary') || color == 'secondary',
'bg-background-40': !value && color == 'tertiary',
@@ -86,6 +88,7 @@ export function CheckBox({
className={classNames(classes.pin, {
'left-0': !value,
'right-0': value,
'bg-background-30': disabled,
})}
></div>
</div>
+2 -2
View File
@@ -98,10 +98,10 @@ export const InputInside = forwardRef<
></input>
{type === 'password' && (
<div
className="fill-background-10 absolute top-0 h-full flex flex-col justify-center right-0 p-4"
className="fill-background-10 absolute inset-y-0 right-0 pr-6 z-10 my-auto w-[16px] h-[16px]"
onClick={togglePassword}
>
<EyeIcon></EyeIcon>
<EyeIcon width={16} closed={forceText}></EyeIcon>
</div>
)}
{error?.message && (
+44 -15
View File
@@ -1,7 +1,36 @@
import { BodyPart } from 'solarxr-protocol';
export function PersonFrontIcon({ width }: { width?: number }) {
export const SIDES = [
{
shoulder: BodyPart.LEFT_SHOULDER,
upperArm: BodyPart.LEFT_UPPER_ARM,
lowerArm: BodyPart.LEFT_LOWER_ARM,
hand: BodyPart.LEFT_HAND,
upperLeg: BodyPart.LEFT_UPPER_LEG,
lowerLeg: BodyPart.LEFT_LOWER_LEG,
foot: BodyPart.LEFT_FOOT,
},
{
shoulder: BodyPart.RIGHT_SHOULDER,
upperArm: BodyPart.RIGHT_UPPER_ARM,
lowerArm: BodyPart.RIGHT_LOWER_ARM,
hand: BodyPart.RIGHT_HAND,
upperLeg: BodyPart.RIGHT_UPPER_LEG,
lowerLeg: BodyPart.RIGHT_LOWER_LEG,
foot: BodyPart.RIGHT_FOOT,
},
];
export function PersonFrontIcon({
width,
mirror = true,
}: {
width?: number;
mirror?: boolean;
}) {
const CIRCLE_RADIUS = 0.0001;
const left = +!mirror;
const right = +mirror;
return (
<svg
@@ -62,49 +91,49 @@ export function PersonFrontIcon({ width }: { width?: number }) {
cx="128"
cy="218"
r={CIRCLE_RADIUS}
id={BodyPart[BodyPart.RIGHT_HAND]}
id={BodyPart[SIDES[right].hand]}
/>
<circle
className="body-part-circle"
cx="115"
cy="140"
r={CIRCLE_RADIUS}
id={BodyPart[BodyPart.RIGHT_UPPER_ARM]}
id={BodyPart[SIDES[right].upperArm]}
/>
<circle
className="body-part-circle"
cx="105"
cy="105"
r={CIRCLE_RADIUS}
id={BodyPart[BodyPart.RIGHT_SHOULDER]}
id={BodyPart[SIDES[right].shoulder]}
/>
<circle
className="body-part-circle"
cx="125"
cy="194"
r={CIRCLE_RADIUS}
id={BodyPart[BodyPart.RIGHT_LOWER_ARM]}
id={BodyPart[SIDES[right].lowerArm]}
/>
<circle
className="body-part-circle"
cx="97.004"
cy="360"
r={CIRCLE_RADIUS}
id={BodyPart[BodyPart.RIGHT_LOWER_LEG]}
id={BodyPart[SIDES[right].lowerLeg]}
/>
<circle
className="body-part-circle"
cx="97"
cy="250"
r={CIRCLE_RADIUS}
id={BodyPart[BodyPart.RIGHT_UPPER_LEG]}
id={BodyPart[SIDES[right].upperLeg]}
/>
<circle
className="body-part-circle"
cx="97.004"
cy="380"
r={CIRCLE_RADIUS}
id={BodyPart[BodyPart.RIGHT_FOOT]}
id={BodyPart[SIDES[right].foot]}
/>
<circle
@@ -112,7 +141,7 @@ export function PersonFrontIcon({ width }: { width?: number }) {
cx="36"
cy="218"
r={CIRCLE_RADIUS}
id={BodyPart[BodyPart.LEFT_HAND]}
id={BodyPart[SIDES[left].hand]}
/>
<circle
@@ -120,28 +149,28 @@ export function PersonFrontIcon({ width }: { width?: number }) {
cx="50"
cy="140"
r={CIRCLE_RADIUS}
id={BodyPart[BodyPart.LEFT_UPPER_ARM]}
id={BodyPart[SIDES[left].upperArm]}
/>
<circle
className="body-part-circle"
cx="58"
cy="105"
r={CIRCLE_RADIUS}
id={BodyPart[BodyPart.LEFT_SHOULDER]}
id={BodyPart[SIDES[left].shoulder]}
/>
<circle
className="body-part-circle"
cx="39"
cy="194"
r={CIRCLE_RADIUS}
id={BodyPart[BodyPart.LEFT_LOWER_ARM]}
id={BodyPart[SIDES[left].lowerArm]}
/>
<circle
className="body-part-circle"
cx="67.004"
cy="360"
r={CIRCLE_RADIUS}
id={BodyPart[BodyPart.LEFT_LOWER_LEG]}
id={BodyPart[SIDES[left].lowerLeg]}
/>
<circle
@@ -149,14 +178,14 @@ export function PersonFrontIcon({ width }: { width?: number }) {
cx="67"
cy="250"
r={CIRCLE_RADIUS}
id={BodyPart[BodyPart.LEFT_UPPER_LEG]}
id={BodyPart[SIDES[left].upperLeg]}
/>
<circle
className="body-part-circle"
cx="67.004"
cy="380"
r={CIRCLE_RADIUS}
id={BodyPart[BodyPart.LEFT_FOOT]}
id={BodyPart[SIDES[left].foot]}
/>
</svg>
);
+30 -6
View File
@@ -1,12 +1,36 @@
export function EyeIcon() {
return (
export function EyeIcon({
width = 14,
closed = false,
}: {
width?: number;
closed?: boolean;
}) {
return closed ? (
<svg
width="14"
height="10"
viewBox="0 0 14 10"
xmlns="http://www.w3.org/2000/svg"
width={width}
height={width}
viewBox="0 0 24 24"
fill="currentColor"
>
<path d="M9.09817 4.99914C9.09817 6.11133 8.15709 7.01294 6.9962 7.01294C5.83532 7.01294 4.89424 6.11133 4.89424 4.99914C4.89424 3.88693 5.83532 2.98533 6.9962 2.98533C8.15709 2.98532 9.09817 3.88694 9.09817 4.99914ZM7 0.806091C5.79804 0.811423 4.55217 1.10403 3.37279 1.66426C2.49711 2.09735 1.64372 2.70838 0.90293 3.46257C0.539093 3.84756 0.0750283 4.40501 0 4.99979C0.00886667 5.515 0.561517 6.15093 0.90293 6.53703C1.5976 7.2616 2.42877 7.85557 3.37279 8.33578C4.47262 8.86954 5.68997 9.17685 7 9.19395C8.2031 9.18853 9.44869 8.89255 10.6268 8.33578C11.5024 7.90269 12.3563 7.29122 13.0971 6.53703C13.4609 6.15204 13.925 5.59457 14 4.99979C13.9911 4.48458 13.4385 3.84863 13.0971 3.46254C12.4024 2.73797 11.5708 2.14446 10.6268 1.66423C9.52751 1.13088 8.30716 0.82568 7 0.806091ZM6.99911 1.84732C8.8205 1.84732 10.297 3.25891 10.297 5.00025C10.297 6.74157 8.8205 8.15316 6.99911 8.15316C5.17773 8.15316 3.70124 6.74156 3.70124 5.00025C3.70124 3.25891 5.17773 1.84732 6.99911 1.84732Z" />
<path d="M3.53 2.47a.75.75 0 0 0-1.06 1.06l18 18a.75.75 0 1 0 1.06-1.06l-18-18ZM22.676 12.553a11.249 11.249 0 0 1-2.631 4.31l-3.099-3.099a5.25 5.25 0 0 0-6.71-6.71L7.759 4.577a11.217 11.217 0 0 1 4.242-.827c4.97 0 9.185 3.223 10.675 7.69.12.362.12.752 0 1.113Z" />
<path d="M15.75 12c0 .18-.013.357-.037.53l-4.244-4.243A3.75 3.75 0 0 1 15.75 12ZM12.53 15.713l-4.243-4.244a3.75 3.75 0 0 0 4.244 4.243Z" />
<path d="M6.75 12c0-.619.107-1.213.304-1.764l-3.1-3.1a11.25 11.25 0 0 0-2.63 4.31c-.12.362-.12.752 0 1.114 1.489 4.467 5.704 7.69 10.675 7.69 1.5 0 2.933-.294 4.242-.827l-2.477-2.477A5.25 5.25 0 0 1 6.75 12Z" />
</svg>
) : (
<svg
xmlns="http://www.w3.org/2000/svg"
width={width}
height={width}
viewBox="0 0 24 24"
fill="currentColor"
>
<path d="M12 15a3 3 0 1 0 0-6 3 3 0 0 0 0 6Z" />
<path
fillRule="evenodd"
d="M1.323 11.447C2.811 6.976 7.028 3.75 12.001 3.75c4.97 0 9.185 3.223 10.675 7.69.12.362.12.752 0 1.113-1.487 4.471-5.705 7.697-10.677 7.697-4.97 0-9.186-3.223-10.675-7.69a1.762 1.762 0 0 1 0-1.113ZM17.25 12a5.25 5.25 0 1 1-10.5 0 5.25 5.25 0 0 1 10.5 0Z"
clipRule="evenodd"
/>
</svg>
);
}
@@ -5,3 +5,20 @@ export function PlayIcon({ width = 33 }: { width?: number }) {
</svg>
);
}
export function PlayCircleIcon({ width = 24 }: { width?: number }) {
return (
<svg
xmlns="http://www.w3.org/2000/svg"
width={width}
viewBox="0 0 24 24"
fill="inherit"
>
<path
fillRule="evenodd"
d="M2.25 12c0-5.385 4.365-9.75 9.75-9.75s9.75 4.365 9.75 9.75-4.365 9.75-9.75 9.75S2.25 17.385 2.25 12Zm14.024-.983a1.125 1.125 0 0 1 0 1.966l-5.603 3.113A1.125 1.125 0 0 1 9 15.113V8.887c0-.857.921-1.4 1.671-.983l5.603 3.113Z"
clipRule="evenodd"
/>
</svg>
);
}
@@ -1,4 +1,4 @@
export function QuestionIcon({ width = 35 }: { width?: number }) {
export function QuestionIcon({ width = 23 }: { width?: number }) {
return (
<svg
xmlns="http://www.w3.org/2000/svg"
@@ -5,7 +5,16 @@ import { useTrackers } from '@/hooks/tracker';
import { BodyInteractions } from '@/components/commons/BodyInteractions';
import { TrackerPartCard } from '@/components/tracker/TrackerPartCard';
import { BodyPartError } from './pages/trackers-assign/TrackerAssignment';
import { SIDES } from '@/components/commons/PersonFrontIcon';
export const LOWER_BODY = new Set([
BodyPart.LEFT_FOOT,
BodyPart.RIGHT_FOOT,
BodyPart.LEFT_LOWER_LEG,
BodyPart.RIGHT_LOWER_LEG,
BodyPart.LEFT_UPPER_LEG,
BodyPart.RIGHT_UPPER_LEG,
]);
export const SPINE_PARTS = [
BodyPart.UPPER_CHEST,
BodyPart.CHEST,
@@ -37,6 +46,7 @@ export const ASSIGNMENT_RULES: Partial<
export function BodyAssignment({
advanced,
mirror,
onRoleSelected,
rolesWithErrors = {},
highlightedRoles = [],
@@ -44,6 +54,7 @@ export function BodyAssignment({
width,
}: {
advanced: boolean;
mirror: boolean;
onlyAssigned?: boolean;
rolesWithErrors?: Partial<Record<BodyPart, BodyPartError>>;
highlightedRoles?: BodyPart[];
@@ -80,10 +91,14 @@ export function BodyAssignment({
[assignedTrackers]
);
const left = +!mirror;
const right = +mirror;
return (
<>
<BodyInteractions
width={width}
mirror={mirror}
assignedRoles={assignedRoles}
highlightedRoles={highlightedRoles}
onSelectRole={onRoleSelected}
@@ -116,39 +131,39 @@ export function BodyAssignment({
{advanced && (
<TrackerPartCard
onlyAssigned={onlyAssigned}
roleError={rolesWithErrors[BodyPart.LEFT_SHOULDER]?.label}
td={trackerPartGrouped[BodyPart.LEFT_SHOULDER]}
role={BodyPart.LEFT_SHOULDER}
onClick={() => onRoleSelected(BodyPart.LEFT_SHOULDER)}
roleError={rolesWithErrors[SIDES[left].shoulder]?.label}
td={trackerPartGrouped[SIDES[left].shoulder]}
role={SIDES[left].shoulder}
onClick={() => onRoleSelected(SIDES[left].shoulder)}
direction="right"
/>
)}
<TrackerPartCard
onlyAssigned={onlyAssigned}
roleError={rolesWithErrors[BodyPart.LEFT_UPPER_ARM]?.label}
td={trackerPartGrouped[BodyPart.LEFT_UPPER_ARM]}
role={BodyPart.LEFT_UPPER_ARM}
onClick={() => onRoleSelected(BodyPart.LEFT_UPPER_ARM)}
roleError={rolesWithErrors[SIDES[left].upperArm]?.label}
td={trackerPartGrouped[SIDES[left].upperArm]}
role={SIDES[left].upperArm}
onClick={() => onRoleSelected(SIDES[left].upperArm)}
direction="right"
/>
</div>
<div className="flex flex-col gap-2">
<TrackerPartCard
onlyAssigned={onlyAssigned}
roleError={rolesWithErrors[BodyPart.LEFT_LOWER_ARM]?.label}
td={trackerPartGrouped[BodyPart.LEFT_LOWER_ARM]}
role={BodyPart.LEFT_LOWER_ARM}
onClick={() => onRoleSelected(BodyPart.LEFT_LOWER_ARM)}
roleError={rolesWithErrors[SIDES[left].lowerArm]?.label}
td={trackerPartGrouped[SIDES[left].lowerArm]}
role={SIDES[left].lowerArm}
onClick={() => onRoleSelected(SIDES[left].lowerArm)}
direction="right"
/>
{advanced && (
<TrackerPartCard
onlyAssigned={onlyAssigned}
roleError={rolesWithErrors[BodyPart.LEFT_HAND]?.label}
td={trackerPartGrouped[BodyPart.LEFT_HAND]}
role={BodyPart.LEFT_HAND}
onClick={() => onRoleSelected(BodyPart.LEFT_HAND)}
roleError={rolesWithErrors[SIDES[left].hand]?.label}
td={trackerPartGrouped[SIDES[left].hand]}
role={SIDES[left].hand}
onClick={() => onRoleSelected(SIDES[left].hand)}
direction="right"
/>
)}
@@ -156,27 +171,27 @@ export function BodyAssignment({
<div className="flex flex-col gap-2">
<TrackerPartCard
onlyAssigned={onlyAssigned}
roleError={rolesWithErrors[BodyPart.LEFT_UPPER_LEG]?.label}
td={trackerPartGrouped[BodyPart.LEFT_UPPER_LEG]}
role={BodyPart.LEFT_UPPER_LEG}
onClick={() => onRoleSelected(BodyPart.LEFT_UPPER_LEG)}
roleError={rolesWithErrors[SIDES[left].upperLeg]?.label}
td={trackerPartGrouped[SIDES[left].upperLeg]}
role={SIDES[left].upperLeg}
onClick={() => onRoleSelected(SIDES[left].upperLeg)}
direction="right"
/>
<TrackerPartCard
onlyAssigned={onlyAssigned}
roleError={rolesWithErrors[BodyPart.LEFT_LOWER_LEG]?.label}
td={trackerPartGrouped[BodyPart.LEFT_LOWER_LEG]}
role={BodyPart.LEFT_LOWER_LEG}
onClick={() => onRoleSelected(BodyPart.LEFT_LOWER_LEG)}
roleError={rolesWithErrors[SIDES[left].lowerLeg]?.label}
td={trackerPartGrouped[SIDES[left].lowerLeg]}
role={SIDES[left].lowerLeg}
onClick={() => onRoleSelected(SIDES[left].lowerLeg)}
direction="right"
/>
<TrackerPartCard
onlyAssigned={onlyAssigned}
roleError={rolesWithErrors[BodyPart.LEFT_FOOT]?.label}
td={trackerPartGrouped[BodyPart.LEFT_FOOT]}
role={BodyPart.LEFT_FOOT}
onClick={() => onRoleSelected(BodyPart.LEFT_FOOT)}
roleError={rolesWithErrors[SIDES[left].foot]?.label}
td={trackerPartGrouped[SIDES[left].foot]}
role={SIDES[left].foot}
onClick={() => onRoleSelected(SIDES[left].foot)}
direction="right"
/>
</div>
@@ -208,20 +223,20 @@ export function BodyAssignment({
{advanced && (
<TrackerPartCard
onlyAssigned={onlyAssigned}
roleError={rolesWithErrors[BodyPart.RIGHT_SHOULDER]?.label}
td={trackerPartGrouped[BodyPart.RIGHT_SHOULDER]}
role={BodyPart.RIGHT_SHOULDER}
onClick={() => onRoleSelected(BodyPart.RIGHT_SHOULDER)}
roleError={rolesWithErrors[SIDES[right].shoulder]?.label}
td={trackerPartGrouped[SIDES[right].shoulder]}
role={SIDES[right].shoulder}
onClick={() => onRoleSelected(SIDES[right].shoulder)}
direction="left"
/>
)}
<TrackerPartCard
onlyAssigned={onlyAssigned}
roleError={rolesWithErrors[BodyPart.RIGHT_UPPER_ARM]?.label}
td={trackerPartGrouped[BodyPart.RIGHT_UPPER_ARM]}
role={BodyPart.RIGHT_UPPER_ARM}
onClick={() => onRoleSelected(BodyPart.RIGHT_UPPER_ARM)}
roleError={rolesWithErrors[SIDES[right].upperArm]?.label}
td={trackerPartGrouped[SIDES[right].upperArm]}
role={SIDES[right].upperArm}
onClick={() => onRoleSelected(SIDES[right].upperArm)}
direction="left"
/>
</div>
@@ -248,19 +263,19 @@ export function BodyAssignment({
<div className="flex flex-col gap-2">
<TrackerPartCard
onlyAssigned={onlyAssigned}
roleError={rolesWithErrors[BodyPart.RIGHT_LOWER_ARM]?.label}
td={trackerPartGrouped[BodyPart.RIGHT_LOWER_ARM]}
role={BodyPart.RIGHT_LOWER_ARM}
onClick={() => onRoleSelected(BodyPart.RIGHT_LOWER_ARM)}
roleError={rolesWithErrors[SIDES[right].lowerArm]?.label}
td={trackerPartGrouped[SIDES[right].lowerArm]}
role={SIDES[right].lowerArm}
onClick={() => onRoleSelected(SIDES[right].lowerArm)}
direction="left"
/>
{advanced && (
<TrackerPartCard
onlyAssigned={onlyAssigned}
roleError={rolesWithErrors[BodyPart.RIGHT_HAND]?.label}
td={trackerPartGrouped[BodyPart.RIGHT_HAND]}
onClick={() => onRoleSelected(BodyPart.RIGHT_HAND)}
role={BodyPart.RIGHT_HAND}
roleError={rolesWithErrors[SIDES[right].hand]?.label}
td={trackerPartGrouped[SIDES[right].hand]}
onClick={() => onRoleSelected(SIDES[right].hand)}
role={SIDES[right].hand}
direction="left"
/>
)}
@@ -269,27 +284,27 @@ export function BodyAssignment({
<div className="flex flex-col gap-2">
<TrackerPartCard
onlyAssigned={onlyAssigned}
roleError={rolesWithErrors[BodyPart.RIGHT_UPPER_LEG]?.label}
td={trackerPartGrouped[BodyPart.RIGHT_UPPER_LEG]}
role={BodyPart.RIGHT_UPPER_LEG}
onClick={() => onRoleSelected(BodyPart.RIGHT_UPPER_LEG)}
roleError={rolesWithErrors[SIDES[right].upperLeg]?.label}
td={trackerPartGrouped[SIDES[right].upperLeg]}
role={SIDES[right].upperLeg}
onClick={() => onRoleSelected(SIDES[right].upperLeg)}
direction="left"
/>
<TrackerPartCard
onlyAssigned={onlyAssigned}
roleError={rolesWithErrors[BodyPart.RIGHT_LOWER_LEG]?.label}
td={trackerPartGrouped[BodyPart.RIGHT_LOWER_LEG]}
role={BodyPart.RIGHT_LOWER_LEG}
onClick={() => onRoleSelected(BodyPart.RIGHT_LOWER_LEG)}
roleError={rolesWithErrors[SIDES[right].lowerLeg]?.label}
td={trackerPartGrouped[SIDES[right].lowerLeg]}
role={SIDES[right].lowerLeg}
onClick={() => onRoleSelected(SIDES[right].lowerLeg)}
direction="left"
/>
<TrackerPartCard
onlyAssigned={onlyAssigned}
roleError={rolesWithErrors[BodyPart.RIGHT_FOOT]?.label}
td={trackerPartGrouped[BodyPart.RIGHT_FOOT]}
role={BodyPart.RIGHT_FOOT}
onClick={() => onRoleSelected(BodyPart.RIGHT_FOOT)}
roleError={rolesWithErrors[SIDES[right].foot]?.label}
td={trackerPartGrouped[SIDES[right].foot]}
role={SIDES[right].foot}
onClick={() => onRoleSelected(SIDES[right].foot)}
direction="left"
/>
</div>
@@ -17,6 +17,7 @@ type StepComponentType = FC<{
prevStep: () => void;
resetSteps: () => void;
variant: 'alone' | 'onboarding';
active: boolean;
}>;
export type Step = {
type: 'numbered' | 'fullsize';
@@ -160,6 +161,7 @@ export function StepperSlider({
nextStep={nextStep}
prevStep={prevStep}
resetSteps={resetSteps}
active={index === step}
/>
</StepContainer>
))}
@@ -1,11 +1,13 @@
import { useLocalization } from '@fluent/react';
import { Localized, useLocalization } from '@fluent/react';
import classNames from 'classnames';
import { useEffect, useMemo, useState } from 'react';
import { useNavigate } from 'react-router-dom';
import {
AddUnknownDeviceRequestT,
RpcMessage,
StartWifiProvisioningRequestT,
StopWifiProvisioningRequestT,
UnknownDeviceHandshakeNotificationT,
WifiProvisioningStatus,
WifiProvisioningStatusResponseT,
} from 'solarxr-protocol';
@@ -97,6 +99,15 @@ export function ConnectTrackersPage() {
}
);
useRPCPacket(
RpcMessage.UnknownDeviceHandshakeNotification,
({ macAddress }: UnknownDeviceHandshakeNotificationT) =>
sendRPCPacket(
RpcMessage.AddUnknownDeviceRequest,
new AddUnknownDeviceRequestT(macAddress)
)
);
const isError =
provisioningStatus === WifiProvisioningStatus.CONNECTION_ERROR ||
provisioningStatus === WifiProvisioningStatus.COULD_NOT_FIND_SERVER;
@@ -126,6 +137,14 @@ export function ConnectTrackersPage() {
}
}, [provisioningStatus]);
const currentTip = useMemo(
() =>
connectedIMUTrackers.length > 0
? 'tips-find_tracker'
: 'tips-turn_on_tracker',
[connectedIMUTrackers.length]
);
return (
<div className="flex flex-col h-full items-center px-4 pb-4">
<div className="flex gap-10 mobile:flex-col w-full xs:max-w-7xl">
@@ -156,7 +175,12 @@ export function ConnectTrackersPage() {
{l10n.getString('onboarding-connect_tracker-issue-serial')}
</ArrowLink>
</div>
<TipBox>{l10n.getString('tips-find_tracker')}</TipBox>
<Localized
id={currentTip}
elems={{ em: <em className="italic"></em>, b: <b></b> }}
>
<TipBox>Conditional tip</TipBox>
</Localized>
<div
className={classNames(
@@ -77,7 +77,14 @@ export function WifiCredsPage() {
>
<Input
control={control}
rules={{ required: true }}
rules={{
validate: {
validPassword: (v: string | undefined) =>
v === undefined ||
v.length === 0 ||
new Blob([v]).size >= 8,
},
}}
name="password"
type="password"
label="Password"
@@ -14,6 +14,7 @@ import { StartRecording } from './autobone-steps/StartRecording';
import { VerifyResultsStep } from './autobone-steps/VerifyResults';
import { useCountdown } from '@/hooks/countdown';
import { CheckHeight } from './autobone-steps/СheckHeight';
import { PreparationStep } from './autobone-steps/Preparation';
export function AutomaticProportionsPage() {
const { l10n } = useLocalization();
@@ -50,6 +51,7 @@ export function AutomaticProportionsPage() {
variant={state.alonePage ? 'alone' : 'onboarding'}
steps={[
{ type: 'numbered', component: PutTrackersOnStep },
{ type: 'numbered', component: PreparationStep },
{ type: 'numbered', component: RequirementsStep },
{ type: 'numbered', component: CheckHeight },
{ type: 'numbered', component: StartRecording },
@@ -159,13 +159,18 @@ export function ProportionsChoose() {
{l10n.getString('onboarding-choose_proportions')}
</Typography>
<div className="xs:w-10/12 xs:max-w-[666px]">
<Typography
variant="standard"
color="secondary"
whitespace="whitespace-pre-line"
<Localized
id="onboarding-choose_proportions-description-v1"
elems={{ b: <b className="text-base underline"></b> }}
>
{l10n.getString('onboarding-choose_proportions-description')}
</Typography>
<Typography
variant="standard"
color="secondary"
whitespace="whitespace-pre-line"
>
How to measure your body!
</Typography>
</Localized>
</div>
<div
className={classNames(
@@ -244,7 +249,7 @@ export function ProportionsChoose() {
</div>
<div>
<Localized
id="onboarding-choose_proportions-auto_proportions-descriptionv2"
id="onboarding-choose_proportions-auto_proportions-descriptionv3"
elems={{ b: <b></b> }}
>
<Typography
@@ -0,0 +1,70 @@
import { ResetType } from 'solarxr-protocol';
import { Button } from '@/components/commons/Button';
import { Typography } from '@/components/commons/Typography';
import { ResetButton } from '@/components/home/ResetButton';
import { useLocalization } from '@fluent/react';
import { useBreakpoint } from '@/hooks/breakpoint';
export function PreparationStep({
nextStep,
prevStep,
variant,
}: {
nextStep: () => void;
prevStep: () => void;
variant: 'onboarding' | 'alone';
}) {
const { isMobile } = useBreakpoint('mobile');
const { l10n } = useLocalization();
return (
<div className="flex mobile:flex-col items-center w-full">
<div className="flex flex-col flex-grow justify-between">
<div className="flex flex-col gap-4 max-w-sm">
<Typography variant="main-title" bold>
{l10n.getString('onboarding-automatic_mounting-preparation-title')}
</Typography>
<div>
<Typography color="secondary">
{l10n.getString(
'onboarding-automatic_mounting-preparation-step-0'
)}
</Typography>
<Typography color="secondary">
{l10n.getString(
'onboarding-automatic_mounting-preparation-step-1'
)}
</Typography>
</div>
</div>
{isMobile && (
<div className="flex flex-col pt-1 items-center fill-background-50 justify-center px-12">
<img
src="/images/reset-pose.webp"
width={100}
alt="Reset position"
/>
</div>
)}
<div className="flex gap-3 mobile:justify-between">
<Button
variant={variant === 'onboarding' ? 'secondary' : 'tertiary'}
onClick={prevStep}
>
{l10n.getString('onboarding-automatic_mounting-prev_step')}
</Button>
<ResetButton
variant="small"
type={ResetType.Full}
onReseted={nextStep}
></ResetButton>
</div>
</div>
{!isMobile && (
<div className="flex flex-col pt-1 items-center fill-background-50 justify-center px-12">
<img src="/images/reset-pose.webp" width={90} alt="Reset position" />
</div>
)}
</div>
);
}
@@ -1,4 +1,4 @@
import { ReactNode, useEffect, useState } from 'react';
import { ReactNode, useEffect, useRef, useState } from 'react';
import { ProcessStatus, useAutobone } from '@/hooks/autobone';
import { ProgressBar } from '@/components/commons/ProgressBar';
import { TipBox } from '@/components/commons/TipBox';
@@ -6,13 +6,16 @@ import { Typography } from '@/components/commons/Typography';
import { useLocalization } from '@fluent/react';
import { P, match } from 'ts-pattern';
import { AutoboneErrorModal } from './AutoboneErrorModal';
import { PlayCircleIcon } from '@/components/commons/icon/PlayIcon';
export function Recording({
nextStep,
resetSteps,
active,
}: {
nextStep: () => void;
resetSteps: () => void;
active: boolean;
}) {
const { l10n } = useLocalization();
const { progress, hasCalibration, hasRecording, eta } = useAutobone();
@@ -35,8 +38,33 @@ export function Recording({
}
}, [progress, hasCalibration, hasRecording]);
const videoRef = useRef<HTMLVideoElement | null>(null);
const [paused, setPaused] = useState(true);
function toggleVideo() {
if (!videoRef.current) return;
if (videoRef.current.paused) {
videoRef.current.play();
} else {
videoRef.current.pause();
videoRef.current.currentTime = 0;
}
setPaused(videoRef.current.paused);
}
useEffect(() => {
if (!active && !paused) {
toggleVideo();
return;
}
if (active && paused) {
toggleVideo();
return;
}
}, [active]);
return (
<div className="flex flex-col items-center w-full justify-between">
<div className="flex flex-row flex-grow">
<AutoboneErrorModal
isOpen={modalOpen}
onClose={() => {
@@ -44,75 +72,99 @@ export function Recording({
resetSteps();
}}
></AutoboneErrorModal>
<div className="flex gap-1 flex-col justify-center items-center">
<div className="flex text-status-critical justify-center items-center gap-1">
<div className="w-2 h-2 rounded-lg bg-status-critical"></div>
<Typography color="text-status-critical">
{l10n.getString('onboarding-automatic_proportions-recording-title')}
<div className="flex flex-col items-center w-full justify-between">
<div className="flex gap-1 flex-col justify-center items-center">
<div className="flex text-status-critical justify-center items-center gap-1">
<div className="w-2 h-2 rounded-lg bg-status-critical"></div>
<Typography color="text-status-critical">
{l10n.getString(
'onboarding-automatic_proportions-recording-title'
)}
</Typography>
</div>
<Typography variant="section-title">
{l10n.getString(
'onboarding-automatic_proportions-recording-description-p0'
)}
</Typography>
<Typography color="secondary">
{l10n.getString(
'onboarding-automatic_proportions-recording-description-p1'
)}
</Typography>
</div>
<Typography variant="section-title">
{l10n.getString(
'onboarding-automatic_proportions-recording-description-p0'
)}
</Typography>
<Typography color="secondary">
{l10n.getString(
'onboarding-automatic_proportions-recording-description-p1'
)}
</Typography>
</div>
<ol className="list-decimal mobile:px-4">
<>
{l10n
.getString('onboarding-automatic_proportions-recording-steps')
.split('\n')
.map((line, i) => (
<li key={i}>
<Typography color="secondary">{line}</Typography>
</li>
))}
</>
</ol>
<div className="flex">
<TipBox>{l10n.getString('tips-do_not_move_heels')}</TipBox>
</div>
<div className="flex flex-col gap-2 items-center w-full max-w-[150px]">
<ProgressBar
progress={progress}
height={2}
colorClass={match([hasCalibration, hasRecording])
.returnType<string | undefined>()
.with(
P.union(
[ProcessStatus.REJECTED, P._],
[P._, ProcessStatus.REJECTED]
),
() => 'bg-status-critical'
)
.with(
[ProcessStatus.FULFILLED, ProcessStatus.FULFILLED],
() => 'bg-status-success'
)
.otherwise(() => undefined)}
></ProgressBar>
<Typography color="secondary">
{match([hasCalibration, hasRecording])
.returnType<ReactNode>()
.with([ProcessStatus.PENDING, ProcessStatus.FULFILLED], () =>
l10n.getString(
'onboarding-automatic_proportions-recording-processing'
<ol className="list-decimal mobile:px-4">
<>
{l10n
.getString('onboarding-automatic_proportions-recording-steps')
.split('\n')
.map((line, i) => (
<li key={i}>
<Typography color="secondary">{line}</Typography>
</li>
))}
</>
</ol>
<div className="flex">
<TipBox>{l10n.getString('tips-do_not_move_heels')}</TipBox>
</div>
<div className="flex flex-col gap-2 items-center w-full max-w-[150px]">
<ProgressBar
progress={progress}
height={2}
colorClass={match([hasCalibration, hasRecording])
.returnType<string | undefined>()
.with(
P.union(
[ProcessStatus.REJECTED, P._],
[P._, ProcessStatus.REJECTED]
),
() => 'bg-status-critical'
)
)
.with([ProcessStatus.PENDING, ProcessStatus.PENDING], () =>
l10n.getString(
'onboarding-automatic_proportions-recording-timer',
{ time: Math.round(eta) }
.with(
[ProcessStatus.FULFILLED, ProcessStatus.FULFILLED],
() => 'bg-status-success'
)
)
.otherwise(() => '')}
</Typography>
.otherwise(() => undefined)}
></ProgressBar>
<Typography color="secondary">
{match([hasCalibration, hasRecording])
.returnType<ReactNode>()
.with([ProcessStatus.PENDING, ProcessStatus.FULFILLED], () =>
l10n.getString(
'onboarding-automatic_proportions-recording-processing'
)
)
.with([ProcessStatus.PENDING, ProcessStatus.PENDING], () =>
l10n.getString(
'onboarding-automatic_proportions-recording-timer',
{ time: Math.round(eta) }
)
)
.otherwise(() => '')}
</Typography>
</div>
</div>
<button className="relative appearance-none h-fit" onClick={toggleVideo}>
<div
className="absolute w-[100px] h-[100px] top-0 bottom-0 left-0 right-0 m-auto fill-background-20"
hidden={!paused}
>
<PlayCircleIcon width={100}></PlayCircleIcon>
</div>
<video
preload=""
ref={videoRef}
src="/videos/autobone.webm"
className="min-w-[12rem] w-[12rem]"
muted
loop
playsInline
controls={false}
poster="/images/autobone-poster.webp"
></video>
</button>
</div>
);
}
@@ -26,7 +26,7 @@ export function RequirementsStep({
<>
{l10n
.getString(
'onboarding-automatic_proportions-requirements-description'
'onboarding-automatic_proportions-requirements-descriptionv2'
)
.split('\n')
.map((line, i) => (
@@ -3,18 +3,39 @@ import { Button } from '@/components/commons/Button';
import { TipBox } from '@/components/commons/TipBox';
import { Typography } from '@/components/commons/Typography';
import { useLocalization } from '@fluent/react';
import { useEffect, useRef, useState } from 'react';
import { PlayCircleIcon } from '@/components/commons/icon/PlayIcon';
export function StartRecording({
nextStep,
prevStep,
variant,
active,
}: {
nextStep: () => void;
prevStep: () => void;
variant: 'onboarding' | 'alone';
active: boolean;
}) {
const { l10n } = useLocalization();
const { startRecording } = useAutobone();
const videoRef = useRef<HTMLVideoElement | null>(null);
const [paused, setPaused] = useState(true);
function toggleVideo() {
if (!videoRef.current) return;
if (videoRef.current.paused) {
videoRef.current.play();
} else {
videoRef.current.pause();
videoRef.current.currentTime = 0;
}
setPaused(videoRef.current.paused);
}
useEffect(() => {
if (!active && !paused) toggleVideo();
}, [active]);
const start = () => {
nextStep();
@@ -24,34 +45,59 @@ export function StartRecording({
return (
<>
<div className="flex flex-col flex-grow">
<div className="flex flex-grow flex-col gap-4">
<Typography variant="main-title" bold>
{l10n.getString(
'onboarding-automatic_proportions-start_recording-title'
)}
</Typography>
<div>
<Typography color="secondary">
<div className="flex flex-row flex-grow">
<div className="flex flex-grow flex-col gap-4">
<Typography variant="main-title" bold>
{l10n.getString(
'onboarding-automatic_proportions-start_recording-description'
'onboarding-automatic_proportions-start_recording-title'
)}
</Typography>
<div>
<Typography color="secondary">
{l10n.getString(
'onboarding-automatic_proportions-start_recording-description'
)}
</Typography>
</div>
<ol className="list-decimal mobile:px-4">
<>
{l10n
.getString('onboarding-automatic_proportions-recording-steps')
.split('\n')
.map((line, i) => (
<li key={i}>
<Typography color="secondary">{line}</Typography>
</li>
))}
</>
</ol>
<div className="flex">
<TipBox>{l10n.getString('tips-do_not_move_heels')}</TipBox>
</div>
</div>
<ol className="list-decimal mobile:px-4">
<>
{l10n
.getString('onboarding-automatic_proportions-recording-steps')
.split('\n')
.map((line, i) => (
<li key={i}>
<Typography color="secondary">{line}</Typography>
</li>
))}
</>
</ol>
<div className="flex">
<TipBox>{l10n.getString('tips-do_not_move_heels')}</TipBox>
</div>
<button
className="relative appearance-none h-fit"
onClick={toggleVideo}
>
<div
className="absolute w-[100px] h-[100px] top-0 bottom-0 left-0 right-0 m-auto fill-background-20"
hidden={!paused}
>
<PlayCircleIcon width={100}></PlayCircleIcon>
</div>
<video
preload=""
ref={videoRef}
src="/videos/autobone.webm"
className="min-w-[12rem] w-[12rem]"
muted
loop
playsInline
controls={false}
poster="/images/autobone-poster.webp"
></video>
</button>
</div>
<div className="flex gap-3 mobile:justify-between">
@@ -18,6 +18,7 @@ import {
} from '@/components/onboarding/pages/body-proportions/ProportionsChoose';
import { useLocaleConfig } from '@/i18n/config';
import { useCountdown } from '@/hooks/countdown';
import { TipBox } from '@/components/commons/TipBox';
interface HeightForm {
height: number;
@@ -104,18 +105,24 @@ export function CheckHeight({
</Typography>
</Localized>
<Button
variant="primary"
className="mt-2"
onClick={startCountdown}
disabled={isCounting}
>
{isCounting
? sFormat.format(timer, 'second')
: l10n.getString(
'onboarding-automatic_proportions-check_height-fetch_height'
)}
</Button>
<div className="flex flex-row items-center mt-2 gap-2">
<Button
variant="primary"
onClick={startCountdown}
disabled={isCounting}
>
{isCounting
? sFormat.format(timer, 'second')
: l10n.getString(
'onboarding-automatic_proportions-check_height-fetch_height'
)}
</Button>
<TipBox whitespace={true}>
{l10n.getString(
'onboarding-automatic_proportions-check_height-guardian_tip'
)}
</TipBox>
</div>
</div>
<form className="flex flex-col self-center items-center justify-center">
<NumberSelector
@@ -13,14 +13,14 @@ import { MountingSelectionMenu } from './MountingSelectionMenu';
import { useLocalization } from '@fluent/react';
import { useBreakpoint } from '@/hooks/breakpoint';
import { Quaternion } from 'three';
import { useConfig } from '@/hooks/config';
import { defaultConfig, useConfig } from '@/hooks/config';
export function ManualMountingPage() {
const { isMobile } = useBreakpoint('mobile');
const { l10n } = useLocalization();
const { applyProgress, state } = useOnboarding();
const { sendRPCPacket } = useWebsocketAPI();
const { setConfig } = useConfig();
const { setConfig, config } = useConfig();
const [selectedRole, setSelectRole] = useState<BodyPart>(BodyPart.NONE);
@@ -102,6 +102,7 @@ export function ManualMountingPage() {
<div className="flex flex-row justify-center">
<BodyAssignment
width={isMobile ? 160 : undefined}
mirror={config?.mirrorView ?? defaultConfig.mirrorView}
onlyAssigned={true}
advanced={true}
onRoleSelected={setSelectRole}
@@ -7,7 +7,7 @@ import { Typography } from '@/components/commons/Typography';
import { Button } from '@/components/commons/Button';
import { TryManualFirstModal } from './TryManualFirstModal';
import { useConfig } from '@/hooks/config';
import { useNavigate } from 'react-router';
import { useNavigate } from 'react-router-dom';
export function MountingChoose() {
const { l10n } = useLocalization();
@@ -26,6 +26,7 @@ import { Typography } from '@/components/commons/Typography';
import {
ASSIGNMENT_RULES,
BodyAssignment,
LOWER_BODY,
} from '@/components/onboarding/BodyAssignment';
import { NeckWarningModal } from '@/components/onboarding/NeckWarningModal';
import { TrackerSelectionMenu } from './TrackerSelectionMenu';
@@ -53,15 +54,21 @@ export function TrackersAssignPage() {
const { applyProgress, state } = useOnboarding();
const { sendRPCPacket, useRPCPacket } = useWebsocketAPI();
const { control, watch } = useForm<{ advanced: boolean }>({
defaultValues: { advanced: config?.advancedAssign ?? false },
const { control, watch } = useForm<{
advanced: boolean;
mirrorView: boolean;
}>({
defaultValues: {
advanced: config?.advancedAssign ?? false,
mirrorView: config?.mirrorView ?? true,
},
});
const { advanced } = watch();
const { advanced, mirrorView } = watch();
const [selectedRole, setSelectRole] = useState<BodyPart>(BodyPart.NONE);
const assignedTrackers = useAssignedTrackers();
useEffect(() => {
setConfig({ advancedAssign: advanced });
}, [advanced]);
setConfig({ advancedAssign: advanced, mirrorView });
}, [advanced, mirrorView]);
const [tapDetectionSettings, setTapDetectionSettings] = useState<Omit<
TapDetectionSettingsT,
@@ -153,6 +160,14 @@ export function TrackersAssignPage() {
: trackerRoles.includes(part),
]);
// Special exception for waist/hip: https://github.com/SlimeVR/SlimeVR-Server/issues/612
if (
(assignedRole === BodyPart.HIP || assignedRole === BodyPart.WAIST) &&
!trackerRoles.some((t) => LOWER_BODY.has(t))
) {
return;
}
if (unassignedRoles.every(([, state]) => state)) return;
return {
@@ -277,12 +292,22 @@ export function TrackersAssignPage() {
</Typography>
</div>
<TipBox>{l10n.getString('tips-find_tracker')}</TipBox>
<CheckBox
control={control}
label={l10n.getString('onboarding-assign_trackers-advanced')}
name="advanced"
variant="toggle"
></CheckBox>
<div>
<CheckBox
control={control}
label={l10n.getString('onboarding-assign_trackers-advanced')}
name="advanced"
variant="toggle"
></CheckBox>
<CheckBox
control={control}
label={l10n.getString(
'onboarding-assign_trackers-mirror_view'
)}
name="mirrorView"
variant="toggle"
></CheckBox>
</div>
{!!firstError && (
<div className="bg-status-warning text-background-60 px-3 py-2 text-justify rounded-md">
<div className="flex flex-col gap-1 whitespace-normal">
@@ -320,6 +345,7 @@ export function TrackersAssignPage() {
highlightedRoles={firstError?.affectedRoles || []}
rolesWithErrors={rolesWithErrors}
advanced={advanced}
mirror={mirrorView}
onRoleSelected={tryOpenChokerWarning}
></BodyAssignment>
</div>
@@ -0,0 +1,66 @@
import { Button } from '@/components/commons/Button';
import { WarningBox } from '@/components/commons/TipBox';
import { Localized, useLocalization } from '@fluent/react';
import { BaseModal } from '@/components/commons/BaseModal';
import ReactModal from 'react-modal';
export function HandsWarningModal({
isOpen = true,
onClose,
accept,
...props
}: {
/**
* Is the parent/sibling component opened?
*/
isOpen: boolean;
/**
* Function to trigger when the neck warning hasn't been accepted
*/
onClose: () => void;
/**
* Function when you press `i understand`
*/
accept: () => void;
} & ReactModal.Props) {
const { l10n } = useLocalization();
// isOpen is checked by checking if the parent modal is opened + our bodyPart is the
// neck and we havent showed this warning yet
return (
<BaseModal
isOpen={isOpen}
shouldCloseOnOverlayClick
shouldCloseOnEsc
onRequestClose={onClose}
className={props.className}
overlayClassName={props.overlayClassName}
>
<div className="flex w-full h-full flex-col ">
<div className="flex w-full flex-col flex-grow items-center gap-3">
<Localized
id="settings-general-steamvr-trackers-hands-warning"
elems={{ b: <b></b> }}
>
<WarningBox>
<b>Warning:</b> Please don't use hands if you have controllers!
</WarningBox>
</Localized>
<div className="flex flex-row gap-3 pt-5 place-content-center">
<Button variant="secondary" onClick={onClose}>
{l10n.getString(
'settings-general-steamvr-trackers-hands-warning-cancel'
)}
</Button>
<Button variant="primary" onClick={accept}>
{l10n.getString(
'settings-general-steamvr-trackers-hands-warning-done'
)}
</Button>
</div>
</div>
</div>
</BaseModal>
);
}
@@ -1,5 +1,5 @@
import { useLocalization } from '@fluent/react';
import { useEffect } from 'react';
import { useEffect, useState } from 'react';
import { DefaultValues, useForm } from 'react-hook-form';
import {
ChangeSettingsRequestT,
@@ -30,6 +30,7 @@ import {
SettingsPageLayout,
SettingsPagePaneLayout,
} from '@/components/settings/SettingsPageLayout';
import { HandsWarningModal } from '@/components/settings/HandsWarningModal';
interface SettingsForm {
trackers: {
@@ -39,6 +40,7 @@ interface SettingsForm {
knees: boolean;
elbows: boolean;
hands: boolean;
automaticTrackerToggle: boolean;
};
filtering: {
type: number;
@@ -159,9 +161,13 @@ export function GeneralSettings() {
});
const { sendRPCPacket, useRPCPacket } = useWebsocketAPI();
const { reset, control, watch, handleSubmit } = useForm<SettingsForm>({
defaultValues: defaultValues,
});
const { reset, control, watch, handleSubmit, getValues, setValue } =
useForm<SettingsForm>({
defaultValues: defaultValues,
});
const {
trackers: { automaticTrackerToggle, hands: steamVrHands },
} = watch();
const onSubmit = (values: SettingsForm) => {
const settings = new ChangeSettingsRequestT();
@@ -174,6 +180,7 @@ export function GeneralSettings() {
trackers.knees = values.trackers.knees;
trackers.elbows = values.trackers.elbows;
trackers.hands = values.trackers.hands;
trackers.automaticTrackerToggle = values.trackers.automaticTrackerToggle;
settings.steamVrTrackers = trackers;
}
@@ -267,6 +274,9 @@ export function GeneralSettings() {
sendRPCPacket(RpcMessage.SettingsRequest, new SettingsRequestT());
}, []);
// If null, we still haven't shown the hands warning
// if false then initially the hands warning was disabled
const [handsWarning, setHandsWarning] = useState<boolean | null>(null);
useRPCPacket(RpcMessage.SettingsResponse, (settings: SettingsResponseT) => {
const formData: DefaultValues<SettingsForm> = {};
@@ -280,10 +290,13 @@ export function GeneralSettings() {
if (settings.steamVrTrackers) {
formData.trackers = settings.steamVrTrackers;
if (settings.steamVrTrackers.hands) {
setHandsWarning(false);
}
}
if (settings.modelSettings?.toggles) {
formData.toggles = Object.keys(settings.modelSettings?.toggles).reduce(
formData.toggles = Object.keys(settings.modelSettings.toggles).reduce(
(curr, key: string) => ({
...curr,
[key]:
@@ -296,7 +309,7 @@ export function GeneralSettings() {
}
if (settings.modelSettings?.ratios) {
formData.ratios = Object.keys(settings.modelSettings?.ratios).reduce(
formData.ratios = Object.keys(settings.modelSettings.ratios).reduce(
(curr, key: string) => ({
...curr,
[key]:
@@ -346,7 +359,7 @@ export function GeneralSettings() {
if (settings.modelSettings?.legTweaks) {
formData.legTweaks = {
correctionStrength:
settings.modelSettings?.legTweaks.correctionStrength ||
settings.modelSettings.legTweaks.correctionStrength ||
defaultValues.legTweaks.correctionStrength,
};
}
@@ -355,9 +368,17 @@ export function GeneralSettings() {
formData.resetsSettings = settings.resetsSettings;
}
reset(formData);
reset({ ...getValues(), ...formData });
});
useEffect(() => {
if (steamVrHands && handsWarning === null) {
setHandsWarning(true);
} else if (!steamVrHands && handsWarning === false) {
setHandsWarning(null);
}
}, [steamVrHands, handsWarning]);
// Handle scrolling to selected page
// useEffect(() => {
// const typedState: { scrollTo: string } = state as any;
@@ -372,6 +393,17 @@ export function GeneralSettings() {
return (
<SettingsPageLayout>
<HandsWarningModal
isOpen={!!handsWarning}
onClose={() => {
setValue('trackers.hands', false);
setHandsWarning(null);
}}
accept={() => {
setValue('trackers.hands', true);
setHandsWarning(false);
}}
/>
<form className="flex flex-col gap-2 w-full">
<SettingsPagePaneLayout icon={<SteamIcon></SteamIcon>} id="steamvr">
<>
@@ -395,6 +427,7 @@ export function GeneralSettings() {
<CheckBox
variant="toggle"
outlined
disabled={automaticTrackerToggle}
control={control}
name="trackers.chest"
label={l10n.getString(
@@ -404,6 +437,7 @@ export function GeneralSettings() {
<CheckBox
variant="toggle"
outlined
disabled={automaticTrackerToggle}
control={control}
name="trackers.waist"
label={l10n.getString(
@@ -413,6 +447,7 @@ export function GeneralSettings() {
<CheckBox
variant="toggle"
outlined
disabled={automaticTrackerToggle}
control={control}
name="trackers.knees"
label={l10n.getString(
@@ -422,6 +457,7 @@ export function GeneralSettings() {
<CheckBox
variant="toggle"
outlined
disabled={automaticTrackerToggle}
control={control}
name="trackers.feet"
label={l10n.getString('settings-general-steamvr-trackers-feet')}
@@ -429,6 +465,7 @@ export function GeneralSettings() {
<CheckBox
variant="toggle"
outlined
disabled={automaticTrackerToggle}
control={control}
name="trackers.elbows"
label={l10n.getString(
@@ -445,6 +482,33 @@ export function GeneralSettings() {
)}
/>
</div>
<div className="flex flex-col pt-4 pb-4"></div>
<Typography bold>
{l10n.getString(
'settings-general-steamvr-trackers-tracker_toggling'
)}
</Typography>
<div className="flex flex-col pt-2 pb-4">
{l10n
.getString(
'settings-general-steamvr-trackers-tracker_toggling-description'
)
.split('\n')
.map((line, i) => (
<Typography color="secondary" key={i}>
{line}
</Typography>
))}
</div>
<CheckBox
variant="toggle"
outlined
control={control}
name="trackers.automaticTrackerToggle"
label={l10n.getString(
'settings-general-steamvr-trackers-tracker_toggling-label'
)}
/>
</>
</SettingsPagePaneLayout>
<SettingsPagePaneLayout icon={<WrenchIcon></WrenchIcon>} id="mechanics">
@@ -29,6 +29,7 @@ interface InterfaceSettingsForm {
feedbackSound: boolean;
feedbackSoundVolume: number;
connectedTrackersWarning: boolean;
useTray: boolean;
};
}
@@ -53,6 +54,7 @@ export function InterfaceSettings() {
connectedTrackersWarning:
config?.connectedTrackersWarning ??
defaultConfig.connectedTrackersWarning,
useTray: config?.useTray ?? defaultConfig.useTray ?? false,
},
},
});
@@ -67,6 +69,7 @@ export function InterfaceSettings() {
fonts: values.appearance.fonts.split(','),
textSize: values.appearance.textSize,
connectedTrackersWarning: values.notifications.connectedTrackersWarning,
useTray: values.notifications.useTray,
});
};
@@ -179,6 +182,28 @@ export function InterfaceSettings() {
)}
/>
</div>
<Typography bold>
{l10n.getString('settings-general-interface-use_tray')}
</Typography>
<div className="flex flex-col pt-1 pb-2">
<Typography color="secondary">
{l10n.getString(
'settings-general-interface-use_tray-description'
)}
</Typography>
</div>
<div className="grid sm:grid-cols-2 pb-4">
<CheckBox
variant="toggle"
control={control}
outlined
name="notifications.useTray"
label={l10n.getString(
'settings-general-interface-use_tray-label'
)}
/>
</div>
</>
</SettingsPagePaneLayout>
@@ -12,6 +12,7 @@ import {
SerialTrackerGetInfoRequestT,
SerialTrackerRebootRequestT,
SerialUpdateResponseT,
SerialTrackerGetWifiScanRequestT,
} from 'solarxr-protocol';
import { useElemSize, useLayout } from '@/hooks/layout';
import { useWebsocketAPI } from '@/hooks/websocket-api';
@@ -158,6 +159,12 @@ export function Serial() {
new SerialTrackerGetInfoRequestT()
);
};
const getWifiScan = () => {
sendRPCPacket(
RpcMessage.SerialTrackerGetWifiScanRequest,
new SerialTrackerGetWifiScanRequestT()
);
};
return (
<>
@@ -231,6 +238,9 @@ export function Serial() {
<Button variant="quaternary" onClick={getInfos}>
{l10n.getString('settings-serial-get_infos')}
</Button>
<Button variant="quaternary" onClick={getWifiScan}>
{l10n.getString('settings-serial-get_wifi_scan')}
</Button>
{isMobile && (
<Dropdown
control={control}
@@ -10,6 +10,7 @@ import { useLocalization } from '@fluent/react';
import { NeckWarningModal } from '@/components/onboarding/NeckWarningModal';
import { useChokerWarning } from '@/hooks/choker-warning';
import { useBreakpoint } from '@/hooks/breakpoint';
import { defaultConfig, useConfig } from '@/hooks/config';
export function SingleTrackerBodyAssignmentMenu({
isOpen,
@@ -22,6 +23,7 @@ export function SingleTrackerBodyAssignmentMenu({
}) {
const { isMobile } = useBreakpoint('mobile');
const { l10n } = useLocalization();
const { config } = useConfig();
const { control, watch } = useForm<{ advanced: boolean }>({
defaultValues: { advanced: false },
});
@@ -75,6 +77,7 @@ export function SingleTrackerBodyAssignmentMenu({
</div>
<div className="flex flex-col xs:flex-grow gap-3 rounded-xl fill-background-50 py-2">
<BodyAssignment
mirror={config?.mirrorView ?? defaultConfig.mirrorView}
width={isMobile ? 160 : undefined}
onlyAssigned={false}
advanced={advanced}
+40 -8
View File
@@ -7,6 +7,7 @@ import { useParams } from 'react-router-dom';
import {
AssignTrackerRequestT,
BodyPart,
ForgetDeviceRequestT,
ImuType,
RpcMessage,
} from 'solarxr-protocol';
@@ -31,6 +32,7 @@ import { IMUVisualizerWidget } from '@/components/widgets/IMUVisualizerWidget';
import { SingleTrackerBodyAssignmentMenu } from './SingleTrackerBodyAssignmentMenu';
import { TrackerCard } from './TrackerCard';
import { Quaternion } from 'three';
import { useAppContext } from '@/hooks/app';
const rotationsLabels: [Quaternion, string][] = [
[rotationToQuatMap.BACK, 'tracker-rotation-back'],
@@ -64,6 +66,7 @@ export function TrackerSettingsPage() {
},
reValidateMode: 'onSubmit',
});
const { dispatch } = useAppContext();
const { trackerName, allowDriftCompensation } = watch();
const tracker = useTrackerFromId(trackernum, deviceid);
@@ -124,13 +127,7 @@ export function TrackerSettingsPage() {
updateTrackerSettings();
};
useDebouncedEffect(
() => {
updateTrackerSettings();
},
[trackerName],
1000
);
useDebouncedEffect(() => updateTrackerSettings(), [trackerName], 1000);
useEffect(() => {
updateTrackerSettings();
@@ -149,6 +146,18 @@ export function TrackerSettingsPage() {
}
}, [firstLoad]);
const macAddress = useMemo(() => {
if (
/(?:[a-zA-Z\d]{2}:){5}[a-zA-Z\d]{2}/.test(
(tracker?.device?.hardwareInfo?.hardwareIdentifier as string | null) ??
''
)
) {
return tracker?.device?.hardwareInfo?.hardwareIdentifier as string;
}
return null;
}, [tracker?.device?.hardwareInfo?.hardwareIdentifier]);
return (
<form
className="h-full overflow-y-auto"
@@ -165,7 +174,7 @@ export function TrackerSettingsPage() {
onClose={() => setSelectRotation(false)}
onDirectionSelected={onDirectionSelected}
></MountingSelectionMenu>
<div className="flex gap-2 md:h-full max-md:flex-wrap md:flex-row xs:flex-col mobile:flex-col">
<div className="flex gap-2 max-md:flex-wrap md:flex-row xs:flex-col mobile:flex-col">
<div className="flex flex-col w-full md:max-w-xs gap-2">
{tracker && (
<TrackerCard
@@ -404,6 +413,29 @@ export function TrackerSettingsPage() {
label="Tracker name"
></Input>
</div>
{macAddress && (
<div className="flex flex-col gap-2 w-full mt-3">
<Typography variant="section-title">
{l10n.getString('tracker-settings-forget')}
</Typography>
<Typography color="secondary">
{l10n.getString('tracker-settings-forget-description')}
</Typography>
<Button
variant="secondary"
className="!bg-status-critical self-start"
onClick={() => {
sendRPCPacket(
RpcMessage.ForgetDeviceRequest,
new ForgetDeviceRequestT(macAddress)
);
dispatch({ type: 'ignoreTracker', value: macAddress });
}}
>
{l10n.getString('tracker-settings-forget-label')}
</Button>
</div>
)}
</div>
</div>
</form>
@@ -11,6 +11,7 @@ import { QuatObject } from '@/maths/quaternion';
import { useLocalization } from '@fluent/react';
import { Vector3Object } from '@/maths/vector3';
import { Gltf } from '@react-three/drei';
import { ErrorBoundary } from 'react-error-boundary';
const groundColor = '#4444aa';
@@ -158,13 +159,21 @@ export function IMUVisualizerWidget({ tracker }: { tracker: TrackerDataT }) {
>
{l10n.getString('widget-imu_visualizer-rotation_hide')}
</Button>
<SceneRenderer
quat={{ ...quat }}
vec={{ ...vec }}
model={
isExtension ? '/models/extension.gltf' : '/models/tracker.gltf'
<ErrorBoundary
fallback={
<Typography color="primary" textAlign="text-center">
{l10n.getString('tips-failed_webgl')}
</Typography>
}
></SceneRenderer>
>
<SceneRenderer
quat={{ ...quat }}
vec={{ ...vec }}
model={
isExtension ? '/models/extension.gltf' : '/models/tracker.gltf'
}
></SceneRenderer>
</ErrorBoundary>
</>
)}
</div>
@@ -18,6 +18,8 @@ import { QuaternionFromQuatT, isIdentity } from '@/maths/quaternion';
import classNames from 'classnames';
import { Button } from '@/components/commons/Button';
import { useLocalization } from '@fluent/react';
import { ErrorBoundary } from 'react-error-boundary';
import { Typography } from '@/components/commons/Typography';
extend({ BasedSkeletonHelper });
@@ -88,6 +90,11 @@ export function ToggleableSkeletonVisualizerWidget(
const { l10n } = useLocalization();
const [enabled, setEnabled] = useState(false);
useEffect(() => {
const state = localStorage.getItem('skeletonModelPreview');
if (state) setEnabled(state === 'true');
}, []);
return (
<>
{!enabled && (
@@ -96,7 +103,7 @@ export function ToggleableSkeletonVisualizerWidget(
className="w-full"
onClick={() => {
setEnabled(true);
localStorage.setItem('modelPreview', 'true');
localStorage.setItem('skeletonModelPreview', 'true');
}}
>
{l10n.getString('widget-skeleton_visualizer-preview')}
@@ -109,11 +116,12 @@ export function ToggleableSkeletonVisualizerWidget(
variant="secondary"
onClick={() => {
setEnabled(false);
localStorage.setItem('modelPreview', 'false');
localStorage.setItem('skeletonModelPreview', 'false');
}}
>
{l10n.getString('widget-skeleton_visualizer-hide')}
</Button>
<SkeletonVisualizerWidget {...props} />
</>
)}
@@ -127,6 +135,7 @@ export function SkeletonVisualizerWidget({
}: SkeletonVisualizerWidgetProps) {
const { bones: _bones } = useAppContext();
const { l10n } = useLocalization();
const bones = useMemo(
() => new Map(_bones.map((b) => [b.bodyPart, b])),
[JSON.stringify(_bones)]
@@ -189,27 +198,35 @@ export function SkeletonVisualizerWidget({
if (!skeleton.current) return <></>;
return (
<div className="bg-background-70 flex flex-col p-3 rounded-lg gap-2">
<Canvas
className={classNames('container mx-auto')}
style={{ height, background: 'transparent', maxHeight }}
<ErrorBoundary
fallback={
<Typography color="primary" textAlign="text-center">
{l10n.getString('tips-failed_webgl')}
</Typography>
}
>
<gridHelper args={[10, 50, GROUND_COLOR, GROUND_COLOR]} />
<group position={[0, heightOffset, 0]} quaternion={yawReset}>
<SkeletonHelper object={skeleton.current[0]}></SkeletonHelper>
</group>
<primitive object={skeleton.current[0]} />
<PerspectiveCamera
makeDefault
position={[3, 2.5, -3]}
fov={20}
zoom={1 / scale}
/>
<OrbitControls
target={[0, targetCamera, 0]}
maxDistance={20}
maxPolarAngle={Math.PI / 2}
/>
</Canvas>
<Canvas
className={classNames('container mx-auto')}
style={{ height, background: 'transparent', maxHeight }}
>
<gridHelper args={[10, 50, GROUND_COLOR, GROUND_COLOR]} />
<group position={[0, heightOffset, 0]} quaternion={yawReset}>
<SkeletonHelper object={skeleton.current[0]}></SkeletonHelper>
</group>
<primitive object={skeleton.current[0]} />
<PerspectiveCamera
makeDefault
position={[3, 2.5, -3]}
fov={20}
zoom={1 / scale}
/>
<OrbitControls
target={[0, targetCamera, 0]}
maxDistance={20}
maxPolarAngle={Math.PI / 2}
/>
</Canvas>
</ErrorBoundary>
</div>
);
}
+11 -2
View File
@@ -29,10 +29,13 @@ export interface FlatDeviceTracker {
tracker: TrackerDataT;
}
type AppStateAction = { type: 'datafeed'; value: DataFeedUpdateT };
export type AppStateAction =
| { type: 'datafeed'; value: DataFeedUpdateT }
| { type: 'ignoreTracker'; value: string };
export interface AppState {
datafeed?: DataFeedUpdateT;
ignoredTrackers: Set<string>;
}
export interface AppContext {
@@ -47,8 +50,13 @@ export function reducer(state: AppState, action: AppStateAction) {
switch (action.type) {
case 'datafeed':
return { ...state, datafeed: action.value };
case 'ignoreTracker':
return {
...state,
ignoredTrackers: new Set([...state.ignoredTrackers, action.value]),
};
default:
throw new Error(`unhandled state action ${action.type}`);
throw new Error(`unhandled state action ${(action as AppStateAction).type}`);
}
}
@@ -59,6 +67,7 @@ export function useProvideAppContext(): AppContext {
const { dataFeedConfig } = useDataFeedConfig();
const [state, dispatch] = useReducer<Reducer<AppState, AppStateAction>>(reducer, {
datafeed: new DataFeedUpdateT(),
ignoredTrackers: new Set(),
});
useEffect(() => {
+40 -11
View File
@@ -1,9 +1,10 @@
import { BaseDirectory, readTextFile } from '@tauri-apps/plugin-fs';
import { createContext, useContext, useState } from 'react';
import { createContext, useContext, useMemo, useState } from 'react';
import { DeveloperModeWidgetForm } from '@/components/widgets/DeveloperModeWidget';
import { error } from '@/utils/logging';
import { useDebouncedEffect } from './timeout';
import { Store } from '@tauri-apps/plugin-store';
import { useIsTauri } from './breakpoint';
import { waitUntil } from '@/utils/a11y';
export interface WindowConfig {
width: number;
@@ -25,7 +26,9 @@ export interface Config {
textSize: number;
fonts: string[];
advancedAssign: boolean;
useTray: boolean | null;
doneManualMounting: boolean;
mirrorView: boolean;
}
export interface ConfigContext {
@@ -47,7 +50,21 @@ export const defaultConfig: Omit<Config, 'devSettings'> = {
textSize: 12,
fonts: ['poppins'],
advancedAssign: false,
useTray: null,
doneManualMounting: false,
mirrorView: true,
};
interface CrossStorage {
set(key: string, value: string): Promise<void>;
get(key: string): Promise<string | null>;
}
const tauriStore: CrossStorage = new Store('gui-settings.dat');
const localStore: CrossStorage = {
get: async (key) => localStorage.getItem(key),
set: async (key, value) => localStorage.setItem(key, value),
};
function fallbackToDefaults(loadedConfig: any): Config {
@@ -57,12 +74,14 @@ function fallbackToDefaults(loadedConfig: any): Config {
export function useConfigProvider(): ConfigContext {
const [currConfig, set] = useState<Config | null>(null);
const [loading, setLoading] = useState(false);
const tauri = useIsTauri();
const store = useMemo(() => (tauri ? tauriStore : localStore), [tauri]);
useDebouncedEffect(
() => {
if (!currConfig) return;
localStorage.setItem('config.json', JSON.stringify(currConfig));
store.set('config.json', JSON.stringify(currConfig));
},
[currConfig],
100
@@ -77,6 +96,18 @@ export function useConfigProvider(): ConfigContext {
} as Config)
: null
);
await waitUntil(
() => {
const newConfig: Partial<Config> = JSON.parse(
localStorage.getItem('config.json') ?? '{}'
);
return Object.entries(config).every(
([key, value]) => newConfig[key as keyof Config] === value
);
},
100,
10
);
};
return {
@@ -86,18 +117,16 @@ export function useConfigProvider(): ConfigContext {
loadConfig: async () => {
setLoading(true);
try {
const migrated = localStorage.getItem('configMigrated');
const migrated = await store.get('configMigratedToTauri');
if (!migrated) {
const oldConfig = await readTextFile('config.json', {
dir: BaseDirectory.AppConfig,
}).catch(() => null);
const oldConfig = localStorage.getItem('config.json');
if (oldConfig) localStorage.setItem('config.json', oldConfig);
if (oldConfig) await store.set('config.json', oldConfig);
localStorage.setItem('configMigrated', 'true');
store.set('configMigratedToTauri', 'true');
}
const json = localStorage.getItem('config.json');
const json = await store.get('config.json');
if (!json) throw new Error('Config has ceased existing for some reason');
+1 -1
View File
@@ -11,7 +11,7 @@ export function useCountdown({
}) {
const [isCounting, setIsCounting] = useState(false);
const [timer, setDisplayTimer] = useState(0);
const countdownTimer = useRef<NodeJS.Timeout>();
const countdownTimer = useRef<ReturnType<typeof setInterval>>();
const counter = useRef(0);
const startCountdown = () => {
+2 -2
View File
@@ -5,7 +5,7 @@ import { useOnboarding } from './onboarding';
export interface WifiFormData {
ssid: string;
password: string;
password?: string;
}
export function useWifiForm() {
@@ -27,7 +27,7 @@ export function useWifiForm() {
}, []);
const submitWifiCreds = (value: WifiFormData) => {
setWifiCredentials(value.ssid, value.password);
setWifiCredentials(value.ssid, value.password ?? '');
navigate('/onboarding/connect-trackers', {
state: { alonePage: state.alonePage },
});
+17
View File
@@ -11,6 +11,7 @@ import {
} from 'react';
import { exists, readTextFile, BaseDirectory } from '@tauri-apps/plugin-fs';
import { error } from '@/utils/logging';
import { invoke } from '@tauri-apps/api';
export const defaultNS = 'translation';
export const DEFAULT_LOCALE = 'en';
@@ -152,6 +153,8 @@ interface i18n {
changeLocales: (userLocales: string[]) => Promise<void>;
}
const TRAY_MENU_KEYS = ['tray_menu-show', 'tray_menu-hide', 'tray_menu-quit'];
export const LangContext = createContext<i18n>(undefined as never);
export function AppLocalizationProvider(props: AppLocalizationProviderProps) {
const [currentLocales, setCurrentLocales] = useState([DEFAULT_LOCALE]);
@@ -196,6 +199,20 @@ export function AppLocalizationProvider(props: AppLocalizationProviderProps) {
}
}, []);
useEffect(() => {
if (l10n === null) return;
const newI18n: Record<string, string> = {};
TRAY_MENU_KEYS.forEach((key) => {
newI18n[key] = l10n.getString(key);
});
const promise = invoke('update_translations', { newI18n });
return () => {
// eslint-disable-next-line @typescript-eslint/no-empty-function
promise.then(() => {});
};
}, [l10n]);
if (l10n === null) {
return <></>;
}
+18
View File
@@ -6,3 +6,21 @@ export function a11yClick(event: React.KeyboardEvent | React.MouseEvent) {
return keyboard.key === 'Enter' || keyboard.key === ' ';
}
}
export function waitUntil(
condition: () => boolean,
time: number,
tries?: number
): Promise<void> {
return new Promise((resolve) => {
const interval = setInterval(() => {
if (tries && --tries === 0) {
clearInterval(interval);
}
if (condition()) {
resolve();
clearInterval(interval);
}
}, time);
});
}
-12034
View File
File diff suppressed because it is too large. Load diff
+8 -6
View File
@@ -2,17 +2,19 @@
"name": "slimevr-ui",
"version": "0.5.1",
"private": true,
"packageManager": "[email protected]",
"workspaces": [
"solarxr-protocol",
"gui"
],
"scripts": {
"gui": "npm run update-solarxr && cd gui && npm run dev",
"tauri": "cd gui && npm run tauri",
"skipbundler": "cd gui && npm run skipbundler",
"build": "npm run tauri build",
"update-solarxr": "cd solarxr-protocol && npm run build",
"prepare": "husky install && npm run update-solarxr"
"gui": "pnpm run update-solarxr && cd gui && pnpm run dev",
"tauri": "cd gui && pnpm run tauri",
"skipbundler": "cd gui && pnpm run skipbundler",
"build": "pnpm run tauri build",
"update-solarxr": "cd solarxr-protocol && pnpm run build",
"prepare": "husky install && pnpm run update-solarxr",
"preinstall": "npx only-allow pnpm"
},
"devDependencies": {
"husky": "^8.0.3",
+7377
View File
File diff suppressed because it is too large. Load diff
+4
View File
@@ -0,0 +1,4 @@
packages:
- "solarxr-protocol"
- "gui"
- "!solarxr-protocol/lib/flatbuffers/**"
+19 -32
View File
@@ -31,7 +31,7 @@ tasks.register<Copy>("copyGuiAssets") {
from(rootProject.layout.projectDirectory.dir("gui/dist"))
into(layout.projectDirectory.dir("src/main/resources/web-gui"))
if (inputs.sourceFiles.isEmpty) {
throw GradleException("You need to run \"npm run build\" on the gui folder first!")
throw GradleException("You need to run \"pnpm run build\" on the gui folder first!")
}
}
tasks.preBuild {
@@ -40,6 +40,7 @@ tasks.preBuild {
tasks.withType<KotlinCompile> {
kotlinOptions.jvmTarget = "17"
kotlinOptions.freeCompilerArgs += "-Xvalue-classes"
}
// Set compiler to use UTF-8
@@ -84,36 +85,26 @@ dependencies {
implementation("com.github.mik3y:usb-serial-for-android:3.7.0")
}
/**
* The android block is where you configure all your Android-specific
* build options.
*/
// The android block is where you configure all your Android-specific build options.
extra.apply {
set("gitVersionCode", grgit.tag.list().size)
set("gitVersionName", grgit.describe(mapOf("tags" to true, "always" to true)))
}
android {
/**
* The app's namespace. Used primarily to access app resources.
*/
// The app's namespace. Used primarily to access app resources.
namespace = "dev.slimevr.android"
/**
* compileSdk specifies the Android API level Gradle should use to
* compile your app. This means your app can use the API features included in
* this API level and lower.
*/
/* compileSdk specifies the Android API level Gradle should use to
compile your app. This means your app can use the API features included in
this API level and lower. */
compileSdk = 33
/**
* The defaultConfig block encapsulates default settings and entries for all
* build variants and can override some attributes in main/AndroidManifest.xml
* dynamically from the build system. You can configure product flavors to override
* these values for different versions of your app.
*/
/* The defaultConfig block encapsulates default settings and entries for all
build variants and can override some attributes in main/AndroidManifest.xml
dynamically from the build system. You can configure product flavors to override
these values for different versions of your app. */
packaging {
resources.excludes.add("META-INF/*")
@@ -139,26 +130,22 @@ android {
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
}
/**
* The buildTypes block is where you can configure multiple build types.
* By default, the build system defines two build types: debug and release. The
* debug build type is not explicitly shown in the default build configuration,
* but it includes debugging tools and is signed with the debug key. The release
* build type applies ProGuard settings and is not signed by default.
*/
/* The buildTypes block is where you can configure multiple build types.
By default, the build system defines two build types: debug and release. The
debug build type is not explicitly shown in the default build configuration,
but it includes debugging tools and is signed with the debug key. The release
build type applies ProGuard settings and is not signed by default. */
buildTypes {
/**
* By default, Android Studio configures the release build type to enable code
* shrinking, using minifyEnabled, and specifies the default ProGuard rules file.
*/
/* By default, Android Studio configures the release build type to enable code
shrinking, using minifyEnabled, and specifies the default ProGuard rules file. */
getByName("release") {
isMinifyEnabled = true // Enables code shrinking for the release build type.
proguardFiles(
getDefaultProguardFile("proguard-android.txt"),
"proguard-rules.pro"
"proguard-rules.pro",
)
}
}
@@ -49,7 +49,7 @@ fun main(activity: AppCompatActivity) {
try {
vrServer = VRServer(
configPath = File(activity.filesDir, "vrconfig.yml").absolutePath,
serialHandlerProvider = { _ -> AndroidSerialHandler(activity) }
serialHandlerProvider = { _ -> AndroidSerialHandler(activity) },
)
vrServer.start()
Keybinding(vrServer)
@@ -64,9 +64,7 @@ class AndroidSerialHandler(val activity: AppCompatActivity) :
startWatchingNewDevices()
}
private fun getPorts(): List<UsbSerialDriver> {
return UsbSerialProber.getDefaultProber().findAllDrivers(manager)
}
private fun getPorts(): List<UsbSerialDriver> = UsbSerialProber.getDefaultProber().findAllDrivers(manager)
private fun startWatchingNewDevices() {
if (watchingNewDevices) return
@@ -78,13 +76,13 @@ class AndroidSerialHandler(val activity: AppCompatActivity) :
} catch (t: Throwable) {
LogManager.severe(
"[SerialHandler] Error while watching for new devices, cancelling the \"getDevicesTimer\".",
t
t,
)
getDevicesTimer.cancel()
}
},
0,
3000
3000,
)
}
@@ -116,7 +114,7 @@ class AndroidSerialHandler(val activity: AppCompatActivity) :
if (newPort == null) {
LogManager.info(
"[SerialHandler] No serial ports found to connect to (${lastKnownPorts.size}) total ports"
"[SerialHandler] No serial ports found to connect to (${lastKnownPorts.size}) total ports",
)
return false
}
@@ -126,7 +124,7 @@ class AndroidSerialHandler(val activity: AppCompatActivity) :
if (newPort != port) {
LogManager.info(
"[SerialHandler] Closing current serial port " +
port.descriptivePortName
port.descriptivePortName,
)
closeSerial()
} else {
@@ -138,7 +136,7 @@ class AndroidSerialHandler(val activity: AppCompatActivity) :
LogManager.info(
"[SerialHandler] Trying to connect to new serial port " +
newPort.descriptivePortName
newPort.descriptivePortName,
)
if (!manager.hasPermission(newPort.port.device)) {
@@ -147,7 +145,7 @@ class AndroidSerialHandler(val activity: AppCompatActivity) :
activity,
0,
Intent(ACTION_USB_PERMISSION),
flags
flags,
)
if (requestingPermission != newPort.portLocation) {
println("Requesting permission for ${newPort.portLocation}")
@@ -155,7 +153,7 @@ class AndroidSerialHandler(val activity: AppCompatActivity) :
requestingPermission = newPort.portLocation
}
LogManager.warning(
"[SerialHandler] Can't open serial port ${newPort.descriptivePortName}, invalid permissions"
"[SerialHandler] Can't open serial port ${newPort.descriptivePortName}, invalid permissions",
)
return false
}
@@ -163,7 +161,7 @@ class AndroidSerialHandler(val activity: AppCompatActivity) :
val connection = manager.openDevice(newPort.port.device)
if (connection == null) {
LogManager.warning(
"[SerialHandler] Can't open serial port ${newPort.descriptivePortName}, connection failed"
"[SerialHandler] Can't open serial port ${newPort.descriptivePortName}, connection failed",
)
return false
@@ -204,6 +202,10 @@ class AndroidSerialHandler(val activity: AppCompatActivity) :
writeSerial("GET INFO")
}
override fun wifiScanRequest() {
writeSerial("GET WIFISCAN")
}
override fun closeSerial() {
try {
if (isConnected) {
@@ -211,7 +213,7 @@ class AndroidSerialHandler(val activity: AppCompatActivity) :
}
listeners.forEach { it.onSerialDisconnected() }
LogManager.info(
"[SerialHandler] Port ${currentPort?.descriptivePortName} closed okay"
"[SerialHandler] Port ${currentPort?.descriptivePortName} closed okay",
)
usbIoManager?.stop()
usbIoManager = null
@@ -219,7 +221,7 @@ class AndroidSerialHandler(val activity: AppCompatActivity) :
} catch (e: Exception) {
LogManager.warning(
"[SerialHandler] Error closing port ${currentPort?.descriptivePortName}",
e
e,
)
}
}
+9 -11
View File
@@ -27,30 +27,28 @@ configure<com.diffplug.gradle.spotless.SpotlessExtension> {
// indentWithSpaces(2) // YAML cannot contain tabs: https://yaml.org/faq.html
// }
// .editorconfig doesn't work so, manual override
// https://github.com/diffplug/spotless/issues/142
val editorConfig =
mapOf(
"indent_size" to 4,
"indent_style" to "tab",
// "max_line_length" to 88,
"max_line_length" to "off",
"ktlint_experimental" to "enabled",
"ktlint_standard_condition-wrapping" to "disabled",
"ktlint_standard_property-naming" to "disabled",
"ij_kotlin_packages_to_use_import_on_demand" to
"java.util.*,kotlin.math.*,dev.slimevr.autobone.errors.*,io.github.axisangles.ktmath.*,kotlinx.atomicfu.*",
"ij_kotlin_allow_trailing_comma" to true
"java.util.*,kotlin.math.*,dev.slimevr.autobone.errors.*" +
",io.github.axisangles.ktmath.*,kotlinx.atomicfu.*" +
",dev.slimevr.tracking.trackers.*,dev.slimevr.desktop.platform.ProtobufMessages.*",
"ij_kotlin_allow_trailing_comma" to true,
)
val ktlintVersion = "0.47.1"
val ktlintVersion = "1.2.1"
kotlinGradle {
target("**/*.gradle.kts") // default target for kotlinGradle
ktlint(ktlintVersion)
.setUseExperimental(true)
.editorConfigOverride(editorConfig)
}
kotlin {
target("**/*.kt")
targetExclude("**/build/**/**.kt")
targetExclude("**/build/**/**.kt", "bin/")
ktlint(ktlintVersion)
.setUseExperimental(true)
.editorConfigOverride(editorConfig)
}
java {
+2 -1
View File
@@ -26,6 +26,7 @@ java {
}
tasks.withType<KotlinCompile> {
kotlinOptions.jvmTarget = "17"
kotlinOptions.freeCompilerArgs += "-Xvalue-classes"
}
// Set compiler to use UTF-8
@@ -65,7 +66,7 @@ dependencies {
implementation("com.illposed.osc:javaosc-core:0.8")
implementation("org.java-websocket:Java-WebSocket:1.+")
implementation("com.melloware:jintellitype:1.+")
implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:1.5.1")
implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:1.6.3")
implementation("it.unimi.dsi:fastutil:8.5.12")
testImplementation(kotlin("test"))
@@ -1,938 +0,0 @@
/*
* Copyright (c) 2009-2012 jMonkeyEngine
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* * Neither the name of 'jMonkeyEngine' nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
package com.jme3.math;
import io.github.axisangles.ktmath.Vector3;
import java.util.Random;
/**
* <code>FastMath</code> provides 'fast' math approximations and float
* equivalents of Math functions. These are all used as static values and
* functions.
*
* @author Various
* @version $Id: FastMath.java,v 1.45 2007/08/26 08:44:20 irrisor Exp $
*/
final public class FastMath {
private FastMath() {
}
/** A "close to zero" double epsilon value for use */
public static final double DBL_EPSILON = 2.220446049250313E-16d;
/** A "close to zero" float epsilon value for use */
public static final float FLT_EPSILON = 1.1920928955078125E-7f;
/** A "close to zero" float epsilon value for use */
public static final float ZERO_TOLERANCE = 0.0001f;
public static final float ONE_THIRD = 1f / 3f;
/** The value PI as a float. (180 degrees) */
public static final float PI = (float) Math.PI;
/** The value 2PI as a float. (360 degrees) */
public static final float TWO_PI = 2.0f * PI;
/** The value PI/2 as a float. (90 degrees) */
public static final float HALF_PI = 0.5f * PI;
/** The value PI/4 as a float. (45 degrees) */
public static final float QUARTER_PI = 0.25f * PI;
/** The value 1/PI as a float. */
public static final float INV_PI = 1.0f / PI;
/** The value 1/(2PI) as a float. */
public static final float INV_TWO_PI = 1.0f / TWO_PI;
/** A value to multiply a degree value by, to convert it to radians. */
public static final float DEG_TO_RAD = PI / 180.0f;
/** A value to multiply a radian value by, to convert it to degrees. */
public static final float RAD_TO_DEG = 180.0f / PI;
/** A premade random object for random numbers. */
public static final Random rand = new Random(System.currentTimeMillis());
/**
* Returns true if the number is within the specified {@code tolerance}
* value.
*
* @param value The number to check.
* @param tolerance The tolerance to zero (must be positive).
* @return True if the number is within the specified {@code tolerance}
* value.
*/
public static boolean isApproxZero(float value, float tolerance) {
return value < tolerance && value > tolerance;
}
/**
* Returns true if the number is within the {@link #ZERO_TOLERANCE} value.
*
* @param value The number to check.
* @return True if the number is within the {@link #ZERO_TOLERANCE} value.
*/
public static boolean isApproxZero(float value) {
return isApproxZero(value, ZERO_TOLERANCE);
}
/**
* Returns true if the two numbers are equal within the specified
* {@code tolerance} value.
*
* @param valueOne The first number to check.
* @param valueTwo The second number to check.
* @param tolerance The tolerance to zero (must be positive).
* @return True if the numbers are approximately equal within the specified
* {@code tolerance} value.
*/
public static boolean isApproxEqual(float valueOne, float valueTwo, float tolerance) {
return isApproxZero(valueTwo - valueOne, tolerance);
}
/**
* Returns true if the two numbers are equal within the
* {@link #ZERO_TOLERANCE} value.
*
* @param valueOne The first number to check.
* @param valueTwo The second number to check.
* @return True if the numbers are approximately equal within the
* {@link #ZERO_TOLERANCE} value.
*/
public static boolean isApproxEqual(float valueOne, float valueTwo) {
return isApproxEqual(valueOne, valueTwo, ZERO_TOLERANCE);
}
/**
* Returns true if the number is a power of 2 (2,4,8,16...)
*
* A good implementation found on the Java boards. note: a number is a power
* of two if and only if it is the smallest number with that number of
* significant bits. Therefore, if you subtract 1, you know that the new
* number will have fewer bits, so ANDing the original number with anything
* less than it will give 0.
*
* @param number The number to test.
* @return True if it is a power of two.
*/
public static boolean isPowerOfTwo(int number) {
return (number > 0) && (number & (number - 1)) == 0;
}
public static int nearestPowerOfTwo(int number) {
return (int) Math.pow(2, Math.ceil(Math.log(number) / Math.log(2)));
}
/**
* Linear interpolation from startValue to endValue by the given percent.
* Basically: ((1 - percent) * startValue) + (percent * endValue)
*
* @param scale scale value to use. if 1, use endValue, if 0, use
* startValue.
* @param startValue Beginning value. 0% of f
* @param endValue ending value. 100% of f
* @return The interpolated value between startValue and endValue.
*/
public static float interpolateLinear(float scale, float startValue, float endValue) {
if (startValue == endValue) {
return startValue;
}
if (scale <= 0f) {
return startValue;
}
if (scale >= 1f) {
return endValue;
}
return ((1f - scale) * startValue) + (scale * endValue);
}
/**
* Linear interpolation from startValue to endValue by the given percent.
* Basically: ((1 - percent) * startValue) + (percent * endValue)
*
* @param scale scale value to use. if 1, use endValue, if 0, use
* startValue.
* @param startValue Beginning value. 0% of f
* @param endValue ending value. 100% of f
* @return The interpolated value between startValue and endValue.
*/
public static Vector3 interpolateLinear(
float scale,
Vector3 startValue,
Vector3 endValue
) {
float x = interpolateLinear(scale, startValue.getX(), endValue.getX());
float y = interpolateLinear(scale, startValue.getY(), endValue.getY());
float z = interpolateLinear(scale, startValue.getZ(), endValue.getZ());
return new Vector3(x, y, z);
}
/**
* Linear extrapolation from startValue to endValue by the given scale. if
* scale is between 0 and 1 this method returns the same result as
* interpolateLinear if the scale is over 1 the value is linearly
* extrapolated. Note that the end value is the value for a scale of 1.
*
* @param scale the scale for extrapolation
* @param startValue the starting value (scale = 0)
* @param endValue the end value (scale = 1)
* @return an extrapolation for the given parameters
*/
public static float extrapolateLinear(float scale, float startValue, float endValue) {
// if (scale <= 0f) {
// return startValue;
// }
return ((1f - scale) * startValue) + (scale * endValue);
}
/**
* Linear extrapolation from startValue to endValue by the given scale. if
* scale is between 0 and 1 this method returns the same result as
* interpolateLinear if the scale is over 1 the value is linearly
* extrapolated. Note that the end value is the value for a scale of 1.
*
* @param scale the scale for extrapolation
* @param startValue the starting value (scale = 0)
* @param endValue the end value (scale = 1)
* @return an extrapolation for the given parameters
*/
public static Vector3 extrapolateLinear(
float scale,
Vector3 startValue,
Vector3 endValue
) {
// if (scale <= 1f) {
// return interpolateLinear(scale, startValue, endValue, store);
// }
float x = extrapolateLinear(scale, startValue.getX(), endValue.getX());
float y = extrapolateLinear(scale, startValue.getY(), endValue.getY());
float z = extrapolateLinear(scale, startValue.getZ(), endValue.getZ());
return new Vector3(x, y, z);
}
/**
* Interpolate a spline between at least 4 control points following the
* Catmull-Rom equation. here is the interpolation matrix m = [ 0.0 1.0 0.0
* 0.0 ] [-T 0.0 T 0.0 ] [ 2T T-3 3-2T -T ] [-T 2-T T-2 T ] where T is the
* curve tension the result is a value between p1 and p2, t=0 for p1, t=1
* for p2
*
* @param u value from 0 to 1
* @param T The tension of the curve
* @param p0 control point 0
* @param p1 control point 1
* @param p2 control point 2
* @param p3 control point 3
* @return catmull-Rom interpolation
*/
public static float interpolateCatmullRom(
float u,
float T,
float p0,
float p1,
float p2,
float p3
) {
float c1, c2, c3, c4;
c1 = p1;
c2 = -1.0f * T * p0 + T * p2;
c3 = 2 * T * p0 + (T - 3) * p1 + (3 - 2 * T) * p2 + -T * p3;
c4 = -T * p0 + (2 - T) * p1 + (T - 2) * p2 + T * p3;
return (float) (((c4 * u + c3) * u + c2) * u + c1);
}
/**
* Interpolate a spline between at least 4 control points following the
* Catmull-Rom equation. here is the interpolation matrix m = [ 0.0 1.0 0.0
* 0.0 ] [-T 0.0 T 0.0 ] [ 2T T-3 3-2T -T ] [-T 2-T T-2 T ] where T is the
* tension of the curve the result is a value between p1 and p2, t=0 for p1,
* t=1 for p2
*
* @param u value from 0 to 1
* @param T The tension of the curve
* @param p0 control point 0
* @param p1 control point 1
* @param p2 control point 2
* @param p3 control point 3
* @return catmull-Rom interpolation
*/
public static Vector3 interpolateCatmullRom(
float u,
float T,
Vector3 p0,
Vector3 p1,
Vector3 p2,
Vector3 p3
) {
float x = interpolateCatmullRom(u, T, p0.getX(), p1.getX(), p2.getX(), p3.getX());
float y = interpolateCatmullRom(u, T, p0.getY(), p1.getY(), p2.getY(), p3.getY());
float z = interpolateCatmullRom(u, T, p0.getZ(), p1.getZ(), p2.getZ(), p3.getZ());
return new Vector3(x, y, z);
}
/**
* Interpolate a spline between at least 4 control points following the
* Bezier equation. here is the interpolation matrix m = [ -1.0 3.0 -3.0 1.0
* ] [ 3.0 -6.0 3.0 0.0 ] [ -3.0 3.0 0.0 0.0 ] [ 1.0 0.0 0.0 0.0 ] where T
* is the curve tension the result is a value between p1 and p3, t=0 for p1,
* t=1 for p3
*
* @param u value from 0 to 1
* @param p0 control point 0
* @param p1 control point 1
* @param p2 control point 2
* @param p3 control point 3
* @return Bezier interpolation
*/
public static float interpolateBezier(float u, float p0, float p1, float p2, float p3) {
float oneMinusU = 1.0f - u;
float oneMinusU2 = oneMinusU * oneMinusU;
float u2 = u * u;
return p0 * oneMinusU2 * oneMinusU
+ 3.0f * p1 * u * oneMinusU2
+ 3.0f * p2 * u2 * oneMinusU
+ p3 * u2 * u;
}
/**
* Interpolate a spline between at least 4 control points following the
* Bezier equation. here is the interpolation matrix m = [ -1.0 3.0 -3.0 1.0
* ] [ 3.0 -6.0 3.0 0.0 ] [ -3.0 3.0 0.0 0.0 ] [ 1.0 0.0 0.0 0.0 ] where T
* is the tension of the curve the result is a value between p1 and p3, t=0
* for p1, t=1 for p3
*
* @param u value from 0 to 1
* @param p0 control point 0
* @param p1 control point 1
* @param p2 control point 2
* @param p3 control point 3
* @return Bezier interpolation
*/
public static Vector3 interpolateBezier(
float u,
Vector3 p0,
Vector3 p1,
Vector3 p2,
Vector3 p3
) {
float x = interpolateBezier(u, p0.getX(), p1.getX(), p2.getX(), p3.getX());
float y = interpolateBezier(u, p0.getY(), p1.getY(), p2.getY(), p3.getY());
float z = interpolateBezier(u, p0.getZ(), p1.getZ(), p2.getZ(), p3.getZ());
return new Vector3(x, y, z);
}
/**
* Compute the length on a catmull rom spline between control point 1 and 2
*
* @param p0 control point 0
* @param p1 control point 1
* @param p2 control point 2
* @param p3 control point 3
* @param startRange the starting range on the segment (use 0)
* @param endRange the end range on the segment (use 1)
* @param curveTension the curve tension
* @return the length of the segment
*/
public static float getCatmullRomP1toP2Length(
Vector3 p0,
Vector3 p1,
Vector3 p2,
Vector3 p3,
float startRange,
float endRange,
float curveTension
) {
float epsilon = 0.001f;
float middleValue = (startRange + endRange) * 0.5f;
Vector3 start = Vector3.Companion.getNULL();
Vector3 end = Vector3.Companion.getNULL();
if (startRange != 0) {
start = FastMath.interpolateCatmullRom(startRange, curveTension, p0, p1, p2, p3);
}
if (endRange != 1) {
end = FastMath.interpolateCatmullRom(endRange, curveTension, p0, p1, p2, p3);
}
Vector3 middle = FastMath.interpolateCatmullRom(middleValue, curveTension, p0, p1, p2, p3);
float l = end.minus(start).len();
float l1 = middle.minus(start).len();
float l2 = end.minus(middle).len();
float len = l1 + l2;
if (l + epsilon < len) {
l1 = getCatmullRomP1toP2Length(p0, p1, p2, p3, startRange, middleValue, curveTension);
l2 = getCatmullRomP1toP2Length(p0, p1, p2, p3, middleValue, endRange, curveTension);
}
l = l1 + l2;
return l;
}
/**
* Compute the length on a bezier spline between control point 1 and 2
*
* @param p0 control point 0
* @param p1 control point 1
* @param p2 control point 2
* @param p3 control point 3
* @return the length of the segment
*/
public static float getBezierP1toP2Length(Vector3 p0, Vector3 p1, Vector3 p2, Vector3 p3) {
float delta = 0.02f, t = 0.0f, result = 0.0f;
while (t <= 1.0f) {
Vector3 v2 = FastMath.interpolateBezier(t, p0, p1, p2, p3);
result += p0.minus(v2).len();
p0 = v2;
t += delta;
}
return result;
}
/**
* Returns the arc cosine of a value.<br>
* Special cases:
* <ul>
* <li>If fValue is smaller than -1, then the result is PI.
* <li>If the argument is greater than 1, then the result is 0.
* </ul>
*
* @param fValue The value to arc cosine.
* @return The angle, in radians.
* @see java.lang.Math#acos(double)
*/
public static float acos(float fValue) {
if (-1.0f < fValue) {
if (fValue < 1.0f) {
return (float) Math.acos(fValue);
}
return 0.0f;
}
return PI;
}
/**
* Returns the arc sine of a value.<br>
* Special cases:
* <ul>
* <li>If fValue is smaller than -1, then the result is -HALF_PI.
* <li>If the argument is greater than 1, then the result is HALF_PI.
* </ul>
*
* @param fValue The value to arc sine.
* @return the angle in radians.
* @see java.lang.Math#asin(double)
*/
public static float asin(float fValue) {
if (-1.0f < fValue) {
if (fValue < 1.0f) {
return (float) Math.asin(fValue);
}
return HALF_PI;
}
return -HALF_PI;
}
/**
* Returns the arc tangent of an angle given in radians.<br>
*
* @param fValue The angle, in radians.
* @return fValue's atan
* @see java.lang.Math#atan(double)
*/
public static float atan(float fValue) {
return (float) Math.atan(fValue);
}
/**
* A direct call to Math.atan2.
*
* @param fY
* @param fX
* @return Math.atan2(fY,fX)
* @see java.lang.Math#atan2(double, double)
*/
public static float atan2(float fY, float fX) {
return (float) Math.atan2(fY, fX);
}
/**
* Rounds a fValue up. A call to Math.ceil
*
* @param fValue The value.
* @return The fValue rounded up
* @see java.lang.Math#ceil(double)
*/
public static float ceil(float fValue) {
return (float) Math.ceil(fValue);
}
/**
* Returns cosine of an angle. Direct call to java.lang.Math
*
* @see Math#cos(double)
* @param v The angle to cosine.
* @return the cosine of the angle.
*/
public static float cos(float v) {
return (float) Math.cos(v);
}
/**
* Returns the sine of an angle. Direct call to java.lang.Math
*
* @see Math#sin(double)
* @param v The angle to sine.
* @return the sine of the angle.
*/
public static float sin(float v) {
return (float) Math.sin(v);
}
/**
* Returns E^fValue
*
* @param fValue Value to raise to a power.
* @return The value E^fValue
* @see java.lang.Math#exp(double)
*/
public static float exp(float fValue) {
return (float) Math.exp(fValue);
}
/**
* Returns Absolute value of a float.
*
* @param fValue The value to abs.
* @return The abs of the value.
* @see java.lang.Math#abs(float)
*/
public static float abs(float fValue) {
if (fValue < 0) {
return -fValue;
}
return fValue;
}
/**
* Returns a number rounded down.
*
* @param fValue The value to round
* @return The given number rounded down
* @see java.lang.Math#floor(double)
*/
public static float floor(float fValue) {
return (float) Math.floor(fValue);
}
/**
* Returns 1/sqrt(fValue)
*
* @param fValue The value to process.
* @return 1/sqrt(fValue)
* @see java.lang.Math#sqrt(double)
*/
public static float invSqrt(float fValue) {
return (float) (1.0f / Math.sqrt(fValue));
}
public static float fastInvSqrt(float x) {
float xhalf = 0.5f * x;
int i = Float.floatToIntBits(x); // get bits for floating value
i = 0x5f375a86 - (i >> 1); // gives initial guess y0
x = Float.intBitsToFloat(i); // convert bits back to float
x = x * (1.5f - xhalf * x * x); // Newton step, repeating increases
// accuracy
return x;
}
/**
* Returns the log base E of a value.
*
* @param fValue The value to log.
* @return The log of fValue base E
* @see java.lang.Math#log(double)
*/
public static float log(float fValue) {
return (float) Math.log(fValue);
}
/**
* Returns the logarithm of value with given base, calculated as
* log(value)/log(base), so that pow(base, return)==value (contributed by
* vear)
*
* @param value The value to log.
* @param base Base of logarithm.
* @return The logarithm of value with given base
*/
public static float log(float value, float base) {
return (float) (Math.log(value) / Math.log(base));
}
/**
* Returns a number raised to an exponent power. fBase^fExponent
*
* @param fBase The base value (IE 2)
* @param fExponent The exponent value (IE 3)
* @return base raised to exponent (IE 8)
* @see java.lang.Math#pow(double, double)
*/
public static float pow(float fBase, float fExponent) {
return (float) Math.pow(fBase, fExponent);
}
/**
* Returns the value squared. fValue ^ 2
*
* @param fValue The value to square.
* @return The square of the given value.
*/
public static float sqr(float fValue) {
return fValue * fValue;
}
/**
* Returns the square root of a given value.
*
* @param fValue The value to sqrt.
* @return The square root of the given value.
* @see java.lang.Math#sqrt(double)
*/
public static float sqrt(float fValue) {
return (float) Math.sqrt(fValue);
}
/**
* Returns the tangent of a value. If USE_FAST_TRIG is enabled, an
* approximate value is returned. Otherwise, a direct value is used.
*
* @param fValue The value to tangent, in radians.
* @return The tangent of fValue.
* @see java.lang.Math#tan(double)
*/
public static float tan(float fValue) {
return (float) Math.tan(fValue);
}
/**
* Returns 1 if the number is positive, -1 if the number is negative, and 0
* otherwise
*
* @param iValue The integer to examine.
* @return The integer's sign.
*/
public static int sign(int iValue) {
if (iValue > 0) {
return 1;
}
if (iValue < 0) {
return -1;
}
return 0;
}
/**
* Returns 1 if the number is positive, -1 if the number is negative, and 0
* otherwise
*
* @param fValue The float to examine.
* @return The float's sign.
*/
public static float sign(float fValue) {
return Math.signum(fValue);
}
/**
* A method that computes normal for a triangle defined by three vertices.
*
* @param v1 first vertex
* @param v2 second vertex
* @param v3 third vertex
* @return a normal for the face
*/
public static Vector3 computeNormal(Vector3 v1, Vector3 v2, Vector3 v3) {
Vector3 a1 = v1.minus(v2);
Vector3 a2 = v3.minus(v2);
return a2.cross(a1).unit();
}
/**
* Returns the determinant of a 4x4 matrix.
*/
public static float determinant(
double m00,
double m01,
double m02,
double m03,
double m10,
double m11,
double m12,
double m13,
double m20,
double m21,
double m22,
double m23,
double m30,
double m31,
double m32,
double m33
) {
double det01 = m20 * m31 - m21 * m30;
double det02 = m20 * m32 - m22 * m30;
double det03 = m20 * m33 - m23 * m30;
double det12 = m21 * m32 - m22 * m31;
double det13 = m21 * m33 - m23 * m31;
double det23 = m22 * m33 - m23 * m32;
return (float) (m00 * (m11 * det23 - m12 * det13 + m13 * det12)
- m01
* (m10 * det23 - m12 * det03 + m13 * det02)
+ m02
* (m10 * det13 - m11 * det03 + m13 * det01)
- m03
* (m10 * det12 - m11 * det02 + m12 * det01));
}
/**
* Returns a random float between 0 and 1.
*
* @return A random float between <tt>0.0f</tt> (inclusive) to <tt>1.0f</tt>
* (exclusive).
*/
public static float nextRandomFloat() {
return rand.nextFloat();
}
/**
* Returns a random integer between min and max.
*
* @return A random int between <tt>min</tt> (inclusive) to <tt>max</tt>
* (inclusive).
*/
public static int nextRandomInt(int min, int max) {
return (int) (nextRandomFloat() * (max - min + 1)) + min;
}
public static int nextRandomInt() {
return rand.nextInt();
}
/**
* Converts a point from Spherical coordinates to Cartesian (using positive
* Y as up) and stores the results in the store var.
*/
public static Vector3 sphericalToCartesian(Vector3 sphereCoords) {
float y = sphereCoords.getX() * FastMath.sin(sphereCoords.getZ());
float a = sphereCoords.getX() * FastMath.cos(sphereCoords.getZ());
float x = a * FastMath.cos(sphereCoords.getY());
float z = a * FastMath.sin(sphereCoords.getY());
return new Vector3(x, y, z);
}
/**
* Converts a point from Cartesian coordinates (using positive Y as up) to
* Spherical and stores the results in the store var. (Radius, Azimuth,
* Polar)
*/
public static Vector3 cartesianToSpherical(Vector3 cartCoords) {
float x = cartCoords.getX();
if (x == 0) {
x = FastMath.FLT_EPSILON;
}
float vx = FastMath
.sqrt(
(x * x)
+ (cartCoords.getY() * cartCoords.getY())
+ (cartCoords.getZ() * cartCoords.getZ())
);
float vy = FastMath.atan(cartCoords.getZ() / x);
if (x < 0) {
vy += FastMath.PI;
}
float vz = FastMath.asin(cartCoords.getY() / vx);
return new Vector3(vx, vy, vz);
}
/**
* Converts a point from Spherical coordinates to Cartesian (using positive
* Z as up) and stores the results in the store var.
*/
public static Vector3 sphericalToCartesianZ(Vector3 sphereCoords) {
float z = sphereCoords.getX() * FastMath.sin(sphereCoords.getZ());
float a = sphereCoords.getX() * FastMath.cos(sphereCoords.getZ());
float x = a * FastMath.cos(sphereCoords.getY());
float y = a * FastMath.sin(sphereCoords.getY());
return new Vector3(x, y, z);
}
/**
* Converts a point from Cartesian coordinates (using positive Z as up) to
* Spherical and stores the results in the store var. (Radius, Azimuth,
* Polar)
*/
public static Vector3 cartesianZToSpherical(Vector3 cartCoords) {
float x = cartCoords.getX();
if (x == 0) {
x = FastMath.FLT_EPSILON;
}
float vx = FastMath
.sqrt(
(x * x)
+ (cartCoords.getY() * cartCoords.getY())
+ (cartCoords.getZ() * cartCoords.getZ())
);
float vz = FastMath.atan(cartCoords.getZ() / x);
if (x < 0) {
vz += FastMath.PI;
}
float vy = FastMath.asin(cartCoords.getY() / vx);
return new Vector3(vx, vy, vz);
}
/**
* Takes an value and expresses it in terms of min to max.
*
* @param val - the angle to normalize (in radians)
* @return the normalized angle (also in radians)
*/
public static float normalize(float val, float min, float max) {
if (Float.isInfinite(val) || Float.isNaN(val)) {
return 0f;
}
float range = max - min;
while (val > max) {
val -= range;
}
while (val < min) {
val += range;
}
return val;
}
/**
* @param x the value whose sign is to be adjusted.
* @param y the value whose sign is to be used.
* @return x with its sign changed to match the sign of y.
*/
public static float copysign(float x, float y) {
if (y >= 0 && x <= -0) {
return -x;
} else if (y < 0 && x >= 0) {
return -x;
} else {
return x;
}
}
/**
* Take a float input and clamp it between min and max.
*
* @param input
* @param min
* @param max
* @return clamped input
*/
public static float clamp(float input, float min, float max) {
return (input < min) ? min : (input > max) ? max : input;
}
/**
* Clamps the given float to be between 0 and 1.
*
* @param input
* @return input clamped between 0 and 1.
*/
public static float saturate(float input) {
return clamp(input, 0f, 1f);
}
/**
* Converts a single precision (32 bit) floating point value into half
* precision (16 bit).
*
* <p>
* Source:
* <a href="http://www.fox-toolkit.org/ftp/fasthalffloatconversion.pdf">
* http://www.fox-toolkit.org/ftp/fasthalffloatconversion.pdf</a><br>
* <strong>broken link</strong>
*
* @param half The half floating point value as a short.
* @return floating point value of the half.
*/
public static float convertHalfToFloat(short half) {
switch ((int) half) {
case 0x0000:
return 0f;
case 0x8000:
return -0f;
case 0x7c00:
return Float.POSITIVE_INFINITY;
case 0xfc00:
return Float.NEGATIVE_INFINITY;
// TODO: Support for NaN?
default:
return Float
.intBitsToFloat(
((half & 0x8000) << 16)
| (((half & 0x7c00) + 0x1C000) << 13)
| ((half & 0x03FF) << 13)
);
}
}
public static short convertFloatToHalf(float flt) {
if (Float.isNaN(flt)) {
throw new UnsupportedOperationException("NaN to half conversion not supported!");
} else if (flt == Float.POSITIVE_INFINITY) {
return (short) 0x7c00;
} else if (flt == Float.NEGATIVE_INFINITY) {
return (short) 0xfc00;
} else if (flt == 0f) {
return (short) 0x0000;
} else if (flt == -0f) {
return (short) 0x8000;
} else if (flt > 65504f) {
// max value supported by half float
return 0x7bff;
} else if (flt < -65504f) {
return (short) (0x7bff | 0x8000);
} else if (flt > 0f && flt < 5.96046E-8f) {
return 0x0001;
} else if (flt < 0f && flt > -5.96046E-8f) {
return (short) 0x8001;
}
int f = Float.floatToIntBits(flt);
return (short) (((f >> 16) & 0x8000)
| ((((f & 0x7f800000) - 0x38000000) >> 13) & 0x7c00)
| ((f >> 13) & 0x03ff));
}
}
@@ -0,0 +1,662 @@
/*
* Copyright (c) 2009-2012 jMonkeyEngine
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* * Neither the name of 'jMonkeyEngine' nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
package com.jme3.math
import io.github.axisangles.ktmath.Vector3
import io.github.axisangles.ktmath.Vector3.Companion.NULL
import java.util.*
import kotlin.math.*
/**
* `FastMath` provides 'fast' math approximations and float
* equivalents of Math functions. These are all used as static values and
* functions.
*
* @author Various
* @version $Id: FastMath.java,v 1.45 2007/08/26 08:44:20 irrisor Exp $
*/
object FastMath {
/** A "close to zero" double epsilon value for use */
const val DBL_EPSILON: Double = 2.220446049250313E-16
/** A "close to zero" float epsilon value for use */
const val FLT_EPSILON: Float = 1.1920928955078125E-7f
/** A "close to zero" float epsilon value for use */
const val ZERO_TOLERANCE: Float = 0.0001f
const val ONE_THIRD: Float = 1f / 3f
/** The value PI as a float. (180 degrees) */
const val PI: Float = Math.PI.toFloat()
/** The value 2PI as a float. (360 degrees) */
const val TWO_PI: Float = 2.0f * PI
/** The value PI/2 as a float. (90 degrees) */
const val HALF_PI: Float = 0.5f * PI
/** The value PI/4 as a float. (45 degrees) */
const val QUARTER_PI: Float = 0.25f * PI
/** The value 1/PI as a float. */
const val INV_PI: Float = 1.0f / PI
/** The value 1/(2PI) as a float. */
const val INV_TWO_PI: Float = 1.0f / TWO_PI
/** A value to multiply a degree value by, to convert it to radians. */
const val DEG_TO_RAD: Float = PI / 180.0f
/** A value to multiply a radian value by, to convert it to degrees. */
const val RAD_TO_DEG: Float = 180.0f / PI
/** A premade random object for random numbers. */
val rand: Random = Random(System.currentTimeMillis())
/**
* Returns true if the number is within the specified `tolerance`
* value.
*
* @param value The number to check.
* @param tolerance The tolerance to zero (must be positive).
* @return True if the number is within the specified `tolerance`
* value.
*/
fun isApproxZero(value: Float, tolerance: Float): Boolean = value < tolerance && value > -tolerance
/**
* Returns true if the number is within the [.ZERO_TOLERANCE] value.
*
* @param value The number to check.
* @return True if the number is within the [.ZERO_TOLERANCE] value.
*/
fun isApproxZero(value: Float): Boolean = isApproxZero(value, ZERO_TOLERANCE)
/**
* Returns true if the two numbers are equal within the specified
* `tolerance` value.
*
* @param valueOne The first number to check.
* @param valueTwo The second number to check.
* @param tolerance The tolerance to zero (must be positive).
* @return True if the numbers are approximately equal within the specified
* `tolerance` value.
*/
fun isApproxEqual(valueOne: Float, valueTwo: Float, tolerance: Float): Boolean = isApproxZero(valueTwo - valueOne, tolerance)
/**
* Returns true if the two numbers are equal within the
* [.ZERO_TOLERANCE] value.
*
* @param valueOne The first number to check.
* @param valueTwo The second number to check.
* @return True if the numbers are approximately equal within the
* [.ZERO_TOLERANCE] value.
*/
fun isApproxEqual(valueOne: Float, valueTwo: Float): Boolean = isApproxEqual(valueOne, valueTwo, ZERO_TOLERANCE)
/**
* Returns true if the number is a power of 2 (2,4,8,16...)
*
* A good implementation found on the Java boards. note: a number is a power
* of two if and only if it is the smallest number with that number of
* significant bits. Therefore, if you subtract 1, you know that the new
* number will have fewer bits, so ANDing the original number with anything
* less than it will give 0.
*
* @param number The number to test.
* @return True if it is a power of two.
*/
fun isPowerOfTwo(number: Int): Boolean = (number > 0) && (number and (number - 1)) == 0
fun nearestPowerOfTwo(number: Int): Int = 2.0.pow(ceil(ln(number.toDouble()) / ln(2.0))).toInt()
/**
* Linear interpolation from startValue to endValue by the given percent.
* Basically: ((1 - percent) * startValue) + (percent * endValue)
*
* @param scale scale value to use. if 1, use endValue, if 0, use
* startValue.
* @param startValue Beginning value. 0% of f
* @param endValue ending value. 100% of f
* @return The interpolated value between startValue and endValue.
*/
fun interpolateLinear(scale: Float, startValue: Float, endValue: Float): Float {
if (startValue == endValue) {
return startValue
}
if (scale <= 0f) {
return startValue
}
if (scale >= 1f) {
return endValue
}
return ((1f - scale) * startValue) + (scale * endValue)
}
/**
* Linear interpolation from startValue to endValue by the given percent.
* Basically: ((1 - percent) * startValue) + (percent * endValue)
*
* @param scale scale value to use. if 1, use endValue, if 0, use
* startValue.
* @param startValue Beginning value. 0% of f
* @param endValue ending value. 100% of f
* @return The interpolated value between startValue and endValue.
*/
fun interpolateLinear(
scale: Float,
startValue: Vector3,
endValue: Vector3,
): Vector3 {
val x = interpolateLinear(scale, startValue.x, endValue.x)
val y = interpolateLinear(scale, startValue.y, endValue.y)
val z = interpolateLinear(scale, startValue.z, endValue.z)
return Vector3(x, y, z)
}
/**
* Linear extrapolation from startValue to endValue by the given scale. if
* scale is between 0 and 1 this method returns the same result as
* interpolateLinear if the scale is over 1 the value is linearly
* extrapolated. Note that the end value is the value for a scale of 1.
*
* @param scale the scale for extrapolation
* @param startValue the starting value (scale = 0)
* @param endValue the end value (scale = 1)
* @return an extrapolation for the given parameters
*/
fun extrapolateLinear(scale: Float, startValue: Float, endValue: Float): Float {
// if (scale <= 0f) {
// return startValue;
// }
return ((1f - scale) * startValue) + (scale * endValue)
}
/**
* Linear extrapolation from startValue to endValue by the given scale. if
* scale is between 0 and 1 this method returns the same result as
* interpolateLinear if the scale is over 1 the value is linearly
* extrapolated. Note that the end value is the value for a scale of 1.
*
* @param scale the scale for extrapolation
* @param startValue the starting value (scale = 0)
* @param endValue the end value (scale = 1)
* @return an extrapolation for the given parameters
*/
fun extrapolateLinear(
scale: Float,
startValue: Vector3,
endValue: Vector3,
): Vector3 {
// if (scale <= 1f) {
// return interpolateLinear(scale, startValue, endValue, store);
// }
val x = extrapolateLinear(scale, startValue.x, endValue.x)
val y = extrapolateLinear(scale, startValue.y, endValue.y)
val z = extrapolateLinear(scale, startValue.z, endValue.z)
return Vector3(x, y, z)
}
/**
* Interpolate a spline between at least 4 control points following the
* Catmull-Rom equation. here is the interpolation matrix m = [ 0.0 1.0 0.0
* 0.0 ] [-T 0.0 T 0.0 ] [ 2T T-3 3-2T -T ] [-T 2-T T-2 T ] where T is the
* curve tension the result is a value between p1 and p2, t=0 for p1, t=1
* for p2
*
* @param u value from 0 to 1
* @param T The tension of the curve
* @param p0 control point 0
* @param p1 control point 1
* @param p2 control point 2
* @param p3 control point 3
* @return catmull-Rom interpolation
*/
fun interpolateCatmullRom(
u: Float,
T: Float,
p0: Float,
p1: Float,
p2: Float,
p3: Float,
): Float {
val c1 = p1
val c2 = -1.0f * T * p0 + T * p2
val c3 = 2 * T * p0 + (T - 3) * p1 + (3 - 2 * T) * p2 + -T * p3
val c4 = -T * p0 + (2 - T) * p1 + (T - 2) * p2 + T * p3
return (((c4 * u + c3) * u + c2) * u + c1)
}
/**
* Interpolate a spline between at least 4 control points following the
* Catmull-Rom equation. here is the interpolation matrix m = [ 0.0 1.0 0.0
* 0.0 ] [-T 0.0 T 0.0 ] [ 2T T-3 3-2T -T ] [-T 2-T T-2 T ] where T is the
* tension of the curve the result is a value between p1 and p2, t=0 for p1,
* t=1 for p2
*
* @param u value from 0 to 1
* @param T The tension of the curve
* @param p0 control point 0
* @param p1 control point 1
* @param p2 control point 2
* @param p3 control point 3
* @return catmull-Rom interpolation
*/
fun interpolateCatmullRom(
u: Float,
T: Float,
p0: Vector3,
p1: Vector3,
p2: Vector3,
p3: Vector3,
): Vector3 {
val x = interpolateCatmullRom(u, T, p0.x, p1.x, p2.x, p3.x)
val y = interpolateCatmullRom(u, T, p0.y, p1.y, p2.y, p3.y)
val z = interpolateCatmullRom(u, T, p0.z, p1.z, p2.z, p3.z)
return Vector3(x, y, z)
}
/**
* Interpolate a spline between at least 4 control points following the
* Bezier equation. here is the interpolation matrix m = [ -1.0 3.0 -3.0 1.0
* ] [ 3.0 -6.0 3.0 0.0 ] [ -3.0 3.0 0.0 0.0 ] [ 1.0 0.0 0.0 0.0 ] where T
* is the curve tension the result is a value between p1 and p3, t=0 for p1,
* t=1 for p3
*
* @param u value from 0 to 1
* @param p0 control point 0
* @param p1 control point 1
* @param p2 control point 2
* @param p3 control point 3
* @return Bezier interpolation
*/
fun interpolateBezier(u: Float, p0: Float, p1: Float, p2: Float, p3: Float): Float {
val oneMinusU = 1.0f - u
val oneMinusU2 = oneMinusU * oneMinusU
val u2 = u * u
return p0 * oneMinusU2 * oneMinusU + 3.0f * p1 * u * oneMinusU2 + 3.0f * p2 * u2 * oneMinusU + p3 * u2 * u
}
/**
* Interpolate a spline between at least 4 control points following the
* Bezier equation. here is the interpolation matrix m = [ -1.0 3.0 -3.0 1.0
* ] [ 3.0 -6.0 3.0 0.0 ] [ -3.0 3.0 0.0 0.0 ] [ 1.0 0.0 0.0 0.0 ] where T
* is the tension of the curve the result is a value between p1 and p3, t=0
* for p1, t=1 for p3
*
* @param u value from 0 to 1
* @param p0 control point 0
* @param p1 control point 1
* @param p2 control point 2
* @param p3 control point 3
* @return Bezier interpolation
*/
fun interpolateBezier(
u: Float,
p0: Vector3,
p1: Vector3,
p2: Vector3,
p3: Vector3,
): Vector3 {
val x = interpolateBezier(u, p0.x, p1.x, p2.x, p3.x)
val y = interpolateBezier(u, p0.y, p1.y, p2.y, p3.y)
val z = interpolateBezier(u, p0.z, p1.z, p2.z, p3.z)
return Vector3(x, y, z)
}
/**
* Compute the length on a catmull rom spline between control point 1 and 2
*
* @param p0 control point 0
* @param p1 control point 1
* @param p2 control point 2
* @param p3 control point 3
* @param startRange the starting range on the segment (use 0)
* @param endRange the end range on the segment (use 1)
* @param curveTension the curve tension
* @return the length of the segment
*/
fun getCatmullRomP1toP2Length(
p0: Vector3,
p1: Vector3,
p2: Vector3,
p3: Vector3,
startRange: Float,
endRange: Float,
curveTension: Float,
): Float {
val epsilon = 0.001f
val middleValue = (startRange + endRange) * 0.5f
var start = NULL
var end = NULL
if (startRange != 0f) {
start = interpolateCatmullRom(startRange, curveTension, p0, p1, p2, p3)
}
if (endRange != 1f) {
end = interpolateCatmullRom(endRange, curveTension, p0, p1, p2, p3)
}
val middle = interpolateCatmullRom(middleValue, curveTension, p0, p1, p2, p3)
var l = end.minus(start).len()
var l1 = middle.minus(start).len()
var l2 = end.minus(middle).len()
val len = l1 + l2
if (l + epsilon < len) {
l1 = getCatmullRomP1toP2Length(p0, p1, p2, p3, startRange, middleValue, curveTension)
l2 = getCatmullRomP1toP2Length(p0, p1, p2, p3, middleValue, endRange, curveTension)
}
l = l1 + l2
return l
}
/**
* Compute the length on a bezier spline between control point 1 and 2
*
* @param p0 control point 0
* @param p1 control point 1
* @param p2 control point 2
* @param p3 control point 3
* @return the length of the segment
*/
fun getBezierP1toP2Length(p0: Vector3, p1: Vector3, p2: Vector3, p3: Vector3): Float {
var p0 = p0
val delta = 0.02f
var t = 0.0f
var result = 0.0f
while (t <= 1.0f) {
val v2 = interpolateBezier(t, p0, p1, p2, p3)
result += p0.minus(v2).len()
p0 = v2
t += delta
}
return result
}
fun fastInvSqrt(x: Float): Float {
var x = x
val xhalf = 0.5f * x
var i = java.lang.Float.floatToIntBits(x) // get bits for floating value
i = 0x5f375a86 - (i shr 1) // gives initial guess y0
x = java.lang.Float.intBitsToFloat(i) // convert bits back to float
x *= (1.5f - xhalf * x * x) // Newton step, repeating increases
// accuracy
return x
}
/**
* A method that computes normal for a triangle defined by three vertices.
*
* @param v1 first vertex
* @param v2 second vertex
* @param v3 third vertex
* @return a normal for the face
*/
fun computeNormal(v1: Vector3, v2: Vector3?, v3: Vector3): Vector3 {
val a1 = v1.minus(v2!!)
val a2 = v3.minus(v2)
return a2.cross(a1).unit()
}
/**
* Returns the determinant of a 4x4 matrix.
*/
fun determinant(
m00: Double,
m01: Double,
m02: Double,
m03: Double,
m10: Double,
m11: Double,
m12: Double,
m13: Double,
m20: Double,
m21: Double,
m22: Double,
m23: Double,
m30: Double,
m31: Double,
m32: Double,
m33: Double,
): Float {
val det01 = m20 * m31 - m21 * m30
val det02 = m20 * m32 - m22 * m30
val det03 = m20 * m33 - m23 * m30
val det12 = m21 * m32 - m22 * m31
val det13 = m21 * m33 - m23 * m31
val det23 = m22 * m33 - m23 * m32
return (
m00 * (m11 * det23 - m12 * det13 + m13 * det12) -
m01
* (m10 * det23 - m12 * det03 + m13 * det02) +
m02
* (m10 * det13 - m11 * det03 + m13 * det01) -
m03
* (m10 * det12 - m11 * det02 + m12 * det01)
).toFloat()
}
/**
* Converts a point from Spherical coordinates to Cartesian (using positive
* Y as up) and stores the results in the store var.
*/
fun sphericalToCartesian(sphereCoords: Vector3): Vector3 {
val y = sphereCoords.x * sin(sphereCoords.z)
val a = sphereCoords.x * cos(sphereCoords.z)
val x = a * cos(sphereCoords.y)
val z = a * sin(sphereCoords.y)
return Vector3(x, y, z)
}
/**
* Converts a point from Cartesian coordinates (using positive Y as up) to
* Spherical and stores the results in the store var. (Radius, Azimuth,
* Polar)
*/
fun cartesianToSpherical(cartCoords: Vector3): Vector3 {
var x = cartCoords.x
if (x == 0f) {
x = FLT_EPSILON
}
val vx = sqrt(
(x * x) +
(cartCoords.y * cartCoords.y) +
(cartCoords.z * cartCoords.z),
)
var vy = atan(cartCoords.z / x)
if (x < 0) {
vy += PI
}
val vz = asin(cartCoords.y / vx)
return Vector3(vx, vy, vz)
}
/**
* Converts a point from Spherical coordinates to Cartesian (using positive
* Z as up) and stores the results in the store var.
*/
fun sphericalToCartesianZ(sphereCoords: Vector3): Vector3 {
val z = sphereCoords.x * sin(sphereCoords.z)
val a = sphereCoords.x * cos(sphereCoords.z)
val x = a * cos(sphereCoords.y)
val y = a * sin(sphereCoords.y)
return Vector3(x, y, z)
}
/**
* Converts a point from Cartesian coordinates (using positive Z as up) to
* Spherical and stores the results in the store var. (Radius, Azimuth,
* Polar)
*/
fun cartesianZToSpherical(cartCoords: Vector3): Vector3 {
var x = cartCoords.x
if (x == 0f) {
x = FLT_EPSILON
}
val vx = sqrt(
(x * x) +
(cartCoords.y * cartCoords.y) +
(cartCoords.z * cartCoords.z),
)
var vz = atan(cartCoords.z / x)
if (x < 0) {
vz += PI
}
val vy = asin(cartCoords.y / vx)
return Vector3(vx, vy, vz)
}
/**
* Takes an value and expresses it in terms of min to max.
*
* @param `val` - the angle to normalize (in radians)
* @return the normalized angle (also in radians)
*/
@JvmStatic
fun normalize(value: Float, min: Float, max: Float): Float {
var v = value
if (v.isInfinite() || v.isNaN()) {
return 0f
}
val range = max - min
while (v > max) {
v -= range
}
while (v < min) {
v += range
}
return v
}
/**
* @param x the value whose sign is to be adjusted.
* @param y the value whose sign is to be used.
* @return x with its sign changed to match the sign of y.
*/
fun copysign(x: Float, y: Float): Float = if (y >= 0 && x <= -0) {
-x
} else if (y < 0 && x >= 0) {
-x
} else {
x
}
/**
* Take a float input and clamp it between min and max.
*
* @param input
* @param min
* @param max
* @return clamped input
*/
@JvmStatic
fun clamp(input: Float, min: Float, max: Float): Float = if ((input < min)) {
min
} else if ((input > max)) {
max
} else {
input
}
/**
* Clamps the given float to be between 0 and 1.
*
* @param input
* @return input clamped between 0 and 1.
*/
fun saturate(input: Float): Float = clamp(input, 0f, 1f)
/**
* Converts a single precision (32 bit) floating point value into half
* precision (16 bit).
*
*
*
* Source:
* [
* http://www.fox-toolkit.org/ftp/fasthalffloatconversion.pdf](http://www.fox-toolkit.org/ftp/fasthalffloatconversion.pdf)<br></br>
* **broken link**
*
* @param half The half floating point value as a short.
* @return floating point value of the half.
*/
fun convertHalfToFloat(half: Short): Float = when (half.toInt()) {
0x0000 -> 0f
0x8000 -> -0f
0x7c00 -> Float.POSITIVE_INFINITY
0xfc00 -> Float.NEGATIVE_INFINITY
else ->
java.lang.Float
.intBitsToFloat(
((half.toInt() and 0x8000) shl 16)
or (((half.toInt() and 0x7c00) + 0x1C000) shl 13)
or ((half.toInt() and 0x03FF) shl 13),
)
}
fun convertFloatToHalf(flt: Float): Short {
if (flt.isNaN()) {
throw UnsupportedOperationException("NaN to half conversion not supported!")
} else if (flt == Float.POSITIVE_INFINITY) {
return 0x7c00.toShort()
} else if (flt == Float.NEGATIVE_INFINITY) {
return 0xfc00.toShort()
} else if (flt == 0f) {
return 0x0000.toShort()
} else if (flt == -0f) {
return 0x8000.toShort()
} else if (flt > 65504f) {
// max value supported by half float
return 0x7bff
} else if (flt < -65504f) {
return (0x7bff or 0x8000).toShort()
} else if (flt > 0f && flt < 5.96046E-8f) {
return 0x0001
} else if (flt < 0f && flt > -5.96046E-8f) {
return 0x8001.toShort()
}
val f = java.lang.Float.floatToIntBits(flt)
return (
((f shr 16) and 0x8000)
or ((((f and 0x7f800000) - 0x38000000) shr 13) and 0x7c00)
or ((f shr 13) and 0x03ff)
).toShort()
}
}
@@ -34,7 +34,7 @@ public class Keybinding implements HotkeyListener {
}
try {
if (JIntellitype.getInstance() instanceof JIntellitype) {
if (JIntellitype.getInstance() != null) {
JIntellitype.getInstance().addHotKeyListener(this);
String fullResetBinding = this.config.getFullResetBinding();
@@ -11,18 +11,17 @@ import dev.slimevr.osc.VMCHandler
import dev.slimevr.osc.VRCOSCHandler
import dev.slimevr.posestreamer.BVHRecorder
import dev.slimevr.protocol.ProtocolAPI
import dev.slimevr.protocol.rpc.settings.RPCSettingsHandler
import dev.slimevr.reset.ResetHandler
import dev.slimevr.serial.ProvisioningHandler
import dev.slimevr.serial.SerialHandler
import dev.slimevr.serial.SerialHandlerStub
import dev.slimevr.setup.HandshakeHandler
import dev.slimevr.setup.TapSetupHandler
import dev.slimevr.status.StatusSystem
import dev.slimevr.tracking.processor.HumanPoseManager
import dev.slimevr.tracking.processor.skeleton.HumanSkeleton
import dev.slimevr.tracking.trackers.DeviceManager
import dev.slimevr.tracking.trackers.Tracker
import dev.slimevr.tracking.trackers.TrackerPosition
import dev.slimevr.tracking.trackers.TrackerUtils
import dev.slimevr.tracking.trackers.*
import dev.slimevr.tracking.trackers.udp.TrackersUDPServer
import dev.slimevr.util.ann.VRServerThread
import dev.slimevr.websocketapi.WebSocketVRBridge
@@ -48,7 +47,6 @@ class VRServer @JvmOverloads constructor(
driverBridgeProvider: SteamBridgeProvider = { _, _ -> null },
feederBridgeProvider: (VRServer) -> ISteamVRBridge? = { _ -> null },
serialHandlerProvider: (VRServer) -> SerialHandler = { _ -> SerialHandlerStub() },
// configPath is used by VRWorkout, do not remove!
configPath: String,
) : Thread("VRServer") {
@JvmField
@@ -97,6 +95,9 @@ class VRServer @JvmOverloads constructor(
@JvmField
val statusSystem = StatusSystem()
@JvmField
val handshakeHandler = HandshakeHandler()
init {
// UwU
configManager = ConfigManager(configPath)
@@ -117,7 +118,7 @@ class VRServer @JvmOverloads constructor(
LogManager.info("Starting the tracker server on port $trackerPort...")
trackersServer = TrackersUDPServer(
trackerPort,
"Sensors UDP server"
"Sensors UDP server",
) { tracker: Tracker -> registerTracker(tracker) }
// Start bridges for SteamVR and Feeder
@@ -143,13 +144,13 @@ class VRServer @JvmOverloads constructor(
humanPoseManager,
driverBridge,
configManager.vrConfig.vrcOSC,
computedTrackers
computedTrackers,
)
vMCHandler = VMCHandler(
this,
humanPoseManager,
configManager.vrConfig.vmc,
computedTrackers
computedTrackers,
)
// Initialize OSC router
@@ -173,6 +174,9 @@ class VRServer @JvmOverloads constructor(
return false
}
// FIXME: Code using this function normally uses this to get the SteamVR driver but
// that's because we first save the SteamVR driver bridge and then the feeder in the array.
// Not really a great thing to have.
@ThreadSafe
fun <E : Bridge?> getVRBridge(bridgeClass: Class<E>): E? {
for (bridge in bridges) {
@@ -209,7 +213,7 @@ class VRServer @JvmOverloads constructor(
}
@ThreadSafe
fun addSkeletonUpdatedCallback(consumer: Consumer<HumanSkeleton?>?) {
fun addSkeletonUpdatedCallback(consumer: Consumer<HumanSkeleton>) {
queueTask { humanPoseManager.addSkeletonUpdatedCallback(consumer) }
}
@@ -277,9 +281,14 @@ class VRServer @JvmOverloads constructor(
@ThreadSafe
fun updateSkeletonModel() {
queueTask { humanPoseManager.updateSkeletonModelFromServer() }
queueTask {
humanPoseManager.updateSkeletonModelFromServer()
if (this.getVRBridge(ISteamVRBridge::class.java)?.updateShareSettingsAutomatically() == true) {
RPCSettingsHandler.sendSteamVRUpdatedSettings(protocolAPI, protocolAPI.rpcHandler)
}
}
vrcOSCHandler.setHeadTracker(
TrackerUtils.getTrackerForSkeleton(trackers, TrackerPosition.HEAD)
TrackerUtils.getTrackerForSkeleton(trackers, TrackerPosition.HEAD),
)
}
@@ -398,9 +407,7 @@ class VRServer @JvmOverloads constructor(
get() = ::instance.isInitialized
@JvmStatic
fun getNextLocalTrackerId(): Int {
return nextLocalTrackerId.incrementAndGet()
}
fun getNextLocalTrackerId(): Int = nextLocalTrackerId.incrementAndGet()
@JvmStatic
val currentLocalTrackerId: Int
@@ -1,6 +1,5 @@
package dev.slimevr.autobone
import com.jme3.math.FastMath
import dev.slimevr.SLIMEVR_IDENTIFIER
import dev.slimevr.VRServer
import dev.slimevr.autobone.errors.*
@@ -21,11 +20,12 @@ import java.io.File
import java.util.*
import java.util.function.Consumer
import java.util.function.Function
import kotlin.math.*
class AutoBone(server: VRServer) {
// This is filled by loadConfigValues()
val offsets = EnumMap<SkeletonConfigOffsets, Float>(
SkeletonConfigOffsets::class.java
SkeletonConfigOffsets::class.java,
)
val adjustOffsets = FastList(
arrayOf(
@@ -39,8 +39,8 @@ class AutoBone(server: VRServer) {
// best still, but it is somewhat functional
SkeletonConfigOffsets.HIPS_WIDTH,
SkeletonConfigOffsets.UPPER_LEG,
SkeletonConfigOffsets.LOWER_LEG
)
SkeletonConfigOffsets.LOWER_LEG,
),
)
var estimatedHeight: Float = 1f
@@ -74,20 +74,9 @@ class AutoBone(server: VRServer) {
// Remove all previous values
offsets.clear()
// Get current or default skeleton configs
val skeleton = server.humanPoseManager
// Still compensate for a null skeleton, as it may not be initialized yet
val getOffset: Function<SkeletonConfigOffsets, Float> =
if (skeleton != null) {
Function { key: SkeletonConfigOffsets -> skeleton.getOffset(key) }
} else {
val defaultConfig = SkeletonConfigManager(false)
Function { config: SkeletonConfigOffsets ->
defaultConfig.getOffset(config)
}
}
// Get current skeleton configs
for (bone in adjustOffsets) {
val offset = getOffset.apply(bone)
val offset = server.humanPoseManager.getOffset(bone)
if (offset > 0f) {
offsets[bone] = offset
}
@@ -109,6 +98,7 @@ class AutoBone(server: VRServer) {
SkeletonConfigOffsets.LOWER_LEG, SkeletonConfigOffsets.FOOT_LENGTH,
->
if (rightSide) configOffset.affectedOffsets[1] else configOffset.affectedOffsets[0]
else -> configOffset.affectedOffsets[0]
}
return skeleton.getBone(boneType).getGlobalRotation().toRotationVector()
@@ -153,23 +143,20 @@ class AutoBone(server: VRServer) {
val targetHeight: Float
// Get the current skeleton from the server
val humanPoseManager = server.humanPoseManager
// Still compensate for a null skeleton, as it may not be initialized yet
if (config.useSkeletonHeight && humanPoseManager != null) {
// If there is a skeleton available, calculate the target height
// from its configs
if (config.useSkeletonHeight) {
// calculate the target height from the skeleton configs
targetHeight = humanPoseManager.userHeightFromConfig
LogManager
.warning(
"[AutoBone] Target height loaded from skeleton (Make sure you reset before running!): $targetHeight"
"[AutoBone] Target height loaded from skeleton (Make sure you reset before running!): $targetHeight",
)
} else {
// Otherwise if there is no skeleton available, attempt to get the
// max HMD height from the recording
// Otherwise, attempt to get the max HMD height from the recording
val hmdHeight = frames.maxHmdHeight
if (hmdHeight <= 0.4f) {
LogManager
.warning(
"[AutoBone] Max headset height detected (Value seems too low, did you not stand up straight while measuring?): $hmdHeight"
"[AutoBone] Max headset height detected (Value seems too low, did you not stand up straight while measuring?): $hmdHeight",
)
} else {
LogManager.info("[AutoBone] Max headset height detected: $hmdHeight")
@@ -217,7 +204,7 @@ class AutoBone(server: VRServer) {
targetFullHeight = targetFullHeight,
frames = frames,
epochCallback = epochCallback,
serverConfig = server.configManager
serverConfig = server.configManager,
)
// Initialize the frame order randomizer with a repeatable seed
@@ -252,7 +239,7 @@ class AutoBone(server: VRServer) {
trainingStep.setCursors(
i,
j,
updatePlayerCursors = true
updatePlayerCursors = true,
)
frameStats.addValue(getErrorDeriv(trainingStep))
@@ -287,7 +274,7 @@ class AutoBone(server: VRServer) {
trainingStep.setCursors(
i,
j,
updatePlayerCursors = true
updatePlayerCursors = true,
)
frameStats.addValue(getErrorDeriv(trainingStep))
@@ -313,14 +300,14 @@ class AutoBone(server: VRServer) {
LogManager
.info(
"[AutoBone] Target height: ${trainingStep.targetHmdHeight}, Final height: $estimatedHeight"
"[AutoBone] Target height: ${trainingStep.targetHmdHeight}, Final height: $estimatedHeight",
)
return AutoBoneResults(
estimatedHeight,
trainingStep.targetHmdHeight,
trainingStep.errorStats,
offsets
offsets,
)
}
@@ -367,13 +354,13 @@ class AutoBone(server: VRServer) {
.setCursors(
randomFrameIndices[frameCursor],
randomFrameIndices[frameCursor2],
updatePlayerCursors = true
updatePlayerCursors = true,
)
} else {
trainingStep.setCursors(
frameCursor,
frameCursor2,
updatePlayerCursors = true
updatePlayerCursors = true,
)
}
@@ -390,11 +377,11 @@ class AutoBone(server: VRServer) {
if (epoch <= 0 || epoch >= config.numEpochs - 1 || (epoch + 1) % config.printEveryNumEpochs == 0) {
LogManager
.info(
"[AutoBone] Epoch: ${epoch + 1}, Mean error: ${errorStats.mean} (SD ${errorStats.standardDeviation}), Adjust rate: ${trainingStep.curAdjustRate}"
"[AutoBone] Epoch: ${epoch + 1}, Mean error: ${errorStats.mean} (SD ${errorStats.standardDeviation}), Adjust rate: ${trainingStep.curAdjustRate}",
)
LogManager
.info(
"[AutoBone] Target height: ${trainingStep.targetHmdHeight}, Estimated height: $estimatedHeight"
"[AutoBone] Target height: ${trainingStep.targetHmdHeight}, Estimated height: $estimatedHeight",
)
}
@@ -459,7 +446,7 @@ class AutoBone(server: VRServer) {
// Extinguish
LogManager
.warning(
"[AutoBone] Error value is invalid, resetting variables to recover"
"[AutoBone] Error value is invalid, resetting variables to recover",
)
// Reset adjustable config values
loadConfigValues()
@@ -502,14 +489,14 @@ class AutoBone(server: VRServer) {
skeleton2,
entry.key,
false,
slideLeft
slideLeft,
)
val rightDotProduct = getDotProductDiff(
skeleton1,
skeleton2,
entry.key,
true,
slideRight
slideRight,
)
// Calculate the total effect of the bone based on change in rotation
@@ -675,18 +662,18 @@ class AutoBone(server: VRServer) {
if (PoseFrameIO.tryWriteToFile(recordingFile, frames)) {
LogManager
.info(
"[AutoBone] Done exporting! Recording can be found at \"${recordingFile.path}\"."
"[AutoBone] Done exporting! Recording can be found at \"${recordingFile.path}\".",
)
} else {
LogManager
.severe(
"[AutoBone] Failed to export the recording to \"${recordingFile.path}\"."
"[AutoBone] Failed to export the recording to \"${recordingFile.path}\".",
)
}
} else {
LogManager
.severe(
"[AutoBone] Failed to create the recording directory \"${saveDir.path}\"."
"[AutoBone] Failed to create the recording directory \"${saveDir.path}\".",
)
}
}
@@ -713,7 +700,7 @@ class AutoBone(server: VRServer) {
LogManager
.info(
"[AutoBone] Detected recording at \"${file.path}\", loading frames..."
"[AutoBone] Detected recording at \"${file.path}\", loading frames...",
)
val frames = PoseFrameIO.tryReadFromFile(file)
if (frames == null) {
@@ -731,9 +718,7 @@ class AutoBone(server: VRServer) {
val epochError: StatsCalculator,
val configValues: EnumMap<SkeletonConfigOffsets, Float>,
) {
override fun toString(): String {
return "Epoch: $epoch, Epoch error: $epochError"
}
override fun toString(): String = "Epoch: $epoch, Epoch error: $epochError"
}
inner class AutoBoneResults(
@@ -743,7 +728,7 @@ class AutoBone(server: VRServer) {
val configValues: EnumMap<SkeletonConfigOffsets, Float>,
) {
val heightDifference: Float
get() = FastMath.abs(targetHeight - finalHeight)
get() = abs(targetHeight - finalHeight)
}
companion object {
@@ -753,22 +738,18 @@ class AutoBone(server: VRServer) {
// FIXME: Won't work on iOS and Android, maybe fix resolveConfigDirectory more than this
val saveDir = File(
OperatingSystem.resolveConfigDirectory(SLIMEVR_IDENTIFIER)?.resolve(
AUTOBONE_FOLDER
)?.toString() ?: AUTOBONE_FOLDER
AUTOBONE_FOLDER,
)?.toString() ?: AUTOBONE_FOLDER,
)
val loadDir = File(
OperatingSystem.resolveConfigDirectory(SLIMEVR_IDENTIFIER)?.resolve(
LOADAUTOBONE_FOLDER
)?.toString() ?: LOADAUTOBONE_FOLDER
LOADAUTOBONE_FOLDER,
)?.toString() ?: LOADAUTOBONE_FOLDER,
)
// Mean square error function
private fun errorFunc(errorDeriv: Float): Float {
return 0.5f * (errorDeriv * errorDeriv)
}
private fun errorFunc(errorDeriv: Float): Float = 0.5f * (errorDeriv * errorDeriv)
private fun decayFunc(initialAdjustRate: Float, adjustRateDecay: Float, epoch: Int): Float {
return if (epoch >= 0) initialAdjustRate / (1 + (adjustRateDecay * epoch)) else 0.0f
}
private fun decayFunc(initialAdjustRate: Float, adjustRateDecay: Float, epoch: Int): Float = if (epoch >= 0) initialAdjustRate / (1 + (adjustRateDecay * epoch)) else 0.0f
}
}
@@ -59,24 +59,25 @@ class AutoBoneHandler(private val server: VRServer) {
total,
eta,
completed,
success
success,
)
}
}
@Throws(AutoBoneException::class)
private fun processFrames(frames: PoseFrames): AutoBoneResults {
return autoBone
.processFrames(frames) { epoch ->
listeners.forEach { listener -> listener.onAutoBoneEpoch(epoch) }
}
}
private fun processFrames(frames: PoseFrames): AutoBoneResults = autoBone
.processFrames(frames) { epoch ->
listeners.forEach { listener -> listener.onAutoBoneEpoch(epoch) }
}
fun startProcessByType(processType: AutoBoneProcessType?): Boolean {
when (processType) {
AutoBoneProcessType.RECORD -> startRecording()
AutoBoneProcessType.SAVE -> saveRecording()
AutoBoneProcessType.PROCESS -> processRecording()
else -> {
return false
}
@@ -108,13 +109,13 @@ class AutoBoneHandler(private val server: VRServer) {
val framesFuture = poseRecorder
.startFrameRecording(
sampleCount,
sampleRate
sampleRate,
) { progress: RecordingProgress ->
announceProcessStatus(
AutoBoneProcessType.RECORD,
current = progress.frame.toLong(),
total = progress.totalFrames.toLong(),
eta = totalTime - (progress.frame * totalTime / progress.totalFrames)
eta = totalTime - (progress.frame * totalTime / progress.totalFrames),
)
}
val frames = framesFuture.get()
@@ -126,7 +127,7 @@ class AutoBoneHandler(private val server: VRServer) {
if (autoBone.globalConfig.saveRecordings) {
announceProcessStatus(
AutoBoneProcessType.RECORD,
"Saving recording (from config option)..."
"Saving recording (from config option)...",
)
autoBone.saveRecording(frames)
}
@@ -135,14 +136,14 @@ class AutoBoneHandler(private val server: VRServer) {
AutoBoneProcessType.RECORD,
"Done recording!",
completed = true,
success = true
success = true,
)
} else {
announceProcessStatus(
AutoBoneProcessType.RECORD,
"The server is not ready to record",
completed = true,
success = false
success = false,
)
LogManager.severe("[AutoBone] Unable to record...")
return
@@ -152,7 +153,7 @@ class AutoBoneHandler(private val server: VRServer) {
AutoBoneProcessType.RECORD,
String.format("Recording failed: %s", e.message),
completed = true,
success = false
success = false,
)
LogManager.severe("[AutoBone] Failed recording!", e)
} finally {
@@ -196,14 +197,14 @@ class AutoBoneHandler(private val server: VRServer) {
AutoBoneProcessType.SAVE,
"Recording saved!",
completed = true,
success = true
success = true,
)
} else {
announceProcessStatus(
AutoBoneProcessType.SAVE,
"No recording found",
completed = true,
success = false
success = false,
)
LogManager.severe("[AutoBone] Unable to save, no recording was done...")
return
@@ -213,7 +214,7 @@ class AutoBoneHandler(private val server: VRServer) {
AutoBoneProcessType.SAVE,
String.format("Failed to save recording: %s", e.message),
completed = true,
success = false
success = false,
)
LogManager.severe("[AutoBone] Failed to save recording!", e)
} finally {
@@ -250,11 +251,11 @@ class AutoBoneHandler(private val server: VRServer) {
AutoBoneProcessType.PROCESS,
"No recordings found...",
completed = true,
success = false
success = false,
)
LogManager
.severe(
"[AutoBone] No recordings found in \"${loadDir.path}\" and no recording was done..."
"[AutoBone] No recordings found in \"${loadDir.path}\" and no recording was done...",
)
return
}
@@ -263,7 +264,7 @@ class AutoBoneHandler(private val server: VRServer) {
LogManager.info("[AutoBone] Processing frames...")
val errorStats = StatsCalculator()
val offsetStats = EnumMap<SkeletonConfigOffsets, StatsCalculator>(
SkeletonConfigOffsets::class.java
SkeletonConfigOffsets::class.java,
)
val skeletonConfigManagerBuffer = SkeletonConfigManager(false)
for ((key, value) in frameRecordings) {
@@ -314,8 +315,8 @@ class AutoBoneHandler(private val server: VRServer) {
LogManager
.info(
"[AutoBone] Average height error: ${
StringUtils.prettyNumber(errorStats.mean, 6)
} (SD ${StringUtils.prettyNumber(errorStats.standardDeviation, 6)})"
StringUtils.prettyNumber(errorStats.mean, 6)
} (SD ${StringUtils.prettyNumber(errorStats.standardDeviation, 6)})",
)
// #endregion
listeners.forEach { listener: AutoBoneListener -> listener.onAutoBoneEnd(autoBone.offsets) }
@@ -323,14 +324,14 @@ class AutoBoneHandler(private val server: VRServer) {
AutoBoneProcessType.PROCESS,
"Done processing!",
completed = true,
success = true
success = true,
)
} catch (e: Exception) {
announceProcessStatus(
AutoBoneProcessType.PROCESS,
String.format("Processing failed: %s", e.message),
completed = true,
success = false
success = false,
)
LogManager.severe("[AutoBone] Failed adjustment!", e)
} finally {
@@ -394,12 +395,12 @@ class AutoBoneHandler(private val server: VRServer) {
LogManager.info(
"[AutoBone] Ratios: [{Neck-Torso: ${
StringUtils.prettyNumber(neckTorso)}}, {Chest-Torso: ${
StringUtils.prettyNumber(chestTorso)}}, {Torso-Waist: ${
StringUtils.prettyNumber(torsoWaist)}}, {Leg-Torso: ${
StringUtils.prettyNumber(legTorso)}}, {Leg-Body: ${
StringUtils.prettyNumber(legBody)}}, {Knee-Leg: ${
StringUtils.prettyNumber(kneeLeg)}}]"
StringUtils.prettyNumber(neckTorso)}}, {Chest-Torso: ${
StringUtils.prettyNumber(chestTorso)}}, {Torso-Waist: ${
StringUtils.prettyNumber(torsoWaist)}}, {Leg-Torso: ${
StringUtils.prettyNumber(legTorso)}}, {Leg-Body: ${
StringUtils.prettyNumber(legBody)}}, {Knee-Leg: ${
StringUtils.prettyNumber(kneeLeg)}}]",
)
}
@@ -1,7 +1,11 @@
package dev.slimevr.autobone
enum class AutoBoneProcessType(val id: Int) {
NONE(0), RECORD(1), SAVE(2), PROCESS(3);
NONE(0),
RECORD(1),
SAVE(2),
PROCESS(3),
;
companion object {
fun getById(id: Int): AutoBoneProcessType? = byId[id]
@@ -1,6 +1,6 @@
package dev.slimevr.autobone
import com.jme3.math.FastMath
import kotlin.math.*
/**
* This is a stat calculator based on Welford's online algorithm
@@ -27,9 +27,17 @@ class StatsCalculator {
}
val variance: Float
get() = if (count < 1) { Float.NaN } else { m2 / count }
get() = if (count < 1) {
Float.NaN
} else {
m2 / count
}
val sampleVariance: Float
get() = if (count < 2) { Float.NaN } else { m2 / (count - 1) }
get() = if (count < 2) {
Float.NaN
} else {
m2 / (count - 1)
}
val standardDeviation: Float
get() = FastMath.sqrt(variance)
get() = sqrt(variance)
}
@@ -1,27 +1,25 @@
package dev.slimevr.autobone.errors
import com.jme3.math.FastMath
import dev.slimevr.autobone.AutoBoneStep
import dev.slimevr.autobone.errors.proportions.ProportionLimiter
import dev.slimevr.autobone.errors.proportions.RangeProportionLimiter
import dev.slimevr.tracking.processor.HumanPoseManager
import dev.slimevr.tracking.processor.config.SkeletonConfigOffsets
import kotlin.math.*
// The distance from average human proportions
class BodyProportionError : IAutoBoneError {
@Throws(AutoBoneException::class)
override fun getStepError(trainingStep: AutoBoneStep): Float {
return getBodyProportionError(
trainingStep.skeleton1,
// Skeletons are now normalized to reduce bias, so height is always 1
1f
)
}
override fun getStepError(trainingStep: AutoBoneStep): Float = getBodyProportionError(
trainingStep.skeleton1,
// Skeletons are now normalized to reduce bias, so height is always 1
1f,
)
fun getBodyProportionError(humanPoseManager: HumanPoseManager, fullHeight: Float): Float {
var sum = 0f
for (limiter in proportionLimits) {
sum += FastMath.abs(limiter.getProportionError(humanPoseManager, fullHeight))
sum += abs(limiter.getProportionError(humanPoseManager, fullHeight))
}
return sum
}
@@ -54,7 +52,7 @@ class BodyProportionError : IAutoBoneError {
RangeProportionLimiter(
0.059f,
SkeletonConfigOffsets.HEAD,
0.01f
0.01f,
),
// Neck
// Expected: 0.052
@@ -62,35 +60,35 @@ class BodyProportionError : IAutoBoneError {
RangeProportionLimiter(
0.054f,
SkeletonConfigOffsets.NECK,
0.0015f
0.0015f,
),
// Upper Chest
// Experimental: 0.0945
RangeProportionLimiter(
0.0945f,
SkeletonConfigOffsets.UPPER_CHEST,
0.01f
0.01f,
),
// Chest
// Experimental: 0.0945
RangeProportionLimiter(
0.0945f,
SkeletonConfigOffsets.CHEST,
0.01f
0.01f,
),
// Waist
// Experimental: 0.118
RangeProportionLimiter(
0.118f,
SkeletonConfigOffsets.WAIST,
0.05f
0.05f,
),
// Hip
// Experimental: 0.0237
RangeProportionLimiter(
0.0237f,
SkeletonConfigOffsets.HIP,
0.01f
0.01f,
),
// Hip Width
// Expected: 0.191
@@ -98,14 +96,14 @@ class BodyProportionError : IAutoBoneError {
RangeProportionLimiter(
0.184f,
SkeletonConfigOffsets.HIPS_WIDTH,
0.04f
0.04f,
),
// Upper Leg
// Expected: 0.245
RangeProportionLimiter(
0.245f,
SkeletonConfigOffsets.UPPER_LEG,
0.015f
0.015f,
),
// Lower Leg
// Expected: 0.246 (0.285 including below ankle, could use a separate
@@ -113,8 +111,8 @@ class BodyProportionError : IAutoBoneError {
RangeProportionLimiter(
0.285f,
SkeletonConfigOffsets.LOWER_LEG,
0.02f
)
0.02f,
),
)
@JvmStatic
@@ -1,20 +1,18 @@
package dev.slimevr.autobone.errors
import com.jme3.math.FastMath
import dev.slimevr.autobone.AutoBoneStep
import dev.slimevr.tracking.processor.skeleton.HumanSkeleton
import dev.slimevr.tracking.trackers.Tracker
import dev.slimevr.tracking.trackers.TrackerRole
import kotlin.math.*
// The offset between the height both feet at one instant and over time
class FootHeightOffsetError : IAutoBoneError {
@Throws(AutoBoneException::class)
override fun getStepError(trainingStep: AutoBoneStep): Float {
return getSlideError(
trainingStep.skeleton1.skeleton,
trainingStep.skeleton2.skeleton
)
}
override fun getStepError(trainingStep: AutoBoneStep): Float = getSlideError(
trainingStep.skeleton1.skeleton,
trainingStep.skeleton2.skeleton,
)
companion object {
fun getSlideError(skeleton1: HumanSkeleton, skeleton2: HumanSkeleton): Float {
@@ -37,12 +35,12 @@ class FootHeightOffsetError : IAutoBoneError {
val rightFoot2 = rightTracker2.position.y
// Compute all combinations of heights
val dist1 = FastMath.abs(leftFoot1 - rightFoot1)
val dist2 = FastMath.abs(leftFoot1 - leftFoot2)
val dist3 = FastMath.abs(leftFoot1 - rightFoot2)
val dist4 = FastMath.abs(rightFoot1 - leftFoot2)
val dist5 = FastMath.abs(rightFoot1 - rightFoot2)
val dist6 = FastMath.abs(leftFoot2 - rightFoot2)
val dist1 = abs(leftFoot1 - rightFoot1)
val dist2 = abs(leftFoot1 - leftFoot2)
val dist3 = abs(leftFoot1 - rightFoot2)
val dist4 = abs(rightFoot1 - leftFoot2)
val dist5 = abs(rightFoot1 - rightFoot2)
val dist6 = abs(leftFoot2 - rightFoot2)
// Divide by 12 (6 values * 2 to halve) to halve and average, it's
// halved because you want to approach a midpoint, not the other point
@@ -1,19 +1,15 @@
package dev.slimevr.autobone.errors
import com.jme3.math.FastMath
import dev.slimevr.autobone.AutoBoneStep
import kotlin.math.*
// The difference from the current height to the target height
class HeightError : IAutoBoneError {
@Throws(AutoBoneException::class)
override fun getStepError(trainingStep: AutoBoneStep): Float {
return getHeightError(
trainingStep.currentHmdHeight,
trainingStep.targetHmdHeight
)
}
override fun getStepError(trainingStep: AutoBoneStep): Float = getHeightError(
trainingStep.currentHmdHeight,
trainingStep.targetHmdHeight,
)
fun getHeightError(currentHeight: Float, targetHeight: Float): Float {
return FastMath.abs(targetHeight - currentHeight)
}
fun getHeightError(currentHeight: Float, targetHeight: Float): Float = abs(targetHeight - currentHeight)
}
@@ -1,20 +1,18 @@
package dev.slimevr.autobone.errors
import com.jme3.math.FastMath
import dev.slimevr.autobone.AutoBoneStep
import dev.slimevr.tracking.processor.skeleton.HumanSkeleton
import dev.slimevr.tracking.trackers.Tracker
import dev.slimevr.tracking.trackers.TrackerRole
import kotlin.math.*
// The change in distance between both of the ankles over time
class OffsetSlideError : IAutoBoneError {
@Throws(AutoBoneException::class)
override fun getStepError(trainingStep: AutoBoneStep): Float {
return getSlideError(
trainingStep.skeleton1.skeleton,
trainingStep.skeleton2.skeleton
)
}
override fun getStepError(trainingStep: AutoBoneStep): Float = getSlideError(
trainingStep.skeleton1.skeleton,
trainingStep.skeleton2.skeleton,
)
companion object {
fun getSlideError(skeleton1: HumanSkeleton, skeleton2: HumanSkeleton): Float {
@@ -41,12 +39,12 @@ class OffsetSlideError : IAutoBoneError {
val slideDist4 = (rightFoot1 - leftFoot2).len()
// Compute all combinations of distances
val dist1 = FastMath.abs(slideDist1 - slideDist2)
val dist2 = FastMath.abs(slideDist1 - slideDist3)
val dist3 = FastMath.abs(slideDist1 - slideDist4)
val dist4 = FastMath.abs(slideDist2 - slideDist3)
val dist5 = FastMath.abs(slideDist2 - slideDist4)
val dist6 = FastMath.abs(slideDist3 - slideDist4)
val dist1 = abs(slideDist1 - slideDist2)
val dist2 = abs(slideDist1 - slideDist3)
val dist3 = abs(slideDist1 - slideDist4)
val dist4 = abs(slideDist2 - slideDist3)
val dist5 = abs(slideDist2 - slideDist4)
val dist6 = abs(slideDist3 - slideDist4)
// Divide by 12 (6 values * 2 to halve) to halve and average, it's
// halved because you want to approach a midpoint, not the other point
@@ -14,12 +14,12 @@ class PositionError : IAutoBoneError {
getPositionError(
trackers,
trainingStep.cursor1,
trainingStep.skeleton1.skeleton
trainingStep.skeleton1.skeleton,
) +
getPositionError(
trackers,
trainingStep.cursor2,
trainingStep.skeleton2.skeleton
trainingStep.skeleton2.skeleton,
)
) /
2f
@@ -39,7 +39,7 @@ class PositionError : IAutoBoneError {
val position = trackerFrame.tryGetPosition() ?: continue
val trackerRole = trackerFrame.tryGetTrackerPosition()?.trackerRole ?: continue
val computedTracker = skeleton.getComputedTracker(trackerRole) ?: continue
val computedTracker = skeleton.getComputedTracker(trackerRole)
offset += (position - computedTracker.position).len()
offsetCount++
@@ -1,9 +1,9 @@
package dev.slimevr.autobone.errors
import com.jme3.math.FastMath
import dev.slimevr.autobone.AutoBoneStep
import dev.slimevr.poseframeformat.trackerdata.TrackerFrames
import dev.slimevr.tracking.processor.skeleton.HumanSkeleton
import kotlin.math.*
// The difference between offset of absolute position and the corresponding point over time
class PositionOffsetError : IAutoBoneError {
@@ -15,7 +15,7 @@ class PositionOffsetError : IAutoBoneError {
trainingStep.cursor1,
trainingStep.cursor2,
trainingStep.skeleton1.skeleton,
trainingStep.skeleton2.skeleton
trainingStep.skeleton2.skeleton,
)
}
@@ -37,12 +37,12 @@ class PositionOffsetError : IAutoBoneError {
val position2 = trackerFrame2.tryGetPosition() ?: continue
val trackerRole2 = trackerFrame2.tryGetTrackerPosition()?.trackerRole ?: continue
val computedTracker1 = skeleton1.getComputedTracker(trackerRole1) ?: continue
val computedTracker2 = skeleton2.getComputedTracker(trackerRole2) ?: continue
val computedTracker1 = skeleton1.getComputedTracker(trackerRole1)
val computedTracker2 = skeleton2.getComputedTracker(trackerRole2)
val dist1 = (position1 - computedTracker1.position).len()
val dist2 = (position2 - computedTracker2.position).len()
offset += FastMath.abs(dist2 - dist1)
offset += abs(dist2 - dist1)
offsetCount++
}
return if (offsetCount > 0) offset / offsetCount else 0f
@@ -8,12 +8,10 @@ import dev.slimevr.tracking.trackers.TrackerRole
// The change in position of the ankle over time
class SlideError : IAutoBoneError {
@Throws(AutoBoneException::class)
override fun getStepError(trainingStep: AutoBoneStep): Float {
return getSlideError(
trainingStep.skeleton1.skeleton,
trainingStep.skeleton2.skeleton
)
}
override fun getStepError(trainingStep: AutoBoneStep): Float = getSlideError(
trainingStep.skeleton1.skeleton,
trainingStep.skeleton2.skeleton,
)
companion object {
fun getSlideError(skeleton1: HumanSkeleton, skeleton2: HumanSkeleton): Float {
@@ -32,7 +30,7 @@ class SlideError : IAutoBoneError {
// Calculate and average between both feet
return getSlideError(
skeleton1.getComputedTracker(trackerRole),
skeleton2.getComputedTracker(trackerRole)
skeleton2.getComputedTracker(trackerRole),
)
}
Loaded 100 of 193 files, more files were not shown because too many files have changed in this diff. Show more