Class: VectorSalad::StandardShapes::Jitter
- Inherits:
-
Transform
- Object
- Transform
- VectorSalad::StandardShapes::Jitter
- Defined in:
- lib/vector_salad/standard_shapes/jitter.rb
Overview
Jitter the position of nodes in the contained shapes randomly.
Instance Method Summary (collapse)
Constructor Details
- (Any) initialize(max, min: 0, fn: nil, canvas:, **_options, &block)
27 28 29 30 31 32 33 |
# File 'lib/vector_salad/standard_shapes/jitter.rb', line 27 def initialize(max, min: 0, fn: nil, canvas:, **, &block) instance_eval(&block) # inner_canvas is populated @canvas.each do |shape| canvas << shape.jitter(max, min: min, fn: fn) end end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class VectorSalad::DSL