diff --git a/main.js b/main.js index 62d0e7a..9d9e4a3 100644 --- a/main.js +++ b/main.js @@ -80,12 +80,12 @@ const scene = new THREE.Scene(); scene.background = new THREE.CubeTextureLoader(loadMngr) .setPath( 'textures/calm-sea-skybox/' ) .load( [ - 'ft.jpg', - 'bk.jpg', - 'up.jpg', - 'dn.jpg', - 'rt.jpg', - 'lf.jpg', + 'ft.avif', + 'bk.avif', + 'up.avif', + 'dn.avif', + 'rt.avif', + 'lf.avif', ] ); scene.backgroundBlurriness = 0.03; scene.backgroundIntensity = 1.4; @@ -102,10 +102,10 @@ const mazeCollisionner = new THREE.Group(); // Maze const wallMaterial = new THREE.MeshStandardMaterial({ - map : loader.load('textures/Poly-cobblestone-wall/color_map.jpg'), - normalMap : loader.load('textures/Poly-cobblestone-wall/normal_map_opengl.jpg'), - aoMap : loader.load('textures/Poly-cobblestone-wall/ao_map.jpg'), - roughnessMap : loader.load('textures/Poly-cobblestone-wall/roughness_map.jpg'), + map : loader.load('textures/Poly-cobblestone-wall/color_map.avif'), + normalMap : loader.load('textures/Poly-cobblestone-wall/normal_map_opengl.avif'), + aoMap : loader.load('textures/Poly-cobblestone-wall/ao_map.avif'), + roughnessMap : loader.load('textures/Poly-cobblestone-wall/roughness_map.avif'), roughness : 1 }) @@ -139,11 +139,11 @@ function repeatGroundMaterial (texture) { texture.repeat.set(mazeWidth / 4, mazeWidth / 4) } const groundMaterial = new THREE.MeshStandardMaterial({ - map : loader.load('textures/angled-blocks-vegetation/albedo.png', repeatGroundMaterial), - aoMap : loader.load('textures/angled-blocks-vegetation/ao-roughness-metalness.png', repeatGroundMaterial), - metalnessMap: loader.load('textures/angled-blocks-vegetation/ao-roughness-metalness.png', repeatGroundMaterial), - normalMap : loader.load('textures/angled-blocks-vegetation/normal-dx.png', repeatGroundMaterial), - roughnessMap: loader.load('textures/angled-blocks-vegetation/ao-roughness-metalness.png', repeatGroundMaterial), + map : loader.load('textures/angled-blocks-vegetation/albedo.avif', repeatGroundMaterial), + aoMap : loader.load('textures/angled-blocks-vegetation/ao-roughness-metalness.avif', repeatGroundMaterial), + metalnessMap: loader.load('textures/angled-blocks-vegetation/ao-roughness-metalness.avif', repeatGroundMaterial), + normalMap : loader.load('textures/angled-blocks-vegetation/normal-dx.avif', repeatGroundMaterial), + roughnessMap: loader.load('textures/angled-blocks-vegetation/ao-roughness-metalness.avif', repeatGroundMaterial), /*hexTiling : { patchScale: 1, useContrastCorrectedBlending: true, @@ -204,7 +204,7 @@ const ocean = new Water(waterGeometry, { textureWidth : 512, textureHeight: 512, waterNormals : loader.load( - 'textures/waternormals.jpg', + 'textures/waternormals.avif', function (texture) { texture.wrapS = texture.wrapT = THREE.RepeatWrapping; } @@ -302,15 +302,15 @@ function repeatRaftMaterial(texture) { texture.repeat.set(2, 1) } const raftMaterial = new THREE.MeshStandardMaterial({ - map: loader.load("textures/Poly-wood/color_map.jpg", repeatRaftMaterial), - aoMap: loader.load("textures/Poly-wood/ao_map.jpg", repeatRaftMaterial), - normalMap: loader.load("textures/Poly-wood/normal_map_opengl.jpg", repeatRaftMaterial), + map: loader.load("textures/Poly-wood/color_map.avif", repeatRaftMaterial), + aoMap: loader.load("textures/Poly-wood/ao_map.avif", repeatRaftMaterial), + normalMap: loader.load("textures/Poly-wood/normal_map_opengl.avif", repeatRaftMaterial), normalScale : new THREE.Vector2(2, 2), - roughnessMap: loader.load("textures/Poly-wood/roughness_map.jpg", repeatRaftMaterial), + roughnessMap: loader.load("textures/Poly-wood/roughness_map.avif", repeatRaftMaterial), depthFunc: 3, depthTest: true, depthWrite: true, - displacementMap: loader.load("textures/Poly-wood/displacement_map.jpg", repeatRaftMaterial), + displacementMap: loader.load("textures/Poly-wood/displacement_map.avif", repeatRaftMaterial), displacementScale: -0.3, displacementBias: 0.15, }) diff --git a/textures/Poly-cobblestone-wall/ao_map.avif b/textures/Poly-cobblestone-wall/ao_map.avif new file mode 100644 index 0000000..a5744c1 Binary files /dev/null and b/textures/Poly-cobblestone-wall/ao_map.avif differ diff --git a/textures/Poly-cobblestone-wall/color_map.avif b/textures/Poly-cobblestone-wall/color_map.avif new file mode 100644 index 0000000..0ce74fd Binary files /dev/null and b/textures/Poly-cobblestone-wall/color_map.avif differ diff --git a/textures/Poly-cobblestone-wall/displacement_map.avif b/textures/Poly-cobblestone-wall/displacement_map.avif new file mode 100644 index 0000000..b88789a Binary files /dev/null and b/textures/Poly-cobblestone-wall/displacement_map.avif differ diff --git a/textures/Poly-cobblestone-wall/normal_map_opengl.avif b/textures/Poly-cobblestone-wall/normal_map_opengl.avif new file mode 100644 index 0000000..4209995 Binary files /dev/null and b/textures/Poly-cobblestone-wall/normal_map_opengl.avif differ diff --git a/textures/Poly-cobblestone-wall/render_map.avif b/textures/Poly-cobblestone-wall/render_map.avif new file mode 100644 index 0000000..c7b9202 Binary files /dev/null and b/textures/Poly-cobblestone-wall/render_map.avif differ diff --git a/textures/Poly-cobblestone-wall/roughness_map.avif b/textures/Poly-cobblestone-wall/roughness_map.avif new file mode 100644 index 0000000..3f21bd7 Binary files /dev/null and b/textures/Poly-cobblestone-wall/roughness_map.avif differ diff --git a/textures/Poly-wood/ao_map.avif b/textures/Poly-wood/ao_map.avif new file mode 100644 index 0000000..cbcce1f Binary files /dev/null and b/textures/Poly-wood/ao_map.avif differ diff --git a/textures/Poly-wood/color_map.avif b/textures/Poly-wood/color_map.avif new file mode 100644 index 0000000..cc572e8 Binary files /dev/null and b/textures/Poly-wood/color_map.avif differ diff --git a/textures/Poly-wood/displacement_map.avif b/textures/Poly-wood/displacement_map.avif new file mode 100644 index 0000000..8822b6a Binary files /dev/null and b/textures/Poly-wood/displacement_map.avif differ diff --git a/textures/Poly-wood/normal_map_opengl.avif b/textures/Poly-wood/normal_map_opengl.avif new file mode 100644 index 0000000..e897ca4 Binary files /dev/null and b/textures/Poly-wood/normal_map_opengl.avif differ diff --git a/textures/Poly-wood/render_map.avif b/textures/Poly-wood/render_map.avif new file mode 100644 index 0000000..e1e2325 Binary files /dev/null and b/textures/Poly-wood/render_map.avif differ diff --git a/textures/Poly-wood/roughness_map.avif b/textures/Poly-wood/roughness_map.avif new file mode 100644 index 0000000..e616478 Binary files /dev/null and b/textures/Poly-wood/roughness_map.avif differ diff --git a/textures/angled-blocks-vegetation/albedo.avif b/textures/angled-blocks-vegetation/albedo.avif new file mode 100644 index 0000000..0ac7205 Binary files /dev/null and b/textures/angled-blocks-vegetation/albedo.avif differ diff --git a/textures/angled-blocks-vegetation/ao-roughness-metalness.avif b/textures/angled-blocks-vegetation/ao-roughness-metalness.avif new file mode 100644 index 0000000..fa3dd64 Binary files /dev/null and b/textures/angled-blocks-vegetation/ao-roughness-metalness.avif differ diff --git a/textures/angled-blocks-vegetation/ao.avif b/textures/angled-blocks-vegetation/ao.avif new file mode 100644 index 0000000..10a346f Binary files /dev/null and b/textures/angled-blocks-vegetation/ao.avif differ diff --git a/textures/angled-blocks-vegetation/height.avif b/textures/angled-blocks-vegetation/height.avif new file mode 100644 index 0000000..7c4f62a Binary files /dev/null and b/textures/angled-blocks-vegetation/height.avif differ diff --git a/textures/angled-blocks-vegetation/metallic.avif b/textures/angled-blocks-vegetation/metallic.avif new file mode 100644 index 0000000..5c5985e Binary files /dev/null and b/textures/angled-blocks-vegetation/metallic.avif differ diff --git a/textures/angled-blocks-vegetation/normal-dx.avif b/textures/angled-blocks-vegetation/normal-dx.avif new file mode 100644 index 0000000..b4a764b Binary files /dev/null and b/textures/angled-blocks-vegetation/normal-dx.avif differ diff --git a/textures/angled-blocks-vegetation/roughness.avif b/textures/angled-blocks-vegetation/roughness.avif new file mode 100644 index 0000000..270022a Binary files /dev/null and b/textures/angled-blocks-vegetation/roughness.avif differ diff --git a/textures/calm-sea-skybox/bk.avif b/textures/calm-sea-skybox/bk.avif new file mode 100644 index 0000000..81b59dd Binary files /dev/null and b/textures/calm-sea-skybox/bk.avif differ diff --git a/textures/calm-sea-skybox/dn.avif b/textures/calm-sea-skybox/dn.avif new file mode 100644 index 0000000..49cba5b Binary files /dev/null and b/textures/calm-sea-skybox/dn.avif differ diff --git a/textures/calm-sea-skybox/ft.avif b/textures/calm-sea-skybox/ft.avif new file mode 100644 index 0000000..e5aed5e Binary files /dev/null and b/textures/calm-sea-skybox/ft.avif differ diff --git a/textures/calm-sea-skybox/lf.avif b/textures/calm-sea-skybox/lf.avif new file mode 100644 index 0000000..89c1916 Binary files /dev/null and b/textures/calm-sea-skybox/lf.avif differ diff --git a/textures/calm-sea-skybox/rt.avif b/textures/calm-sea-skybox/rt.avif new file mode 100644 index 0000000..37960fc Binary files /dev/null and b/textures/calm-sea-skybox/rt.avif differ diff --git a/textures/calm-sea-skybox/up.avif b/textures/calm-sea-skybox/up.avif new file mode 100644 index 0000000..1a5726c Binary files /dev/null and b/textures/calm-sea-skybox/up.avif differ diff --git a/textures/waternormals.avif b/textures/waternormals.avif new file mode 100644 index 0000000..0bf09d0 Binary files /dev/null and b/textures/waternormals.avif differ