Class: MiniScad::Color
Instance Method Summary collapse
-
#initialize(r, g, b, a, &block) ⇒ Color
constructor
A new instance of Color.
Methods included from Transform
#&, #+, #-, #color, #hull, #mirror, #projection, #render, #rotate, #scale, #translate, #|
Constructor Details
#initialize(r, g, b, a, &block) ⇒ Color
Returns a new instance of Color.
177 178 179 180 181 |
# File 'lib/mini_scad.rb', line 177 def initialize(r, g, b, a, &block) @renderer = -> do "color([#{r}, #{g}, #{b}, #{a}]) { #{block.().render} };" end end |