Class: MiniScad::Color

Inherits:
Object
  • Object
show all
Includes:
Transform
Defined in:
lib/mini_scad.rb

Instance Method Summary collapse

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