Class: Bayonetta::MOT2File::Interpolation3
- Inherits:
-
LibBin::Structure
- Object
- LibBin::Structure
- Bayonetta::MOT2File::Interpolation3
- Defined in:
- lib/bayonetta/mot.rb
Instance Method Summary collapse
Instance Method Details
#value(frame_index) ⇒ Object
187 188 189 190 191 |
# File 'lib/bayonetta/mot.rb', line 187 def value(frame_index) cp = @keys[frame_index] cp = @keys.last unless cp @p + cp*@dp end |
#values(frame_count) ⇒ Object
181 182 183 184 185 |
# File 'lib/bayonetta/mot.rb', line 181 def values(frame_count) count = frame_count res = @keys.collect { |k| @p + k*@dp } res + [res.last] * (frame_count - keys.length) end |