pixel-daylight-switch-gsvegetable 2.1.0 → 2.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.ja.md CHANGED
@@ -164,7 +164,32 @@ GitHub Actions は Node.js 18、20、22 でパッケージと SSR のチェッ
164
164
 
165
165
  ## Android / iOS
166
166
 
167
- Capacitor 8 のビルドフローが含まれ、Web と同じランタイムを使用します。GitHub Actions は Android Debug APK と未署名の iOS Simulator アーカイブを生成します。これらは開発用成果物であり、ストア公開用ではありません。Android APK は Play Store リリースではなく、iOS Simulator 版は実機の iPhone / iPad にはインストールできません。[モバイルビルド情報](builds/README.md) と [ビルドワークフロー](https://github.com/GSvegetable/pixel-daylight-switch/actions/workflows/mobile-build.yml) を参照してください。
167
+ Capacitor 8 アプリには、田園の家、日本の街並み、モダンな部屋、海辺の灯台、山小屋の 5 シーンを切り替えるコントロールと、雪を降らせるオプションを追加しました。共通レンダラーを再利用し、ガラスシェーダーと昼夜のドラッグ操作はそのまま維持します。端末の言語に応じて日本語、簡体字中国語、英語を表示します。縦向きでは縦方向のレイアウト、横向きの幅広い画面ではスイッチとシーン・天気コントロールを左右に配置し、横向きの小型スマートフォンではコンパクトな縦レイアウトに切り替わります。GitHub Actions は Android Debug APK と未署名の iOS Simulator アーカイブを生成します。これらは開発用成果物であり、ストア公開用ではありません。Android APK は Play Store リリースではなく、iOS Simulator 版は実機の iPhone / iPad にはインストールできません。[モバイルビルド情報](builds/README.md) と [ビルドワークフロー](https://github.com/GSvegetable/pixel-daylight-switch/actions/workflows/mobile-build.yml) を参照してください。
168
+
169
+
170
+
171
+ ### Web ページへの埋め込み
172
+
173
+ 基本的な昼夜スイッチを 1 つ表示するだけなら、依存関係のインストールは不要です。次の 1 行を HTML に貼り付けてください。
174
+
175
+ ```html
176
+ <script src="https://gsvegetable.github.io/pixel-daylight-switch/embed.js"></script>
177
+ ```
178
+
179
+ スタイルとデフォルトシーンのスイッチを自動挿入します。シーンや天気のカスタマイズ、複数インスタンス、配置の制御には、上記の npm API と `data-scene` / `data-weather` 属性を使用してください。
180
+
181
+ ### 独自の Android / iOS Capacitor アプリへの統合
182
+
183
+ このリポジトリが現在提供するのは **Capacitor アプリのテンプレートとビルドスクリプト**であり、単独でインストールできるネイティブ UI プラグインではありません。既存の Capacitor 8 プロジェクトには、`mobile/`、`app.js`、`style.css`、`scripts/prepare-mobile.cjs` を統合し、次を実行します。
184
+
185
+ ```bash
186
+ npm install
187
+ npm run mobile:prepare
188
+ npm run mobile:android:init # Android 初回作成
189
+ npm run mobile:android # 以降の同期
190
+ ```
191
+
192
+ iOS は初回に `npm run mobile:ios:init`、以降は `npm run mobile:ios` を実行します(macOS と Xcode が必要です)。`npm run mobile:open:android` / `npm run mobile:open:ios` でネイティブプロジェクトを開けます。正確なスクリプトは [package.json](package.json) を参照してください。
168
193
 
169
194
  ## リポジトリ構成
170
195
 
package/README.md CHANGED
@@ -164,7 +164,32 @@ GitHub Actions runs package and SSR checks on Node.js 18, 20 and 22, plus Chromi
164
164
 
165
165
  ## Android and iOS
166
166
 
167
- The repository includes Capacitor 8 build workflows that reuse the web runtime. GitHub Actions produces an Android debug APK and an unsigned iOS Simulator app archive. These are development artifacts, not store-ready releases: the Android APK is not a Play Store release, and the iOS Simulator build cannot be installed on a physical iPhone or iPad. See [mobile build notes](builds/README.md) and the [mobile workflow](https://github.com/GSvegetable/pixel-daylight-switch/actions/workflows/mobile-build.yml).
167
+ The Capacitor app includes a native-friendly control surface for all five worlds (countryside, Japanese street, apartment, seaside and mountain cabin), plus an optional snowfall effect. Scene and weather changes reuse the shared renderer; the glass shader and day/night interaction remain the same. The app shell detects English, Simplified Chinese and Japanese from the device language. Its layout adapts to portrait and landscape: portrait keeps the switch and controls in a vertical flow, while wider landscape screens place the switch beside the scene and weather controls; compact landscape phones use a denser single-column layout. GitHub Actions produces an Android debug APK and an unsigned iOS Simulator archive. These are development artifacts, not store-ready releases: the Android APK is not a Play Store release, and the iOS Simulator build cannot be installed on a physical iPhone or iPad. See [mobile build notes](builds/README.md) and the [mobile workflow](https://github.com/GSvegetable/pixel-daylight-switch/actions/workflows/mobile-build.yml).
168
+
169
+
170
+
171
+ ### Embed in a web page
172
+
173
+ For one basic day/night switch, no package installation is required. Paste this single line into your HTML:
174
+
175
+ ```html
176
+ <script src="https://gsvegetable.github.io/pixel-daylight-switch/embed.js"></script>
177
+ ```
178
+
179
+ The loader injects its styles and one default-scene switch. For custom scenes, weather, multiple instances or full control over placement, use the npm API above and its `data-scene` / `data-weather` attributes.
180
+
181
+ ### Integrate with your own Android / iOS Capacitor app
182
+
183
+ This repository currently ships a **Capacitor app template and build scripts**, not a separately installable native UI plugin. For an existing Capacitor 8 project, integrate this repository's `mobile/`, `app.js`, `style.css` and `scripts/prepare-mobile.cjs`, then run:
184
+
185
+ ```bash
186
+ npm install
187
+ npm run mobile:prepare
188
+ npm run mobile:android:init # first-time Android project creation
189
+ npm run mobile:android # sync subsequent updates
190
+ ```
191
+
192
+ For iOS, use `npm run mobile:ios:init` once and `npm run mobile:ios` for later syncs; macOS and Xcode are required. Open the native projects with `npm run mobile:open:android` or `npm run mobile:open:ios`. See [package.json](package.json) for the exact scripts.
168
193
 
169
194
  ## Repository map
170
195
 
package/README.zh-CN.md CHANGED
@@ -164,7 +164,32 @@ GitHub Actions 会在 Node.js 18、20、22 环境中执行包与 SSR 检查,
164
164
 
165
165
  ## Android 与 iOS
166
166
 
167
- 仓库包含 Capacitor 8 构建流程,移动端复用同一套 Web 运行时。GitHub Actions 会生成 Android Debug APK 和未签名的 iOS 模拟器应用压缩包。它们属于开发测试产物,不是可直接上架的商店版本:Android APK 不是 Play Store 发布包,iOS 模拟器版本也不能安装到实体 iPhone/iPad。请查看[移动端构建说明](builds/README.md)和[移动端工作流](https://github.com/GSvegetable/pixel-daylight-switch/actions/workflows/mobile-build.yml)。
167
+ Capacitor 移动端现已提供完整的场景控制界面:可在乡间小屋、日本街道、现代公寓、海边灯塔、山间木屋五个世界之间切换,并可单独开启飘雪效果。切换时复用同一套渲染器,不改动玻璃 Shader 和昼夜拖动交互。界面会根据设备语言显示简体中文、日文或英文。布局同时适配竖屏和横屏:竖屏采用纵向浏览;较宽的横屏将开关放在左侧、场景与天气控制放在右侧;窄屏横向手机则采用更紧凑的单列布局。GitHub Actions 会生成 Android Debug APK 和未签名的 iOS 模拟器应用压缩包。它们属于开发测试产物,不是可直接上架的商店版本:Android APK 不是 Play Store 发布包,iOS 模拟器版本也不能安装到实体 iPhone/iPad。请查看[移动端构建说明](builds/README.md)和[移动端工作流](https://github.com/GSvegetable/pixel-daylight-switch/actions/workflows/mobile-build.yml)。
168
+
169
+
170
+
171
+ ### 快速嵌入到网页
172
+
173
+ 如果只需要在网页中放入一个昼夜开关,无需安装依赖,直接粘贴下面这一行即可。它会自动加载样式和组件:
174
+
175
+ ```html
176
+ <script src="https://gsvegetable.github.io/pixel-daylight-switch/embed.js"></script>
177
+ ```
178
+
179
+ 这是一键式基础嵌入,当前展示单个默认场景开关;如果需要自定义场景、天气或多个实例,请使用上面的 npm API(`data-scene`、`data-weather` 等参数)。
180
+
181
+ ### 集成到自己的 Android / iOS Capacitor 工程
182
+
183
+ 项目目前提供的是 **Capacitor 应用模板与构建脚本**,不是可直接 `npm install` 的原生 UI 插件。若你的工程已经使用 Capacitor 8,可将本仓库的 `mobile/`、`app.js`、`style.css` 和 `scripts/prepare-mobile.cjs` 集成到工程,再执行:
184
+
185
+ ```bash
186
+ npm install
187
+ npm run mobile:prepare
188
+ npm run mobile:android:init # 首次创建 Android 工程
189
+ npm run mobile:android # 后续同步更新
190
+ ```
191
+
192
+ iOS 首次创建使用 `npm run mobile:ios:init`,后续使用 `npm run mobile:ios`;需要 macOS 与 Xcode。打开原生工程分别执行 `npm run mobile:open:android` 或 `npm run mobile:open:ios`。详细脚本以 [package.json](package.json) 为准。
168
193
 
169
194
  ## 项目 / 目录结构
170
195
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pixel-daylight-switch-gsvegetable",
3
- "version": "2.1.0",
3
+ "version": "2.2.0",
4
4
  "description": "A draggable pixel-art day/night switch with a living world inside a refractive glass lens.",
5
5
  "keywords": [
6
6
  "pixel-art",