Class: Three::LineBasicMaterial
- Inherits:
-
Material
- Object
- EventDispatcher
- Material
- Three::LineBasicMaterial
- Defined in:
- lib/three/materials/line_basic_material.rb
Instance Attribute Summary collapse
-
#color ⇒ Object
Returns the value of attribute color.
-
#fog ⇒ Object
Returns the value of attribute fog.
-
#linecap ⇒ Object
Returns the value of attribute linecap.
-
#linejoin ⇒ Object
Returns the value of attribute linejoin.
-
#linewidth ⇒ Object
Returns the value of attribute linewidth.
Attributes inherited from Material
#blending, #id, #name, #opacity, #side, #transparent, #type, #user_data, #uuid, #vertex_colors, #visible
Instance Method Summary collapse
-
#initialize(parameters = nil) ⇒ LineBasicMaterial
constructor
A new instance of LineBasicMaterial.
- #to_h ⇒ Object
Methods inherited from Material
allocate_id, #dirty_dependency_changed, #dispose, #needs_update, #needs_update!, #needs_update=, #set_values, #texture_slots, #textures
Methods included from Dirty
#add_dirty_dependent, #dirty?, #dirty_dependents, #dirty_field?, #dirty_fields, #mark_clean!, #mark_dirty!, #remove_dirty_dependent
Methods inherited from EventDispatcher
#add_event_listener, #dispatch_event, #has_event_listener?, #remove_event_listener
Constructor Details
#initialize(parameters = nil) ⇒ LineBasicMaterial
Returns a new instance of LineBasicMaterial.
10 11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/three/materials/line_basic_material.rb', line 10 def initialize(parameters = nil) super(nil) @type = "LineBasicMaterial" @color = Color.new(0xffffff) @linewidth = 1 @linecap = "round" @linejoin = "round" @fog = true bind_color_changes set_values(parameters) if parameters mark_dirty! end |
Instance Attribute Details
#color ⇒ Object
Returns the value of attribute color.
8 9 10 |
# File 'lib/three/materials/line_basic_material.rb', line 8 def color @color end |
#fog ⇒ Object
Returns the value of attribute fog.
8 9 10 |
# File 'lib/three/materials/line_basic_material.rb', line 8 def fog @fog end |
#linecap ⇒ Object
Returns the value of attribute linecap.
8 9 10 |
# File 'lib/three/materials/line_basic_material.rb', line 8 def linecap @linecap end |
#linejoin ⇒ Object
Returns the value of attribute linejoin.
8 9 10 |
# File 'lib/three/materials/line_basic_material.rb', line 8 def linejoin @linejoin end |
#linewidth ⇒ Object
Returns the value of attribute linewidth.
8 9 10 |
# File 'lib/three/materials/line_basic_material.rb', line 8 def linewidth @linewidth end |
Instance Method Details
#to_h ⇒ Object
49 50 51 52 53 54 55 56 57 |
# File 'lib/three/materials/line_basic_material.rb', line 49 def to_h super.merge( color: @color.hex, linewidth: @linewidth, linecap: @linecap, linejoin: @linejoin, fog: @fog ) end |