Compare commits

..

No commits in common. "ecc20f9702119208f208e52c27914dd4beeb7317" and "815644144c64a6b98dd5ff64d45ee24b94fdc646" have entirely different histories.

3 changed files with 1078 additions and 912 deletions

1971
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"
},
"devDependencies": {
"@types/three": "^0.186.0",
"typescript": "^7.0.2",
"vite": "^8.3.5",
"@types/three": "^0.180.0",
"typescript": "^5.9.3",
"vite": "^7.3.7",
"vite-plugin-singlefile": "^2.3.4",
"vitest": "^5.0.5"
"vitest": "^3.2.7"
},
"dependencies": {
"three": "^0.186.1"
"three": "^0.180.0"
}
}

View File

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