perf: 完善首页 icon

This commit is contained in:
richarjiang
2026-04-30 12:10:41 +08:00
parent 16efb1bb25
commit dd883f14b0
12 changed files with 2496 additions and 9 deletions

View File

@@ -19,7 +19,84 @@ Git 历史采用 Conventional Commits且摘要多为中文例如 `feat:
<claude-mem-context> <claude-mem-context>
# Memory Context # Memory Context
# [mp-xieyingeng] recent context, 2026-04-26 3:57pm GMT+8 # [mp-xieyingeng] recent context, 2026-04-29 6:32pm GMT+8
No previous sessions found. Legend: 🎯session 🔴bugfix 🟣feature 🔄refactor ✅change 🔵discovery ⚖decision 🚨security_alert 🔐security_note
Format: ID TIME TYPE TITLE
Fetch details: get_observations([IDs]) | Search: mem-search skill
Stats: 50 obs (9,755t read) | 1,857,754t work | 99% savings
### Apr 26, 2026
1330 4:45p 🔄 API Protocol Upgrade - NextLevel-Driven Architecture
1331 " ✅ ApiTypes.ts type definitions updated
1332 " ✅ Task 4 completed: ApiTypes.ts type definitions updated
1333 4:46p ✅ Tasks 4 and 5 completed: type definitions migrated
1334 5:10p 🔵 进度条小百分比时圆角畸形问题
1335 " 🔵 进度条圆角畸形问题调查中
1336 " 🔵 通关弹窗进度条使用 Cocos ProgressBar 组件
1337 5:11p 🔵 进度条圆角畸形调查中 - Prefab 结构检查
1338 " 🔵 ProgressBar 系统架构已定位
1340 " 🔵 找到进度条圆角畸形根本原因
1341 5:12p 🔵 进度条小百分比时圆角变形问题定位
1339 " 🔵 发现 RoundedRectMask 工具组件
S1309 移除 PageLevel.ts 进入关卡时弹出体力扣减 toast (Apr 26 at 5:16 PM)
1342 5:16p 🔵 PassModal 进度值规范化逻辑
1343 5:17p 🔴 进度条圆角畸形问题已修复
1344 " ⚖️ 探索使用 Mask 裁剪替代最小进度值方案
1345 " ⚖️ 否决 Mask 方案,确认最小进度值方案最优
### Apr 27, 2026
1346 9:21a 🔴 移除进入游戏后的体力扣减 toast 提示
1347 " 🔴 移除进入游戏后的体力扣减 toast 提示
1348 " 🟣 首页添加体力值显示功能
S1308 移除进入游戏关卡时弹出体力扣减的 toast 提示 (Apr 27 at 9:21 AM)
S1310 移除进入游戏体力扣减 toast 并在首页添加体力显示 (Apr 27 at 9:22 AM)
S1311 移除体力扣减 toast 并完善首页体验 (Apr 27 at 9:23 AM)
1349 9:25a ✅ PageHome.ts 添加 ToastManager 导入
1350 " ✅ PK按钮点击改为提示"功能开发中"
S1313 Implement object-fit: cover image scaling in Cocos Creator to prevent downloaded images from being distorted (Apr 27 at 9:26 AM)
1351 9:32a 🟣 Stamina animation system for level entry
1352 " 🔵 Cocos Creator game project structure discovered
1354 " 🟣 StarGame 按钮点击动画需求
1356 " 🔵 体力系统架构发现
1353 9:33a 🔵 StaminaManager API confirmed for stamina operations
1355 9:37a 🔵 项目结构和现有代码发现
1357 9:38a 🔵 EnterLevelData 结构分析
1359 9:39a 🟣 Stamina animation system implemented for game entry flow
1358 9:41a ⚖️ 体力值飞行动画实现计划制定完成
1362 9:45a 🟣 Image Cover Mode Scaling in Cocos Creator
S1312 Fix image distortion in PageLevel.ts by implementing object-fit: cover behavior for downloaded images (Apr 27 at 9:45 AM)
1360 " ✅ Cocos Creator animation imports added to PageHome.ts
1361 " ✅ Animation constants added to PageHome class
1363 " ✅ Start game button integrated with stamina check and animation flow
1364 " 🟣 Stamina consumption animation fully implemented in PageHome
S1314 Implement stamina consumption animation in Cocos Creator game - when clicking StarGame button, IconLive node flies to button with floating "-1" text, then navigates to level (Apr 27 at 9:45 AM)
1365 9:46a 🔴 Animation completes but navigation to PageLevel fails
S1315 为 PageLevel.ts 的 mainImage 和 mainImage2 节点实现 CSS cover 模式图片缩放 (Apr 27 at 9:46 AM)
1366 9:50a 🔴 Cocos Creator tween chain broken by premature node destroy
1367 9:55a 🔴 Navigation still failing after first tween chain fix - further debugging needed
1368 " 🔴 Decoupled fly animation from float text timing using setTimeout
1369 9:56a 🔴 Cocos Creator tween chain broken by any node state change mid-animation
1370 9:59a 🟣 CSS cover-style image scaling for PageLevel images
1371 10:01a ✅ PageLevel.ts imports extended for cover-style image scaling
1372 " 🟣 CSS cover-mode image scaling implemented for PageLevel images
S1316 Debug cover mode image overflow in PageLevel.ts - image exceeds container bounds despite Mask applied (Apr 27 at 10:02 AM)
1373 10:02a 🔴 Cover mode image overflows container bounds
1374 10:06a 🔵 GRAPHICS_RECT vs GRAPHICS_STENCIL for Mask in Cocos Creator
1375 10:08a 🔴 Mask.Type.RECT does not exist in Cocos Creator API
1376 " 🔵 MaskType enum found in Cocos Creator 3.8 engine declarations
1378 " 🔵 MaskType enum values confirmed - GRAPHICS_RECT exists
1377 10:09a 🔵 MaskType enum definition found at line 46015
1379 10:10a 🔴 Reverted Mask.Type to GRAPHICS_RECT
S1317 Implement CSS cover-mode image scaling for PageLevel.ts mainImage nodes (Apr 27 at 10:10 AM)
**Investigated**: Cover mode implementation in _applyCoverSprite() using Mask + scaled child node approach; Cocos Creator 3.8 MaskType enum investigation; root cause analysis of image overflow
**Learned**: Cocos Creator Mask only clips child nodes, NOT the container's own Sprite component; GRAPHICS_RECT = 0 is valid enum value in Cocos 3.8; container Sprite renders outside Mask bounds; solution: disable containerSprite and use child node for image display
**Completed**: _applyCoverSprite() method implemented with: Mask(GRAPHICS_RECT) on container, child node '_coverImg' with Sprite.SizeMode.RAW, cover scale calculation, containerSprite.enabled = false to prevent overflow
**Next Steps**: User to test in Cocos Creator editor to verify image clipping now works correctly
Access 1858k tokens of past work via get_observations([IDs]) or mem-search skill.
</claude-mem-context> </claude-mem-context>

File diff suppressed because it is too large Load Diff

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

View File

@@ -0,0 +1,134 @@
{
"ver": "1.0.27",
"importer": "image",
"imported": true,
"uuid": "894c2169-ec35-4aeb-b656-3caa09604b09",
"files": [
".json",
".png"
],
"subMetas": {
"6c48a": {
"importer": "texture",
"uuid": "894c2169-ec35-4aeb-b656-3caa09604b09@6c48a",
"displayName": "homeIconChallenge",
"id": "6c48a",
"name": "texture",
"userData": {
"wrapModeS": "clamp-to-edge",
"wrapModeT": "clamp-to-edge",
"imageUuidOrDatabaseUri": "894c2169-ec35-4aeb-b656-3caa09604b09",
"isUuid": true,
"visible": false,
"minfilter": "linear",
"magfilter": "linear",
"mipfilter": "none",
"anisotropy": 0
},
"ver": "1.0.22",
"imported": true,
"files": [
".json"
],
"subMetas": {}
},
"f9941": {
"importer": "sprite-frame",
"uuid": "894c2169-ec35-4aeb-b656-3caa09604b09@f9941",
"displayName": "homeIconChallenge",
"id": "f9941",
"name": "spriteFrame",
"userData": {
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 375,
"height": 183,
"rawWidth": 375,
"rawHeight": 183,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"packable": true,
"pixelsToUnit": 100,
"pivotX": 0.5,
"pivotY": 0.5,
"meshType": 0,
"vertices": {
"rawPosition": [
-187.5,
-91.5,
0,
187.5,
-91.5,
0,
-187.5,
91.5,
0,
187.5,
91.5,
0
],
"indexes": [
0,
1,
2,
2,
1,
3
],
"uv": [
0,
183,
375,
183,
0,
0,
375,
0
],
"nuv": [
0,
0,
1,
0,
0,
1,
1,
1
],
"minPos": [
-187.5,
-91.5,
0
],
"maxPos": [
187.5,
91.5,
0
]
},
"isUuid": true,
"imageUuidOrDatabaseUri": "894c2169-ec35-4aeb-b656-3caa09604b09@6c48a",
"atlasUuid": "",
"trimType": "auto"
},
"ver": "1.0.12",
"imported": true,
"files": [
".json"
],
"subMetas": {}
}
},
"userData": {
"type": "sprite-frame",
"fixAlphaTransparencyArtifacts": false,
"hasAlpha": true,
"redirect": "894c2169-ec35-4aeb-b656-3caa09604b09@6c48a"
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

View File

@@ -0,0 +1,134 @@
{
"ver": "1.0.27",
"importer": "image",
"imported": true,
"uuid": "0253c893-2588-492f-9d96-911878b8a673",
"files": [
".json",
".png"
],
"subMetas": {
"6c48a": {
"importer": "texture",
"uuid": "0253c893-2588-492f-9d96-911878b8a673@6c48a",
"displayName": "homeIconCreate",
"id": "6c48a",
"name": "texture",
"userData": {
"wrapModeS": "clamp-to-edge",
"wrapModeT": "clamp-to-edge",
"imageUuidOrDatabaseUri": "0253c893-2588-492f-9d96-911878b8a673",
"isUuid": true,
"visible": false,
"minfilter": "linear",
"magfilter": "linear",
"mipfilter": "none",
"anisotropy": 0
},
"ver": "1.0.22",
"imported": true,
"files": [
".json"
],
"subMetas": {}
},
"f9941": {
"importer": "sprite-frame",
"uuid": "0253c893-2588-492f-9d96-911878b8a673@f9941",
"displayName": "homeIconCreate",
"id": "f9941",
"name": "spriteFrame",
"userData": {
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": -0.5,
"trimX": 0,
"trimY": 1,
"width": 373,
"height": 232,
"rawWidth": 373,
"rawHeight": 233,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"packable": true,
"pixelsToUnit": 100,
"pivotX": 0.5,
"pivotY": 0.5,
"meshType": 0,
"vertices": {
"rawPosition": [
-186.5,
-116,
0,
186.5,
-116,
0,
-186.5,
116,
0,
186.5,
116,
0
],
"indexes": [
0,
1,
2,
2,
1,
3
],
"uv": [
0,
232,
373,
232,
0,
0,
373,
0
],
"nuv": [
0,
0,
1,
0,
0,
0.9957081545064378,
1,
0.9957081545064378
],
"minPos": [
-186.5,
-116,
0
],
"maxPos": [
186.5,
116,
0
]
},
"isUuid": true,
"imageUuidOrDatabaseUri": "0253c893-2588-492f-9d96-911878b8a673@6c48a",
"atlasUuid": "",
"trimType": "auto"
},
"ver": "1.0.12",
"imported": true,
"files": [
".json"
],
"subMetas": {}
}
},
"userData": {
"type": "sprite-frame",
"fixAlphaTransparencyArtifacts": false,
"hasAlpha": true,
"redirect": "0253c893-2588-492f-9d96-911878b8a673@6c48a"
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

View File

@@ -0,0 +1,134 @@
{
"ver": "1.0.27",
"importer": "image",
"imported": true,
"uuid": "a85c793d-50ce-4db1-ac92-2af76b8aa505",
"files": [
".json",
".png"
],
"subMetas": {
"6c48a": {
"importer": "texture",
"uuid": "a85c793d-50ce-4db1-ac92-2af76b8aa505@6c48a",
"displayName": "homeIconFriend",
"id": "6c48a",
"name": "texture",
"userData": {
"wrapModeS": "clamp-to-edge",
"wrapModeT": "clamp-to-edge",
"imageUuidOrDatabaseUri": "a85c793d-50ce-4db1-ac92-2af76b8aa505",
"isUuid": true,
"visible": false,
"minfilter": "linear",
"magfilter": "linear",
"mipfilter": "none",
"anisotropy": 0
},
"ver": "1.0.22",
"imported": true,
"files": [
".json"
],
"subMetas": {}
},
"f9941": {
"importer": "sprite-frame",
"uuid": "a85c793d-50ce-4db1-ac92-2af76b8aa505@f9941",
"displayName": "homeIconFriend",
"id": "f9941",
"name": "spriteFrame",
"userData": {
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 345,
"height": 260,
"rawWidth": 345,
"rawHeight": 260,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"packable": true,
"pixelsToUnit": 100,
"pivotX": 0.5,
"pivotY": 0.5,
"meshType": 0,
"vertices": {
"rawPosition": [
-172.5,
-130,
0,
172.5,
-130,
0,
-172.5,
130,
0,
172.5,
130,
0
],
"indexes": [
0,
1,
2,
2,
1,
3
],
"uv": [
0,
260,
345,
260,
0,
0,
345,
0
],
"nuv": [
0,
0,
1,
0,
0,
1,
1,
1
],
"minPos": [
-172.5,
-130,
0
],
"maxPos": [
172.5,
130,
0
]
},
"isUuid": true,
"imageUuidOrDatabaseUri": "a85c793d-50ce-4db1-ac92-2af76b8aa505@6c48a",
"atlasUuid": "",
"trimType": "auto"
},
"ver": "1.0.12",
"imported": true,
"files": [
".json"
],
"subMetas": {}
}
},
"userData": {
"type": "sprite-frame",
"fixAlphaTransparencyArtifacts": false,
"hasAlpha": true,
"redirect": "a85c793d-50ce-4db1-ac92-2af76b8aa505@6c48a"
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

View File

@@ -0,0 +1,134 @@
{
"ver": "1.0.27",
"importer": "image",
"imported": true,
"uuid": "496f93ae-424d-427d-b3eb-54e47e336fc8",
"files": [
".json",
".png"
],
"subMetas": {
"6c48a": {
"importer": "texture",
"uuid": "496f93ae-424d-427d-b3eb-54e47e336fc8@6c48a",
"displayName": "homeIconGift",
"id": "6c48a",
"name": "texture",
"userData": {
"wrapModeS": "clamp-to-edge",
"wrapModeT": "clamp-to-edge",
"imageUuidOrDatabaseUri": "496f93ae-424d-427d-b3eb-54e47e336fc8",
"isUuid": true,
"visible": false,
"minfilter": "linear",
"magfilter": "linear",
"mipfilter": "none",
"anisotropy": 0
},
"ver": "1.0.22",
"imported": true,
"files": [
".json"
],
"subMetas": {}
},
"f9941": {
"importer": "sprite-frame",
"uuid": "496f93ae-424d-427d-b3eb-54e47e336fc8@f9941",
"displayName": "homeIconGift",
"id": "f9941",
"name": "spriteFrame",
"userData": {
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 283,
"height": 285,
"rawWidth": 283,
"rawHeight": 285,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"packable": true,
"pixelsToUnit": 100,
"pivotX": 0.5,
"pivotY": 0.5,
"meshType": 0,
"vertices": {
"rawPosition": [
-141.5,
-142.5,
0,
141.5,
-142.5,
0,
-141.5,
142.5,
0,
141.5,
142.5,
0
],
"indexes": [
0,
1,
2,
2,
1,
3
],
"uv": [
0,
285,
283,
285,
0,
0,
283,
0
],
"nuv": [
0,
0,
1,
0,
0,
1,
1,
1
],
"minPos": [
-141.5,
-142.5,
0
],
"maxPos": [
141.5,
142.5,
0
]
},
"isUuid": true,
"imageUuidOrDatabaseUri": "496f93ae-424d-427d-b3eb-54e47e336fc8@6c48a",
"atlasUuid": "",
"trimType": "auto"
},
"ver": "1.0.12",
"imported": true,
"files": [
".json"
],
"subMetas": {}
}
},
"userData": {
"type": "sprite-frame",
"fixAlphaTransparencyArtifacts": false,
"hasAlpha": true,
"redirect": "496f93ae-424d-427d-b3eb-54e47e336fc8@6c48a"
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

View File

@@ -0,0 +1,134 @@
{
"ver": "1.0.27",
"importer": "image",
"imported": true,
"uuid": "6cc6bad3-00c6-4416-b48f-0434317d96c2",
"files": [
".json",
".png"
],
"subMetas": {
"6c48a": {
"importer": "texture",
"uuid": "6cc6bad3-00c6-4416-b48f-0434317d96c2@6c48a",
"displayName": "homeIconRank",
"id": "6c48a",
"name": "texture",
"userData": {
"wrapModeS": "clamp-to-edge",
"wrapModeT": "clamp-to-edge",
"imageUuidOrDatabaseUri": "6cc6bad3-00c6-4416-b48f-0434317d96c2",
"isUuid": true,
"visible": false,
"minfilter": "linear",
"magfilter": "linear",
"mipfilter": "none",
"anisotropy": 0
},
"ver": "1.0.22",
"imported": true,
"files": [
".json"
],
"subMetas": {}
},
"f9941": {
"importer": "sprite-frame",
"uuid": "6cc6bad3-00c6-4416-b48f-0434317d96c2@f9941",
"displayName": "homeIconRank",
"id": "f9941",
"name": "spriteFrame",
"userData": {
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": -0.5,
"trimX": 0,
"trimY": 1,
"width": 346,
"height": 307,
"rawWidth": 346,
"rawHeight": 308,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"packable": true,
"pixelsToUnit": 100,
"pivotX": 0.5,
"pivotY": 0.5,
"meshType": 0,
"vertices": {
"rawPosition": [
-173,
-153.5,
0,
173,
-153.5,
0,
-173,
153.5,
0,
173,
153.5,
0
],
"indexes": [
0,
1,
2,
2,
1,
3
],
"uv": [
0,
307,
346,
307,
0,
0,
346,
0
],
"nuv": [
0,
0,
1,
0,
0,
0.9967532467532467,
1,
0.9967532467532467
],
"minPos": [
-173,
-153.5,
0
],
"maxPos": [
173,
153.5,
0
]
},
"isUuid": true,
"imageUuidOrDatabaseUri": "6cc6bad3-00c6-4416-b48f-0434317d96c2@6c48a",
"atlasUuid": "",
"trimType": "auto"
},
"ver": "1.0.12",
"imported": true,
"files": [
".json"
],
"subMetas": {}
}
},
"userData": {
"type": "sprite-frame",
"fixAlphaTransparencyArtifacts": false,
"hasAlpha": true,
"redirect": "6cc6bad3-00c6-4416-b48f-0434317d96c2@6c48a"
}
}