feat:2.5.0初始化专注启蒙项目

This commit is contained in:
R524809
2025-12-15 17:00:06 +08:00
parent 62ba977a45
commit fefe437f0f
29 changed files with 3465 additions and 700 deletions
@@ -83,9 +83,13 @@ export function generateSymmetricalPattern(
/**
* 从形状模板生成完整的格子数据
* @param template 形状模板
* @param config 网格配置(用于对称生成)
* @returns 完整的格子数据
*/
export function generateCompletePattern(template: ShapeTemplate): GridCell[] {
export function generateCompletePattern(
template: ShapeTemplate,
config: GridConfig,
): GridCell[] {
if (template.isComplete) {
// 如果已经是完整图案,直接返回
return [...template.cells];
@@ -95,10 +99,7 @@ export function generateCompletePattern(template: ShapeTemplate): GridCell[] {
// 使用对称生成完整图案
return generateSymmetricalPattern(
template.cells,
{
rows: template.recommendedSize.rows,
cols: template.recommendedSize.cols,
},
config,
template.symmetryType,
);
}