diff --git a/app.js b/app.js index 1b845f9..baf9863 100644 --- a/app.js +++ b/app.js @@ -1,6 +1,6 @@ import * as THREE from 'three' import { scheduler } from './jsm/scheduler.js' -import { TRANSLATION, ROTATION, environnement, Mino, Playfield, HoldQueue, NextQueue } from './jsm/gamelogic.js' +import { TRANSLATION, ROTATION, environment, Mino, Playfield, HoldQueue, NextQueue } from './jsm/Tetrominoes.js' import { Settings } from './jsm/Settings.js' import { Stats } from './jsm/Stats.js' import { TetraGUI } from './jsm/TetraGUI.js' @@ -29,7 +29,7 @@ let game = { gui.settings.close() gui.stats.show() - Mino.mesh.clear() + Mino.meshes.clear() nextQueue.init() holdQueue.piece = undefined @@ -298,17 +298,18 @@ const stats = new Stats() const settings = new Settings() const scene = new TetraScene(settings, loadingManager) const controls = new TetraControls(scene.camera, renderer.domElement) -const gui = new TetraGUI(game, settings, stats, scene, controls) - -scene.add(Mino.mesh) +scene.add(Mino.meshes) const holdQueue = new HoldQueue() scene.add(holdQueue) -const playfield = new Playfield() +const playfield = new Playfield(loadingManager) scene.add(playfield) const nextQueue = new NextQueue() scene.add(nextQueue) +const gui = new TetraGUI(game, settings, stats, scene, controls, playfield) +gui.load() + messagesSpan.onanimationend = function (event) { event.target.remove() } @@ -321,12 +322,12 @@ function animate() { scene.updateMatrixWorld() scene.update(delta) playfield.update(delta) - Mino.mesh.update() + Mino.meshes.update() controls.update() gui.update() renderer.render(scene, scene.camera) - environnement.camera.update(renderer, scene) + environment.camera.update(renderer, scene) } window.addEventListener("resize", () => { diff --git a/audio/Tetris_MkVaffQuasi_Ultimix_OC_ReMix.mp3 b/audio/Tetris_MkVaffQuasi_Ultimix_OC_ReMix.mp3 new file mode 100644 index 0000000..4f81749 Binary files /dev/null and b/audio/Tetris_MkVaffQuasi_Ultimix_OC_ReMix.mp3 differ diff --git a/loading.css b/css/loading.css similarity index 100% rename from loading.css rename to css/loading.css diff --git a/style.css b/css/style.css similarity index 100% rename from style.css rename to css/style.css diff --git a/images/edge.png b/images/edge.png new file mode 100644 index 0000000..70f2dd9 Binary files /dev/null and b/images/edge.png differ diff --git a/images/sprites.png b/images/sprites.png new file mode 100644 index 0000000..424448a Binary files /dev/null and b/images/sprites.png differ diff --git a/index.html b/index.html index 0a40ac6..fdb76b2 100644 --- a/index.html +++ b/index.html @@ -6,8 +6,8 @@