Skip to content

Commit

Permalink
Fix DCM
Browse files Browse the repository at this point in the history
  • Loading branch information
luanpotter committed Sep 13, 2024
1 parent 3f8e4d6 commit 9132ee8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion examples/lib/stories/system/resize_example.dart
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class ResizingRectangle extends RectangleComponent {
void onGameResize(Vector2 size) {
super.onGameResize(size);

this.size = size * .4;
this.size = size * 0.4;
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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));

Expand All @@ -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));
Expand All @@ -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());

Expand All @@ -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));

Expand All @@ -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));
Expand Down Expand Up @@ -105,7 +105,7 @@ void main() {
});
}

Shader createShader(List<UniformSlot> slots) {
Shader _createShader(List<UniformSlot> slots) {
return Shader(
name: '-test-',
slots: slots,
Expand Down

0 comments on commit 9132ee8

Please sign in to comment.