Skip to content

Commit 13bbbe5

Browse files
committed
docs: add comprehensive English README and reorganize documentation
- Added detailed English README (README.en.md) with full project documentation - Moved Chinese content to dedicated README.zh-CN.md file - Updated main README.md to serve as language selector - Expanded LICENSE file with complete PolyForm NonCommercial terms - Improved documentation organization and navigation between language versions - Added badges, links and consistent formatting across README files - Included detailed sections
1 parent ee618ac commit 13bbbe5

File tree

6 files changed

+420
-73
lines changed

6 files changed

+420
-73
lines changed

LICENSE

Lines changed: 48 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,56 @@
1-
RoadNet Visualizer
2-
31
SPDX-License-Identifier: PolyForm-Noncommercial-1.0.0
42

53
Copyright (c) 2025 RoadNet Visualizer Contributors
64

7-
This software is licensed under the PolyForm Noncommercial License 1.0.0.
5+
PolyForm Noncommercial License 1.0.0
6+
7+
Acceptance
8+
In order to get any license under these terms, you must agree to them as both strict obligations and conditions to all your licenses.
9+
10+
Copyright License
11+
The licensor grants you a copyright license for the software to do everything you might do with the software that would otherwise infringe the licensor’s copyright in it for any permitted purpose. However, you may only distribute the software according to Distribution License and make changes or new works based on the software according to Changes and New Works License.
12+
13+
Distribution License
14+
The licensor grants you an additional copyright license to distribute copies of the software. Your license to distribute covers distributing the software with changes and new works permitted by Changes and New Works License.
15+
16+
Notices
17+
You must ensure that anyone who gets a copy of any part of the software from you also gets a copy of these terms or the URL for them above, as well as copies of any plain-text lines beginning with Required Notice: that the licensor provided with the software. For example:
18+
19+
Required Notice: Copyright Yoyodyne, Inc. (http://example.com)
20+
21+
Changes and New Works License
22+
The licensor grants you an additional copyright license to make changes and new works based on the software for any permitted purpose.
23+
24+
Patent License
25+
The licensor grants you a patent license for the software that covers patent claims the licensor can license, or becomes able to license, that you would infringe by using the software.
26+
27+
Noncommercial Purposes
28+
Any noncommercial purpose is a permitted purpose.
29+
30+
Personal Uses
31+
Personal use for research, experiment, and testing for the benefit of public knowledge, personal study, private entertainment, hobby projects, amateur pursuits, or religious observance, without any anticipated commercial application, is use for a permitted purpose.
32+
33+
Noncommercial Organizations
34+
Use by any charitable organization, educational institution, public research organization, public safety or health organization, environmental protection organization, or government institution is use for a permitted purpose regardless of the source of funding or obligations resulting from the funding.
35+
36+
Fair Use
37+
You may have “fair use” rights for the software under the law. These terms do not limit them.
38+
39+
No Other Rights
40+
These terms do not allow you to sublicense or transfer any of your licenses to anyone else, or prevent the licensor from granting licenses to anyone else. These terms do not imply any other licenses.
841

9-
You may not use the software for commercial purposes.
10-
You may copy, modify, and redistribute the software for noncommercial purposes, provided that you include the required notices.
42+
Patent Defense
43+
If you make any written claim that the software infringes or contributes to infringement of any patent, your patent license for the software granted under these terms ends immediately. If your company makes such a claim, your patent license ends immediately for work on behalf of your company.
1144

12-
Full license text:
13-
https://polyformproject.org/licenses/noncommercial/1.0.0/
45+
Violations
46+
The first time you are notified in writing that you have violated any of these terms, or done anything with the software not covered by your licenses, your licenses can nonetheless continue if you come into full compliance with these terms, and take practical steps to correct past violations, within 32 days of receiving notice. Otherwise, all your licenses end immediately.
1447

15-
简体中文说明(非正式译文):
16-
- 仅允许在非商业目的下使用、复制、修改、分发本软件及其衍生作品;
17-
- 必须保留版权与许可证声明;
18-
- 严禁直接或间接商业用途;
19-
- 如需商业授权,请先取得版权所有者书面许可。
48+
No Liability
49+
As far as the law allows, the software comes as is, without any warranty or condition, and the licensor will not be liable to you for any damages arising out of these terms or the use or nature of the software, under any kind of legal claim.
2050

21-
This is a summary. The English text of the PolyForm Noncommercial License 1.0.0 at the link above is the only legally binding version.
51+
Definitions
52+
The licensor is the individual or entity offering these terms, and the software is the software the licensor makes available under these terms.
53+
You refers to the individual or entity agreeing to these terms.
54+
Your company is any legal entity, sole proprietorship, or other kind of organization that you work for, plus all organizations that have control over, are under the control of, or are under common control with that organization. Control means ownership of substantially all the assets of an entity, or the power to direct its management and policies by vote, contract, or otherwise. Control can be direct or indirect.
55+
Your licenses are all the licenses granted to you for the software under these terms.
56+
Use means anything you do with the software requiring one of your licenses.

README.en.md

Lines changed: 179 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,179 @@
1+
# RoadNet Visualizer
2+
3+
Multi-layer road network generator and visualizer built with Vite, PixiJS, and Web Workers. It supports path optimization (smoothing/orthogonalization), multi-layer navigation, interactive controls, export/share, and theming.
4+
5+
[中文文档 | Chinese README](./README.zh-CN.md)
6+
7+
[![Ask DeepWiki](https://deepwiki.com/badge.svg)](https://deepwiki.com/Duri686/RoadNetVisualizer)
8+
![Deploy](https://github.com/Duri686/RoadNetVisualizer/actions/workflows/deploy.yml/badge.svg?branch=main)
9+
![Node](https://img.shields.io/badge/node-%3E=20-339933?logo=node.js&logoColor=white)
10+
![Vite](https://img.shields.io/badge/vite-5-646CFF?logo=vite&logoColor=white)
11+
![PixiJS](https://img.shields.io/badge/PixiJS-7-blueviolet)
12+
![License](https://img.shields.io/badge/license-NonCommercial-orange)
13+
![Stars](https://img.shields.io/github/stars/Duri686/RoadNetVisualizer?style=social)
14+
15+
## Live Demo
16+
17+
- GitHub Pages: [RoadNet Visualizer Demo](https://duri686.github.io/RoadNetVisualizer/)
18+
- Desktop and mobile supported. Latest Chrome/Edge recommended.
19+
20+
## Table of Contents
21+
22+
- [Features](#features)
23+
- [Preview](#preview)
24+
- [Getting Started](#getting-started)
25+
- [Requirements](#requirements)
26+
- [Local Development](#local-development)
27+
- [Build & Deploy](#build--deploy)
28+
- [Core Concepts & Architecture](#core-concepts--architecture)
29+
- [Config Examples](#config-examples)
30+
- [Roadmap](#roadmap)
31+
- [Contributing](#contributing)
32+
- [FAQ](#faq)
33+
- [License](#license)
34+
- [Acknowledgments](#acknowledgments)
35+
36+
## Features
37+
38+
- Multi-layer road networks
39+
Centroid network, portal midpoints, Voronoi skeleton (experimental)
40+
- Path planning and optimization
41+
A* pathfinding; smoothing and orthogonalization; timing metrics
42+
- Interaction and navigation
43+
Zoom, pan, node picking, layer toggles, canvas navigation controls
44+
- Export and sharing
45+
One-click export and share
46+
- Mobile friendly
47+
Better touch experience
48+
- Performance & observability
49+
Index building, render init/total time, data size metrics
50+
- Themes & styles
51+
Dark/monochrome themes, componentized style system
52+
- Docs & help
53+
DeepWiki integration for quick knowledge lookup
54+
55+
## Preview
56+
57+
![Path Demo](docs/images/showPath.gif)
58+
![Overview](docs/images/overview.png)
59+
![Live Path Preview](docs/images/PathPreview.png)
60+
![Path Dynamic Planning](docs/images/PathDynamicPlanning.png)
61+
62+
## Getting Started
63+
64+
### Requirements
65+
66+
- Node.js >= 20
67+
- Package manager: Yarn (via Corepack)
68+
- Browser: modern Chrome/Edge
69+
70+
### Local Development
71+
72+
```bash
73+
corepack enable
74+
yarn install --immutable
75+
76+
# Start dev server
77+
yarn dev
78+
79+
# Build
80+
yarn build
81+
82+
# Preview (after build)
83+
yarn preview
84+
```
85+
86+
### Build & Deploy
87+
88+
- GitHub Pages workflow: `.github/workflows/deploy.yml`
89+
- Push to `main` triggers build and deploy of `dist/` to GitHub Pages
90+
- Vite `base: './'` is configured for sub-path and Pages compatibility
91+
92+
## Core Concepts & Architecture
93+
94+
- Multi-layer network building
95+
- Centroid network: skeleton nodes from regions/grids
96+
- Portal midpoints: cross-partition connections
97+
- Voronoi skeleton (experimental): alternative representation using Voronoi edges/points
98+
- Path planning & optimization
99+
- Pathfinding: A*
100+
- Optimization: smoothing, orthogonalization for straighter, smoother lines
101+
- Metrics: timing breakdown for pathfinding and optimization
102+
- Rendering & interaction
103+
- Rendering: PixiJS (WebGL)
104+
- Interaction: zoom/pan, node picking, layer toggles, canvas navigation controls
105+
- Animation: moving ball along path
106+
- Concurrency & performance
107+
- Web Workers: index/compute off main thread
108+
- Observability: index duration, render init, total time, data size
109+
110+
> Project structure reference:
111+
112+
```text
113+
src/
114+
├── core/ # rendering core (render/view/layers/interaction/config + workers)
115+
├── core/interaction/ # interaction modules (events/pipeline/animation)
116+
├── utils/ # utilities (navigation/geometry/path/index/export/share/state ...)
117+
│ └── navigation/ # navigation submodules (centroid/portal/voronoi/partition ...)
118+
├── components/ # UI components (forms, progress, layer control)
119+
├── css/ # styles & themes (base/reset/tokens/utilities/layout/buttons/forms/...)
120+
└── main.js # app entry
121+
```
122+
123+
## Config Examples
124+
125+
- Deploy: `vite.config.js` uses `base: './'`
126+
- Build: `build.outDir = dist`, `build.sourcemap = true`
127+
- Dev: `server.port = 3000`, `server.open = true`
128+
- Worker: `worker.format = 'es'`
129+
130+
> If you plan to expose runtime/algorithm configs (e.g., grid size, weights, sampling density, smoothing factor), export them under `src/core/config/` and document here.
131+
132+
## Roadmap
133+
134+
- [ ] More data formats for import/export (e.g., GeoJSON)
135+
- [ ] Richer weights/constraints (lanes/turns/restrictions/cost functions)
136+
- [ ] Enhanced optimization strategies (multi-objective/segmented)
137+
- [ ] Performance profiling panel and metric visualization
138+
- [ ] Unit tests and E2E coverage
139+
- [ ] i18n and accessibility (a11y)
140+
- [ ] More themes and visualization styles
141+
142+
## Contributing
143+
144+
- Branch model: feature/xxx -> PR to `main`
145+
- Conventions: Node 20 + Yarn, ESM, pass ESLint/Prettier
146+
- Steps:
147+
1. Fork and create a feature branch
148+
2. `corepack enable && yarn install --immutable`
149+
3. `yarn dev` and ensure build passes
150+
4. Open a PR with motivation and screenshots/diffs
151+
152+
> Issues and suggestions are welcome.
153+
154+
## FAQ
155+
156+
- Blank page on Pages?
157+
`base: './'` is set. If still broken, clear cache or verify Pages settings (branch/path).
158+
- Node version?
159+
Node >= 20. Use official LTS and enable Yarn via Corepack.
160+
- Local preview URL?
161+
`http://localhost:3000/` (Vite dev server).
162+
- Performance unstable?
163+
Use hardware-accelerated browsers with WebGL; for large data, reduce sampling or load in batches.
164+
- DeepWiki not showing?
165+
Check network or use the provided documentation link directly.
166+
167+
## License
168+
169+
Licensed under the PolyForm Noncommercial License 1.0.0. See [LICENSE](./LICENSE) for details. Commercial use is prohibited. For commercial licensing, please open an Issue to contact us.
170+
171+
## Acknowledgments
172+
173+
- [PixiJS](https://pixijs.com/)
174+
- [d3-delaunay](https://github.com/d3/d3-delaunay)
175+
- [Turf.js](https://turfjs.org/)
176+
- Vite & GitHub Actions
177+
178+
---
179+
Repository: [Duri686/RoadNetVisualizer](https://github.com/Duri686/RoadNetVisualizer)

README.md

Lines changed: 8 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -1,66 +1,14 @@
11
# RoadNet Visualizer
22

3-
基于 Vite + PixiJS + Web Workers 的多层道路网络可视化工具,支持路径优化、导航控件、导出分享与主题化。
3+
Multi-layer road network generator and visualizer (Vite + PixiJS + Web Workers)
44

5-
[![Ask DeepWiki](https://deepwiki.com/badge.svg)](https://deepwiki.com/Duri686/RoadNetVisualizer)
6-
7-
## 功能特性
8-
- 生成多层道路网络:质心网络、Portal 中点、Voronoi 骨架(实验)
9-
- 路径优化:平滑与正交化,线条更顺更直,提供耗时统计
10-
- 交互与导航:缩放、平移、节点选取、图层开关与画布导航控件
11-
- 寻路与动画:A* 路径与动态小球动画
12-
- 导出与分享:一键导出与分享结果
13-
- 移动端适配:手机端操作更顺畅
14-
- 性能与可观测性:索引构建、渲染初始化/总耗时、数据体积等指标
15-
- 主题与样式:夜间/黑白主题,组件化样式体系
5+
## Language / 语言
166

17-
## 效果预览
7+
- English: [README.en.md](./README.en.md)
8+
- 简体中文: [README.zh-CN.md](./README.zh-CN.md)
189

19-
![RoadNet Visualizer 概览效果图](docs/images/overview.png)
20-
![RoadNet Visualizer 路径实时预览效果图](docs/images/PathPreview.png)
21-
![RoadNet Visualizer 路径动态规划效果图](docs/images/PathDynamicPlanning.png)
10+
## Quick Links
2211

23-
## 本地开发
24-
```bash
25-
# 安装依赖(建议 Node.js 20+)
26-
corepack enable
27-
yarn install --immutable
28-
29-
# 启动开发
30-
yarn dev
31-
32-
# 构建产物
33-
yarn build
34-
```
35-
36-
## 部署到 GitHub Pages
37-
本仓库已提供 Actions 工作流:`.github/workflows/deploy.yml`
38-
- 推送到 `main` 分支会自动构建并部署 `dist/` 到 Pages。
39-
- 如需自定义基础路径,已在 `vite.config.js` 使用 `base: './'` 便于 Pages 子路径访问。
40-
41-
## 目录结构
42-
```
43-
src/
44-
├── core/ # 渲染核心(渲染/视图/图层/交互/配置 + Workers)
45-
├── core/interaction/ # 交互拆分模块(事件/管线/动画)
46-
├── utils/ # 工具库(导航/几何/路径/索引/导出/分享/状态 等)
47-
│ └── navigation/ # 导航子模块(质心/Portal/Voronoi/分区 等)
48-
├── components/ # UI 组件(表单、进度、图层控制)
49-
├── css/ # 样式与主题(base/reset/tokens/utilities/layout/buttons/forms/...)
50-
└── main.js # 应用入口
51-
```
52-
53-
## 许可证(License)
54-
本项目以 **非商用许可证(Non-Commercial License)** 开源:
55-
- 允许任何人查看、分叉(fork)、修改与学习代码;
56-
- 允许在非商业目的下使用本项目及其派生作品;
57-
- **禁止任何形式的商业使用**(含直接或间接盈利、售卖、付费服务、企业内部商用等);
58-
- 再分发时必须保留本声明及版权信息。
59-
60-
如需商业授权,请通过 Issue 与我们联系。
61-
62-
## 致谢
63-
- [PixiJS](https://pixijs.com/)
64-
- [d3-delaunay](https://github.com/d3/d3-delaunay)
65-
- [Turf.js](https://turfjs.org/)
66-
- Vite & GitHub Actions
12+
- Live Demo: [RoadNet Visualizer Demo](https://duri686.github.io/RoadNetVisualizer/)
13+
- License: [LICENSE](./LICENSE) (PolyForm Noncommercial 1.0.0)
14+
- Repository: [Duri686/RoadNetVisualizer](https://github.com/Duri686/RoadNetVisualizer)

0 commit comments

Comments
 (0)