Compare commits
2 Commits
815644144c
...
ecc20f9702
| Author | SHA1 | Date |
|---|---|---|
|
|
ecc20f9702 | |
|
|
05c0de39e8 |
File diff suppressed because it is too large
Load Diff
10
package.json
10
package.json
|
|
@ -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"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -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;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue