23
Canvas 2D / WebGL
Vignettage de confort
Le vignettage dynamique est la technique anti-nausee la plus efficace en VR. En reduisant le champ de vision peripherique durant le mouvement, le systeme vestibulaire recoit moins de signaux contradictoires. Des etudes montrent une reduction de 30-40% du mal du simulateur avec une perte d'immersion minimale. Experimentez ici l'effet en temps reel.
Statut: Immobile
// Comfort Vignetting - FOV Reduction During Movement
// Reduces peripheral vision to minimize vestibular conflict
class ComfortVignette {
constructor(canvas) {
this.ctx = canvas.getContext('2d');
this.intensity = 0.6; // 0-1 darkness
this.radius = 0.45; // 0-1 inner circle ratio
this.currentFade = 0; // animated 0-1
this.isMoving = false;
this.enabled = true;
}
update(dt) {
const target = this.isMoving && this.enabled ? 1 : 0;
// Smooth transition (80ms attack, 200ms release)
const speed = target > this.currentFade ? 12 : 5;
this.currentFade += (target - this.currentFade) * speed * dt;
this.currentFade = Math.max(0, Math.min(1, this.currentFade));
}
render(w, h) {
if (this.currentFade < 0.01) return;
const ctx = this.ctx;
const cx = w / 2, cy = h / 2;
const maxR = Math.hypot(cx, cy);
const innerR = maxR * this.radius;
const gradient = ctx.createRadialGradient(
cx, cy, innerR, cx, cy, maxR
);
gradient.addColorStop(0, `rgba(0,0,0,0)`);
gradient.addColorStop(1, `rgba(0,0,0,${this.intensity * this.currentFade})`);
ctx.fillStyle = gradient;
ctx.fillRect(0, 0, w, h);
}
}
Defi
Implementez un vignettage adaptatif : plus la vitesse de deplacement est elevee, plus le champ de vision se reduit. Ajoutez un indicateur visuel (arc color) montrant le FOV effectif en degres. Trouvez le seuil de vitesse optimal ou le vignettage doit commencer.
Maitrisez les techniques de confort VR
Formations avancees sur le design d'experience immersive sans nausee.
Explorer les formations