fix: THREE.Timer remplace Clock déprécié, PCFShadowMap remplace PCFSoftShadowMap retiré

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TSnWBkuuJ8eYh2MNPAwCYV
This commit is contained in:
Julien Quiaios 2026-10-24 16:59:12 +00:00
parent 05c0de39e8
commit ecc20f9702
1 changed files with 5 additions and 4 deletions

View File

@ -69,7 +69,7 @@ export class ThreeRenderer extends BaseRenderer {
private tweens: Tween[] = []; private tweens: Tween[] = [];
/** Dernière valeur vue des variables d'à-coup (`jiggle`), par objet. */ /** Dernière valeur vue des variables d'à-coup (`jiggle`), par objet. */
private jiggleSeen = new Map<string, number>(); private jiggleSeen = new Map<string, number>();
private clock = new THREE.Clock(); private timer = new THREE.Timer();
private raf = 0; private raf = 0;
private resizeObs: ResizeObserver; private resizeObs: ResizeObserver;
private controls: OrbitControls | null = null; private controls: OrbitControls | null = null;
@ -113,7 +113,7 @@ export class ThreeRenderer extends BaseRenderer {
this.gl.toneMapping = THREE.ACESFilmicToneMapping; this.gl.toneMapping = THREE.ACESFilmicToneMapping;
this.gl.toneMappingExposure = 1.15; this.gl.toneMappingExposure = 1.15;
this.gl.shadowMap.enabled = high; this.gl.shadowMap.enabled = high;
this.gl.shadowMap.type = THREE.PCFSoftShadowMap; this.gl.shadowMap.type = THREE.PCFShadowMap;
this.sceneLayer.appendChild(this.gl.domElement); this.sceneLayer.appendChild(this.gl.domElement);
this.loadingEl = el('div', 'loading', this.sceneLayer); this.loadingEl = el('div', 'loading', this.sceneLayer);
this.loadingEl.textContent = 'Chargement de la pièce…'; this.loadingEl.textContent = 'Chargement de la pièce…';
@ -655,9 +655,10 @@ export class ThreeRenderer extends BaseRenderer {
// --- Boucle de rendu ------------------------------------------------------------------------ // --- Boucle de rendu ------------------------------------------------------------------------
private loop = (): void => { private loop = (time?: number): void => {
this.raf = requestAnimationFrame(this.loop); this.raf = requestAnimationFrame(this.loop);
const dt = Math.min(this.clock.getDelta(), 0.1); this.timer.update(time);
const dt = Math.min(this.timer.getDelta(), 0.1);
if (this.camAnim) { if (this.camAnim) {
const a = this.camAnim; const a = this.camAnim;