Compare commits

...

23 Commits

Author SHA1 Message Date
1b8e4b2676 little fixes 2024-03-13 03:18:35 +01:00
dd8361cf33 - new loading screen
- huge loading time reducing by simplifiying ocean
2024-03-13 02:29:02 +01:00
4f20dce37f loading circle before instructions 2024-02-26 23:59:36 +01:00
eb36acac39 fov 2024-02-24 15:14:35 +01:00
ebe7c41578 use webp textures 2024-02-22 23:18:34 +01:00
97172aedf3 use cdn.jsdelivr.net 2024-02-22 23:16:43 +01:00
6ddf3b2949 use avif to reduce textures size 2024-02-19 15:18:55 +01:00
4722783018 remove hex tiling 2023-11-20 01:44:03 +01:00
96d485aabb format 2023-11-20 00:30:56 +01:00
d53b6a97c9 rename pressedMouseButtons 2023-11-18 16:33:38 +01:00
eb5b39529a combine ao roughness and metalness maps in one file for ground material 2023-11-18 16:31:40 +01:00
af8fdfd30e cleanup 2023-11-18 15:49:36 +01:00
2adbecea71 cleanup 2023-11-18 15:49:35 +01:00
a0b2aa96ad use three-hex-tiling for ground material 2023-11-18 12:45:50 +01:00
cb1b0bb541 import hexTiling 2023-11-18 11:38:19 +01:00
6e51b2f115 fix favicon and click 2023-10-15 09:50:36 +02:00
738e92c16b "you are here" in favicon (idea from Yves) 2023-10-11 20:44:26 +02:00
938160f053 deeper ground 2023-08-09 20:46:26 +02:00
75a173d0af threejs V155 2023-07-30 15:01:43 +02:00
3bb43edcee cursor 2023-07-30 14:32:25 +02:00
b318adb469 learn to swim 2023-07-29 17:46:07 +02:00
cee4d886c0 new texture again 2023-07-28 22:35:12 +02:00
cd313b363c tunning 2023-07-28 19:12:02 +02:00
69 changed files with 535 additions and 571 deletions

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
textures/old/

BIN
favicon.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 762 B

View File

@ -2,43 +2,15 @@
header('Content-Type: image/x-icon');
const SIZE = 16;
const WALL = 1;
const GROUND = 0;
$favicon = imagecreatetruecolor(SIZE, SIZE);
$wallColor = imagecolorallocate($favicon, 165, 80, 30);
$groundColor = imagecolorallocate($favicon, 203, 162, 133);
$x = filter_input(INPUT_GET, "x", FILTER_SANITIZE_NUMBER_INT);
$y = filter_input(INPUT_GET, "y", FILTER_SANITIZE_NUMBER_INT);
imagefill($favicon, 0, 0, $wallColor);
$favicon = imagecreatefrombmp("favicon.ico");
$maze = array();
for ($y = 0; $y < SIZE; $y++) {
$maze[$y] = array();
for ($x = 0; $x < SIZE; $x++) {
$maze[$y][$x] = WALL;
}
}
$red = imagecolorallocate($favicon, 255, 0, 0);
imagesetpixel($favicon, $x, $y, $red);
function dig($position) {
global $maze;
global $favicon;
global $groundColor;
$directions = [[0, 1], [0, -1], [1, 0], [-1, 0]];
shuffle($directions);
foreach ($directions as $direction) {
$step1 = [$position[0] + $direction[0], $position[1] + $direction[1]];
$step2 = [$step1[0] + $direction[0], $step1[1] + $direction[1]];
if (0 <= $step2[1] and $step2[1] < SIZE and 0 <= $step2[0] and $step2[0] < SIZE and $maze[$step2[1]][$step2[0]] == WALL) {
$maze[$step1[1]][$step1[0]] = GROUND;
imagesetpixel($favicon, $step1[0], $step1[1], $groundColor);
$maze[$step2[1]][$step2[0]] = GROUND;
imagesetpixel($favicon, $step2[0], $step2[1], $groundColor);
dig($step2);
}
}
}
dig([1, 1]);
imagebmp($favicon);
imagedestroy($favicon);
?>

View File

@ -1,19 +1,20 @@
<!DOCTYPE html>
<html lang="fr">
<head>
<title>Daedalus</title>
<meta charset=utf-8 />
<title>Daedalus</title>
<meta name="viewport" content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">
<link rel="shortcut icon" type="image/x-icon" href="favicon.php"/>
<link rel="shortcut icon" type="image/x-icon" href="favicon.ico" id="favicon"/>
<link rel="stylesheet" href="style.css">
<!-- Import maps polyfill -->
<!-- Remove this when import maps will be widely supported -->
<script async src="https://unpkg.com/es-module-shims@1.6.3/dist/es-module-shims.js"></script>
<script async src="https://cdn.jsdelivr.net/npm/es-module-shims@1.8.3/dist/es-module-shims.min.js"></script>
<script type="importmap">
{
"imports": {
"three": "https://unpkg.com/three@0.154/build/three.module.js?module",
"three/addons/": "https://unpkg.com/three@0.154/examples/jsm/"
"three": "https://cdn.jsdelivr.net/npm/three@0.161.0/build/three.module.min.js",
"three/addons/": "https://cdn.jsdelivr.net/npm/three@0.161.0/examples/jsm/",
"three-hex-tiling": "https://cdn.jsdelivr.net/npm/three-hex-tiling@0.1.1/dist/index.js"
}
}
</script>
@ -142,15 +143,17 @@
</script>
</head>
<body>
<div id="container"></div>
<span id="message" class="loading">
<div id="loading">
<table id="labyTable"></table>
<div id="loadingMessage">Construction du labyrinthe : <span id="progress">0</span>%</div>
<div>
Se déplacer : ↑←↓→, ZQSD ou clic<br/>
Sauter : ESPACE<br/>
Regarder : Souris
</div>
<div id="progressCircle" style="--progress: 0deg;">0%</div>
</span>
</div>
<div id="container"></div>
<span id="message"></span>
<script type="module" src="./main.js"></script>
</body>

895
main.js

File diff suppressed because it is too large Load Diff

View File

@ -1,9 +1,47 @@
body {
margin: 0;
background-color: #000;
color: #fff;
font-family: Georgia, serif;
background-color: #041626;
font-size: 1.3em;
overscroll-behavior: none;
cursor: wait;
}
#loading {
width: fit-content;
color: #2c5c88;
font-size: 1.3em;
top: 20vh;
margin: auto;
}
#loadingMessage {
margin-bottom: 0.5em;
}
#labyTable {
width: 230px;
height: 230px;
margin-left: auto;
margin-right: auto;
margin-top: 20vh;
margin-bottom: 5vh;
border-collapse: collapse;
}
#labyTable td {
width: 10px;
height: 10px;
transition: background-color 1s;
border: 0;
padding: 0;
}
.wall {
background-color: transparent;
}
.ground {
background-color: #214464;
}
#container {
@ -32,58 +70,18 @@ body {
justify-content: center;
z-index: 1;
color: gray;
}
#message.loading {
display: flex;
flex-direction: column;
top: 20vh;
width: 100%;
margin: auto;
align-items: center;
gap: 5rem;
text-align: center;
font-size: 1.7em;
}
#progressCircle {
display: flex;
justify-content: center;
align-items: center;
position: relative;
width: 200px;
height: 200px;
border: 4px solid dimgray;
border-radius: 50%;
font-size: 0;
font-size: 3vh;
font-weight: 700;
font-family: system-ui;
text-align: center;
}
#progressCircle::after {
content: "";
display: flex;
position: absolute;
width: 200px;
height: 200px;
top: -4px;
left: -4px;
border: 4px solid #1da8b7;
border-radius: 50%;
mask: conic-gradient(black var(--progress), transparent var(--progress));
font-family: Times, "Times New Roman", Georgia, serif;
}
#message a {
text-decoration: none;
color: inherit;
}
#message.escaped {
display: flex;
display: block;
opacity: 100%;
font-size: 10vh;
font-size: 4vh;
text-align: center;
top: 30vh;
animation: escaped 5s;
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.8 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.3 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 209 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.7 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.4 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 324 KiB

View File

@ -1,20 +1,20 @@
{
"prompt_text": "stone retaining wall, extreme fine details",
"prompt_text": "cobblestone wall with grass and flowers between rocks",
"patch": {
"ext": "png",
"dtype": "uint8",
"width": 512,
"height": 512,
"url": "https://static-dev.withpoly.com/v3-voronoi/textures/patches/909585e0-8b3f-4659-ae84-03f58ceaaaeb.png",
"patch_id": "EbJzaafatu"
"url": "https://static-dev.withpoly.com/v3-voronoi/textures/patches/486f8eed-0dfd-4bdc-9dee-3776fc72b1f1.png",
"patch_id": "GVpEsGuQ8S"
},
"seamless_prompt_text": "stone retaining wall, extreme fine details",
"seamless_patch_scale": 0.8,
"upscale_prompt_text": "stone retaining wall, extreme fine details",
"seamless_prompt_text": "cobblestone wall with grass and flowers between rocks",
"seamless_patch_scale": 0.98,
"upscale_prompt_text": "cobblestone wall with grass and flowers between rocks",
"upscale_resolution": 4096,
"is_seamless": true,
"pbr_mode": "organic",
"pbr_generate_color": true,
"pbr_use_render_as_color": true,
"pbr_generate_normal": true,
"pbr_generate_height": true,
"pbr_generate_ao": true,

Binary file not shown.

Before

Width:  |  Height:  |  Size: 60 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 79 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 43 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 73 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 96 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 32 KiB

View File

@ -1,22 +0,0 @@
{
"prompt_text": "raft wood",
"patch": {
"ext": "png",
"dtype": "uint8",
"width": 512,
"height": 512,
"url": "https://static.withpoly.com/v3-voronoi/textures/patches/43d5b37f-e2e2-4f85-b2a9-b9135346748e.png",
"patch_id": "Td9yL3mXYo"
},
"seamless_prompt_text": "raft wood",
"seamless_patch_scale": 0.8,
"upscale_prompt_text": "raft wood",
"upscale_resolution": 1024,
"is_seamless": true,
"pbr_mode": "general",
"pbr_generate_color": true,
"pbr_generate_normal": true,
"pbr_generate_height": true,
"pbr_generate_ao": true,
"pbr_generate_roughness": true
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 497 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.3 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 828 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 372 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 595 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 542 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 184 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 803 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 475 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 128 KiB

View File

@ -0,0 +1,23 @@
{
"prompt_text": "wood, planks, wooden, green paint, painted wood, paint, scrathes, raw wood, peeling paint",
"patch": {
"ext": "png",
"dtype": "uint8",
"width": 512,
"height": 512,
"url": "https://static-dev.withpoly.com/v3-voronoi/textures/patches/0ddfc901-a5dd-40f0-993b-8de3ccefb7f7.png",
"patch_id": "a79eceALs5"
},
"seamless_prompt_text": "wood, planks, wooden, green paint, painted wood, paint, scrathes, raw wood, peeling paint",
"seamless_patch_scale": 0.8,
"upscale_prompt_text": "wood, planks, wooden, green paint, painted wood, paint, scrathes, raw wood, peeling paint",
"upscale_resolution": 4096,
"is_seamless": true,
"pbr_mode": "matte",
"pbr_generate_color": true,
"pbr_generate_normal": true,
"pbr_generate_height": true,
"pbr_generate_ao": true,
"pbr_generate_roughness": true,
"pbr_generate_metallic": false
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 566 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 76 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 60 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 61 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 160 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 52 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 69 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 98 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.0 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 556 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.6 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 79 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.6 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 MiB

BIN
textures/waternormals.webp Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 81 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 115 KiB