Class: Mittsu::VideoTexture

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

Constant Summary

Constants inherited from Texture

Texture::DEFAULT_IMAGE, Texture::DEFAULT_MAPPING

Instance Attribute Summary

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

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

Methods included from EventDispatcher

#add_event_listener, #dispatch_event, #has_event_listener, #remove_event_listener

Constructor Details

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

Returns a new instance of VideoTexture.



5
6
7
8
9
10
11
12
13
14
15
# File 'lib/mittsu/textures/video_texture.rb', line 5

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

  @generate_mipmaps = false

  # TODO: update ???
  # requestAnimationFrame( update );
  # if ( video.readyState === video.HAVE_ENOUGH_DATA ) {
  #   scope.needsUpdate = true;
  # }
end