Class: Three::MeshNormalMaterial
- Inherits:
-
Material
- Object
- EventDispatcher
- Material
- Three::MeshNormalMaterial
- Defined in:
- lib/three/materials/mesh_normal_material.rb
Instance Attribute Summary collapse
-
#flat_shading ⇒ Object
Returns the value of attribute flat_shading.
-
#wireframe ⇒ Object
Returns the value of attribute wireframe.
-
#wireframe_linewidth ⇒ Object
Returns the value of attribute wireframe_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) ⇒ MeshNormalMaterial
constructor
A new instance of MeshNormalMaterial.
- #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) ⇒ MeshNormalMaterial
Returns a new instance of MeshNormalMaterial.
9 10 11 12 13 14 15 16 17 |
# File 'lib/three/materials/mesh_normal_material.rb', line 9 def initialize(parameters = nil) super(nil) @type = "MeshNormalMaterial" @wireframe = false @wireframe_linewidth = 1 @flat_shading = false set_values(parameters) if parameters mark_dirty! end |
Instance Attribute Details
#flat_shading ⇒ Object
Returns the value of attribute flat_shading.
7 8 9 |
# File 'lib/three/materials/mesh_normal_material.rb', line 7 def flat_shading @flat_shading end |
#wireframe ⇒ Object
Returns the value of attribute wireframe.
7 8 9 |
# File 'lib/three/materials/mesh_normal_material.rb', line 7 def wireframe @wireframe end |
#wireframe_linewidth ⇒ Object
Returns the value of attribute wireframe_linewidth.
7 8 9 |
# File 'lib/three/materials/mesh_normal_material.rb', line 7 def wireframe_linewidth @wireframe_linewidth end |
Instance Method Details
#to_h ⇒ Object
34 35 36 37 38 39 40 |
# File 'lib/three/materials/mesh_normal_material.rb', line 34 def to_h super.merge( wireframe: @wireframe, wireframe_linewidth: @wireframe_linewidth, flat_shading: @flat_shading ) end |