Class: Stagecraft::Lights::Spot
- Defined in:
- lib/stagecraft/lights/spot_light.rb
Instance Attribute Summary collapse
-
#inner_angle ⇒ Object
Returns the value of attribute inner_angle.
-
#outer_angle ⇒ Object
Returns the value of attribute outer_angle.
Attributes inherited from Point
Attributes inherited from Light
Attributes inherited from Node
#cast_shadow, #children, #name, #parent, #position, #receive_shadow, #render_order, #rotation, #scale, #visible, #world_version
Instance Method Summary collapse
-
#initialize(inner_angle: 0.0, outer_angle: Math::PI / 4.0) ⇒ Spot
constructor
A new instance of Spot.
Methods inherited from Light
Methods inherited from Node
#add, #find, #local_matrix, #look_at, #remove, #transform_dirty!, #traverse, #world_matrix, #world_matrix_with_version, #world_position
Constructor Details
#initialize(inner_angle: 0.0, outer_angle: Math::PI / 4.0) ⇒ Spot
Returns a new instance of Spot.
8 9 10 11 12 13 |
# File 'lib/stagecraft/lights/spot_light.rb', line 8 def initialize(inner_angle: 0.0, outer_angle: Math::PI / 4.0, **) super(**) @inner_angle = Float(inner_angle) @outer_angle = Float(outer_angle) validate_angles! end |
Instance Attribute Details
#inner_angle ⇒ Object
Returns the value of attribute inner_angle.
6 7 8 |
# File 'lib/stagecraft/lights/spot_light.rb', line 6 def inner_angle @inner_angle end |
#outer_angle ⇒ Object
Returns the value of attribute outer_angle.
6 7 8 |
# File 'lib/stagecraft/lights/spot_light.rb', line 6 def outer_angle @outer_angle end |