Packagealternativa.engine3d.loaders
Classpublic class TexturesLoader
InheritanceTexturesLoader Inheritance flash.events.EventDispatcher

An object that downloads textures by their reference and upload them into the Context3D



Public Properties
 PropertyDefined By
  context : Context3D
A Context3D to which resources wil be loaded.
TexturesLoader
Public Methods
 MethodDefined By
  
TexturesLoader(context:Context3D)
Creates a new TexturesLoader instance.
TexturesLoader
  
clean():void
Clears links to all data stored in this TexturesLoader instance.
TexturesLoader
  
Clears links to all data stored in this TexturesLoader instance and removes it from the context.
TexturesLoader
  
dispose(urls:Vector.<String>):void
Removes texture resources from Context3D.
TexturesLoader
  
loadResource(resource:ExternalTextureResource, createTexture3D:Boolean = true, needBitmapData:Boolean = true):void
Loads a resource.
TexturesLoader
  
loadResources(resources:Vector.<ExternalTextureResource>, createTexture3D:Boolean = true, needBitmapData:Boolean = true):void
Loads list of textures
TexturesLoader
Events
 Event Summary Defined By
  Dispatches after complete loading of all textures.TexturesLoader
Property Detail
contextproperty
public var context:Context3D

A Context3D to which resources wil be loaded.

Constructor Detail
TexturesLoader()Constructor
public function TexturesLoader(context:Context3D)

Creates a new TexturesLoader instance.

Parameters
context:Context3D — – A Context3D to which resources wil be loaded.
Method Detail
clean()method
public function clean():void

Clears links to all data stored in this TexturesLoader instance. (List of downloaded textures)

cleanAndDispose()method 
public function cleanAndDispose():void

Clears links to all data stored in this TexturesLoader instance and removes it from the context.

dispose()method 
public function dispose(urls:Vector.<String>):void

Removes texture resources from Context3D.

Parameters

urls:Vector.<String> — List of links to resources, that should be removed.

loadResource()method 
public function loadResource(resource:ExternalTextureResource, createTexture3D:Boolean = true, needBitmapData:Boolean = true):void

Loads a resource.

Parameters

resource:ExternalTextureResource
 
createTexture3D:Boolean (default = true) — Create texture on uploading
 
needBitmapData:Boolean (default = true) — If true, keeps BitmapData after uploading textures into a context.

loadResources()method 
public function loadResources(resources:Vector.<ExternalTextureResource>, createTexture3D:Boolean = true, needBitmapData:Boolean = true):void

Loads list of textures

Parameters

resources:Vector.<ExternalTextureResource> — List of ExternalTextureResource each of them has link to texture file which needs to be downloaded.
 
createTexture3D:Boolean (default = true) — Create texture on uploading.
 
needBitmapData:Boolean (default = true) — If true, keeps BitmapData after uploading textures into a context.

Event Detail
complete Event
Event Object Type: alternativa.engine3d.loaders.events.TexturesLoaderEvent
TexturesLoaderEvent.type property = flash.events.TexturesLoaderEvent.COMPLETE

Dispatches after complete loading of all textures.