load method
dynamic
load(])
override
Implementation
@override
load(url, onLoad, [onProgress, onError]) {
onLoadCallback(texture, texData) {
switch (texture.type) {
case UnsignedByteType:
texture.encoding = RGBEEncoding;
texture.minFilter = NearestFilter;
texture.magFilter = NearestFilter;
texture.generateMipmaps = false;
texture.flipY = true;
break;
case FloatType:
texture.encoding = LinearEncoding;
texture.minFilter = LinearFilter;
texture.magFilter = LinearFilter;
texture.generateMipmaps = false;
texture.flipY = true;
break;
case HalfFloatType:
texture.encoding = LinearEncoding;
texture.minFilter = LinearFilter;
texture.magFilter = LinearFilter;
texture.generateMipmaps = false;
texture.flipY = true;
break;
}
onLoad(texture);
}
return super.load(url, onLoadCallback, onProgress, onError);
}