diff --git a/.github/workflows/archive-check.yml b/.github/workflows/archive-check.yml index bf11983..433f16a 100644 --- a/.github/workflows/archive-check.yml +++ b/.github/workflows/archive-check.yml @@ -50,7 +50,7 @@ jobs: sudo apt-get install -y fonts-noto-cjk npm install --prefix "$RUNNER_TEMP/gallery-tools" --no-package-lock --no-save sharp@0.35.4 playwright@1.63.0 "$RUNNER_TEMP/gallery-tools/node_modules/.bin/playwright" install --with-deps chromium - - name: Check all styles and camera interactions in cloud Chromium + - name: Check realistic seasons, attachments and camera interactions in cloud Chromium run: node scripts/garden-browser-check.mjs env: GALLERY_TOOLS_DIR: ${{ runner.temp }}/gallery-tools diff --git a/app/garden/SeasonGarden.tsx b/app/garden/SeasonGarden.tsx index 229cc5c..508709c 100644 --- a/app/garden/SeasonGarden.tsx +++ b/app/garden/SeasonGarden.tsx @@ -2,12 +2,11 @@ import {useEffect,useRef,useState} from "react"; import {NEW_NOTE} from "../shared/archive"; import {SEASONS,SEASON_DURATION_SECONDS,sampleSeason} from "./seasons.mjs"; import "./garden.css"; -const STYLES=[{id:"real",name:"写实",description:"自然光 · 真实纹理"},{id:"anime",name:"动漫",description:"赛璐璐 · 明快色层"},{id:"ink",name:"水墨",description:"淡墨远山 · 宣纸留白"}]; export default function SeasonGarden(){ const host=useRef(null); - const control=useRef({elapsed:0,automatic:true,paused:false,style:"real",revision:0,reset:0}); + const control=useRef({elapsed:0,automatic:true,paused:false,revision:0,reset:0}); const [season,setSeason]=useState(sampleSeason(0)); - const [automatic,setAutomatic]=useState(true),[paused,setPaused]=useState(false),[style,setStyle]=useState("real"); + const [automatic,setAutomatic]=useState(true),[paused,setPaused]=useState(false); const [status,setStatus]=useState("loading"),[retry,setRetry]=useState(0); useEffect(()=>{ let disposed=false,cleanup=()=>{}; @@ -64,7 +63,6 @@ export default function SeasonGarden(){ if(!c.paused){time+=dt;if(c.automatic)c.elapsed+=dt;} if(c.revision!==previousRevision){ previousRevision=c.revision;dirty=true;renderer.shadowMap.needsUpdate=true; - if(world.style!==c.style){model.setGardenStyle(world,c.style);presentation.setStyle(c.style);} if(c.reset!==previousReset){previousReset=c.reset;home();} } orbit.enableDamping=!c.paused&&!reduce.matches; @@ -109,13 +107,11 @@ export default function SeasonGarden(){ },[retry]); function change(values:Partial){Object.assign(control.current,values);control.current.revision++;host.current?.dispatchEvent(new Event("garden-control"));} function select(i:number){const elapsed=i*SEASON_DURATION_SECONDS;setSeason(sampleSeason(elapsed));setAutomatic(false);change({elapsed,automatic:false});} - function chooseStyle(id:string){setStyle(id);change({style:id});} - return <>
+ return <>