Skip to content

Commit

Permalink
gui: Better labels in IMU visualizer
Browse files Browse the repository at this point in the history
  • Loading branch information
0forks committed Jan 8, 2023
1 parent e8c9295 commit 0e7edb4
Show file tree
Hide file tree
Showing 13 changed files with 17 additions and 17 deletions.
2 changes: 1 addition & 1 deletion gui/public/i18n/en-x-owo/translation.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ widget-developer_mode-more_info = More info
## Widget: IMU Visualizer
widget-imu_visualizer = Wotation
widget-imu_visualizer-rotation_raw = Waw
widget-imu_visualizer-rotation_adjusted = Wawwusted
widget-imu_visualizer-rotation_preview = Pwewiew
## Tracker status
tracker-status-none = no stawtus
Expand Down
2 changes: 1 addition & 1 deletion gui/public/i18n/en/translation.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ widget-developer_mode-more_info = More info
## Widget: IMU Visualizer
widget-imu_visualizer = Rotation
widget-imu_visualizer-rotation_raw = Raw
widget-imu_visualizer-rotation_adjusted = Adjusted
widget-imu_visualizer-rotation_preview = Preview
## Tracker status
tracker-status-none = No Status
Expand Down
2 changes: 1 addition & 1 deletion gui/public/i18n/es-419/translation.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ widget-developer_mode-more_info = More info
## Widget: IMU Visualizer
widget-imu_visualizer = Rotation
widget-imu_visualizer-rotation_raw = Raw
widget-imu_visualizer-rotation_adjusted = Adjusted
widget-imu_visualizer-rotation_preview = Preview
## Tracker status
tracker-status-none = Sin estado
Expand Down
2 changes: 1 addition & 1 deletion gui/public/i18n/fr/translation.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ widget-developer_mode-more_info = More info
## Widget: IMU Visualizer
widget-imu_visualizer = Rotation
widget-imu_visualizer-rotation_raw = Raw
widget-imu_visualizer-rotation_adjusted = Adjusted
widget-imu_visualizer-rotation_preview = Preview
## Tracker status
tracker-status-none = Pas de statut
Expand Down
2 changes: 1 addition & 1 deletion gui/public/i18n/it/translation.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ widget-developer_mode-more_info = More info
## Widget: IMU Visualizer
widget-imu_visualizer = Rotation
widget-imu_visualizer-rotation_raw = Raw
widget-imu_visualizer-rotation_adjusted = Adjusted
widget-imu_visualizer-rotation_preview = Preview
## Tracker status
tracker-status-none = Nessuno Stato
Expand Down
4 changes: 2 additions & 2 deletions gui/public/i18n/ja/translation.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ widget-overlay-is_mirrored_label = オーバーレイをミラーとして表示
## Widget: Developer settings
widget-developer_mode = 開発者モード
widget-developer_mode-high_contrast = ハイコントラスト
widget-developer_mode-high_contrast = ハイ コントラスト
widget-developer_mode-precise_rotation = 正確な回転角度を表示
widget-developer_mode-fast_data_feed = 高速表示モード
widget-developer_mode-filter_slimes_and_hmd = SlimeVRとHMDのみを表示
Expand All @@ -104,7 +104,7 @@ widget-developer_mode-more_info = 他情報
## Widget: IMU Visualizer
widget-imu_visualizer = Rotation
widget-imu_visualizer-rotation_raw = Raw
widget-imu_visualizer-rotation_adjusted = Adjusted
widget-imu_visualizer-rotation_preview = Preview
## Tracker status
tracker-status-none = ステータスなし
Expand Down
2 changes: 1 addition & 1 deletion gui/public/i18n/ko/translation.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ widget-developer_mode-more_info = More info
## Widget: IMU Visualizer
widget-imu_visualizer = Rotation
widget-imu_visualizer-rotation_raw = Raw
widget-imu_visualizer-rotation_adjusted = Adjusted
widget-imu_visualizer-rotation_preview = Preview
## Tracker status
tracker-status-none = No Status
Expand Down
2 changes: 1 addition & 1 deletion gui/public/i18n/pl/translation.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ widget-developer_mode-more_info = More info
## Widget: IMU Visualizer
widget-imu_visualizer = Rotation
widget-imu_visualizer-rotation_raw = Raw
widget-imu_visualizer-rotation_adjusted = Adjusted
widget-imu_visualizer-rotation_preview = Preview
## Tracker status
tracker-status-none = Brak Statusu
Expand Down
2 changes: 1 addition & 1 deletion gui/public/i18n/pt-BR/translation.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ widget-developer_mode-more_info = More info
## Widget: IMU Visualizer
widget-imu_visualizer = Rotation
widget-imu_visualizer-rotation_raw = Raw
widget-imu_visualizer-rotation_adjusted = Adjusted
widget-imu_visualizer-rotation_preview = Preview
## Tracker status
tracker-status-none = Sem Status
Expand Down
2 changes: 1 addition & 1 deletion gui/public/i18n/vi/translation.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ widget-developer_mode-more_info = More info
## Widget: IMU Visualizer
widget-imu_visualizer = Rotation
widget-imu_visualizer-rotation_raw = Raw
widget-imu_visualizer-rotation_adjusted = Adjusted
widget-imu_visualizer-rotation_preview = Preview
## Tracker status
tracker-status-none = Không có tình trạng
Expand Down
2 changes: 1 addition & 1 deletion gui/public/i18n/zh-Hans/translation.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ widget-developer_mode-more_info = More info
## Widget: IMU Visualizer
widget-imu_visualizer = Rotation
widget-imu_visualizer-rotation_raw = Raw
widget-imu_visualizer-rotation_adjusted = Adjusted
widget-imu_visualizer-rotation_preview = Preview
## Tracker status
tracker-status-none = 无状态
Expand Down
8 changes: 4 additions & 4 deletions gui/src/components/widgets/IMUVisualizerWidget.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ export function IMUVisualizerWidget({ tracker }: { tracker: TrackerDataT }) {
const [enabled, setEnabled] = useState(false);
const quat = tracker?.rotationIdentityAdjusted || new THREE.Quaternion();

const { useRawRotationEulerDegrees, useRefAdjRotationEulerDegrees } =
const { useRawRotationEulerDegrees, useIdentAdjRotationEulerDegrees } =
useTracker(tracker);

return (
Expand All @@ -151,16 +151,16 @@ export function IMUVisualizerWidget({ tracker }: { tracker: TrackerDataT }) {

<div className="flex justify-between">
<Typography color="secondary">
{l10n.getString('widget-imu_visualizer-rotation_adjusted')}
{l10n.getString('widget-imu_visualizer-rotation_preview')}
</Typography>
<Typography>
{formatVector3(useRefAdjRotationEulerDegrees(), 2)}
{formatVector3(useIdentAdjRotationEulerDegrees(), 2)}
</Typography>
</div>

{!enabled && (
<Button variant="secondary" onClick={() => setEnabled(true)}>
Preview
{l10n.getString('widget-imu_visualizer-rotation_preview')}
</Button>
)}
{enabled && <SceneRenderer {...quat}></SceneRenderer>}
Expand Down
2 changes: 1 addition & 1 deletion gui/src/hooks/tracker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ export function useTracker(tracker: TrackerDataT) {
() => QuaternionToEulerDegrees(tracker?.rotationReferenceAdjusted),
[tracker.rotationReferenceAdjusted]
),
useRefAdjRotationDebugEulerDegrees: () =>
useIdentAdjRotationEulerDegrees: () =>
useMemo(
() => QuaternionToEulerDegrees(tracker?.rotationIdentityAdjusted),
[tracker.rotationIdentityAdjusted]
Expand Down

0 comments on commit 0e7edb4

Please sign in to comment.