class Mittsu::HemisphereLight

Attributes

ground_color[RW]
intensity[RW]

Public Class Methods

new(sky_color = nil, ground_color = nil, intensity = 1.0) click to toggle source
Calls superclass method
# File lib/mittsu/lights/hemisphere_light.rb, line 8
def initialize(sky_color = nil, ground_color = nil, intensity = 1.0)
  super(sky_color)

  @type = 'HemisphereLight'

  @position.set(0.0, 100.0, 0.0)

  @ground_color = Color.new(ground_color)
  @intensity = intensity
end

Public Instance Methods

clone() click to toggle source
Calls superclass method
# File lib/mittsu/lights/hemisphere_light.rb, line 19
def clone
  light = HemisphereLight.new
  super(light)

  light.ground_color.copy(@ground_color)
  light.intensity = @intensity

  light
end

Protected Instance Methods

jsonify() click to toggle source
Calls superclass method
# File lib/mittsu/lights/hemisphere_light.rb, line 31
def jsonify
  data = super
  data[:color] = self.color.get_hex
  data[:ground_color] = self.ground_color.get_hex
  data
end