Class: Stagecraft::Lights::Light
- Defined in:
- lib/stagecraft/lights/light.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#color ⇒ Object
Returns the value of attribute color.
-
#intensity ⇒ Object
Returns the value of attribute intensity.
Attributes inherited from Node
#cast_shadow, #children, #name, #parent, #position, #receive_shadow, #render_order, #rotation, #scale, #visible, #world_version
Instance Method Summary collapse
- #direction ⇒ Object
-
#initialize(color: Color.new(1.0), intensity: 1.0) ⇒ Light
constructor
A new instance of 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
Instance Attribute Details
#color ⇒ Object
Returns the value of attribute color.
6 7 8 |
# File 'lib/stagecraft/lights/light.rb', line 6 def color @color end |
#intensity ⇒ Object
Returns the value of attribute intensity.
6 7 8 |
# File 'lib/stagecraft/lights/light.rb', line 6 def intensity @intensity end |
Instance Method Details
#direction ⇒ Object
25 26 27 |
# File 'lib/stagecraft/lights/light.rb', line 25 def direction world_matrix.extract_rotation * Larb::Vec3.forward end |