Sha256: f2b8f972e5481fdede7f8ed22a7ea5a91dea76d6468e4b1414c38528cf56cfd6

Contents?: true

Size: 520 Bytes

Versions: 10

Compression:

Stored size: 520 Bytes

Contents

module CyberarmEngine
  class Model
    class Material
      attr_accessor :name, :ambient, :diffuse, :specular
      attr_reader :texture_id

      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

      def set_texture(texture_path)
        @texture_id = Texture.new(path: texture_path).id
      end
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
cyberarm_engine-0.24.4 lib/cyberarm_engine/model/material.rb
cyberarm_engine-0.24.3 lib/cyberarm_engine/model/material.rb
cyberarm_engine-0.24.2 lib/cyberarm_engine/model/material.rb
cyberarm_engine-0.24.1 lib/cyberarm_engine/model/material.rb
cyberarm_engine-0.24.0 lib/cyberarm_engine/model/material.rb
cyberarm_engine-0.23.0 lib/cyberarm_engine/model/material.rb
cyberarm_engine-0.22.0 lib/cyberarm_engine/model/material.rb
cyberarm_engine-0.21.0 lib/cyberarm_engine/model/material.rb
cyberarm_engine-0.20.0 lib/cyberarm_engine/model/material.rb
cyberarm_engine-0.19.1 lib/cyberarm_engine/model/material.rb