Class: Rgltf::Extensions::KHRLightsPunctual::Spot
- Inherits:
-
Object
- Object
- Rgltf::Extensions::KHRLightsPunctual::Spot
- Defined in:
- lib/rgltf/extensions/khr_lights_punctual.rb
Instance Attribute Summary collapse
-
#inner_cone_angle ⇒ Object
readonly
Returns the value of attribute inner_cone_angle.
-
#outer_cone_angle ⇒ Object
readonly
Returns the value of attribute outer_cone_angle.
-
#source_json ⇒ Object
readonly
Returns the value of attribute source_json.
Instance Method Summary collapse
-
#initialize(json) ⇒ Spot
constructor
A new instance of Spot.
Constructor Details
#initialize(json) ⇒ Spot
Returns a new instance of Spot.
43 44 45 46 47 |
# File 'lib/rgltf/extensions/khr_lights_punctual.rb', line 43 def initialize(json) @source_json = json @inner_cone_angle = json.fetch('innerConeAngle', 0.0) @outer_cone_angle = json.fetch('outerConeAngle', Math::PI / 4.0) end |
Instance Attribute Details
#inner_cone_angle ⇒ Object (readonly)
Returns the value of attribute inner_cone_angle.
41 42 43 |
# File 'lib/rgltf/extensions/khr_lights_punctual.rb', line 41 def inner_cone_angle @inner_cone_angle end |
#outer_cone_angle ⇒ Object (readonly)
Returns the value of attribute outer_cone_angle.
41 42 43 |
# File 'lib/rgltf/extensions/khr_lights_punctual.rb', line 41 def outer_cone_angle @outer_cone_angle end |
#source_json ⇒ Object (readonly)
Returns the value of attribute source_json.
41 42 43 |
# File 'lib/rgltf/extensions/khr_lights_punctual.rb', line 41 def source_json @source_json end |