From 638ea2256282ed867a2e2fd46c3207b6207dec69 Mon Sep 17 00:00:00 2001 From: gem Date: Tue, 9 Jun 2026 12:51:16 +0800 Subject: [PATCH] Format TexturePacker atlas changes --- lib/runtime/models/runtime_node.dart | 3 +-- test/runtime/resources/game_resource_manager_test.dart | 8 ++++++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/lib/runtime/models/runtime_node.dart b/lib/runtime/models/runtime_node.dart index b7aa782..9efbc67 100644 --- a/lib/runtime/models/runtime_node.dart +++ b/lib/runtime/models/runtime_node.dart @@ -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, diff --git a/test/runtime/resources/game_resource_manager_test.dart b/test/runtime/resources/game_resource_manager_test.dart index 8479ac3..686c0d1 100644 --- a/test/runtime/resources/game_resource_manager_test.dart +++ b/test/runtime/resources/game_resource_manager_test.dart @@ -371,7 +371,10 @@ Future _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 _createTextureAtlasPackage(String name) async { ] } '''); - final mergedAtlas = ''' + final mergedAtlas = + ''' { "frames": { "button_idle.png": {