diff --git a/image/sinners/以实玛利.png b/image/sinners/以实玛利.png deleted file mode 100644 index 1739a73..0000000 Binary files a/image/sinners/以实玛利.png and /dev/null differ diff --git a/image/sinners/堂吉诃德.png b/image/sinners/堂吉诃德.png deleted file mode 100644 index 76cc32d..0000000 Binary files a/image/sinners/堂吉诃德.png and /dev/null differ diff --git a/image/sinners/奥提斯.png b/image/sinners/奥提斯.png deleted file mode 100644 index 2009029..0000000 Binary files a/image/sinners/奥提斯.png and /dev/null differ diff --git a/image/sinners/希斯克利夫.png b/image/sinners/希斯克利夫.png deleted file mode 100644 index 70ebc96..0000000 Binary files a/image/sinners/希斯克利夫.png and /dev/null differ diff --git a/image/sinners/格里高尔.png b/image/sinners/格里高尔.png deleted file mode 100644 index ccb295b..0000000 Binary files a/image/sinners/格里高尔.png and /dev/null differ diff --git a/image/sinners/浮士德.png b/image/sinners/浮士德.png deleted file mode 100644 index 72f1822..0000000 Binary files a/image/sinners/浮士德.png and /dev/null differ diff --git a/image/sinners/罗佳.png b/image/sinners/罗佳.png deleted file mode 100644 index b8d307d..0000000 Binary files a/image/sinners/罗佳.png and /dev/null differ diff --git a/image/sinners/良秀.png b/image/sinners/良秀.png deleted file mode 100644 index e495122..0000000 Binary files a/image/sinners/良秀.png and /dev/null differ diff --git a/image/sinners/辛克莱.png b/image/sinners/辛克莱.png deleted file mode 100644 index cac94d3..0000000 Binary files a/image/sinners/辛克莱.png and /dev/null differ diff --git a/image/sinners/鸿璐.png b/image/sinners/鸿璐.png deleted file mode 100644 index 0a7fd51..0000000 Binary files a/image/sinners/鸿璐.png and /dev/null differ diff --git a/image/sinners/默尔索.png b/image/sinners/默尔索.png deleted file mode 100644 index b3e97b2..0000000 Binary files a/image/sinners/默尔索.png and /dev/null differ diff --git a/images/egos/don_quixote_ego.png b/images/egos/don_quixote_ego.png new file mode 100644 index 0000000..480d5ad Binary files /dev/null and b/images/egos/don_quixote_ego.png differ diff --git a/images/egos/faust_ego.png b/images/egos/faust_ego.png new file mode 100644 index 0000000..182579f Binary files /dev/null and b/images/egos/faust_ego.png differ diff --git a/images/egos/gregor_ego.png b/images/egos/gregor_ego.png new file mode 100644 index 0000000..2462ef3 Binary files /dev/null and b/images/egos/gregor_ego.png differ diff --git a/images/egos/heathcliff_ego.png b/images/egos/heathcliff_ego.png new file mode 100644 index 0000000..8643c2d Binary files /dev/null and b/images/egos/heathcliff_ego.png differ diff --git a/images/egos/honglu_ego.png b/images/egos/honglu_ego.png new file mode 100644 index 0000000..b6d8416 Binary files /dev/null and b/images/egos/honglu_ego.png differ diff --git a/images/egos/ishmael_ego.png b/images/egos/ishmael_ego.png new file mode 100644 index 0000000..eb79f96 Binary files /dev/null and b/images/egos/ishmael_ego.png differ diff --git a/images/egos/meursault_ego.png b/images/egos/meursault_ego.png new file mode 100644 index 0000000..9fac77e Binary files /dev/null and b/images/egos/meursault_ego.png differ diff --git a/images/egos/outis_ego.png b/images/egos/outis_ego.png new file mode 100644 index 0000000..425332a Binary files /dev/null and b/images/egos/outis_ego.png differ diff --git a/images/egos/rodya_ego.png b/images/egos/rodya_ego.png new file mode 100644 index 0000000..6b13292 Binary files /dev/null and b/images/egos/rodya_ego.png differ diff --git a/images/egos/sinclair_ego.png b/images/egos/sinclair_ego.png new file mode 100644 index 0000000..0c0c9ed Binary files /dev/null and b/images/egos/sinclair_ego.png differ diff --git a/images/egos/yoshihide_ego.png b/images/egos/yoshihide_ego.png new file mode 100644 index 0000000..a69f827 Binary files /dev/null and b/images/egos/yoshihide_ego.png differ diff --git a/images/sinners/dante.png b/images/sinners/dante.png new file mode 100644 index 0000000..af28e78 Binary files /dev/null and b/images/sinners/dante.png differ diff --git a/images/sinners/don_quixote.png b/images/sinners/don_quixote.png new file mode 100644 index 0000000..f987ae5 Binary files /dev/null and b/images/sinners/don_quixote.png differ diff --git a/images/sinners/faust.png b/images/sinners/faust.png new file mode 100644 index 0000000..d1a0cd4 Binary files /dev/null and b/images/sinners/faust.png differ diff --git a/images/sinners/gregor.png b/images/sinners/gregor.png new file mode 100644 index 0000000..33ed380 Binary files /dev/null and b/images/sinners/gregor.png differ diff --git a/images/sinners/heathcliff.png b/images/sinners/heathcliff.png new file mode 100644 index 0000000..0cc85f0 Binary files /dev/null and b/images/sinners/heathcliff.png differ diff --git a/images/sinners/honglu.png b/images/sinners/honglu.png new file mode 100644 index 0000000..8595a21 Binary files /dev/null and b/images/sinners/honglu.png differ diff --git a/images/sinners/ishmael.png b/images/sinners/ishmael.png new file mode 100644 index 0000000..2959504 Binary files /dev/null and b/images/sinners/ishmael.png differ diff --git a/images/sinners/meursault.png b/images/sinners/meursault.png new file mode 100644 index 0000000..ae8bf40 Binary files /dev/null and b/images/sinners/meursault.png differ diff --git a/images/sinners/outis.png b/images/sinners/outis.png new file mode 100644 index 0000000..c37de91 Binary files /dev/null and b/images/sinners/outis.png differ diff --git a/images/sinners/rodya.png b/images/sinners/rodya.png new file mode 100644 index 0000000..bd73ac2 Binary files /dev/null and b/images/sinners/rodya.png differ diff --git a/images/sinners/sinclair.png b/images/sinners/sinclair.png new file mode 100644 index 0000000..c244e72 Binary files /dev/null and b/images/sinners/sinclair.png differ diff --git a/images/sinners/sinners.png b/images/sinners/sinners.png new file mode 100644 index 0000000..bd73ac2 Binary files /dev/null and b/images/sinners/sinners.png differ diff --git a/images/sinners/yisang.png b/images/sinners/yisang.png new file mode 100644 index 0000000..82f4d40 Binary files /dev/null and b/images/sinners/yisang.png differ diff --git a/images/sinners/yoshihide.png b/images/sinners/yoshihide.png new file mode 100644 index 0000000..65dd666 Binary files /dev/null and b/images/sinners/yoshihide.png differ diff --git a/index.html b/index.html index 2e23fdd..15af7c0 100644 --- a/index.html +++ b/index.html @@ -190,9 +190,10 @@ - + diff --git a/matching-game.html b/matching-game.html index 21c218c..81635a5 100644 --- a/matching-game.html +++ b/matching-game.html @@ -97,7 +97,7 @@ background-color: rgba(42, 42, 42, 0.8); border: 2px solid var(--secondary-color); border-radius: 10px; - max-width: 500px; + max-width: 1000px; transition: all 0.3s ease; } @@ -110,8 +110,8 @@ .sinner-image-wrapper { position: relative; - width: 200px; - height: 200px; + width: 400px; + height: 600px; border-radius: 10px; overflow: hidden; border: 1px solid rgba(255, 215, 0, 0.3); @@ -127,19 +127,19 @@ .sinner-image { width: 100%; height: 100%; - object-fit: cover; + object-fit: contain; } .ego-image-wrapper { position: relative; - width: 200px; - height: 200px; + width: 400px; + height: 600px; border-radius: 10px; overflow: hidden; border: 1px solid rgba(255, 215, 0, 0.3); transition: all 0.3s ease; cursor: pointer; - opacity: 0.5; + opacity: 0; } .ego-image-wrapper:hover { @@ -450,19 +450,19 @@ + + \ No newline at end of file diff --git a/test.py b/test.py new file mode 100644 index 0000000..5c01fd8 --- /dev/null +++ b/test.py @@ -0,0 +1,58 @@ +import os +import json + +# 设置基础路径 - 根据你的实际路径修改 +base_path = "D:/progarm/python/084PlayHtml/images" + +# 定义罪人数据 - 从你的gameData中提取的imgName +sinners = [ + "yisang", + "faust", + "don_quixote", + "yoshihide", + "meursault", + "honglu", + "heathcliff", + "ishmael", + "rodya", + "dante", + "sinclair", + "outis", + "gregor" +] + +# 初始化结果列表 +result = [] + +# 遍历每个罪人 +for sinner in sinners: + dir_path = os.path.join(base_path, sinner) + + # 检查目录是否存在 + if os.path.isdir(dir_path): + # 获取目录中的所有PNG图片 + images = [] + for file_name in os.listdir(dir_path): + if file_name.endswith('.webp'): # 如果不是PNG,修改这里 + # 计算相对路径 + relative_path = f"images/{sinner}/{file_name}" + + images.append({ + "name": os.path.splitext(file_name)[0], + "path": relative_path + }) + + # 添加到结果列表 + result.append({ + "name": sinner, + "images": images + }) + else: + print(f"警告: 目录不存在: {dir_path}") + +# 保存为JSON文件 +json_path = os.path.join(base_path, "sinner_images.json") +with open(json_path, "w", encoding="utf-8") as f: + json.dump(result, f, indent=2, ensure_ascii=False) + +print(f"JSON文件已生成: {json_path}")