Class: Stagecraft::Lights::Spot

Inherits:
Point show all
Defined in:
lib/stagecraft/lights/spot_light.rb

Instance Attribute Summary collapse

Attributes inherited from Point

#range

Attributes inherited from Light

#color, #intensity

Attributes inherited from Node

#cast_shadow, #children, #name, #parent, #position, #receive_shadow, #render_order, #rotation, #scale, #visible, #world_version

Instance Method Summary collapse

Methods inherited from Light

#direction

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_angleObject

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_angleObject

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