Class: Bayonetta::MOT2File::Interpolation2
- Inherits:
-
LibBin::Structure
- Object
- LibBin::Structure
- Bayonetta::MOT2File::Interpolation2
- Defined in:
- lib/bayonetta/mot.rb
Instance Method Summary collapse
Instance Method Details
#value(frame_index) ⇒ Object
168 169 170 171 172 |
# File 'lib/bayonetta/mot.rb', line 168 def value(frame_index) cp = @keys[frame_index] cp = @keys.last unless cp @p + cp*@dp end |
#values(frame_count) ⇒ Object
162 163 164 165 166 |
# File 'lib/bayonetta/mot.rb', line 162 def values(frame_count) count = frame_count res = @keys.collect { |k| @p + k*@dp } res + [res.last] * (frame_count - keys.length) end |