mirror of
https://github.com/SlimeVR/SlimeVR-Server.git
synced 2026-11-26 11:56:27 -08:00
Merge branch 'main' into update-eslint
This commit is contained in:
3 files changed
+63
-45
No files matched your search
@@ -1518,7 +1518,7 @@ vrc_config-spine_mode-LOCK_BOTH = Lock Both
|
||||
vrc_config-spine_mode-LOCK_HEAD = Lock Head
|
||||
vrc_config-spine_mode-LOCK_HIP = Lock Hip
|
||||
|
||||
vrc_config-tracker_model-UNKNOWN = Unkown
|
||||
vrc_config-tracker_model-UNKNOWN = Unknown
|
||||
vrc_config-tracker_model-AXIS = Axis
|
||||
vrc_config-tracker_model-BOX = Box
|
||||
vrc_config-tracker_model-SPHERE = Sphere
|
||||
|
||||
@@ -17,16 +17,19 @@ import { Tooltip } from '@/components/commons/Tooltip';
|
||||
function IncrementButton({
|
||||
children,
|
||||
onClick,
|
||||
bgDark,
|
||||
}: {
|
||||
children: ReactNode;
|
||||
onClick?: MouseEventHandler<HTMLDivElement>;
|
||||
bgDark: boolean;
|
||||
}) {
|
||||
return (
|
||||
<div
|
||||
onClick={onClick}
|
||||
className={classNames(
|
||||
'p-3 rounded-lg xs:w-10 xs:h-10 flex flex-col justify-center items-center cursor-pointer',
|
||||
'bg-background-40 hover:bg-opacity-50 active:bg-accent-background-30'
|
||||
'hover:bg-opacity-50 active:bg-accent-background-30',
|
||||
{ 'bg-background-60': bgDark, 'bg-background-40': !bgDark }
|
||||
)}
|
||||
>
|
||||
<Typography variant="vr-accessible" bold>
|
||||
@@ -128,43 +131,51 @@ function ProportionItem({
|
||||
'duration-300'
|
||||
)}
|
||||
>
|
||||
<Tooltip
|
||||
content={
|
||||
<Localized id={`${part.label}-desc`}>
|
||||
<Typography
|
||||
variant="standard"
|
||||
whitespace="whitespace-pre-wrap"
|
||||
/>
|
||||
</Localized>
|
||||
}
|
||||
preferedDirection="bottom"
|
||||
mode="corner"
|
||||
>
|
||||
<div className="flex flex-grow" onClick={toggleOpen}>
|
||||
<Typography variant="section-title" bold>
|
||||
{l10n.getString(part.label)}
|
||||
</Typography>
|
||||
</div>
|
||||
</Tooltip>
|
||||
<div className="flex flex-grow" onClick={toggleOpen}>
|
||||
<Typography variant="section-title" bold>
|
||||
{l10n.getString(part.label)}
|
||||
</Typography>
|
||||
<Tooltip
|
||||
content={
|
||||
<Localized id={`${part.label}-desc`}>
|
||||
<Typography
|
||||
variant="standard"
|
||||
whitespace="whitespace-pre-wrap"
|
||||
/>
|
||||
</Localized>
|
||||
}
|
||||
preferedDirection="bottom"
|
||||
mode="corner"
|
||||
>
|
||||
<div className="hover:opacity-100 opacity-65 ml-1 scale-[0.65] border-2 border-solid text-xs w-5 h-5 flex justify-center items-center rounded-full cursor-help">
|
||||
i
|
||||
</div>
|
||||
</Tooltip>
|
||||
</div>
|
||||
|
||||
<div className="flex gap-4 items-center mobile:justify-center mobile:w-full">
|
||||
<div
|
||||
className={classNames(
|
||||
'flex items-center gap-2 my-2 opacity-10',
|
||||
part.type === 'group-part'
|
||||
? 'group-hover/child-buttons:opacity-100'
|
||||
: 'group-hover/buttons:opacity-100'
|
||||
)}
|
||||
className={classNames('flex items-center gap-2 my-2 opacity-100')}
|
||||
>
|
||||
{!precise && (
|
||||
<IncrementButton onClick={() => boneIncrement(-5)}>
|
||||
<IncrementButton
|
||||
bgDark={part.type !== 'group-part'}
|
||||
onClick={() => boneIncrement(-5)}
|
||||
>
|
||||
{configFormat.format(-5)}
|
||||
</IncrementButton>
|
||||
)}
|
||||
<IncrementButton onClick={() => boneIncrement(-1)}>
|
||||
<IncrementButton
|
||||
bgDark={part.type !== 'group-part'}
|
||||
onClick={() => boneIncrement(-1)}
|
||||
>
|
||||
{configFormat.format(-1)}
|
||||
</IncrementButton>
|
||||
{precise && (
|
||||
<IncrementButton onClick={() => boneIncrement(-0.5)}>
|
||||
<IncrementButton
|
||||
bgDark={part.type !== 'group-part'}
|
||||
onClick={() => boneIncrement(-0.5)}
|
||||
>
|
||||
{configFormat.format(-0.5)}
|
||||
</IncrementButton>
|
||||
)}
|
||||
@@ -181,23 +192,27 @@ function ProportionItem({
|
||||
)}
|
||||
</div>
|
||||
<div
|
||||
className={classNames(
|
||||
'flex items-center gap-2 my-2 opacity-10',
|
||||
part.type === 'group-part'
|
||||
? 'group-hover/child-buttons:opacity-100'
|
||||
: 'group-hover/buttons:opacity-100'
|
||||
)}
|
||||
className={classNames('flex items-center gap-2 my-2 opacity-100')}
|
||||
>
|
||||
{precise && (
|
||||
<IncrementButton onClick={() => boneIncrement(+0.5)}>
|
||||
<IncrementButton
|
||||
bgDark={part.type !== 'group-part'}
|
||||
onClick={() => boneIncrement(+0.5)}
|
||||
>
|
||||
{configFormat.format(+0.5)}
|
||||
</IncrementButton>
|
||||
)}
|
||||
<IncrementButton onClick={() => boneIncrement(+1)}>
|
||||
<IncrementButton
|
||||
bgDark={part.type !== 'group-part'}
|
||||
onClick={() => boneIncrement(+1)}
|
||||
>
|
||||
{configFormat.format(+1)}
|
||||
</IncrementButton>
|
||||
{!precise && (
|
||||
<IncrementButton onClick={() => boneIncrement(+5)}>
|
||||
<IncrementButton
|
||||
bgDark={part.type !== 'group-part'}
|
||||
onClick={() => boneIncrement(+5)}
|
||||
>
|
||||
{configFormat.format(+5)}
|
||||
</IncrementButton>
|
||||
)}
|
||||
@@ -208,7 +223,8 @@ function ProportionItem({
|
||||
<div
|
||||
className={classNames(
|
||||
'flex items-center fill-background-20',
|
||||
part.type === 'bone' && 'opacity-20'
|
||||
part.type === 'bone' && 'opacity-50 cursor-not-allowed',
|
||||
part.type !== 'bone' && 'hover:scale-110'
|
||||
)}
|
||||
onClick={toggleOpen}
|
||||
>
|
||||
|
||||
@@ -342,10 +342,11 @@ class TrackerResetsHandler(val tracker: Tracker) {
|
||||
|
||||
calculateDrift(oldRot)
|
||||
|
||||
postProcessResetFull(reference)
|
||||
|
||||
// Reset Stay Aligned
|
||||
// Reset Stay Aligned (before resetting filtering, which depends on the
|
||||
// tracker's rotation)
|
||||
tracker.stayAligned.reset()
|
||||
|
||||
postProcessResetFull(reference)
|
||||
}
|
||||
|
||||
private fun postProcessResetFull(reference: Quaternion) {
|
||||
@@ -401,10 +402,11 @@ class TrackerResetsHandler(val tracker: Tracker) {
|
||||
this.tracker.lastResetStatus = 0u
|
||||
}
|
||||
|
||||
tracker.resetFilteringQuats(reference)
|
||||
|
||||
// Reset Stay Aligned
|
||||
// Reset Stay Aligned (before resetting filtering, which depends on the
|
||||
// tracker's rotation)
|
||||
tracker.stayAligned.reset()
|
||||
|
||||
tracker.resetFilteringQuats(reference)
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in new issue
Block a user