Class: FlameChannelParser::Key

Inherits:
Object
  • Object
show all
Defined in:
lib/key.rb

Overview

Represents a keyframe

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#break_slopeObject

Whether the tangents are broken at this keyframe



20
21
22
# File 'lib/key.rb', line 20

def break_slope
  @break_slope
end

#curve_modeObject

Curve order (relevant for 2012 only)



14
15
16
# File 'lib/key.rb', line 14

def curve_mode
  @curve_mode
end

#curve_orderObject

Curve order (relevant for 2012 only)



14
15
16
# File 'lib/key.rb', line 14

def curve_order
  @curve_order
end

#frameObject

Default frame is 1.0f



5
6
7
# File 'lib/key.rb', line 5

def frame
  @frame
end

#interpolationObject

Adapter for old interpolation



11
12
13
# File 'lib/key.rb', line 11

def interpolation
  @interpolation
end

#l_handle_xObject

Coordinates of the handles for 2012 setups



23
24
25
# File 'lib/key.rb', line 23

def l_handle_x
  @l_handle_x
end

#l_handle_yObject

Coordinates of the handles for 2012 setups



23
24
25
# File 'lib/key.rb', line 23

def l_handle_y
  @l_handle_y
end

#left_slopeObject

Returns the RightSlope parameter of the keyframe which we use for interpolations



17
18
19
# File 'lib/key.rb', line 17

def left_slope
  @left_slope
end

#r_handle_xObject

Coordinates of the handles for 2012 setups



23
24
25
# File 'lib/key.rb', line 23

def r_handle_x
  @r_handle_x
end

#r_handle_yObject

Coordinates of the handles for 2012 setups



23
24
25
# File 'lib/key.rb', line 23

def r_handle_y
  @r_handle_y
end

#right_slopeObject

Returns the LeftSlope parameter of the keyframe which we use for interpolations



17
18
19
# File 'lib/key.rb', line 17

def right_slope
  @right_slope
end

#valueObject

Default value is 0.f



8
9
10
# File 'lib/key.rb', line 8

def value
  @value
end

Instance Method Details

#has_2012_tangents?Boolean

Tells if this keyframe has 2012 tangents in it

Returns:

  • (Boolean)


60
61
62
# File 'lib/key.rb', line 60

def has_2012_tangents?
  @has_tangents ||= !!(l_handle_x && l_handle_y)
end