Skip to content

fix: 修复非欧几何球面生命游戏预览入口 404#185

Merged
miuchan merged 1 commit into
masterfrom
codex/bug
Feb 24, 2026
Merged

fix: 修复非欧几何球面生命游戏预览入口 404#185
miuchan merged 1 commit into
masterfrom
codex/bug

Conversation

@miuchan
Copy link
Copy Markdown
Owner

@miuchan miuchan commented Feb 24, 2026

Motivation

  • 修复用户反馈的预览入口 not found 问题,使 /demo/game-of-life/non-euclidean/index.html 能正确跳转到实际页面。
  • 确保球面生命游戏在无法访问外部 CDN(如 esm.sh / unpkg)的网络环境下仍能正常运行。

Description

  • 新增重定向入口 demo/game-of-life/non-euclidean/index.html,通过 meta refresh + window.location.replace 双保险跳转到 /public/demo/game-of-life/non-euclidean/index.html
  • public/demo/game-of-life/non-euclidean/sphere-life.js 从依赖 Three.js/OrbitControls 的实现替换为纯 Canvas 2D 实现,保留按经纬划分网格、球面邻接关系与 B3/S23 规则等核心算法。
  • 在新实现中加入交互与渲染改进:自动旋转、拖拽旋转、滚轮缩放、响应式 resize 以及对缺失 Canvas 的早期报错保护。

Testing

  • 在修改后运行 node --check public/demo/game-of-life/non-euclidean/sphere-life.js,语法检查通过。
  • 启动静态服务并使用 curl 验证两个路径返回 200:/public/game-of-life/non-euclidean/index.html/demo/game-of-life/non-euclidean/index.html
  • 使用 Playwright 访问 http://127.0.0.1:8000/demo/game-of-life/non-euclidean/index.html 并截图,页面主体渲染与交互正常,控制台仅记录与页面主体无关的 404 资源提示;截图已生成作为验证工件。

Codex Task

@miuchan miuchan merged commit f10d15d into master Feb 24, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant