diff --git a/package.json b/package.json index 1f96565..6f7eea0 100644 --- a/package.json +++ b/package.json @@ -31,20 +31,20 @@ "url": "git+https://github.com/Next2D/Framework.git" }, "devDependencies": { - "@eslint/eslintrc": "^3.3.6", + "@eslint/eslintrc": "^3.3.7", "@eslint/js": "^10.0.1", - "@types/node": "^26.1.2", - "@typescript-eslint/eslint-plugin": "^8.65.0", - "@typescript-eslint/parser": "^8.65.0", - "@vitest/coverage-v8": "^4.1.10", - "@vitest/web-worker": "^4.1.10", - "eslint": "^10.8.0", + "@types/node": "^26.4.1", + "@typescript-eslint/eslint-plugin": "^8.69.0", + "@typescript-eslint/parser": "^8.69.0", + "@vitest/coverage-v8": "^4.1.11", + "@vitest/web-worker": "^4.1.11", + "eslint": "^10.9.1", "eslint-plugin-unused-imports": "^4.4.1", - "globals": "^17.8.0", + "globals": "^17.12.0", "jsdom": "^30.0.1", "typescript": "^6.0.3", - "vite": "^8.2.0", - "vitest": "^4.1.10", + "vite": "^8.2.2", + "vitest": "^4.1.11", "vitest-webgl-canvas-mock": "^1.1.0" }, "peerDependencies": { diff --git a/specs/cn/config.md b/specs/cn/config.md index af56612..2dba54b 100644 --- a/specs/cn/config.md +++ b/specs/cn/config.md @@ -48,10 +48,20 @@ src/config/ | `bgColor` | string | "transparent" | 以十六进制颜色代码指定背景色(例:`"#1461A0"`)。指定 `"transparent"` 则为透明 | > [!WARNING] -> `stage.json` 中有效的属性仅有 `width`・`height`・`fps`・`options`。 -> `align`・`scaleMode` 等与 Stage 显示相关的设置,在 `stage.json` 中并不存在。 -> 如需这些设置,请在 `config.json` 中定义。 -> 上述以外的属性将被框架完全忽略,不做任何处理。 +> `stage.json` 中只能设置 `width`・`height`・`fps`・`options`(`fullScreen` / `tagId` / `bgColor`)。 +> **Next2D Player 并非 Flash Player 的衍生。** Flash 系选项(`scaleMode`・`align`・`quality`・`wmode` 等)不存在,写入后框架会完全忽略(静默无效)。 +> 白名单以外的属性属于**配置错误**——请删除并改用下表中的替代方法。 + +### ❌ stage.json 中不能设置的项(常见错误) + +| ❌ 属性 | 状态 | 替代方法 | +|---------|------|----------| +| `scaleMode` / `align` | 不存在(Flash 概念) | 需要铺满窗口时使用 `options.fullScreen: true`。或在 `config.json` 中定义为用户设置并在代码中自行实现(框架不会处理) | +| `quality` | 不存在(Flash 概念) | 调整 `fps`,或使用 `cacheAsBitmap` 等性能手段 | +| `wmode` | 不存在(Flash 嵌入概念) | Next2D 无对应设置 | +| `allowFullScreen` | 名称错误 | 使用 `options.fullScreen` | +| `backgroundColor`(顶层) | 位置错误 | 使用 `options.bgColor` | +| 其他任意属性 | 被忽略 | 白名单以外一律无效。请在代码中(如 `stage` 对象)实现 | --- diff --git a/specs/en/config.md b/specs/en/config.md index 891ceee..1e65213 100644 --- a/specs/en/config.md +++ b/specs/en/config.md @@ -48,10 +48,20 @@ JSON file for configuring the display area (Stage). It is read once at applicati | `bgColor` | string | "transparent" | Background color as a hexadecimal color code (e.g. `"#1461A0"`). Use `"transparent"` for a transparent background | > [!WARNING] -> The only valid properties in `stage.json` are `width`, `height`, `fps`, and `options`. -> Properties such as `align` and `scaleMode` — even though they relate to Stage display — do not exist in `stage.json`. -> If you need these settings, define them in `config.json`. -> Any properties not listed above are completely ignored by the framework. +> The only properties you can set in `stage.json` are `width`, `height`, `fps`, and `options` (`fullScreen` / `tagId` / `bgColor`). +> **Next2D Player is NOT a Flash Player derivative.** Flash-era options (`scaleMode`, `align`, `quality`, `wmode`, etc.) do not exist and are silently ignored by the framework. +> Any property not in the whitelist above is a **configuration mistake** — remove it and use the alternatives below. + +### ❌ What cannot be set in stage.json (common mistakes) + +| ❌ Property | Status | What to do instead | +|-------------|--------|--------------------| +| `scaleMode` / `align` | Does not exist (Flash concept) | Use `options.fullScreen: true` to fill the window. Or define it in `config.json` as a user setting and implement it in code (the framework does not process it) | +| `quality` | Does not exist (Flash concept) | Adjust `fps`, use `cacheAsBitmap` and other performance techniques | +| `wmode` | Does not exist (Flash embedding concept) | No equivalent setting in Next2D | +| `allowFullScreen` | Wrong name | Use `options.fullScreen` | +| `backgroundColor` (top level) | Wrong location | Use `options.bgColor` | +| Any other property | Ignored | Anything not in the whitelist is invalid. Implement it in code (e.g. via the `stage` object) | --- diff --git a/specs/ja/config.md b/specs/ja/config.md index 415b080..9b9eaa9 100644 --- a/specs/ja/config.md +++ b/specs/ja/config.md @@ -48,10 +48,22 @@ src/config/ | `bgColor` | string | "transparent" | 背景色を16進数カラーコードで指定(例: `"#1461A0"`)。`"transparent"` を指定すると透明になる | > [!WARNING] -> `stage.json` で有効なプロパティは上記の `width`・`height`・`fps`・`options` のみです。 -> `align`・`scaleMode` などステージ表示に関わる設定であっても、`stage.json` には存在しないプロパティです。 -> これらの設定が必要な場合は `config.json` に記述してください。 -> 上記以外のプロパティを記述しても、フレームワークは一切処理しません。 +> `stage.json` で設定できるのは上記の `width`・`height`・`fps`・`options`(`fullScreen` / `tagId` / `bgColor`)の**み**です。 +> **Next2D Player は Flash Player の派生ではありません。** Flash 由来のオプション(`scaleMode`・`align`・`quality`・`wmode` など)は存在せず、記述してもフレームワークが一切処理しません(サイレントに無視されます)。 +> 上記のホワイトリストにないプロパティは**設定ミス**です。削除し、下表の代替方法を使ってください。 + +### ❌ stage.json で設定できないもの(よくある間違い) + +| ❌ プロパティ | 状態 | 代わりにやること | +|--------------|------|------------------| +| `scaleMode` / `align` | 存在しない(Flash の概念) | 画面いっぱいに合わせたい場合は `options.fullScreen: true` | +| `quality` | 存在しない(Flash の概念) | `fps` の調整や `cacheAsBitmap` 等のパフォーマンス手法を使う | +| `wmode` | 存在しない(Flash 埋め込みの概念) | Next2D には対応する設定がない | +| `allowFullScreen` | 不正な名前 | `options.fullScreen` を使う | +| `backgroundColor`(トップレベル) | 不正な位置 | `options.bgColor` を使う | +| その他の任意のプロパティ | 無視される | 上記のホワイトリストにないものはすべて無効。コード側(`stage` オブジェクト等)で実現する | + +> 補足: `config.json` に `scaleMode`・`align` 等を**ユーザ定義の設定**として書いてコード側で `config.xxx` から読み取り、**自分で実装する**ことは可能です(例: `config.scaleMode` を読んでコードでステージを調整する)。ただしフレームワークは自動的に何も処理しません。`stage.json` 側に書くのは禁止です。 ---