PAC _Version_PAC K_Property_ PAC $_BrushScript_function default_name() local s = "Thorn" if bs_lang() == "ja" then s = "とげ" end return s end function default_size() return 50, 0.5 end function param1() local s = "Density" if bs_lang() == "ja" then s = "密度" end return s, 5, 100, 20 end function param2() local s = "Color Random" if bs_lang() == "ja" then s = "色ランダム" end return s, 0, 100, 40 end function param3() local s = "Opacity by Pressure" if bs_lang() == "ja" then s = "筆圧透明度" end return s, 0, 1, 1 end function set_line( w, rot ) bs_polygon( 0.0, -0.05 ) bs_polygon( 0.2, -0.05 ) bs_polygon( 1.0, 0.0 ) bs_polygon( 0.2, 0.05 ) bs_polygon( 0.0, 0.05 ) bs_polygon( -0.2, 0.05 ) bs_polygon( -1.0, 0.0 ) bs_polygon( -0.2, -0.05 ) bs_polygon( 0.0, -0.05 ) bs_polygon_mul( w, w ) bs_polygon_rotate( rot ) end function main( x, y, p ) local w = bs_width_max() * 0.30 if w < 5 then w = 5 end if not firstDraw then local distance = bs_distance( lastDrawX - x, lastDrawY - y ) if distance < w/2 then return 0 end end local dx,dy = bs_dir() local nx,ny = bs_normal() local a = bs_opaque() * 255 if bs_param3() == 1 then a = p * a end local num = 20 * bs_param1() / 100 local i for i=0,num do set_line( w * (1.0 + math.random()), math.random()*2*3.14159 ) local px,py = bs_rotate( w * math.random(), 0, math.random()*2*3.14159 ) bs_polygon_move( x+px, y+py ) local r,g,b = bs_forebg( 1.0 - math.random()*bs_param2()/100 ) bs_fill( r,g,b, a ) end lastDrawX = x lastDrawY = y firstDraw = false return 1 end lastDrawX = 0 lastDrawY = 0 firstDraw = true PAC _BrushFormat_90