From 0c64c67f1560f80166617598c7a7e3701d48e009 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=91=E5=B0=8F=E9=B8=A6?= <61354956+crowya@users.noreply.github.com> Date: Fri, 28 Jul 2023 12:30:02 +0800 Subject: [PATCH] =?UTF-8?q?=E6=A8=A1=E5=9E=8B=E5=8F=AF=E4=BB=A5=E7=99=BD?= =?UTF-8?q?=E5=A4=9C=E5=88=87=E6=8D=A2=E4=BA=86=EF=BC=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- live2d/waifu-tips.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/live2d/waifu-tips.js b/live2d/waifu-tips.js index 8971d6d..884b741 100644 --- a/live2d/waifu-tips.js +++ b/live2d/waifu-tips.js @@ -190,8 +190,13 @@ function loadWidget() { modelTexturesId = localStorage.getItem("modelTexturesId"); if (modelId === null) { // 首次访问加载 指定模型 的 指定材质 - modelId = 0; // 模型 ID - modelTexturesId = 0; // 材质 ID + const now = new Date(); + if(now.getHours()>=22 || now.getHours()<7){ + modelId = 1; // 夜间模型ID + }else{ + modelId = 0; // 白天模型ID + } + modelTexturesId = 0; // 材质ID } loadModel(modelId, modelTexturesId); fetch(`${live2d_path}waifu-tips.json`)