Game
- update style
This commit is contained in:
@ -25,7 +25,7 @@ urlpatterns = [
|
|||||||
path("multiOnlineGamePage", views.multiOnlineGamePage, name='multiOnlineGamePage'),
|
path("multiOnlineGamePage", views.multiOnlineGamePage, name='multiOnlineGamePage'),
|
||||||
path("waitingGamePage", views.waitingGamePage, name='waitingGamePage'),
|
path("waitingGamePage", views.waitingGamePage, name='waitingGamePage'),
|
||||||
path("profilPage", views.profilPage, name='profilPage'),
|
path("profilPage", views.profilPage, name='profilPage'),
|
||||||
path("game", views.game, name='game'),
|
# path("game", views.game, name='game'),
|
||||||
path("wait_game", views.game, name='wait_game'),
|
path("wait_game", views.game, name='wait_game'),
|
||||||
path("login42", views.login42, name='login42'),
|
path("login42", views.login42, name='login42'),
|
||||||
path("logout", views.logout, name='logout'),
|
path("logout", views.logout, name='logout'),
|
||||||
|
File diff suppressed because one or more lines are too long
Binary file not shown.
Before Width: | Height: | Size: 187 KiB After Width: | Height: | Size: 179 KiB |
Binary file not shown.
After Width: | Height: | Size: 17 KiB |
@ -6,7 +6,7 @@
|
|||||||
/* By: edbernar <edbernar@student.42angouleme. +#+ +:+ +#+ */
|
/* By: edbernar <edbernar@student.42angouleme. +#+ +:+ +#+ */
|
||||||
/* +#+#+#+#+#+ +#+ */
|
/* +#+#+#+#+#+ +#+ */
|
||||||
/* Created: 2024/09/29 22:36:43 by edbernar #+# #+# */
|
/* Created: 2024/09/29 22:36:43 by edbernar #+# #+# */
|
||||||
/* Updated: 2024/09/30 23:08:59 by edbernar ### ########.fr */
|
/* Updated: 2024/10/01 21:58:57 by edbernar ### ########.fr */
|
||||||
/* */
|
/* */
|
||||||
/* ************************************************************************** */
|
/* ************************************************************************** */
|
||||||
|
|
||||||
@ -28,6 +28,7 @@ const url_files = {
|
|||||||
catchVideoPub: '/static/video/multiOnlineGamePage/catch.mp4',
|
catchVideoPub: '/static/video/multiOnlineGamePage/catch.mp4',
|
||||||
fortniteVideoPub: '/static/video/multiOnlineGamePage/fortnite.mp4',
|
fortniteVideoPub: '/static/video/multiOnlineGamePage/fortnite.mp4',
|
||||||
|
|
||||||
|
wallTexture: '/static/img/multiOnlineGamePage/wallTexture.jpg',
|
||||||
planeTexture: '/static/img/multiOnlineGamePage/pastel.jpg',
|
planeTexture: '/static/img/multiOnlineGamePage/pastel.jpg',
|
||||||
skinOneTexture: '/static/img/skin/1.jpg',
|
skinOneTexture: '/static/img/skin/1.jpg',
|
||||||
skinTwoTexture: '/static/img/skin/2.jpg',
|
skinTwoTexture: '/static/img/skin/2.jpg',
|
||||||
|
@ -3,14 +3,10 @@
|
|||||||
/* ::: :::::::: */
|
/* ::: :::::::: */
|
||||||
/* main.js :+: :+: :+: */
|
/* main.js :+: :+: :+: */
|
||||||
/* +:+ +:+ +:+ */
|
/* +:+ +:+ +:+ */
|
||||||
/* By: hubourge <hubourge@student.42.fr> +#+ +:+ +#+ */
|
/* By: edbernar <edbernar@student.42angouleme. +#+ +:+ +#+ */
|
||||||
/* +#+#+#+#+#+ +#+ */
|
/* +#+#+#+#+#+ +#+ */
|
||||||
/* Created: 2024/08/22 17:08:46 by madegryc #+# #+# */
|
/* Created: 2024/08/22 17:08:46 by madegryc #+# #+# */
|
||||||
<<<<<<< HEAD
|
/* Updated: 2024/10/01 21:32:33 by edbernar ### ########.fr */
|
||||||
/* Updated: 2024/10/01 16:46:24 by edbernar ### ########.fr */
|
|
||||||
=======
|
|
||||||
/* Updated: 2024/10/01 18:48:13 by hubourge ### ########.fr */
|
|
||||||
>>>>>>> 3e8bc6071273411d12af866d58550eddebba89ec
|
|
||||||
/* */
|
/* */
|
||||||
/* ************************************************************************** */
|
/* ************************************************************************** */
|
||||||
|
|
||||||
|
@ -6,11 +6,7 @@
|
|||||||
/* By: edbernar <edbernar@student.42angouleme. +#+ +:+ +#+ */
|
/* By: edbernar <edbernar@student.42angouleme. +#+ +:+ +#+ */
|
||||||
/* +#+#+#+#+#+ +#+ */
|
/* +#+#+#+#+#+ +#+ */
|
||||||
/* Created: 2024/08/20 14:52:55 by hubourge #+# #+# */
|
/* Created: 2024/08/20 14:52:55 by hubourge #+# #+# */
|
||||||
<<<<<<< HEAD
|
/* Updated: 2024/10/01 22:10:40 by edbernar ### ########.fr */
|
||||||
/* Updated: 2024/10/01 19:42:54 by edbernar ### ########.fr */
|
|
||||||
=======
|
|
||||||
/* Updated: 2024/10/01 20:27:32 by hubourge ### ########.fr */
|
|
||||||
>>>>>>> 3e8bc6071273411d12af866d58550eddebba89ec
|
|
||||||
/* */
|
/* */
|
||||||
/* ************************************************************************** */
|
/* ************************************************************************** */
|
||||||
|
|
||||||
@ -270,7 +266,7 @@ class Map
|
|||||||
}
|
}
|
||||||
|
|
||||||
geometry1 = new THREE.TorusGeometry(1, 0.1, 12, 24);
|
geometry1 = new THREE.TorusGeometry(1, 0.1, 12, 24);
|
||||||
material1 = new THREE.MeshPhysicalMaterial({color: 0x00ff00});
|
material1 = new THREE.MeshPhysicalMaterial({color: 0x6290C8});
|
||||||
ring1 = new THREE.Mesh(geometry1, material1);
|
ring1 = new THREE.Mesh(geometry1, material1);
|
||||||
ring1.rotateX(-Math.PI / 2);
|
ring1.rotateX(-Math.PI / 2);
|
||||||
ring1.position.set(0, 0, 0);
|
ring1.position.set(0, 0, 0);
|
||||||
@ -279,7 +275,7 @@ class Map
|
|||||||
material1.opacity = 0.75;
|
material1.opacity = 0.75;
|
||||||
|
|
||||||
geometry2 = new THREE.TorusGeometry(1, 0.1, 12, 24);
|
geometry2 = new THREE.TorusGeometry(1, 0.1, 12, 24);
|
||||||
material2 = new THREE.MeshPhysicalMaterial({color: 0x00ff00});
|
material2 = new THREE.MeshPhysicalMaterial({color: 0x829CBC});
|
||||||
ring2 = new THREE.Mesh(geometry2, material2);
|
ring2 = new THREE.Mesh(geometry2, material2);
|
||||||
ring2.rotateX(-Math.PI / 2);
|
ring2.rotateX(-Math.PI / 2);
|
||||||
ring2.position.set(0, 0 + 0.1, 0);
|
ring2.position.set(0, 0 + 0.1, 0);
|
||||||
@ -288,7 +284,7 @@ class Map
|
|||||||
material2.opacity = 0.65;
|
material2.opacity = 0.65;
|
||||||
|
|
||||||
geometry3 = new THREE.TorusGeometry(1, 0.1, 12, 24);
|
geometry3 = new THREE.TorusGeometry(1, 0.1, 12, 24);
|
||||||
material3 = new THREE.MeshPhysicalMaterial({color: 0x00ff00});
|
material3 = new THREE.MeshPhysicalMaterial({color: 0x376996});
|
||||||
ring3 = new THREE.Mesh(geometry3, material3);
|
ring3 = new THREE.Mesh(geometry3, material3);
|
||||||
ring3.rotateX(-Math.PI / 2);
|
ring3.rotateX(-Math.PI / 2);
|
||||||
ring3.position.set(0, 0 + 0.2, 0);
|
ring3.position.set(0, 0 + 0.2, 0);
|
||||||
@ -297,23 +293,23 @@ class Map
|
|||||||
material3.opacity = 0.35;
|
material3.opacity = 0.35;
|
||||||
|
|
||||||
geometry4 = new THREE.CircleGeometry(0.2, 24);
|
geometry4 = new THREE.CircleGeometry(0.2, 24);
|
||||||
material4 = new THREE.MeshPhysicalMaterial({color: 0xaaffaa});
|
material4 = new THREE.MeshPhysicalMaterial({color: 0x376996});
|
||||||
circle1 = new THREE.Mesh(geometry4, material4);
|
circle1 = new THREE.Mesh(geometry4, material4);
|
||||||
circle1.rotateX(-Math.PI / 2);
|
circle1.rotateX(-Math.PI / 2);
|
||||||
circle1.position.set(0, 0 - 0.048, 0);
|
circle1.position.set(0, 0 - 0.048, 0);
|
||||||
|
|
||||||
geometry5 = new THREE.CircleGeometry(0.24, 24);
|
geometry5 = new THREE.CircleGeometry(0.24, 24);
|
||||||
material5 = new THREE.MeshPhysicalMaterial({color: 0x00ff00});
|
material5 = new THREE.MeshPhysicalMaterial({color: 0x6290C8});
|
||||||
circle2 = new THREE.Mesh(geometry5, material5);
|
circle2 = new THREE.Mesh(geometry5, material5);
|
||||||
circle2.rotateX(-Math.PI / 2);
|
circle2.rotateX(-Math.PI / 2);
|
||||||
circle2.position.set(0, 0 - 0.049, 0);
|
circle2.position.set(0, 0 - 0.049, 0);
|
||||||
|
|
||||||
geometry6 = new THREE.CylinderGeometry(0.15, 0.15, 0.35);
|
// geometry6 = new THREE.CylinderGeometry(0.15, 0.15, 0.35);
|
||||||
material6 = new THREE.MeshPhysicalMaterial({color: 0x00ff00});
|
// material6 = new THREE.MeshPhysicalMaterial({color: 0x00ff00});
|
||||||
collider = new THREE.Mesh(geometry6, material6);
|
// collider = new THREE.Mesh(geometry6, material6);
|
||||||
collider.position.set(0, 0 + 0.1, 0);
|
// collider.position.set(0, 0 + 0.1, 0);
|
||||||
material6.transparent = true;
|
// material6.transparent = true;
|
||||||
material6.opacity = 0.1;
|
// material6.opacity = 0.1;
|
||||||
|
|
||||||
groupJumper = new THREE.Group();
|
groupJumper = new THREE.Group();
|
||||||
groupJumper.add(ring1);
|
groupJumper.add(ring1);
|
||||||
@ -321,7 +317,7 @@ class Map
|
|||||||
groupJumper.add(ring3);
|
groupJumper.add(ring3);
|
||||||
groupJumper.add(circle1);
|
groupJumper.add(circle1);
|
||||||
groupJumper.add(circle2);
|
groupJumper.add(circle2);
|
||||||
groupJumper.add(collider);
|
// groupJumper.add(collider);
|
||||||
|
|
||||||
// Set groupJumper position groud / top
|
// Set groupJumper position groud / top
|
||||||
for (let i = 0; i < groupJumper.children.length && onTop; i++)
|
for (let i = 0; i < groupJumper.children.length && onTop; i++)
|
||||||
@ -356,7 +352,10 @@ class Map
|
|||||||
let meshWallObs = null;
|
let meshWallObs = null;
|
||||||
|
|
||||||
geometryWallObs = new THREE.BoxGeometry(size, 0.5, 0.1);
|
geometryWallObs = new THREE.BoxGeometry(size, 0.5, 0.1);
|
||||||
materialWallObs = new THREE.MeshPhysicalMaterial({color: 0xaaaafe});
|
|
||||||
|
// materialWallObs = new THREE.MeshPhysicalMaterial({ map: files.wallTexture });
|
||||||
|
textureLoaderPlane = new THREE.TextureLoader();
|
||||||
|
materialWallObs = new THREE.MeshPhysicalMaterial({ map: textureLoaderPlane.load(files.wallTexture) });
|
||||||
meshWallObs = new THREE.Mesh(geometryWallObs, materialWallObs);
|
meshWallObs = new THREE.Mesh(geometryWallObs, materialWallObs);
|
||||||
if (onTop)
|
if (onTop)
|
||||||
meshWallObs.position.set(x, this.playerLimits.up - 0.1, y);
|
meshWallObs.position.set(x, this.playerLimits.up - 0.1, y);
|
||||||
@ -764,7 +763,7 @@ class Map
|
|||||||
#animationGravityChanger(group, onTop)
|
#animationGravityChanger(group, onTop)
|
||||||
{
|
{
|
||||||
let geometryGC = new THREE.TorusGeometry(1.5, 0.05, 12, 24);
|
let geometryGC = new THREE.TorusGeometry(1.5, 0.05, 12, 24);
|
||||||
let materialGC = new THREE.MeshPhysicalMaterial({color: 0x00ff00});
|
let materialGC = new THREE.MeshPhysicalMaterial({color: 0x829CBC});
|
||||||
let ringGC = new THREE.Mesh(geometryGC, materialGC);
|
let ringGC = new THREE.Mesh(geometryGC, materialGC);
|
||||||
let landmarkGC = group.children[0];
|
let landmarkGC = group.children[0];
|
||||||
let speed = 0.1;
|
let speed = 0.1;
|
||||||
@ -875,7 +874,7 @@ class Map
|
|||||||
if (diff > 2)
|
if (diff > 2)
|
||||||
this.arrObject[i].mesh.material.opacity = 0;
|
this.arrObject[i].mesh.material.opacity = 0;
|
||||||
else
|
else
|
||||||
this.arrObject[i].mesh.material.opacity = 1 - (diff / 2);
|
this.arrObject[i].mesh.material.opacity = 0.7 - (diff / 2);
|
||||||
}
|
}
|
||||||
else if (this.arrObject[i].name == "wallRight")
|
else if (this.arrObject[i].name == "wallRight")
|
||||||
{
|
{
|
||||||
@ -890,7 +889,7 @@ class Map
|
|||||||
if (diff > 2)
|
if (diff > 2)
|
||||||
this.arrObject[i].mesh.material.opacity = 0;
|
this.arrObject[i].mesh.material.opacity = 0;
|
||||||
else
|
else
|
||||||
this.arrObject[i].mesh.material.opacity = 1 - (diff / 2);
|
this.arrObject[i].mesh.material.opacity = 0.7 - (diff / 2);
|
||||||
}
|
}
|
||||||
if (this.arrObject[i].type == 'jumperBottom')
|
if (this.arrObject[i].type == 'jumperBottom')
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user