feat: [1013] FrzReturnの拡張設定のコード整理、設定拡張#1998
Conversation
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughSummary by CodeRabbit
WalkthroughReplaces direct getReturnSequence usage with a Map-based provider Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Suggested labels
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches
🧪 Generate unit tests (beta)
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 ast-grep (0.41.0)js/danoni_main.jsjs/lib/danoni_constants.jsThanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
js/lib/danoni_constants.js (1)
1913-1945: JSDoc comment describes old function signature, not the Map constant.The JSDoc block references
@param {string} _typewhich appears to be leftover from the previous function-basedgetReturnSequenceimplementation. This parameter doesn't apply to a Map constant. Consider updating the documentation to reflect the new structure.📝 Suggested JSDoc update
/** - * FrzReturnの種別ごとの移動配列を作成 - * `@param` {string} _type - * `@returns` {number[][]} + * FrzReturnの種別ごとの移動配列を作成するMap + * - キー: FrzReturn種別 (例: "60deg", "120deg+") + * - 値: 移動配列を返す関数 (オプション引数 _dir で方向指定、デフォルト 1) + * `@type` {Map<string, (dir?: number) => number[][]>} */ const g_frzReturnSeqFunc = new Map([🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@js/lib/danoni_constants.js` around lines 1913 - 1945, The JSDoc above g_frzReturnSeqFunc is stale (mentions a `@param` {_type} for an old function); remove the param and replace the comment to document the Map constant itself (g_frzReturnSeqFunc) and its value shape—e.g. that it is a Map from string keys to functions that accept an optional direction number and return number[][] (or list the specific keys like "60deg","120deg","360deg" and the "+" variants); update the `@returns` to reflect the Map's type signature (or use `@type` {Map<string, (dir?: number) => number[][]>}) and keep a short description of what the map provides.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@js/danoni_main.js`:
- Line 11958: The code calls g_frzReturnSeqFunc.get(g_stateObj.frzReturnType)()
directly which will throw if the Map has no entry for that key; change to first
retrieve the provider with g_frzReturnSeqFunc.get(g_stateObj.frzReturnType),
check that the provider exists and is a function, then invoke it and assign to
g_workObj.frzReturnSeq; if missing, assign a safe default (e.g. null or an empty
sequence) and optionally log or handle the error so initialization continues
gracefully.
---
Nitpick comments:
In `@js/lib/danoni_constants.js`:
- Around line 1913-1945: The JSDoc above g_frzReturnSeqFunc is stale (mentions a
`@param` {_type} for an old function); remove the param and replace the comment to
document the Map constant itself (g_frzReturnSeqFunc) and its value shape—e.g.
that it is a Map from string keys to functions that accept an optional direction
number and return number[][] (or list the specific keys like
"60deg","120deg","360deg" and the "+" variants); update the `@returns` to reflect
the Map's type signature (or use `@type` {Map<string, (dir?: number) =>
number[][]>}) and keep a short description of what the map provides.
ℹ️ Review info
Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: e2a776a0-8387-4d64-a058-5df7ed930833
📒 Files selected for processing (2)
js/danoni_main.jsjs/lib/danoni_constants.js
There was a problem hiding this comment.
🧹 Nitpick comments (1)
js/lib/danoni_constants.js (1)
1926-1954: LGTM!The Map-based sequence provider is well-structured. The "+" variants elegantly compose bidirectional rotation sequences by calling the base function with both directions and concatenating the results.
One minor observation: the variable names
stepF40 = 25andstepF120 = 40don't directly correspond to their values, which could be slightly confusing for future maintainers. Consider renaming to reflect the actual step counts (e.g.,stepCount = 25) if the names don't have specific historical meaning.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@js/lib/danoni_constants.js` around lines 1926 - 1954, Rename the confusing stepF40 and stepF120 variables inside the g_frzReturnSeqFunc entries to clearer names that reflect their numeric values or purpose (e.g., stepCount25 or stepCount40, or simply stepCount) and update their uses in the `60deg` and `120deg` arrow functions so the variable name matches everywhere; ensure only the variable identifier changes (no logic change) in the `60deg` function where stepF40 is used and in the `120deg` function where stepF120 is used.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In `@js/lib/danoni_constants.js`:
- Around line 1926-1954: Rename the confusing stepF40 and stepF120 variables
inside the g_frzReturnSeqFunc entries to clearer names that reflect their
numeric values or purpose (e.g., stepCount25 or stepCount40, or simply
stepCount) and update their uses in the `60deg` and `120deg` arrow functions so
the variable name matches everywhere; ensure only the variable identifier
changes (no logic change) in the `60deg` function where stepF40 is used and in
the `120deg` function where stepF120 is used.
ℹ️ Review info
Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: a6c3f12c-a641-44c7-89fa-f983b47aa2c3
📒 Files selected for processing (1)
js/lib/danoni_constants.js
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@js/lib/danoni_constants.js`:
- Around line 1951-1965: The Pendulum entry references an undefined _dir
variable; change its function signature to accept _dir with a default (e.g.,
(_dir = 1) => {) so the body can use _dir safely, mirroring other entries like
'+60deg'; update the Pendulum arrow function declaration to include the
parameter and keep the rest of the makeEaseSequence(...) calls intact so runtime
ReferenceError is avoided.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: dee9e31d-3d08-46dc-a399-21452a9054f1
📒 Files selected for processing (1)
js/lib/danoni_constants.js
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@js/lib/danoni_constants.js`:
- Around line 1928-1963: The easing concatenations for presets like '+60deg',
'+120deg' and 'Pendulum' are duplicating junction frames because
makeEaseSequence includes both endpoints; fix by deduping boundaries when
concatenating: for each subsequent makeEaseSequence call drop its first element
(e.g., use .slice(1)) so sequences join without repeating the shared frame;
apply this for all concatenations inside the '+60deg', '+120deg' and 'Pendulum'
handlers (and any other places using multiple makeEaseSequence calls) so total
frame counts match the intended 50/80/100 targets.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: eb67cdcb-252d-486e-b472-fabe7deaf17a
📒 Files selected for processing (1)
js/lib/danoni_constants.js
🔨 変更内容 / Details of Changes
1. FrzReturnの拡張設定のコード整理、設定拡張
または 0 ⇒ -70 ⇒ 70 ⇒ 0
または 0 ⇒ -80 ⇒ 80 ⇒ 0の軌道で回転
(イージングあり、約100frame)
(イージングあり、約80frame)
2. 機能別の制御関数について、定義が必要なキー名の補足コメントを追記
🔖 関連Issue, 変更理由 / Related Issues, Reason for Changes
📷 スクリーンショット / Screenshot
📝 その他コメント / Other Comments