Class: MiniScad::Translate
- Inherits:
-
Object
- Object
- MiniScad::Translate
- Includes:
- Transform
- Defined in:
- lib/mini_scad.rb
Instance Method Summary collapse
-
#initialize(x, y, z, &block) ⇒ Translate
constructor
A new instance of Translate.
Methods included from Transform
#&, #+, #-, #color, #hull, #mirror, #projection, #render, #rotate, #scale, #translate, #|
Constructor Details
#initialize(x, y, z, &block) ⇒ Translate
Returns a new instance of Translate.
137 138 139 140 141 |
# File 'lib/mini_scad.rb', line 137 def initialize(x, y, z, &block) @renderer = -> do "translate([#{x}, #{y}, #{z}]) { #{block.().render} };" end end |