add tweening

This commit is contained in:
2025-01-11 19:38:40 +09:00
parent 4aba510ec0
commit 462dfe7b9a
6 changed files with 56 additions and 25 deletions
+6 -5
View File
@@ -10,6 +10,7 @@ const game = new Game()
app.use('/', express.static('public'))
app.use('/three/', express.static('node_modules/three'))
app.use('/@tweenjs/', express.static('node_modules/@tweenjs'))
app.use(express.urlencoded({ extended: true }))
app.ws('/ws', async (req, res) => {
@@ -50,11 +51,11 @@ app.listen(port, () => {
entity1.radius = 50
game.spawn_entity(entity1)
// const entity2 = new Entity()
// entity2.id = '2'
// entity2.teleport(110, 110)
// entity2.radius = 50
// game.spawn_entity(entity2)
const entity2 = new Entity()
entity2.id = '2'
entity2.teleport(110, 110)
entity2.radius = 50
game.spawn_entity(entity2)
// const triangle = new Terrain([
// { x: 400, y: 200 },