Class: Rgltf::Extensions::KHRLightsPunctual::Spot

Inherits:
Object
  • Object
show all
Defined in:
lib/rgltf/extensions/khr_lights_punctual.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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_angleObject (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_angleObject (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_jsonObject (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