Class: Raylib::MaterialMap

Inherits:
FFI::Struct
  • Object
show all
Defined in:
lib/raylib/core/structs/material_map.rb

Overview

MaterialMap

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.create(texture, color, value) ⇒ Object



10
11
12
13
14
15
16
# File 'lib/raylib/core/structs/material_map.rb', line 10

def self.create(texture, color, value)
  new.tap do |instance|
    instance[:texture] = texture
    instance[:color] = color
    instance[:value] = value
  end
end

Instance Method Details

#colorColor

Material map color

Returns:



33
# File 'lib/raylib/core/structs/material_map.rb', line 33

def color = self[:color]

#color=(new_color) ⇒ Object

Sets Material map color



36
37
38
# File 'lib/raylib/core/structs/material_map.rb', line 36

def color=(new_color)
  self[:color] = new_color
end

#textureTexture2D

Material map texture

Returns:



24
# File 'lib/raylib/core/structs/material_map.rb', line 24

def texture = self[:texture]

#texture=(new_texture) ⇒ Object

Sets Material map texture



27
28
29
# File 'lib/raylib/core/structs/material_map.rb', line 27

def texture=(new_texture)
  self[:texture] = new_texture
end

#to_sObject



18
19
20
# File 'lib/raylib/core/structs/material_map.rb', line 18

def to_s
  "Raylib::MaterialMap##{object_id} texture=#{texture} color=#{color} value=#{value}"
end

#valueFloat

Material map value

Returns:

  • (Float)

    value



42
# File 'lib/raylib/core/structs/material_map.rb', line 42

def value = self[:value]

#value=(new_value) ⇒ Object

Sets Material map value



45
46
47
# File 'lib/raylib/core/structs/material_map.rb', line 45

def value=(new_value)
  self[:value] = new_value
end