Compare commits

...

2 Commits

Author SHA1 Message Date
Julien Quiaios ecc20f9702 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
2026-10-24 16:59:12 +00:00
Julien Quiaios 05c0de39e8 chore: mise à jour des dépendances (three r186, TS 7, Vite 8, Vitest 5)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TSnWBkuuJ8eYh2MNPAwCYV
2026-10-24 16:59:11 +00:00
3 changed files with 1028 additions and 1194 deletions

2201
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -15,13 +15,13 @@
"smoke": "vite build && node tests/smoke.cjs" "smoke": "vite build && node tests/smoke.cjs"
}, },
"devDependencies": { "devDependencies": {
"@types/three": "^0.180.0", "@types/three": "^0.186.0",
"typescript": "^5.9.3", "typescript": "^7.0.2",
"vite": "^7.3.7", "vite": "^8.3.5",
"vite-plugin-singlefile": "^2.3.4", "vite-plugin-singlefile": "^2.3.4",
"vitest": "^3.2.7" "vitest": "^5.0.5"
}, },
"dependencies": { "dependencies": {
"three": "^0.180.0" "three": "^0.186.1"
} }
} }

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;