Skip to content

Commit

Permalink
clean code
Browse files Browse the repository at this point in the history
  • Loading branch information
Dituon committed Jan 24, 2025
1 parent a53c5dc commit 6db33ce
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 27 deletions.
23 changes: 1 addition & 22 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,37 +33,16 @@

## 项目结构

**源码**

- `bot/`: 机器人模块
- `mirai/`: Mirai 插件
- `onebot/`: Onebot 客户端
- `shared/`: 通用代码
- `core/`: 渲染核心模块
- `docs/`: 标准文档
- `httpserver/`: HTTP 服务器模块
- `script/`: 脚本与动态模板模块
- `service/`: 通用服务模块

**其它**

- `docs/`: 标准文档
- `data/`: 旧版数据自动更新目录
- `index.json`: 旧版数据自动更新索引

## 新版更新内容

1. 为了区分于旧版架构,新版版本号从 `v1.0.0` 开始。
2. 新增 [脚本动态模板](docs/script/index.md)
3. 新增 [`mirage` (幻影坦克)](docs/template/filter.md#滤镜类型) 滤镜
4. 支持 [旋转缓动动画](docs/template/image.md#rotate-transition)
5. 支持 [边框半径](docs/template/image.md#borderradius)
6. 支持 [文本基线](docs/template/text.md#text-baseline)
7. 支持 [`max_size` & `min_size`](docs/template/text.md#text-wrap)
8. 支持 回退字体
9. 新增 [权限管理](bot/README.md#权限管理)

更多更新内容请参考 [docs/template](docs/template/index.md)

## 自定义模板

#### `template.json`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ public Shape getShape(RealPosition position) {


Path2D path = new Path2D.Float();
path.moveTo(leftTopX + x, y); // 加入 x 偏移
path.moveTo(leftTopX + x, y);
path.lineTo(w - rightTopX + x, y);
path.curveTo(w - rightTopX / 2 + x, y, w + x, rightTopY / 2 + y, w + x, rightTopY + y);
path.lineTo(w + x, h - rightBottomY + y);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ class EnvironmentChecker {
companion object {
@JvmStatic
val log: Logger = LoggerFactory.getLogger("Petpet")
val infoHead = "=============== Petpet 环境检查 ==============="
val infoSplit = "=============================================="
const val infoHead = "=============== Petpet 环境检查 ==============="
const val infoSplit = "=============================================="

@JvmStatic
fun check() {
Expand All @@ -23,8 +23,8 @@ class EnvironmentChecker {
使用 $vendor 提供的 JVM 可能不支持以下功能:
- 彩色 Emoji 渲染
- 全局字体回退
- 基于 jcef 的 HTML 渲染
- Linux 上的增强字体渲染
- 亚像素抗锯齿
""".trimIndent())
}
val unsupportedLanguages = GlobalContext.getInstance().fontManager
Expand Down

0 comments on commit 6db33ce

Please sign in to comment.