SINGLE INSTANCEDMESH

This commit is contained in:
2023-07-17 02:22:36 +02:00
parent d2a0e241c8
commit cfa73565f0
3 changed files with 127 additions and 133 deletions

5
app.js
View File

@@ -1,6 +1,6 @@
import * as THREE from 'three'
import { scheduler } from './jsm/scheduler.js'
import { TRANSLATION, ROTATION, environnement, Playfield, HoldQueue, NextQueue } from './jsm/gamelogic.js'
import { TRANSLATION, ROTATION, environnement, Mino, Playfield, HoldQueue, NextQueue } from './jsm/gamelogic.js'
import { Settings } from './jsm/Settings.js'
import { Stats } from './jsm/Stats.js'
import { TetraGUI } from './jsm/TetraGUI.js'
@@ -288,6 +288,8 @@ const gui = new TetraGUI(game, settings, stats, scene)
const clock = new THREE.Clock()
scene.add(Mino.mesh)
const holdQueue = new HoldQueue()
scene.add(holdQueue)
const playfield = new Playfield()
@@ -307,6 +309,7 @@ function animate() {
const delta = clock.getDelta()
scene.update(delta)
playfield.update(delta)
Mino.update()
controls.update()
gui.update()