From 9132ee883c02378b99150ce2506b06ed98cbc627 Mon Sep 17 00:00:00 2001 From: Luan Nico Date: Wed, 11 Sep 2024 10:45:19 -0400 Subject: [PATCH] Fix DCM --- examples/lib/stories/system/resize_example.dart | 2 +- .../test/resources/shader/uniform_binding_test.dart | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/examples/lib/stories/system/resize_example.dart b/examples/lib/stories/system/resize_example.dart index 3c12b69a8d7..f60458c6433 100644 --- a/examples/lib/stories/system/resize_example.dart +++ b/examples/lib/stories/system/resize_example.dart @@ -13,7 +13,7 @@ class ResizingRectangle extends RectangleComponent { void onGameResize(Vector2 size) { super.onGameResize(size); - this.size = size * .4; + this.size = size * 0.4; } } diff --git a/packages/flame_3d/test/resources/shader/uniform_binding_test.dart b/packages/flame_3d/test/resources/shader/uniform_binding_test.dart index 5742e53a2e6..f628a34df6e 100644 --- a/packages/flame_3d/test/resources/shader/uniform_binding_test.dart +++ b/packages/flame_3d/test/resources/shader/uniform_binding_test.dart @@ -9,7 +9,7 @@ void main() { group('uniform bindings', () { test('can bind a vec3 a slot', () { final slot = UniformSlot.value('Vertex', {'position'}); - final shader = createShader([slot]); + final shader = _createShader([slot]); shader.setVector3('Vertex.position', Vector3(7, 8, 9)); @@ -20,7 +20,7 @@ void main() { test('can bind multiple vector slots', () { final slot = UniformSlot.value('AmbientLight', {'color', 'position'}); - final shader = createShader([slot]); + final shader = _createShader([slot]); shader.setVector3('AmbientLight.position', Vector3(7, 8, 9)); shader.setVector4('AmbientLight.color', Vector4(4, 3, 2, 1)); @@ -36,7 +36,7 @@ void main() { test('can bind a mat4 a slot', () { final slot = UniformSlot.value('Vertex', {'camera'}); - final shader = createShader([slot]); + final shader = _createShader([slot]); shader.setMatrix4('Vertex.camera', Matrix4.identity()); @@ -47,7 +47,7 @@ void main() { test('can bind a vec3 to an array slot', () { final slot = UniformSlot.array('Light', {'position'}); - final shader = createShader([slot]); + final shader = _createShader([slot]); shader.setVector3('Light[0].position', Vector3(7, 8, 9)); @@ -63,7 +63,7 @@ void main() { UniformSlot.value('Material', {'color', 'metallic'}), UniformSlot.array('Light', {'position', 'color'}), ]; - final shader = createShader(slots); + final shader = _createShader(slots); shader.setVector3('Vertex.position', Vector3(1, 2, 3)); shader.setVector4('Material.color', Vector4(4, 3, 2, 1)); @@ -105,7 +105,7 @@ void main() { }); } -Shader createShader(List slots) { +Shader _createShader(List slots) { return Shader( name: '-test-', slots: slots,