Class: Mittsu::CubeTexture

Inherits:
Texture
  • Object
show all
Defined in:
lib/mittsu/textures/cube_texture.rb

Constant Summary

Constants inherited from Texture

Texture::DEFAULT_IMAGE, Texture::DEFAULT_MAPPING

Instance Attribute Summary collapse

Attributes inherited from Texture

#anisotropy, #filp_y, #format, #generate_mipmaps, #id, #image, #mag_filter, #mapping, #min_filter, #mipmaps, #name, #offset, #on_update, #premultiply_alpha, #repeat, #source_file, #type, #unpack_alignment, #uuid, #wrap_s, #wrap_t

Instance Method Summary collapse

Methods inherited from Texture

#dispose, #needs_update=, #needs_update?, #update

Methods included from EventDispatcher

#add_event_listener, #dispatch_event, #has_event_listener, #remove_event_listener

Constructor Details

#initialize(images = nil, mapping = DEFAULT_MAPPING, wrap_s = ClampToEdgeWrapping, wrap_t = ClampToEdgeWrapping, mag_filter = LinearFilter, min_filter = LinearMipMapLinearFilter, format = RGBAFormat, type = UnsignedByteType, anisotropy = 1) ⇒ CubeTexture

Returns a new instance of CubeTexture.



7
8
9
10
11
# File 'lib/mittsu/textures/cube_texture.rb', line 7

def initialize(images = nil, mapping = DEFAULT_MAPPING, wrap_s = ClampToEdgeWrapping, wrap_t = ClampToEdgeWrapping, mag_filter = LinearFilter, min_filter = LinearMipMapLinearFilter, format = RGBAFormat, type = UnsignedByteType, anisotropy = 1)
  super(images, mapping, wrap_s, wrap_t, mag_filter, min_filter, format, type, anisotropy)

  @images = images
end

Instance Attribute Details

#imagesObject

Returns the value of attribute images.



5
6
7
# File 'lib/mittsu/textures/cube_texture.rb', line 5

def images
  @images
end

Instance Method Details

#clone(texture = CubeTexture.new) ⇒ Object



13
14
15
16
17
# File 'lib/mittsu/textures/cube_texture.rb', line 13

def clone(texture = CubeTexture.new)
  super(texture)
  texture.images = @images
  texture
end