Class: AnimateIt::Timeline::Segment
- Inherits:
-
Data
- Object
- Data
- AnimateIt::Timeline::Segment
- Defined in:
- lib/animate_it/timeline.rb
Instance Attribute Summary collapse
-
#class_name ⇒ Object
readonly
Returns the value of attribute class_name.
-
#duration_frames ⇒ Object
readonly
Returns the value of attribute duration_frames.
-
#from_frame ⇒ Object
readonly
Returns the value of attribute from_frame.
-
#kind ⇒ Object
readonly
Returns the value of attribute kind.
-
#layout ⇒ Object
readonly
Returns the value of attribute layout.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#renderer ⇒ Object
readonly
Returns the value of attribute renderer.
-
#scene_class ⇒ Object
readonly
Returns the value of attribute scene_class.
-
#show_in_timeline ⇒ Object
readonly
Returns the value of attribute show_in_timeline.
-
#source ⇒ Object
readonly
Returns the value of attribute source.
-
#style ⇒ Object
readonly
Returns the value of attribute style.
-
#track ⇒ Object
readonly
Returns the value of attribute track.
-
#transition ⇒ Object
readonly
Returns the value of attribute transition.
Instance Method Summary collapse
Instance Attribute Details
#class_name ⇒ Object (readonly)
Returns the value of attribute class_name
3 4 5 |
# File 'lib/animate_it/timeline.rb', line 3 def class_name @class_name end |
#duration_frames ⇒ Object (readonly)
Returns the value of attribute duration_frames
3 4 5 |
# File 'lib/animate_it/timeline.rb', line 3 def duration_frames @duration_frames end |
#from_frame ⇒ Object (readonly)
Returns the value of attribute from_frame
3 4 5 |
# File 'lib/animate_it/timeline.rb', line 3 def from_frame @from_frame end |
#kind ⇒ Object (readonly)
Returns the value of attribute kind
3 4 5 |
# File 'lib/animate_it/timeline.rb', line 3 def kind @kind end |
#layout ⇒ Object (readonly)
Returns the value of attribute layout
3 4 5 |
# File 'lib/animate_it/timeline.rb', line 3 def layout @layout end |
#name ⇒ Object (readonly)
Returns the value of attribute name
3 4 5 |
# File 'lib/animate_it/timeline.rb', line 3 def name @name end |
#renderer ⇒ Object (readonly)
Returns the value of attribute renderer
3 4 5 |
# File 'lib/animate_it/timeline.rb', line 3 def renderer @renderer end |
#scene_class ⇒ Object (readonly)
Returns the value of attribute scene_class
3 4 5 |
# File 'lib/animate_it/timeline.rb', line 3 def scene_class @scene_class end |
#show_in_timeline ⇒ Object (readonly)
Returns the value of attribute show_in_timeline
3 4 5 |
# File 'lib/animate_it/timeline.rb', line 3 def show_in_timeline @show_in_timeline end |
#source ⇒ Object (readonly)
Returns the value of attribute source
3 4 5 |
# File 'lib/animate_it/timeline.rb', line 3 def source @source end |
#style ⇒ Object (readonly)
Returns the value of attribute style
3 4 5 |
# File 'lib/animate_it/timeline.rb', line 3 def style @style end |
#track ⇒ Object (readonly)
Returns the value of attribute track
3 4 5 |
# File 'lib/animate_it/timeline.rb', line 3 def track @track end |
#transition ⇒ Object (readonly)
Returns the value of attribute transition
3 4 5 |
# File 'lib/animate_it/timeline.rb', line 3 def transition @transition end |
Instance Method Details
#active_at?(frame) ⇒ Boolean
18 19 20 21 22 |
# File 'lib/animate_it/timeline.rb', line 18 def active_at?(frame) return frame >= from_frame if duration_frames.nil? frame >= from_frame && frame < from_frame + duration_frames end |
#local_frame(frame) ⇒ Object
24 25 26 |
# File 'lib/animate_it/timeline.rb', line 24 def local_frame(frame) frame - from_frame end |