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, #time_source

Attributes included from Yuki::AnimationMixin

#player, #resolver

Instance Method Summary collapse

Methods inherited from ScalarAnimation

#start

Methods inherited from TimedAnimation

#done?, #duration, #parallel_add, #play_before, #start, #update

Methods included from Yuki::AnimationMixin

#begin_offset_for_next_animation, #done?, #duration, #start, #update

Constructor Details

#initialize(time_to_process, on, property_get, property_set, a, b, distortion: :UNICITY_DISTORTION, time_source: :SCENE_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: :SCENE_TIME_SOURCE) —

    callable taking no parameter and giving the current time



375
376
# File 'docs/4_Systems_005_Animation.rb', line 375

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