fix(debug): defer hand tracking startup
This commit is contained in:
@@ -9,6 +9,7 @@ export function SceneLoadingOverlay({
|
||||
}: SceneLoadingOverlayProps): React.JSX.Element | null {
|
||||
const isReady = state.status === "ready";
|
||||
const progress = Math.round(Math.max(0, Math.min(1, state.progress)) * 100);
|
||||
const helperText = getLoadingHelperText(state.progress);
|
||||
|
||||
return (
|
||||
<div
|
||||
@@ -17,6 +18,7 @@ export function SceneLoadingOverlay({
|
||||
>
|
||||
<div className="scene-loading-overlay__content">
|
||||
<strong>{state.currentStep}</strong>
|
||||
<p>{helperText}</p>
|
||||
<div className="scene-loading-overlay__track">
|
||||
<span style={{ width: `${progress}%` }} />
|
||||
<em>{progress}%</em>
|
||||
@@ -25,3 +27,19 @@ export function SceneLoadingOverlay({
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
function getLoadingHelperText(progress: number): string {
|
||||
if (progress >= 0.95) {
|
||||
return "Finalisation de la scène et de la première frame.";
|
||||
}
|
||||
|
||||
if (progress >= 0.7) {
|
||||
return "Préparation des collisions et du gameplay.";
|
||||
}
|
||||
|
||||
if (progress >= 0.25) {
|
||||
return "Chargement progressif de la map autour du joueur.";
|
||||
}
|
||||
|
||||
return "Récupération des données et modèles nécessaires.";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user