Method: Mittsu::MeshPhongMaterial#initialize
- Defined in:
- lib/mittsu/materials/mesh_phong_material.rb
#initialize(parameters = {}) ⇒ MeshPhongMaterial
Returns a new instance of MeshPhongMaterial.
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 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 |
# File 'lib/mittsu/materials/mesh_phong_material.rb', line 48 def initialize(parameters = {}) super() @type = 'MeshPhongMaterial' @color = Color.new(0xffffff) # diffuse @emissive = Color.new(0x000000) @specular = Color.new(0x111111) @shininess = 30.0 @metal = false @wrap_around = false @wrap_rgb = Vector3.new(1.0, 1.0, 1.0) @map = nil @light_map = nil @bump_map = nil @bump_scale = 1.0 @normal_map = nil @normal_scale = Vector2.new(1.0, 1.0) @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.0 @wireframe_linecap = 'round' @wireframe_linejoin = 'round' @vertex_colors = NoColors @skinning = false @morph_targets = false @morph_normals = false self.set_values(parameters) end |