remove mouse sensitivity value, improve type strictness

This commit is contained in:
Brian Beck 2026-03-14 00:27:22 -07:00
parent 8542e07259
commit d47d3adc27
3 changed files with 53 additions and 26 deletions

View file

@ -265,9 +265,6 @@ export function InspectorControls({
Mouse sensitivity
</label>
<div className={styles.Control}>
<output htmlFor="mouseSensitivityInput">
{Math.round(mouseSensitivity * 8000) / 64}
</output>
<input
id="mouseSensitivityInput"
type="range"

View file

@ -87,15 +87,33 @@ type PersistedSettings = {
};
export function useSettings() {
return useContext(SettingsContext);
const context = useContext(SettingsContext);
if (!context) {
throw new Error(
"No SettingsContext found. Did you remember to add a <SettingsProvider>?",
);
}
return context;
}
export function useDebug() {
return useContext(DebugContext);
const context = useContext(DebugContext);
if (!context) {
throw new Error(
"No DebugContext found. Did you remember to add a <SettingsProvider>?",
);
}
return context;
}
export function useControls() {
return useContext(ControlsContext);
const context = useContext(ControlsContext);
if (!context) {
throw new Error(
"No ControlsContext found. Did you remember to add a <SettingsProvider>?",
);
}
return context;
}
export function SettingsProvider({ children }: { children: ReactNode }) {