Skip to content

Instantly share code, notes, and snippets.

@julik
Created October 10, 2009 11:00
Show Gist options
  • Save julik/206786 to your computer and use it in GitHub Desktop.
Save julik/206786 to your computer and use it in GitHub Desktop.
require "rubygems"
require "tracksperanto"
# Make a tracker called "FirstPoint"
t = Tracksperanto::Tracker.new(:name => "FirstPoint")
# Add a keyframe to it at frame 20 (counting from 0), at 123
# in X and 678 in Y (from lower left corner).
t.keyframe! :frame => 20, :abs_x => 123, :abs_y => 678
# Open a file for writing, initialize an exporter with it and pass the Tracker
# objects to the exporter, along with the width and height
File.open("/tmp/pftrack.2dt", "wb") do | f |
x = Tracksperanto::Export::PFTrack5.new(f)
x.just_export([t], 720, 576)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment