补充安装文档

This commit is contained in:
2023-12-21 13:00:01 +08:00
parent 73d895dc2b
commit 231e7f4376
2 changed files with 19 additions and 17 deletions

View File

@ -1,14 +1,27 @@
# webRTC
webrtc 实现的 p2p 信道
rtc rtc rtc: 稳定, 多重连接
channel channel channel: 细流
part-server: 调谐, 从不同服务器请求资源分片
webrtc://用户@域名:端口/信道标识/资源ID
* 不要将 JS 文件编译, 使用便于阅读的源码发布
* 避免依赖服务器提供静态文件, 使用WEBRTC在浏览器之间共享
* 内核策略, 在浏览器中查看和编辑文件
封包格式
资源ID 分片信息(位置) 分片数据
```
# 使用 git 克隆到本地或者直接下载zip压缩包
git clone git@git.satori.love:LaniakeaSupercluster/webrtc.git
cd webrtc
# 安装依赖
npm i
# 编译
npm run build
# 运行服务
npm run start
# 或者使用 pm2 作为守护进程
pm2 start npm --name webrtc -- run start
```
插件市场
1. 从浏览器创建插件(单文件)

View File

@ -162,17 +162,6 @@ export class Chessboard {
context.lineTo(边距, 边距)
context.stroke()
//// 绘制棋子们
//context.font = '20px serif'
//context.fillStyle = 'red'
//context.fillText('車', 0+边距-(比例/5), 20+边距-(比例/5))
//context.stroke()
//// 绘制棋子们
//context.font = '20px serif'
//context.fillStyle = 'red'
//context.fillText('馬', 0+边距-(比例/5) + (比例*1), 20+边距-(比例/5))
//context.stroke()
// 单独保存绘制好的棋盘
const chessboard = canvas.toDataURL()