Format TexturePacker atlas changes

This commit is contained in:
gem
2026-06-09 12:51:16 +08:00
parent 38f6e0c0c9
commit 638ea22562
2 changed files with 7 additions and 4 deletions

View File

@@ -237,8 +237,7 @@ class RuntimeNode {
asset: _stringProp(props, RuntimeProtocolField.asset) ?? asset,
frame: _stringProp(props, RuntimeProtocolField.frame) ?? frame,
pressedFrame:
_stringProp(props, RuntimeProtocolField.pressedFrame) ??
pressedFrame,
_stringProp(props, RuntimeProtocolField.pressedFrame) ?? pressedFrame,
disabledFrame:
_stringProp(props, RuntimeProtocolField.disabledFrame) ??
disabledFrame,

View File

@@ -371,7 +371,10 @@ Future<GamePackage> _createTextureAtlasPackage(String name) async {
final hashAtlas = RuntimeTextureAtlas.fromJsonString(
File('${root.path}/assets/ui.json').readAsStringSync(),
);
expect(hashAtlas.frames['button_idle.png']?.rect, Rect.fromLTWH(2, 3, 40, 20));
expect(
hashAtlas.frames['button_idle.png']?.rect,
Rect.fromLTWH(2, 3, 40, 20),
);
final arrayAtlas = RuntimeTextureAtlas.fromJsonString('''
{
"frames": [
@@ -384,7 +387,8 @@ Future<GamePackage> _createTextureAtlasPackage(String name) async {
]
}
''');
final mergedAtlas = '''
final mergedAtlas =
'''
{
"frames": {
"button_idle.png": {