mirror of
https://github.com/SlimeVR/SlimeVR-Server.git
synced 2026-12-01 22:32:35 -08:00
Compare commits
4
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
60f8db7079 | ||
|
|
b06f038777 | ||
|
|
1fba4e67ab | ||
|
|
1950a419a8 |
No files matched your search
Binary file not shown.
|
After Width: | Height: | Size: 466 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 108 KiB |
@@ -4,7 +4,7 @@ export function Preload() {
|
||||
<Helmet>
|
||||
<link rel="preload" href="/images/front-standing-pose.webp" as="image" />
|
||||
<link rel="preload" href="/images/slime-girl.webp" as="image" />
|
||||
<link rel="preload" href="/images/mounting-reset-pose.webp" as="image" />
|
||||
<link rel="preload" href="/images/mounting-reset-pose.avif" as="image" />
|
||||
<link rel="preload" href="/images/reset-pose.webp" as="image" />
|
||||
<link rel="preload" href="/images/slimes.webp" as="image" />
|
||||
|
||||
|
||||
@@ -1,10 +1,14 @@
|
||||
import { useMemo, useState } from 'react';
|
||||
import { useCallback, useMemo, useState } from 'react';
|
||||
import { AssignTrackerRequestT, BodyPart, RpcMessage } from 'solarxr-protocol';
|
||||
import { FlatDeviceTracker } from '@/hooks/app';
|
||||
import { useOnboarding } from '@/hooks/onboarding';
|
||||
import { useTrackers } from '@/hooks/tracker';
|
||||
import { useWebsocketAPI } from '@/hooks/websocket-api';
|
||||
import { MountingOrientationDegreesToQuatT } from '@/maths/quaternion';
|
||||
import {
|
||||
MountingOrientationDegreesToQuatT,
|
||||
QuaternionFromQuatT,
|
||||
similarQuaternions,
|
||||
} from '@/maths/quaternion';
|
||||
import { Button } from '@/components/commons/Button';
|
||||
import { TipBox } from '@/components/commons/TipBox';
|
||||
import { Typography } from '@/components/commons/Typography';
|
||||
@@ -62,10 +66,31 @@ export function ManualMountingPage() {
|
||||
setSelectRole(BodyPart.NONE);
|
||||
};
|
||||
|
||||
const getCurrRotation = useCallback(
|
||||
(role: BodyPart) => {
|
||||
if (role === BodyPart.NONE) return undefined;
|
||||
|
||||
const trackers = trackerPartGrouped[role] || [];
|
||||
const [mountingOrientation, ...orientation] = trackers
|
||||
.map((td) => td.tracker.info?.mountingOrientation)
|
||||
.filter((orientation) => !!orientation)
|
||||
.map((orientation) => QuaternionFromQuatT(orientation));
|
||||
|
||||
const identicalOrientations =
|
||||
mountingOrientation !== undefined &&
|
||||
orientation.every((quat) =>
|
||||
similarQuaternions(quat, mountingOrientation)
|
||||
);
|
||||
return identicalOrientations ? mountingOrientation : undefined;
|
||||
},
|
||||
[trackerPartGrouped]
|
||||
);
|
||||
|
||||
return (
|
||||
<>
|
||||
<MountingSelectionMenu
|
||||
bodyPart={selectedRole}
|
||||
currRotation={getCurrRotation(selectedRole)}
|
||||
isOpen={selectedRole !== BodyPart.NONE}
|
||||
onClose={() => setSelectRole(BodyPart.NONE)}
|
||||
onDirectionSelected={onDirectionSelected}
|
||||
|
||||
@@ -41,10 +41,10 @@ export function MountingResetStep({
|
||||
</div>
|
||||
|
||||
{isMobile && (
|
||||
<div className="flex flex-col pt-1 items-center fill-background-50 justify-center px-12">
|
||||
<div className="flex flex-col items-center fill-background-50 justify-center">
|
||||
<img
|
||||
src="/images/mounting-reset-pose.webp"
|
||||
width={125}
|
||||
src="/images/mounting-reset-pose.avif"
|
||||
width={450}
|
||||
alt="mounting reset ski pose"
|
||||
/>
|
||||
</div>
|
||||
@@ -65,10 +65,10 @@ export function MountingResetStep({
|
||||
</div>
|
||||
</div>
|
||||
{!isMobile && (
|
||||
<div className="flex flex-col pt-1 items-center fill-background-50 justify-center px-12">
|
||||
<div className="flex flex-col pt-1 items-center fill-background-50 justify-center">
|
||||
<img
|
||||
src="/images/mounting-reset-pose.webp"
|
||||
width={125}
|
||||
src="/images/mounting-reset-pose.avif"
|
||||
width={600}
|
||||
alt="mounting reset ski pose"
|
||||
/>
|
||||
</div>
|
||||
|
||||
Vendored
+3
@@ -24,6 +24,9 @@
|
||||
-dontwarn org.apache.logging.log4j.message.MessageFactory
|
||||
-dontwarn org.apache.logging.log4j.spi.ExtendedLogger
|
||||
-dontwarn org.apache.logging.log4j.spi.ExtendedLoggerWrapper
|
||||
-dontwarn org.apache.log4j.Level
|
||||
-dontwarn org.apache.log4j.Logger
|
||||
-dontwarn org.apache.log4j.Priority
|
||||
-dontwarn org.conscrypt.BufferAllocator
|
||||
-dontwarn org.conscrypt.Conscrypt
|
||||
-dontwarn org.conscrypt.HandshakeListener
|
||||
|
||||
@@ -69,7 +69,7 @@ dependencies {
|
||||
implementation("org.apache.commons:commons-lang3:3.12.0")
|
||||
implementation("org.apache.commons:commons-collections4:4.4")
|
||||
|
||||
implementation("com.illposed.osc:javaosc-core:0.9")
|
||||
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.6.3")
|
||||
|
||||
@@ -1034,6 +1034,7 @@ class HumanSkeleton(
|
||||
val trackersToReset: List<Tracker?>
|
||||
get() = listOf(
|
||||
neckTracker,
|
||||
upperChestTracker,
|
||||
chestTracker,
|
||||
waistTracker,
|
||||
hipTracker,
|
||||
|
||||
Reference in new issue
Block a user