diff --git a/public/client.js b/public/client.js index 456c4cc..029f18b 100644 --- a/public/client.js +++ b/public/client.js @@ -172,6 +172,8 @@ function connectWebSocket() { entity.position.set(e.position.x / 100, e.position.y / 100, e.radius / 100) scene.add(entity) + // TODO: player model out of basic geometries + const hpMargin = 0.4 const maxHp = new THREE.Sprite(new THREE.SpriteMaterial({ color: 0xd03333 })) maxHp.position.set(0, (e.radius / 100) + hpMargin, 0) @@ -188,7 +190,6 @@ function connectWebSocket() { entities[e.id] = entity } - // entity.position.set(e.position.x / 100, e.position.y / 100, e.radius / 100) positionTweens[entity.id] = new Tween(entity.position).to({ x: e.position.x / 100, y: e.position.y / 100, z: e.radius / 100 }, tweenDuration).start() const hp = entity.children.at(0).children.at(0) @@ -217,7 +218,6 @@ function connectWebSocket() { } projectile.userData.flaggedForRemoval = false - // projectile.position.set(p.position.x / 100, p.position.y / 100, p.visualHeight / 100) positionTweens[projectile.id] = new Tween(projectile.position).to({ x: p.position.x / 100, y: p.position.y / 100, z: p.visualHeight / 100 }, tweenDuration).start() } diff --git a/public/index.html b/public/index.html index 3333640..2585e80 100644 --- a/public/index.html +++ b/public/index.html @@ -63,6 +63,8 @@
Connection:
+ +