Class: Three::FogExp2
Instance Attribute Summary collapse
-
#density ⇒ Object
Returns the value of attribute density.
Attributes inherited from Fog
#color, #far, #name, #near, #type, #uuid
Instance Method Summary collapse
-
#initialize(color = 0xffffff, density: 0.00025, name: "") ⇒ FogExp2
constructor
A new instance of FogExp2.
- #to_h ⇒ Object
Methods included from Dirty
#add_dirty_dependent, #dirty?, #dirty_dependents, #dirty_field?, #dirty_fields, #mark_clean!, #mark_dirty!, #remove_dirty_dependent
Constructor Details
#initialize(color = 0xffffff, density: 0.00025, name: "") ⇒ FogExp2
Returns a new instance of FogExp2.
65 66 67 68 69 70 |
# File 'lib/three/scenes/fog.rb', line 65 def initialize(color = 0xffffff, density: 0.00025, name: "") super(color, near: nil, far: nil, name: name) @type = "FogExp2" @density = density mark_dirty! end |
Instance Attribute Details
#density ⇒ Object
Returns the value of attribute density.
63 64 65 |
# File 'lib/three/scenes/fog.rb', line 63 def density @density end |
Instance Method Details
#to_h ⇒ Object
77 78 79 80 81 82 83 84 |
# File 'lib/three/scenes/fog.rb', line 77 def to_h { type: @type, name: name, color: color.hex, density: @density } end |