DEVELOPER_DOCS.rdoc in tracksperanto-2.8.6 vs DEVELOPER_DOCS.rdoc in tracksperanto-2.9.0

- old
+ new

@@ -6,10 +6,20 @@ can chew on. If you implement fixes or new features having tests for them is NOT OPTIONAL. We are not in crunchtime shot delivery mode here but we are sharing an essential pipeline tool that has to be robust day in day out, year to year. Mmmkay? So please do not underestimate tests. +=== Development environment + +Tracksperanto is currently being developed on Ruby 1.9.3 but it should also work fine on 1.8.7. What you will need is everything mentioned +in the Gemfile plus Bundler. Please develop against the git repo checkout since we no longer package the test fixtures with the gem. + +* Checkout the repo at http://github.com/guerilla-di/tracksperanto +* Run `bundle install' and 'rake' to run the tests +* Carry your development, in your own branch or feature branch +* File a pull request or send a patch to info at guerilla-di.org + === Importing your own formats You can easily write a Tracksperanto import module - refer to Tracksperanto::Import::Base docs. Your importer will be configured with width and height of the comp that it is importing, and will get an IO object with the file that you are processing. You should then yield parsed trackers within the each method (tracker objects should @@ -70,20 +80,22 @@ destination_file = File.open("exported_file.other", "wb") some_exporter = Tracksperanto.get_exporter("flamestabilizer").new(destination_file) # Now add some middlewares, for example a Scale scaler = Middleware::Scaler.new(some_exporter, :x_factor => 2) - # ... and a slip - slipper = Middleware::Slipper.new(scaler, :offset => 2) - # Middlewares wrap exporters and other middlewares, so you can chain them + # ... and a slip. Middlewares wrap exporters and other middlewares, so you can chain them # ad nauseam + slipper = Middleware::Slipper.new(scaler, :offset => 2) # Now when we send export commands to the Slipper it will play them through # to the Scaler and the Scaler in turn will send commands to the exporter. slipper.start_export(1024, 576) trackers.each do | t | slipper.start_tracker_segment(t.name) - t.each {|kf slipper.export_point(kf.frame, kf.abs_x, kf.abs_y, kf.residual) } + t.each do | keyframe | + slipper.export_point(keyframe.frame, keyframe.abs_x, keyframe.abs_y, keyframe.residual) + end slipper.end_tracker_segment end - + slipper.end_export + # And we are done! \ No newline at end of file