From efeff37021c3cf5afb801a9941f093752b0d826e Mon Sep 17 00:00:00 2001 From: Tom Black Date: Thu, 28 Sep 2017 14:11:38 -0700 Subject: Add iOS and tvOS support --- test/media | 2 +- test/triangle-ios-tvos.rb | 20 ++++++++++++++++++++ 2 files changed, 21 insertions(+), 1 deletion(-) create mode 100644 test/triangle-ios-tvos.rb (limited to 'test') diff --git a/test/media b/test/media index fd57d1c..0d54e76 160000 --- a/test/media +++ b/test/media @@ -1 +1 @@ -Subproject commit fd57d1c22c11b1cc84b160236718b7e26c438a36 +Subproject commit 0d54e768f8da2217203649cb270f4d0add82328f diff --git a/test/triangle-ios-tvos.rb b/test/triangle-ios-tvos.rb new file mode 100644 index 0000000..5189173 --- /dev/null +++ b/test/triangle-ios-tvos.rb @@ -0,0 +1,20 @@ +require 'ruby2d' + +set title: "Hello Triangle", + width: get(:display_width), height: get(:display_height), + borderless: true + +Rectangle.new( + x: 0, y: 0, + width: get(:width), height: get(:height), + color: [[1, 0, 1, 1], [0, 1, 0, 1], [0, 0, 1, 1], [0, 1, 1, 1]] +) + +Triangle.new( + x1: get(:width) / 2, y1: get(:height) / 5, + x2: get(:width), y2: get(:height) / 1.5, + x3: 0, y3: get(:height) / 1.5, + color: [[1, 0, 0, 1], [0, 1, 0, 1], [0, 0, 1, 1]] +) + +show -- cgit v1.2.3