next2d-development-mcp 1.3.0 → 1.4.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.
@@ -1286,6 +1286,69 @@ export class TopBtnMolecule extends ButtonAtom {
1286
1286
  }
1287
1287
  ```
1288
1288
 
1289
+ ### 親 Sprite コンテナの 0,0 中心設計(アニメーション推奨パターン)
1290
+
1291
+ アニメーション用の親 Sprite コンテナは、**0,0 を視覚的コンテンツの中心点に設計する**のが推奨。
1292
+ `rotation` / `scaleX` / `scaleY` はすべて 0,0 を軸に動くため、0,0 が左上だと回転・拡縮が視覚的にズレる。
1293
+
1294
+ ```
1295
+ 0,0(中心点)
1296
+ |
1297
+ ------+------
1298
+ | |
1299
+ | content |
1300
+ | |
1301
+ -------------
1302
+ (-w/2, -h/2) (w/2, -h/2)
1303
+ ```
1304
+
1305
+ #### NG: 0,0 が左上になるパターン(頻出バグ)
1306
+
1307
+ ```typescript
1308
+ // NG: container の 0,0 が左上 → rotation/scale が左上を基点に動く
1309
+ const container = new Sprite();
1310
+ container.x = stageWidth / 2 - contentWidth / 2; // 左上基準で中央に配置しようとする
1311
+ container.y = stageHeight / 2 - contentHeight / 2;
1312
+
1313
+ const child = new YourContent();
1314
+ container.addChild(child); // child の左上が container の 0,0 に来る
1315
+ // → rotation アニメーションが左上を軸に回転してしまう
1316
+ ```
1317
+
1318
+ #### OK: 0,0 が中心点になるパターン(推奨)
1319
+
1320
+ ```typescript
1321
+ // OK: container の 0,0 = 視覚的中心点 → rotation/scale が中心を基点に動く
1322
+ const container = new Sprite();
1323
+ container.x = stageWidth / 2; // 中心座標を設定
1324
+ container.y = stageHeight / 2;
1325
+
1326
+ const child = new YourContent();
1327
+ // child のサイズ確定後にオフセットを計算
1328
+ child.x = -child.width / 2;
1329
+ child.y = -child.height / 2;
1330
+ container.addChild(child);
1331
+ // → rotation / scaleX / scaleY アニメーションが中心を基点に自然に動く
1332
+ ```
1333
+
1334
+ 複数の子オブジェクトを持つ場合も同様に、全ての child を中心基準でオフセット配置する:
1335
+
1336
+ ```typescript
1337
+ const container = new Sprite();
1338
+ container.x = stageWidth / 2;
1339
+ container.y = stageHeight / 2;
1340
+
1341
+ for (const item of items) {
1342
+ const child = new ItemAtom(item);
1343
+ // 各 child も中心基準でオフセット
1344
+ child.x = -child.width / 2;
1345
+ child.y = -child.height / 2 + indexOffset; // 縦並びなどのレイアウト調整
1346
+ container.addChild(child);
1347
+ }
1348
+ ```
1349
+
1350
+ ---
1351
+
1289
1352
  ### DisplayObject の中心点基準配置(scale・rotation アニメーション必須)
1290
1353
 
1291
1354
  `scaleX` / `scaleY` / `rotation` を変更すると `width` / `height` の値が変わる。
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "next2d-development-mcp",
3
3
  "displayName": "Next2D Development MCP",
4
- "version": "1.3.0",
4
+ "version": "1.4.0",
5
5
  "description": "MCP server for Next2D application development assistance",
6
6
  "type": "module",
7
7
  "author": "Toshiyuki Ienaga <ienaga@next2d.app>",
@@ -53,11 +53,11 @@
53
53
  "devDependencies": {
54
54
  "@eslint/js": "^10.0.1",
55
55
  "@types/node": "^25.9.3",
56
- "@types/vscode": "^1.115.0",
56
+ "@types/vscode": "^1.120.0",
57
57
  "@typescript-eslint/eslint-plugin": "^8.61.0",
58
58
  "@typescript-eslint/parser": "^8.61.0",
59
59
  "@vscode/vsce": "^3.9.2",
60
- "eslint": "^10.4.1",
60
+ "eslint": "^10.5.0",
61
61
  "eslint-plugin-unused-imports": "^4.4.1",
62
62
  "globals": "^17.6.0",
63
63
  "typescript": "^6.0.3",