Ruby 2D


https://www.ruby2d.com/

https://www.ruby2d.com/learn/get-started/


require 'ruby2d'

set title: "Hello Triangle"

Triangle.new(
  x1: 320, y1:  50,
  x2: 540, y2: 430,
  x3: 100, y3: 430,
  color: ['red', 'green', 'blue']
)

show

Great! Now save your script and run it on the command line using:

ruby triangle.rb
阅读量: 455
发布于:
修改于: