Class: Mittsu::MeshBasicMaterial
- Defined in:
- lib/mittsu/materials/mesh_basic_material.rb
Instance Attribute Summary
Attributes inherited from Material
#alpha_map, #alpha_test, #attributes, #blend_dst, #blend_dst_alpha, #blend_equation, #blend_equation_alpha, #blend_src, #blend_src_alpha, #blending, #bump_map, #color, #color_write, #combine, #default_attribute_values, #defines, #depth_test, #depth_write, #env_map, #fog, #fragment_shader, #id, #light_map, #lights, #map, #metal, #morph_normals, #morph_targets, #name, #normal_map, #opacity, #overdraw, #polygon_offset, #polygon_offset_factor, #polygon_offset_units, #program, #reflectivity, #refraction_ratio, #shading, #side, #size_attenuation, #skinning, #specular_map, #transparent, #type, #uniforms, #uuid, #vertex_colors, #vertex_shader, #visible, #wireframe, #wrap_around
Instance Method Summary collapse
- #clone ⇒ Object
-
#initialize(parameters = {}) ⇒ MeshBasicMaterial
constructor
A new instance of MeshBasicMaterial.
Methods inherited from Material
#dispose, #implementation, #needs_update=, #needs_update?, #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.
39 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 |
# File 'lib/mittsu/materials/mesh_basic_material.rb', line 39 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 Method Details
#clone ⇒ Object
76 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 |
# File 'lib/mittsu/materials/mesh_basic_material.rb', line 76 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 |