feat:2.5.0初始化专注启蒙项目
This commit is contained in:
@@ -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,
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user