docs: function Texture2D (opts) {
      var file    = opts.file
        , url     = opts.url
        , data    = opts.data
        , texture = opts.texture
  
      if (url) {
          this.name = url
          data = new Image()
          data.src = url
      } else if (file) {
          this.name = file
          data = resource(file)
      } else if (texture) {
          this.name = texture.name
          data = texture.imgElement
      }
  
      this.size = {width: 0, height: 0}
  
      if (data instanceof RemoteResource) {
          events.addListenerOnce(data, 'load', this.dataDidLoad.bind(this, data))
          this.imgElement = data.load()
      } else if (url) {
          this.imgElement = data
          this.imgElement.onload = this.dataDidLoad.bind(this, data)
      } else {
          this.imgElement = data
          this.dataDidLoad(data)
      }
  }