Class: Tracksperanto::Middleware::Shift
- Defined in:
- lib/middleware/shift.rb
Overview
This middleware moves the keyframs by a preset number of pixels
Instance Attribute Summary collapse
-
#x_shift ⇒ Object
Returns the value of attribute x_shift.
-
#y_shift ⇒ Object
Returns the value of attribute y_shift.
Instance Method Summary collapse
Methods inherited from Base
#end_export, #end_tracker_segment, #initialize, #start_export, #start_tracker_segment
Methods included from BlockInit
Methods included from Casts
#cast_to_float, #cast_to_int, #cast_to_string, included
Constructor Details
This class inherits a constructor from Tracksperanto::Middleware::Base
Instance Attribute Details
#x_shift ⇒ Object
Returns the value of attribute x_shift.
3 4 5 |
# File 'lib/middleware/shift.rb', line 3 def x_shift @x_shift end |
#y_shift ⇒ Object
Returns the value of attribute y_shift.
3 4 5 |
# File 'lib/middleware/shift.rb', line 3 def y_shift @y_shift end |
Instance Method Details
#export_point(frame, float_x, float_y, float_residual) ⇒ Object
6 7 8 |
# File 'lib/middleware/shift.rb', line 6 def export_point(frame, float_x, float_y, float_residual) super(frame, float_x + (@x_shift || 0), float_y + (@y_shift || 0), float_residual) end |