Class: Mittsu::MeshBasicMaterial
- Includes:
- OpenGLMaterialBasics
- Defined in:
- lib/mittsu/materials/mesh_basic_material.rb,
lib/mittsu/renderers/opengl/materials/mesh_basic_material.rb
Instance Attribute Summary collapse
-
#alpha_map ⇒ Object
Returns the value of attribute alpha_map.
-
#color ⇒ Object
Returns the value of attribute color.
-
#combine ⇒ Object
Returns the value of attribute combine.
-
#env_map ⇒ Object
Returns the value of attribute env_map.
-
#fog ⇒ Object
Returns the value of attribute fog.
-
#light_map ⇒ Object
Returns the value of attribute light_map.
-
#map ⇒ Object
Returns the value of attribute map.
-
#morph_targets ⇒ Object
Returns the value of attribute morph_targets.
-
#reflectivity ⇒ Object
Returns the value of attribute reflectivity.
-
#refraction_ratio ⇒ Object
Returns the value of attribute refraction_ratio.
-
#shading ⇒ Object
Returns the value of attribute shading.
-
#skinning ⇒ Object
Returns the value of attribute skinning.
-
#specular_map ⇒ Object
Returns the value of attribute specular_map.
-
#vertex_colors ⇒ Object
Returns the value of attribute vertex_colors.
-
#wireframe ⇒ Object
Returns the value of attribute wireframe.
-
#wireframe_linecap ⇒ Object
Returns the value of attribute wireframe_linecap.
-
#wireframe_linejoin ⇒ Object
Returns the value of attribute wireframe_linejoin.
-
#wireframe_linewidth ⇒ Object
Returns the value of attribute wireframe_linewidth.
Attributes inherited from Material
#alpha_test, #attributes, #blend_dst, #blend_dst_alpha, #blend_equation, #blend_equation_alpha, #blend_src, #blend_src_alpha, #blending, #bump_map, #color_write, #default_attribute_values, #defines, #depth_test, #depth_write, #fragment_shader, #id, #lights, #metal, #morph_normals, #name, #normal_map, #opacity, #overdraw, #polygon_offset, #polygon_offset_factor, #polygon_offset_units, #program, #shader, #shadow_pass, #side, #size_attenuation, #transparent, #type, #uniforms, #uniforms_list, #uuid, #vertex_shader, #visible, #wrap_around
Instance Method Summary collapse
- #clone ⇒ Object
-
#initialize(parameters = {}) ⇒ MeshBasicMaterial
constructor
A new instance of MeshBasicMaterial.
- #refresh_uniforms(uniforms) ⇒ Object
Methods included from OpenGLMaterialBasics
#get_uv_scale_map, #refresh_env_map_uniforms, #refresh_map_uniforms, #refresh_other_uniforms, #refresh_uniforms_basic
Methods inherited from Material
#clear_custom_attributes, #custom_attributes_dirty?, #dispose, #init, #needs_camera_position_uniform?, #needs_face_normals?, #needs_lights?, #needs_update=, #needs_update?, #needs_view_matrix_uniform?, #set, #set_values, #to_json, #update
Methods included from EventDispatcher
#add_event_listener, #dispatch_event, #has_event_listener, #remove_event_listener
Constructor Details
#initialize(parameters = {}) ⇒ MeshBasicMaterial
Returns a new instance of MeshBasicMaterial.
40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 |
# File 'lib/mittsu/materials/mesh_basic_material.rb', line 40 def initialize(parameters = {}) super() @type = 'MeshBasicMaterial' @color = Color.new(0xffffff) # emissive @map = nil @light_map = nil @specular_map = nil @alpha_map = nil @env_map = nil @combine = MultiplyOperation @reflectivity = 1.0 @refraction_ratio = 0.98 @fog = true @shading = SmoothShading @wireframe = false @wireframe_linewidth = 1 @wireframe_linecap = :round @wireframe_linejoin = :round @vertex_colors = NoColors @skinning = false @morph_targets = false set_values(parameters) end |
Instance Attribute Details
#alpha_map ⇒ Object
Returns the value of attribute alpha_map.
38 39 40 |
# File 'lib/mittsu/materials/mesh_basic_material.rb', line 38 def alpha_map @alpha_map end |
#color ⇒ Object
Returns the value of attribute color.
38 39 40 |
# File 'lib/mittsu/materials/mesh_basic_material.rb', line 38 def color @color end |
#combine ⇒ Object
Returns the value of attribute combine.
38 39 40 |
# File 'lib/mittsu/materials/mesh_basic_material.rb', line 38 def combine @combine end |
#env_map ⇒ Object
Returns the value of attribute env_map.
38 39 40 |
# File 'lib/mittsu/materials/mesh_basic_material.rb', line 38 def env_map @env_map end |
#fog ⇒ Object
Returns the value of attribute fog.
38 39 40 |
# File 'lib/mittsu/materials/mesh_basic_material.rb', line 38 def fog @fog end |
#light_map ⇒ Object
Returns the value of attribute light_map.
38 39 40 |
# File 'lib/mittsu/materials/mesh_basic_material.rb', line 38 def light_map @light_map end |
#map ⇒ Object
Returns the value of attribute map.
38 39 40 |
# File 'lib/mittsu/materials/mesh_basic_material.rb', line 38 def map @map end |
#morph_targets ⇒ Object
Returns the value of attribute morph_targets.
38 39 40 |
# File 'lib/mittsu/materials/mesh_basic_material.rb', line 38 def morph_targets @morph_targets end |
#reflectivity ⇒ Object
Returns the value of attribute reflectivity.
38 39 40 |
# File 'lib/mittsu/materials/mesh_basic_material.rb', line 38 def reflectivity @reflectivity end |
#refraction_ratio ⇒ Object
Returns the value of attribute refraction_ratio.
38 39 40 |
# File 'lib/mittsu/materials/mesh_basic_material.rb', line 38 def refraction_ratio @refraction_ratio end |
#shading ⇒ Object
Returns the value of attribute shading.
38 39 40 |
# File 'lib/mittsu/materials/mesh_basic_material.rb', line 38 def shading @shading end |
#skinning ⇒ Object
Returns the value of attribute skinning.
38 39 40 |
# File 'lib/mittsu/materials/mesh_basic_material.rb', line 38 def skinning @skinning end |
#specular_map ⇒ Object
Returns the value of attribute specular_map.
38 39 40 |
# File 'lib/mittsu/materials/mesh_basic_material.rb', line 38 def specular_map @specular_map end |
#vertex_colors ⇒ Object
Returns the value of attribute vertex_colors.
38 39 40 |
# File 'lib/mittsu/materials/mesh_basic_material.rb', line 38 def vertex_colors @vertex_colors end |
#wireframe ⇒ Object
Returns the value of attribute wireframe.
38 39 40 |
# File 'lib/mittsu/materials/mesh_basic_material.rb', line 38 def wireframe @wireframe end |
#wireframe_linecap ⇒ Object
Returns the value of attribute wireframe_linecap.
38 39 40 |
# File 'lib/mittsu/materials/mesh_basic_material.rb', line 38 def wireframe_linecap @wireframe_linecap end |
#wireframe_linejoin ⇒ Object
Returns the value of attribute wireframe_linejoin.
38 39 40 |
# File 'lib/mittsu/materials/mesh_basic_material.rb', line 38 def wireframe_linejoin @wireframe_linejoin end |
#wireframe_linewidth ⇒ Object
Returns the value of attribute wireframe_linewidth.
38 39 40 |
# File 'lib/mittsu/materials/mesh_basic_material.rb', line 38 def wireframe_linewidth @wireframe_linewidth end |
Instance Method Details
#clone ⇒ Object
77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 |
# File 'lib/mittsu/materials/mesh_basic_material.rb', line 77 def clone material = Material.new super(material) material.color.copy(@color) material.map = @map material.lightMap = @lightMap material.specularMap = @specularMap material.alphaMap = @alphaMap material.envMap = @envMap material.combine = @combine material.reflectivity = @reflectivity material.refractionRatio = @refractionRatio material.fog = @fog material.shading = @shading material.wireframe = @wireframe material.wireframeLinewidth = @wireframeLinewidth material.wireframeLinecap = @wireframeLinecap material.wireframeLinejoin = @wireframeLinejoin material.vertexColors = @vertexColors material.skinning = @skinning material.morphTargets = @morphTargets material end |
#refresh_uniforms(uniforms) ⇒ Object
7 8 9 |
# File 'lib/mittsu/renderers/opengl/materials/mesh_basic_material.rb', line 7 def refresh_uniforms(uniforms) refresh_uniforms_basic(uniforms) end |