Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Preserve the exact bytes checked against upstream SHA-256 hashes.
/src/live2d/vendor/pixi.min.js -text
/src/live2d/vendor/cubism4.min.js -text
16 changes: 16 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,22 @@ jobs:
- name: Build
run: npm run build -- --publish never

- name: Packaged resources smoke test (Linux)
if: runner.os == 'Linux'
run: xvfb-run -a npm run test:smoke -- --packaged --no-sandbox

- name: Packaged resources smoke test (Windows and macOS)
if: runner.os != 'Linux'
run: npm run test:smoke -- --packaged

- name: Upload packaged smoke screenshots
if: always()
uses: actions/upload-artifact@v4
with:
name: smoke-packaged-${{ runner.os }}
path: out/smoke-packaged/*.png
if-no-files-found: ignore

- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
node_modules/
node_modules
dist/
out/
.DS_Store
Expand Down
12 changes: 9 additions & 3 deletions README.ja.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,16 @@

[English](README.md) | [简体中文](README.zh-CN.md) | [日本語](README.ja.md)

**0.4.5 デスクトップ操作の改善:**ペットの位置を記憶し、メニューバーやシステムトレイから再表示できます。終了をキャンセルした場合はすべてのウィンドウを保持します。[更新内容](docs/releases/v0.4.5.md)。[0.4.3 の吹き出し操作](docs/releases/v0.4.3.md)と [0.4.1 の安全性修正](docs/releases/v0.4.1.md)も含みます。
**0.5.0 コンパニオン更新:**Live2D キャラクターを追加し、ペットのそばで会話できます。触れ合いの反応や返答時の動作も選べます。既存の画像キャラクター、設定、位置の復元はそのまま使えます。[更新内容](docs/releases/v0.5.0.md)。

**Live2D は任意の機能です。**対応する書き出し済みモデルと Core ファイルを端末に導入してください。Core とサンプルモデルは同梱されません。[モデル導入・互換性・利用条件](docs/live2d.md#日本語)。

[![Build](https://github.com/TonyNa-code/desktop-pet/actions/workflows/build.yml/badge.svg)](https://github.com/TonyNa-code/desktop-pet/actions/workflows/build.yml)
[![Latest Release](https://img.shields.io/github/v/release/TonyNa-code/desktop-pet?label=latest%20release)](https://github.com/TonyNa-code/desktop-pet/releases/latest)
[![License: MIT](https://img.shields.io/badge/license-MIT-green.svg)](LICENSE)
![Platforms](https://img.shields.io/badge/platform-Windows%20%7C%20macOS%20%7C%20Linux-blue)

Windows / macOS / Linux で動くアニメ風デスクトップペットです。キャラクターパック、多言語UI、チャットモデル連携、任意の音声読み上げに対応しています。Electron で透明な常時手前表示ウィンドウを作り、各キャラクターは spritesheet、プレビュー画像、`character.json` から読み込みます。
Windows / macOS / Linux で動くアニメ風デスクトップペットです。画像キャラクターパック、任意の Live2D モデル、多言語UI、チャットモデル連携、音声読み上げに対応しています。Electron で透明な常時手前表示ウィンドウを作ります。画像キャラクターは spritesheet と `character.json`、Live2D は `.model3.json` と関連ファイルから読み込みます。

<p align="center">
<img src="docs/desktop-pet-demo.gif" alt="Desktop Pet animated preview" width="256" />
Expand Down Expand Up @@ -51,6 +53,7 @@ macOS で開発元を確認できないと表示された場合は、app を右
## 機能

- 透明、フレームなし、常に手前の小さなペットウィンドウ
- Live2D の追加、まばたき・呼吸・触れ合いの反応・返答時の動作の設定
- 表示言語:システムに合わせる、簡体字中国語、English、日本語
- ドラッグ移動中に移動アニメーションを再生
- クリック、ダブルクリック、長押し、マウスホバーに反応
Expand All @@ -67,6 +70,7 @@ macOS で開発元を確認できないと表示された場合は、app を右
- 25分集中リマインダー
- 30 / 60分休憩リマインダー
- 会話機能:
- ペット横の入力欄と上部の吹き出し。横のメニューから設定や終了を選択
- 返信をペットの吹き出しに表示するクイック入力ウィンドウ
- 小さなフローティングチャットウィンドウ
- 独立した会話設定ウィンドウ
Expand Down Expand Up @@ -178,7 +182,7 @@ API key はこの端末だけに保存されます。利用できる場合はOS

自動表情モードでは、頭をなでる・長押しする、体を軽くクリックする、ドラッグして置く操作に、それぞれ異なるローカルの反応があります。既存の表情を使い、組み込みキャラクターごとの一言と設定した呼び名で応えます。モデルや音声サービスは呼び出さず、好感度も増えません。表示中の返信や通知を上書きせず、会話や音声を中断しません。**一般 > ふれあいの一言** をオフにすると従来の動作のみになります。

クリック限定モードは手動のままです。1回のクリックで表情が1つ進み、ダブルクリック・長押しでは追加変更せず、ドラッグ後は選んでいた表情に戻ります。画像の変更やLive2Dの追加はありません。
クリック限定モードは手動のままです。1回のクリックで表情が1つ進み、ダブルクリック・長押しでは追加変更せず、ドラッグ後は選んでいた表情に戻ります。既存の画像は変更していません。追加モデルの操作は [Live2D ガイド](docs/live2d.md#日本語)をご覧ください。

## キャラクターパック

Expand Down Expand Up @@ -233,3 +237,5 @@ assets/characters/
## License

Code is released under the MIT License. See [ASSET_NOTICE.md](ASSET_NOTICE.md) before publicly redistributing artwork assets.

同梱の中国語・日本語フォントには SIL Open Font License 1.1 が適用されます。[フォントの利用条件](assets/fonts/NOTICE.md)をご覧ください。
12 changes: 9 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,16 @@

[English](README.md) | [简体中文](README.zh-CN.md) | [日本語](README.ja.md)

**0.4.5 desktop update:** remember the pet's position, find it from the menu bar or system tray, and keep all windows open when cancelling Quit. [Release notes](docs/releases/v0.4.5.md). Includes the [0.4.3 reply bubble controls](docs/releases/v0.4.3.md) and [0.4.1 safety fixes](docs/releases/v0.4.1.md).
**0.5.0 companion update:** import a Live2D character, talk beside the pet, and customize touch reactions and reply gestures. Existing sprite characters, settings and window recovery remain available. [Release notes](docs/releases/v0.5.0.md).

**Live2D is optional.** Bring your own compatible exported model and install the supported Core file locally. Neither Core nor sample models are bundled. [Model import, compatibility and licensing](docs/live2d.md).

[![Build](https://github.com/TonyNa-code/desktop-pet/actions/workflows/build.yml/badge.svg)](https://github.com/TonyNa-code/desktop-pet/actions/workflows/build.yml)
[![Latest Release](https://img.shields.io/github/v/release/TonyNa-code/desktop-pet?label=latest%20release)](https://github.com/TonyNa-code/desktop-pet/releases/latest)
[![License: MIT](https://img.shields.io/badge/license-MIT-green.svg)](LICENSE)
![Platforms](https://img.shields.io/badge/platform-Windows%20%7C%20macOS%20%7C%20Linux-blue)

A cross-platform anime desktop pet for Windows, macOS, and Linux, with character packs, multilingual UI, chat model integration, and optional voice replies. It uses Electron for a transparent always-on-top pet window, and loads each character from a spritesheet plus a small `character.json` action manifest.
A cross-platform anime desktop pet for Windows, macOS, and Linux, with sprite character packs, optional Live2D models, multilingual UI, chat model integration, and optional voice replies. It uses Electron for a transparent always-on-top pet window. Sprite packs use a spritesheet and a small `character.json` action manifest; Live2D imports use `.model3.json` and its associated files.

<p align="center">
<img src="docs/desktop-pet-demo.gif" alt="Desktop Pet animated preview" width="256" />
Expand Down Expand Up @@ -51,6 +53,7 @@ If you only want to download and run the app, see [快速上手指南.md](快速
## Features

- Transparent, frameless, always-on-top pet window
- Optional Live2D import with blinking, breathing, touch reactions and configurable reply gestures
- Interface language: follow system, Simplified Chinese, English, Japanese
- Drag to move, with movement animation while dragging
- Click, double-click, long press, and mouse hover reactions
Expand All @@ -67,6 +70,7 @@ If you only want to download and run the app, see [快速上手指南.md](快速
- 25-minute focus reminder
- 30 / 60-minute break reminder
- Chat:
- Input beside the character, with replies above it and a visible menu for settings or quitting
- Minimal quick input window with replies shown in the pet bubble
- Small floating chat window
- Separate chat settings window
Expand Down Expand Up @@ -185,7 +189,7 @@ You can edit or remove any line, or clear the list, then save. Each character ha

In automatic expression mode, a head touch or long press, a body tap, and putting the character down after dragging give different local responses using the pack's existing expressions. Built-in characters have distinct short lines, with your preferred name when set. These interactions do not contact a model, play TTS, or increase affection. Short lines do not replace visible replies or reminders, and touches do not interrupt a conversation or voice playback. Turn off **General > Touch responses** for the previous gesture-only behavior.

Click-to-change mode stays manual: one click advances one expression, double-clicks and long presses do not add changes, and dragging restores the expression you selected before the move. Character graphics are unchanged; this is not Live2D.
Click-to-change mode stays manual: one click advances one expression, double-clicks and long presses do not add changes, and dragging restores the expression you selected before the move. Existing sprite artwork is unchanged. For imported models, see the [Live2D guide](docs/live2d.md).

## Character Packs

Expand Down Expand Up @@ -240,3 +244,5 @@ See [CONTRIBUTING.md](CONTRIBUTING.md) for local setup, pull request checks, and
## License

Code is released under the MIT License. See [ASSET_NOTICE.md](ASSET_NOTICE.md) before publicly redistributing artwork assets.

Bundled Chinese and Japanese fallback fonts use the SIL Open Font License 1.1. See the [font notices](assets/fonts/NOTICE.md).
12 changes: 9 additions & 3 deletions README.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,16 @@

[English](README.md) | [简体中文](README.zh-CN.md) | [日本語](README.ja.md)

**0.4.5 桌面体验更新:**记住桌宠位置,可从菜单栏或系统托盘找回桌宠;取消退出时保留所有窗口。[更新说明](docs/releases/v0.4.5.md)。包含 [0.4.3 气泡交互](docs/releases/v0.4.3.md)与 [0.4.1 安全修复](docs/releases/v0.4.1.md)。
**0.5.0 陪伴体验更新:**导入 Live2D 角色,在人物身旁对话,自定义触碰反应与回复动作。原有图片角色、设置和窗口找回功能继续保留。[更新说明](docs/releases/v0.5.0.md)。

**Live2D 是可选功能。**需要自行导入兼容的导出模型,并在本机安装受支持的 Core 文件。安装包不附带 Core 或示例模型。[模型导入、兼容性与许可说明](docs/live2d.md#简体中文)。

[![Build](https://github.com/TonyNa-code/desktop-pet/actions/workflows/build.yml/badge.svg)](https://github.com/TonyNa-code/desktop-pet/actions/workflows/build.yml)
[![Latest Release](https://img.shields.io/github/v/release/TonyNa-code/desktop-pet?label=latest%20release)](https://github.com/TonyNa-code/desktop-pet/releases/latest)
[![License: MIT](https://img.shields.io/badge/license-MIT-green.svg)](LICENSE)
![Platforms](https://img.shields.io/badge/platform-Windows%20%7C%20macOS%20%7C%20Linux-blue)

一个可以在 Windows / macOS / Linux 上运行的二次元桌宠项目,支持角色包、多语言界面、聊天模型接入和可选语音朗读。它使用 Electron 做透明置顶窗口,每个角色由 spritesheet、预览图和 `character.json` 动作配置加载。
一个可以在 Windows / macOS / Linux 上运行的二次元桌宠项目,支持图片角色包、可选 Live2D 模型、多语言界面、聊天模型接入和可选语音朗读。它使用 Electron 做透明置顶窗口;图片角色由 spritesheet、预览图和 `character.json` 动作配置加载,Live2D 角色使用 `.model3.json` 及其配套文件。

<p align="center">
<img src="docs/desktop-pet-demo.gif" alt="Desktop Pet animated preview" width="256" />
Expand Down Expand Up @@ -51,6 +53,7 @@ macOS 如果提示无法验证开发者,右键 app 选择 `打开`,再确认
## 功能

- 透明、无边框、置顶小窗口
- 可选 Live2D 模型导入,支持眨眼、呼吸、触碰反应与自定义回复动作
- 界面语言支持跟随系统、简体中文、English、日本語
- 鼠标拖拽移动,拖动时自动播放移动动画
- 左键点击、双击、长按、鼠标靠近都会触发不同反应
Expand All @@ -67,6 +70,7 @@ macOS 如果提示无法验证开发者,右键 app 选择 `打开`,再确认
- 25 分钟专注提醒
- 30 / 60 分钟休息提醒
- 对话功能:
- 人物旁展开输入框,回复显示在人物上方;旁边的菜单可打开设置或退出
- 极简快速输入窗,回复直接显示到桌宠气泡
- 右键打开小型悬浮聊天窗口
- 单独的对话设置窗口
Expand Down Expand Up @@ -180,7 +184,7 @@ API key 只保存在本机。应用会优先用系统安全存储加密;如果

自动表情模式下,摸头或长按、轻点身体打招呼、拖动后放下会有不同的本地回应,使用角色已有表情。内置角色各有自己的短句,也会使用你设置的称呼。不调用模型、不朗读、不增加好感度;短句不会覆盖已有回复或提醒,也不会打断对话和语音。在 **通用 > 互动短句** 中可关闭短句,保留原来的动作反馈。

点击换表情模式保持手动:一次点击只换一个表情,双击和长按不会额外改变,拖动后恢复原先选中的表情。本次不改动角色图片,也不是 Live2D。
点击换表情模式保持手动:一次点击只换一个表情,双击和长按不会额外改变,拖动后恢复原先选中的表情。原有角色图片保持不变,导入模型的使用方式见 [Live2D 指南](docs/live2d.md#简体中文)。

## 角色包

Expand Down Expand Up @@ -237,3 +241,5 @@ assets/characters/
## 许可证

Code is released under the MIT License. See [ASSET_NOTICE.md](ASSET_NOTICE.md) before publicly redistributing artwork assets.

内置中日文备用字体采用 SIL Open Font License 1.1,详见[字体许可说明](assets/fonts/NOTICE.md)。
12 changes: 12 additions & 0 deletions assets/fonts/NOTICE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Noto Sans CJK

The unmodified Noto Sans SC Regular and Noto Sans JP Regular fonts are distributed under the [SIL Open Font License 1.1](OFL.txt), not the project's MIT license. Copyright notices are embedded in each font's name table.

Source: [notofonts/noto-cjk](https://github.com/notofonts/noto-cjk/tree/f8d157532fbfaeda587e826d4cd5b21a49186f7c/Sans/SubsetOTF), revision `f8d157532fbfaeda587e826d4cd5b21a49186f7c`.

| File | Upstream Git blob |
| --- | --- |
| `NotoSansSC-Regular.otf` | `fc0fda9394367c16c1af7555a2ae4d5e2e6a6f02` |
| `NotoSansJP-Regular.otf` | `4af556abb9cc42e585aab777b01857246a110746` |

These local fallback fonts provide Chinese and Japanese glyphs when the operating system has no suitable font. They are loaded from the app package without contacting a font service.
Binary file added assets/fonts/NotoSansJP-Regular.otf
Binary file not shown.
Binary file added assets/fonts/NotoSansSC-Regular.otf
Binary file not shown.
92 changes: 92 additions & 0 deletions assets/fonts/OFL.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
This Font Software is licensed under the SIL Open Font License,
Version 1.1.

This license is copied below, and is also available with a FAQ at:
http://scripts.sil.org/OFL

-----------------------------------------------------------
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
-----------------------------------------------------------

PREAMBLE
The goals of the Open Font License (OFL) are to stimulate worldwide
development of collaborative font projects, to support the font
creation efforts of academic and linguistic communities, and to
provide a free and open framework in which fonts may be shared and
improved in partnership with others.

The OFL allows the licensed fonts to be used, studied, modified and
redistributed freely as long as they are not sold by themselves. The
fonts, including any derivative works, can be bundled, embedded,
redistributed and/or sold with any software provided that any reserved
names are not used by derivative works. The fonts and derivatives,
however, cannot be released under any other type of license. The
requirement for fonts to remain under this license does not apply to
any document created using the fonts or their derivatives.

DEFINITIONS
"Font Software" refers to the set of files released by the Copyright
Holder(s) under this license and clearly marked as such. This may
include source files, build scripts and documentation.

"Reserved Font Name" refers to any names specified as such after the
copyright statement(s).

"Original Version" refers to the collection of Font Software
components as distributed by the Copyright Holder(s).

"Modified Version" refers to any derivative made by adding to,
deleting, or substituting -- in part or in whole -- any of the
components of the Original Version, by changing formats or by porting
the Font Software to a new environment.

"Author" refers to any designer, engineer, programmer, technical
writer or other person who contributed to the Font Software.

PERMISSION & CONDITIONS
Permission is hereby granted, free of charge, to any person obtaining
a copy of the Font Software, to use, study, copy, merge, embed,
modify, redistribute, and sell modified and unmodified copies of the
Font Software, subject to the following conditions:

1) Neither the Font Software nor any of its individual components, in
Original or Modified Versions, may be sold by itself.

2) Original or Modified Versions of the Font Software may be bundled,
redistributed and/or sold with any software, provided that each copy
contains the above copyright notice and this license. These can be
included either as stand-alone text files, human-readable headers or
in the appropriate machine-readable metadata fields within text or
binary files as long as those fields can be easily viewed by the user.

3) No Modified Version of the Font Software may use the Reserved Font
Name(s) unless explicit written permission is granted by the
corresponding Copyright Holder. This restriction only applies to the
primary font name as presented to the users.

4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
Software shall not be used to promote, endorse or advertise any
Modified Version, except to acknowledge the contribution(s) of the
Copyright Holder(s) and the Author(s) or with their explicit written
permission.

5) The Font Software, modified or unmodified, in part or in whole,
must be distributed entirely under this license, and must not be
distributed under any other license. The requirement for fonts to
remain under this license does not apply to any document created using
the Font Software.

TERMINATION
This license becomes null and void if any of the above conditions are
not met.

DISCLAIMER
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
OTHER DEALINGS IN THE FONT SOFTWARE.
Loading
Loading