Class: AnimateIt::Timeline::Segment

Inherits:
Data
  • Object
show all
Defined in:
lib/animate_it/timeline.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#class_nameObject (readonly)

Returns the value of attribute class_name

Returns:

  • (Object)

    the current value of class_name



3
4
5
# File 'lib/animate_it/timeline.rb', line 3

def class_name
  @class_name
end

#duration_framesObject (readonly)

Returns the value of attribute duration_frames

Returns:

  • (Object)

    the current value of duration_frames



3
4
5
# File 'lib/animate_it/timeline.rb', line 3

def duration_frames
  @duration_frames
end

#from_frameObject (readonly)

Returns the value of attribute from_frame

Returns:

  • (Object)

    the current value of from_frame



3
4
5
# File 'lib/animate_it/timeline.rb', line 3

def from_frame
  @from_frame
end

#kindObject (readonly)

Returns the value of attribute kind

Returns:

  • (Object)

    the current value of kind



3
4
5
# File 'lib/animate_it/timeline.rb', line 3

def kind
  @kind
end

#layoutObject (readonly)

Returns the value of attribute layout

Returns:

  • (Object)

    the current value of layout



3
4
5
# File 'lib/animate_it/timeline.rb', line 3

def layout
  @layout
end

#nameObject (readonly)

Returns the value of attribute name

Returns:

  • (Object)

    the current value of name



3
4
5
# File 'lib/animate_it/timeline.rb', line 3

def name
  @name
end

#rendererObject (readonly)

Returns the value of attribute renderer

Returns:

  • (Object)

    the current value of renderer



3
4
5
# File 'lib/animate_it/timeline.rb', line 3

def renderer
  @renderer
end

#scene_classObject (readonly)

Returns the value of attribute scene_class

Returns:

  • (Object)

    the current value of scene_class



3
4
5
# File 'lib/animate_it/timeline.rb', line 3

def scene_class
  @scene_class
end

#show_in_timelineObject (readonly)

Returns the value of attribute show_in_timeline

Returns:

  • (Object)

    the current value of show_in_timeline



3
4
5
# File 'lib/animate_it/timeline.rb', line 3

def show_in_timeline
  @show_in_timeline
end

#sourceObject (readonly)

Returns the value of attribute source

Returns:

  • (Object)

    the current value of source



3
4
5
# File 'lib/animate_it/timeline.rb', line 3

def source
  @source
end

#styleObject (readonly)

Returns the value of attribute style

Returns:

  • (Object)

    the current value of style



3
4
5
# File 'lib/animate_it/timeline.rb', line 3

def style
  @style
end

#trackObject (readonly)

Returns the value of attribute track

Returns:

  • (Object)

    the current value of track



3
4
5
# File 'lib/animate_it/timeline.rb', line 3

def track
  @track
end

#transitionObject (readonly)

Returns the value of attribute transition

Returns:

  • (Object)

    the current value of transition



3
4
5
# File 'lib/animate_it/timeline.rb', line 3

def transition
  @transition
end

Instance Method Details

#active_at?(frame) ⇒ Boolean

Returns:

  • (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