class CyberarmEngine::Model::Material
Attributes
ambient[RW]
diffuse[RW]
name[RW]
specular[RW]
texture_id[R]
Public Class Methods
new(name)
click to toggle source
# File lib/cyberarm_engine/model/material.rb, line 7 def initialize(name) @name = name @ambient = Color.new(1, 1, 1, 1) @diffuse = Color.new(1, 1, 1, 1) @specular = Color.new(1, 1, 1, 1) @texture = nil @texture_id = nil end
Public Instance Methods
set_texture(texture_path)
click to toggle source
# File lib/cyberarm_engine/model/material.rb, line 16 def set_texture(texture_path) @texture_id = Texture.new(path: texture_path).id end