Class: Yuki::Animation::ScalarOffsetAnimation

Inherits:
ScalarAnimation show all
Defined in:
docs/4_Systems_005_Animation.rb

Overview

Scalar animation with offset

Instance Attribute Summary

Attributes inherited from TimedAnimation

#begin_time, #end_time, #parallel_animations, #root, #sub_animation, #time_source

Instance Method Summary collapse

Methods inherited from ScalarAnimation

#start

Methods inherited from TimedAnimation

#done?, #in_parallel_of, #parallel_add, #play_before, #resolver=, #start, #update

Constructor Details

#initialize(time_to_process, on, property_get, property_set, a, b, distortion: :UNICITY_DISTORTION, time_source: :GENERIC_TIME_SOURCE) ⇒ ScalarOffsetAnimation

Create a new ScalarOffsetAnimation convert it to another number (between 0 & 1) in order to distord time

Parameters:

  • time_to_process (Float)

    number of seconds (with generic time) to process the animation

  • on (Object)

    object that will receive the property

  • property_get (Symbol)

    name of the property to affect (add the = sign in the symbol name)

  • property_set (Symbol)

    name of the property to affect (add the = sign in the symbol name)

  • a (Float, Symbol)

    origin position

  • b (Float, Symbol)

    destination position

  • distortion (#call, Symbol) (defaults to: :UNICITY_DISTORTION)

    callable taking one paramater (between 0 & 1) and

  • time_source (#call, Symbol) (defaults to: :GENERIC_TIME_SOURCE)

    callable taking no parameter and giving the current time



190
191
# File 'docs/4_Systems_005_Animation.rb', line 190

def initialize(time_to_process, on, property_get, property_set, a, b, distortion: :UNICITY_DISTORTION, time_source: :GENERIC_TIME_SOURCE)
end