diff --git a/app.js b/app.js index a7050bc..c79ec98 100644 --- a/app.js +++ b/app.js @@ -294,8 +294,8 @@ loadingManager.onStart = function (url, itemsLoaded, itemsTotal) { loadingDiv.style.display = "flex" } -const stats = new Stats() const settings = new Settings() +const stats = new Stats(settings) const scene = new TetraScene(settings, loadingManager) const controls = new CameraControls(scene.camera, renderer.domElement) diff --git a/jsm/Stats.js b/jsm/Stats.js index 1a4db3e..5c9c552 100644 --- a/jsm/Stats.js +++ b/jsm/Stats.js @@ -24,7 +24,8 @@ const DELAY = { class Stats { - constructor() { + constructor(settings) { + this.settings = settings this.clock = new Clock(false) this.timeFormat = new Intl.DateTimeFormat("fr-FR", { hour: "numeric", @@ -70,6 +71,7 @@ class Stats { if (level <= 20) this.fallPeriod = 1000 * Math.pow(0.8 - ((level - 1) * 0.007), level - 1) if (level > 15) this.lockDelay = 500 * Math.pow(0.9, level - 15) messagesSpan.addNewChild("div", { className: "show-level-animation", innerHTML: `