Repository navigation
Living four-season 3D growth garden - #13
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 90e2ea595f
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| const intersection=new IntersectionObserver(entries=>{inView=entries[0].isIntersecting;if(inView){last=0;dirty=true;start()}else{cancelAnimationFrame(frame);frame=0}},{threshold:.02});intersection.observe(element); | ||
| const onVisibility=()=>{visible=!document.hidden;if(visible){last=0;start()}else{cancelAnimationFrame(frame);frame=0}}; | ||
| const onPointer=(e:PointerEvent)=>{if(e.pointerType!=="mouse"||control.current.paused)return;const rect=element.getBoundingClientRect();pointer.x=((e.clientX-rect.left)/rect.width-.5)*.85;pointer.y=((e.clientY-rect.top)/rect.height-.5)*.3;}; | ||
| const lost=(e:Event)=>{e.preventDefault();cancelAnimationFrame(frame);frame=0;setStatus("fallback")}; |
There was a problem hiding this comment.
Restart rendering after WebGL context restoration
When a temporary WebGL context loss occurs, such as after mobile GPU memory pressure, this handler cancels the only animation frame and changes the status to the fallback state, but no webglcontextrestored listener restarts the loop or returns the status to ready. Although Three.js can rebuild its renderer state after restoration, the garden consequently remains frozen and covered by the fallback message; a restoration handler should mark the scene dirty, restore the status, and call start().
Useful? React with 👍 / 👎.
Add two procedural 3D trees on a floating island, a luminous sun and orbital rings, seasonal foliage, rain, falling leaves, snow and particles. Add automatic/manual season controls, pause, reduced motion, offscreen suspension, mobile budgets and cleanup. Keep growth records and publishing unchanged. Reuse the installed Three.js version; no new dependency or external asset.