diff --git a/app/helpers/splats_helper.rb b/app/helpers/splats_helper.rb index 403fba86f..e6c1fc3ed 100644 --- a/app/helpers/splats_helper.rb +++ b/app/helpers/splats_helper.rb @@ -1,2 +1,12 @@ module SplatsHelper + SPLAT_ROTATION = %w[90 80 75 60 45 35 25 5 -45 -40 -75] + SPLAT_SIZE = %w[20 18 16 14 12] + + def splat_rotation(splat) + "--splat-rotate: #{ SPLAT_ROTATION[Zlib.crc32(splat.to_param) % SPLAT_ROTATION.size] }deg;" + end + + def splat_size(splat) + "--splat-size: #{ SPLAT_SIZE[Zlib.crc32(splat.to_param) % SPLAT_SIZE.size] }cqi;" + end end diff --git a/app/views/splats/_splat.html.erb b/app/views/splats/_splat.html.erb index 50a8587ba..d754754a0 100644 --- a/app/views/splats/_splat.html.erb +++ b/app/views/splats/_splat.html.erb @@ -1,4 +1,4 @@ -