| 記事内容:[|]
以下、修正したスクリプトです。 (線、円、をソリッドに変更)
include Math require 'vr/vruby' require 'vr/vrcontrol' frm=VRLocalScreen.newform def frm.construct move 200,100,300,300 $a=chooseColorDialog.to_s end frm.create.show
puts "hd" while ARGF.gets xy=split if xy[0]=~/^hq/ elsif xy[0]=~/^\d|^-/ puts ["lc10",$a].join("\s") print "sl"+"\s"+$_ elsif xy[0]=~/^ci/ puts ["lc10",$a].join("\s") xy.collect!{|item|item.to_f} xy[0]="se" if xy.size==4 xy[4]="1" xy[5]="0" xy[6]=0 xy[7]=2*PI xy[8]="100" else if xy[4]>xy[5] xy[5]+=360 end xy[4],xy[6],xy[5],xy[7],xy[8]= xy[6],xy[4]*2*PI/360,xy[7]*2*PI/360, (xy[5]-xy[4])*2*PI/360,"0" end puts xy.join("\s") elsif xy[0]=~/^lc10/ puts ["lc10",$a].join("\s") else print $_ end end
|