Class: Stagecraft::Lights::Directional
- Defined in:
- lib/stagecraft/lights/directional_light.rb
Instance Attribute Summary collapse
-
#shadow ⇒ Object
Returns the value of attribute shadow.
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(cast_shadow: false, shadow: ShadowConfig.new) ⇒ Directional
constructor
A new instance of Directional.
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(cast_shadow: false, shadow: ShadowConfig.new) ⇒ Directional
Returns a new instance of Directional.
22 23 24 25 26 |
# File 'lib/stagecraft/lights/directional_light.rb', line 22 def initialize(cast_shadow: false, shadow: ShadowConfig.new, **) super(**) self.cast_shadow = cast_shadow @shadow = shadow end |
Instance Attribute Details
#shadow ⇒ Object
Returns the value of attribute shadow.
20 21 22 |
# File 'lib/stagecraft/lights/directional_light.rb', line 20 def shadow @shadow end |