├── .gitignore ├── LICENSE └── README.md /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | .vscode/* 3 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2023 VonBrank 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 |
2 | Logo 3 | 4 |

GAMES202 Assignment Framework with TypeScript Support

5 | 6 |

7 | 【GAMES202】 × 【Vite + TypeScript】 8 |

9 |
10 | 11 | ## 关于本项目 12 | 13 | [《GAMES202:高质量实时渲染》](https://games-cn.org/games202/)是由闫令琪老师开设的计算机图形学进阶课程。 14 | 15 | GAMES202 课程作业大都基于 [WebGL](https://developer.mozilla.org/zh-CN/docs/Web/API/WebGL_API) 实现。得益于 WebGL 简单易用的特点,这免去了我们手动配置 OpenGL 的麻烦。 16 | 17 | 然而原代码框架使用传统 Web 前端技术与原生 JavaScript 进行编写,缺乏代码提示与静态检查,使得完成作业、调试 bug 较为困难。 18 | 19 | 因此本项目针对 [GAMES202 官方作业代码框架](https://games-cn.org/forums/topic/games202zuoyehuizong/)进行简单修改,将原代码框架迁移至 [TypeScript](https://www.tslang.cn/),使用 [Vite](https://vitejs.dev/) 进行打包,并引入 [ES Module](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Modules) 模块化,同时实现类型声明与静态检查,期望能提升开发体验。 20 | 21 |
22 | JS to TS 23 |
24 | 25 | ## 获取代码框架 26 | 27 | 下表列出了迁移进度,你可以直接点击链接转跳到对应分支浏览并下载代码框架,也可以直接使用 `git clone -b ` 指令下载对应分支代码。 28 | 29 | | | 题目 | 现状 | 30 | | :--: | :-------------------------------------: | :----------------------------------------------------------: | 31 | | 00 | WebGL 框架的使用与 Blinn-Phong 着色模型 | [可用](https://github.com/vonbrank/GAMES202-Assignment-Framework-with-TypeScript-Support/tree/assignment-00) | 32 | | 01 | 实时阴影 | [可用](https://github.com/vonbrank/GAMES202-Assignment-Framework-with-TypeScript-Support/tree/assignment-01) | 33 | | 02 | Precomputed Radiance Transfer | [可用](https://github.com/vonbrank/GAMES202-Assignment-Framework-with-TypeScript-Support/tree/assignment-02) | 34 | | 03 | Screen Space Ray Tracing | [可用](https://github.com/vonbrank/GAMES202-Assignment-Framework-with-TypeScript-Support/tree/assignment-03) | 35 | | 04 | Kulla-Conty BRDF | 计划中 | 36 | | 05 | 实时光线追踪降噪 | 暂无计划
(毕竟这次作业要用C++) | 37 | 38 | ## 使用方法 39 | 40 | + 安装 Node.js 41 | 42 | + 在项目文件夹安装依赖项(只需要装一次): 43 | 44 | ```bash 45 | npm install 46 | # 或者(如果你装了 yarn) 47 | yarn install 48 | ``` 49 | 50 | + 运行项目: 51 | 52 | ```bash 53 | npm run dev 54 | # 或者 55 | yarn dev 56 | ``` 57 | 58 | + 根据终端提示访问对应 URL 查看效果。 59 | 60 |
61 | JS to TS 62 |
63 | --------------------------------------------------------------------------------