Vite启动器

graph-editor-template — Vite 启动器模板

作者 We-Gold

We-Gold/graph-editor-template 是一个面向网页图形编辑器应用的起始代码库,使用 TypeScript 与 Vite 构建,并以 Vitest 测试。

看看你的网站会是什么样

浏览真实页面截图,比较内容排版与手机效果。点击下方缩略图切换,放大查看整页细节。

2 个预览视图
桌面端首页1 / 2
桌面端截图首屏预览

从固定源码版本实际渲染并截图。

全部页面与视图 2

截图用于了解视觉与布局,交互效果请以实际项目为准。

采集于 2026-10-16查看来源

值得关注的模板亮点

从已有项目资料中,快速了解它的特点。

01

提供网页图形编辑器应用的完整起始代码库,而非通用库

02

使用 TypeScript 与 Vite 构建,并以 Vitest 进行测试

03

已实现节点与边的创建、鼠标缩放、缩放按钮及键盘快捷键编辑

04

包含撤销、全局配置系统、快捷键提示卡片和左侧配置/内容面板

05

提供可复用图形生成器,并可根据数据集坐标自动居中与缩放

06

README 的 Progress Tracker 列出主题系统、WebGL 渲染器等未完成项

模板详细介绍

这个仓库是网页图形编辑器应用的起始模板,而不是解决所有问题的库。README 说明,使用图形编辑器的 Web 应用通常复杂且高度定制,因此该仓库提供的是完整代码库的起点。它最初为个人项目创建,作者将其公开供他人作为起点使用。

技术栈方面,README 明确说明代码库使用 TypeScript 和 Vite 构建,并用 Vitest 进行测试;如果偏好其他构建工具可以替换,并鼓励贡献迁移指南。仓库采用 MIT 许可证,并建议使用者在自己的项目中链接或注明来源(非强制)。

功能范围以 README 的 Progress Tracker 为准:已完成基础图形节点与边的创建、鼠标缩放系统、图形编辑键盘快捷键(移动点、删除点、添加点、添加边、删除边、取消选择、撤销)、全局配置系统、悬停显示快捷键的提示卡片、左侧配置/内容面板、基于数据集 x/y 坐标的自动居中与缩放、缩放按钮、可复用图形生成器、无障碍功能以及 CSS 文件拆分。未完成项包括 CSS 主题系统、显示信息/配置面板时自动移动图形、可互换的 2D 与 WebGL 渲染器、性能改进、清理测试文件的命令、仅用于边的额外离屏画布、范围外元素的环绕处理,以及超过 256^3 的颜色系统。README 未提供安装、运行或部署步骤的说明。

Vite启动器

适合你的项目吗?

适用场景

  • 需要从零搭建网页图形编辑器时,以此仓库作为代码起点
  • 在个人或团队项目中参考其节点、边、缩放与快捷键的实现方式
  • 基于现有代码库继续开发 README 中列出的未完成功能,如主题系统或渲染器切换

适合人群

  • 希望以完整代码库而非库的形式启动图形编辑器项目的开发者
  • 使用 TypeScript 与 Vite 技术栈的前端开发者
  • 愿意按 README 建议在项目中注明来源并可能回馈改进的贡献者

上手与定制指南

结合仓库当前版本的说明,按下面的资料检查内容、配置与运行要求。

  1. 1

    README 未提供安装、运行或部署步骤,需自行查看仓库中的其他文件

  2. 2

    README 建议使用 GitHub 的 Use this template 按钮基于此仓库创建新仓库

  3. 3

    README 说明可替换构建工具,但未提供具体迁移指南

  4. 4

    README 建议在自己的项目中使用时链接或注明此仓库(非强制)

查看仓库使用说明

授权与来源资料

使用条件与限制

免费使用 · 保留许可声明

本次收录的是公开仓库中采用 MIT 许可的免费版本;免费范围为该版本代码,不代表外部服务或第三方素材免费。

使用时需要遵守

  • 允许免费使用、修改、商用和分发该版本代码。
  • 分发代码副本或实质性部分时,保留原作者版权声明和完整 MIT 许可声明。
  • 代码按现状提供;担保与责任限制以原许可证及适用法律为准。

额外费用与待核对事项

  • 演示图片、字体、图标及其他第三方素材需按各自许可核对,不能仅凭代码的 MIT 许可判断。
  • 域名、托管、数据库、支付或 AI 等外部服务可能另外收费。
  • README 建议在自己的项目中使用时链接或注明此仓库,但明确说明这是非强制性的。
  • 代码库使用 TypeScript 与 Vite 构建,并以 Vitest 测试;若替换构建工具,README 鼓励贡献迁移指南。
  • 若改动是针对个人偏好的定制且可能限制其他用例,README 建议保留在自己的代码库中而非提交。
  • 性能基准在 M2 MacBook Air 上使用 Chrome DevTools FPS 计数器测得,且测试早于部分优化,可能低估性能。
  • Progress Tracker 显示改进添加节点/边的图标尚未完成。
  • Progress Tracker 显示 CSS 主题系统尚未完成。
  • Progress Tracker 显示显示信息/配置面板时自动移动图形尚未完成。
  • Progress Tracker 显示可互换的 2D 与 WebGL 渲染器尚未完成。
  • Progress Tracker 显示性能改进(如对节点和边只执行一次描边与填充)尚未完成。
  • Progress Tracker 显示用于新仓库清理测试文件的命令尚未完成。
  • Progress Tracker 显示仅用于边的额外离屏画布以提升可扩展性尚未完成。
  • Progress Tracker 显示范围外元素的环绕处理尚未完成。
  • Progress Tracker 显示确保颜色系统在超过 256^3 时仍正常工作尚未完成。
查看原文依据

Permission is hereby granted, free of charge

许可证原文

**If you use this in your own project**, please link to or credit this repository. This code is open-source, so you are not required to, but it would be kind.

README 原文

This codebase is built with TypeScript and Vite, and is tested with Vitest. If you prefer using different build tools, feel free to switch, and if possible, contribute some kind of guide on how to do it.

README 原文

However, if your code is a customization for a usecase you prefer, but could restrict the possible usecases of the codebase for others, it would be better to keep this in your own codebase.

README 原文

The system has been tested on an M2 MacBook Air, using the FPS counter in the rendering tab of Chrome DevTools. **These tests were performed before some optimizations, so they may be slightly underestimating performance**

README 原文

- [ ] Improve add node/edge icons

README 原文

- [ ] Add CSS theme system

README 原文

- [ ] Automatically move graph when showing the info/config panel

README 原文

- [ ] Interchangeable 2d and webgl renderers

README 原文

- [ ] Find performance improvements (try doing stroke and fill only once for nodes and edges)

README 原文

- [ ] Create cleaning command to remove testing files for new repos

README 原文

- [ ] Add additional offscreen canvas for edges only to increase scalability

README 原文

- [ ] Add wraparound handling for items outside the range

README 原文

- [ ] Make sure the color system works beyond 256^3

README 原文
https://github.com/We-Gold/graph-editor-template/blob/main/LICENSEhttps://github.com/We-Gold/graph-editor-template/blob/main/README.md

DeepSeek 根据仓库许可证和 README 整理 ·2026-10-15。结果仅覆盖已读取资料,依赖、图片、字体及后续条款变更以各自原文为准。

项目核对记录与介绍依据

模板资料

来源平台
GitHub
资料与维护参考分
资料一般 · 56 / 100
技术栈
Vite
网站类型
启动器
这个分数如何计算

本站按许可资料(最高30分)、演示链接(12分)、预览图(10分)、Star数(15分)、记录的维护时间(15分)、描述完整度(8分)、功能记录(5分)和分类资料(5分)计算。它不是代码、安全或性能测试,也不是 Google 评分;有链接不代表已实测可用。

这个项目需要核对什么

记录的仓库更新时间
2024-05-13
截图检查日期
2026-10-16

目前没有记录演示链接。请依据仓库说明在本地评估;仅凭截图无法确认交互行为。

目录记录的主要技术栈是 Vite。请通过依赖清单和锁文件核对实际版本与托管要求。这些说明基于收录资料,不代表代码审计或部署实测。

查看具体选型方法 →

介绍的制作与核对状态

介绍由 AI 辅助整理目录与仓库资料。仓库作者不等于这篇介绍的审核者。

审核声明: codex-user-requested-batch-review-20261017 · 2026-10-16

查看当时使用的来源资料

SHA-256: 0544b2f1e5eceb7a404ad0a7d9eeff9c193733afaf8b1ffcc58af758eec08452

2026-10-15T08:40:02.644Z

来源文件 / 仓库
[![contributions welcome](https://img.shields.io/badge/contributions-welcome-brightgreen.svg?style=flat)](https://github.com/We-Gold/graph-editor-template/issues)
![ViewCount](https://views.whatilearened.today/views/github/We-Gold/graph-editor-template.svg)
[![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](https://opensource.org/licenses/MIT)

# Graph Editor Template

![Graph Editor Template Demo Image](./readme-hero.png)

This repository is a starter template for web-based graph editor applications.

Use the `Use this template` button to create a repository using this one as a starting point.

**If you use this in your own project**, please link to or credit this repository. This code is open-source, so you are not required to, but it would be kind.

### Motivation

Web apps that utilize graph editors are often complex and very custom software. To accommodate these usecases, this repository serves as a starting point for a full codebase, rather than a library that solves every problem.

This starter code was originally created to serve as a starting point for a personal project, but I figured others may want a solid starting point like this one.

### Dependencies

This codebase is built with TypeScript and Vite, and is tested with Vitest. If you prefer using different build tools, feel free to switch, and if possible, contribute some kind of guide on how to do it.

### Contribution

There are many potential improvements to this codebase. I have listed some in the [Progress Tracker](#progress-tracker) section.

If you would like to contribute a feature or improvement, please create a PR to share your improvements.

If there is a problem with the base code, open an issue.

**A couple of details about contributing:** Not all changes to the codebase are beneficial. If your feature or improvement fixes a problem, or extends the functionality of the code in a beneficial way, that's helpful.

However, if your code is a customization for a usecase you prefer, but could restrict the possible usecases of the codebase for others, it would be better to keep this in your own codebase.

_I am open to creating a theme system, or to listing unofficial themes in this repo, but I haven't done any work towards this end._

_If you aren't sure if a feature would be helpful, but you want to share the idea, open an issue._

## Benchmarks

The system has been tested on an M2 MacBook Air, using the FPS counter in the rendering tab of Chrome DevTools. **These tests were performed before some optimizations, so they may be slightly underestimating performance**

#### Fully Connected (every node to every other node)

| # Nodes | FPS Static | FPS Moving  |
| ------- | ---------- | ----------- |
| 10      | 60         | 60          |
| 50      | 60         | 60          |
| 100     | 60         | 20 (at min) |

#### Sparsely Connected (one/two edge(s) per node)

| # Nodes | FPS Static | FPS Moving |
| ------- | ---------- | ---------- |
| 10      | 60         | 60         |
| 50      | 60         | 60         |
| 100     | 60         | 60         |
| 500     | 60         | 60         |
| 1000    | 60         | 60         |
| 5000    | 60         | 50         |
| 10000   | 45         | 35         |
| 50000   | 15         | 12         |

## Progress Tracker

-   [x] Create basic graph nodes and edges
-   [x] Add mock event listeners using offscreen canvas (are there fractional colors?)
-   [x] Create mouse zoom system (offset, dpr initial scale, center origin)
-   [x] Add graph editing keyboard shortcuts
    -   [x] Move point
    -   [x] Remove point
    -   [x] Add point
    -   [x] Add edge
    -   [x] Remove edge
    -   [x] Deselect
    -   [x] Undo (make each thing an action, and then make classes with an undo method, and a stack (w/ generics) for history)
    -   [ ] Improve add node/edge icons
-   [x] Add any tests that may be useful
-   [x] Create global configuration system
-   [x] Create tooltip/info card that shows shortcuts on hover (synchronized with code)
-   [x] Add config/content pane on the left side (like streamlit)
-   [x] Benchmark/profile the system on large datasets
-   [x] Automatically center and scale based on dataset x and y coords
-   [x] Add zoom buttons
-   [x] Improve class reusability, like with buttons
-   [x] Split up css files
-   [x] Add accessibility features
-   [x] Make reusable graph generator
-   [x] Prepare README for initial release
-   [x] Change action names to be based on actions and not names of things (info-button-active => show-shortcut-info)
-   [ ] Add CSS theme system
-   [ ] Automatically move graph when showing the info/config panel
-   [ ] Interchangeable 2d and webgl renderers
-   [ ] Find performance improvements (try doing stroke and fill only once for nodes and edges)
-   [ ] Create cleaning command to remove testing files for new repos
-   [ ] Add additional offscreen canvas for edges only to increase scalability
-   [ ] Add wraparound handling for items outside the range
-   [ ] Make sure the color system works beyond 256^3

反馈内容错误

看看同类模板

对比同技术栈与用途的模板,找到更适合的视觉与内容结构。