Sha256: 54e48d09c30c4230a4de0aa7ad6ed6a85fc43d76514098bc9eae44806c420af2

Contents?: true

Size: 746 Bytes

Versions: 20

Compression:

Stored size: 746 Bytes

Contents

module Mittsu
  class LineBasicMaterial < Material
    attr_accessor :line_width, :line_cap, :line_join

    def initialize(parameters = {})
      super()

      @type = 'LineBasicMaterial'

      @color = Color.new(0xffffff)

      @line_width = 1.0
      @line_cap = :round
      @line_join = :round

      @vertex_colors = NoColors

      @fog = true

      self.set_values(parameters)
    end

    def clone
      LineBasicMaterial.new.tap do |material|
        super(material)

        material.color.copy(@color)

        material.line_width = @line_width
        material.line_cap = @line_cap
        material.line_join = @line_join

        material.vertex_colors = @vertex_colors

        material.fog = @fog
      end
    end
  end
end

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
mittsu-0.5.0 lib/mittsu/materials/line_basic_material.rb
mittsu-0.4.1 lib/mittsu/materials/line_basic_material.rb
mittsu-0.4.0 lib/mittsu/materials/line_basic_material.rb
mittsu-0.3.3 lib/mittsu/materials/line_basic_material.rb
mittsu-0.3.2 lib/mittsu/materials/line_basic_material.rb
mittsu-0.3.1 lib/mittsu/materials/line_basic_material.rb
mittsu-0.3.0 lib/mittsu/materials/line_basic_material.rb
mittsu-0.2.4 lib/mittsu/materials/line_basic_material.rb
mittsu-0.2.3 lib/mittsu/materials/line_basic_material.rb
mittsu-0.2.2 lib/mittsu/materials/line_basic_material.rb
mittsu-0.2.1 lib/mittsu/materials/line_basic_material.rb
mittsu-0.2.0 lib/mittsu/materials/line_basic_material.rb
mittsu-0.1.7 lib/mittsu/materials/line_basic_material.rb
mittsu-0.1.6 lib/mittsu/materials/line_basic_material.rb
mittsu-0.1.5 lib/mittsu/materials/line_basic_material.rb
mittsu-0.1.4 lib/mittsu/materials/line_basic_material.rb
mittsu-0.1.3 lib/mittsu/materials/line_basic_material.rb
mittsu-0.1.2 lib/mittsu/materials/line_basic_material.rb
mittsu-0.1.1 lib/mittsu/materials/line_basic_material.rb
mittsu-0.1.0 lib/mittsu/materials/line_basic_material.rb