|
@@ -4180,7 +4180,7 @@ export class ThinEngine {
|
|
|
/** @hidden */
|
|
|
public _loadFile(url: string, onSuccess: (data: string | ArrayBuffer, responseURL?: string) => void, onProgress?: (data: any) => void,
|
|
|
offlineProvider?: IOfflineProvider, useArrayBuffer?: boolean, onError?: (request?: IWebRequest, exception?: any) => void): IFileRequest {
|
|
|
- let request = FileTools.LoadFile(url, onSuccess, onProgress, offlineProvider, useArrayBuffer, onError);
|
|
|
+ let request = ThinEngine._FileToolsLoadFile(url, onSuccess, onProgress, offlineProvider, useArrayBuffer, onError);
|
|
|
this._activeRequests.push(request);
|
|
|
request.onCompleteObservable.add((request) => {
|
|
|
this._activeRequests.splice(this._activeRequests.indexOf(request), 1);
|
|
@@ -4189,6 +4189,21 @@ export class ThinEngine {
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
+ * Loads a file from a url
|
|
|
+ * @param url url to load
|
|
|
+ * @param onSuccess callback called when the file successfully loads
|
|
|
+ * @param onProgress callback called while file is loading (if the server supports this mode)
|
|
|
+ * @param offlineProvider defines the offline provider for caching
|
|
|
+ * @param useArrayBuffer defines a boolean indicating that date must be returned as ArrayBuffer
|
|
|
+ * @param onError callback called when the file fails to load
|
|
|
+ * @returns a file request object
|
|
|
+ * @hidden
|
|
|
+ */
|
|
|
+ public static _FileToolsLoadFile(url: string, onSuccess: (data: string | ArrayBuffer, responseURL?: string) => void, onProgress?: (ev: ProgressEvent) => void, offlineProvider?: IOfflineProvider, useArrayBuffer?: boolean, onError?: (request?: WebRequest, exception?: LoadFileError) => void): IFileRequest {
|
|
|
+ throw _DevTools.WarnImport("FileTools");
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
* Reads pixels from the current frame buffer. Please note that this function can be slow
|
|
|
* @param x defines the x coordinate of the rectangle where pixels must be read
|
|
|
* @param y defines the y coordinate of the rectangle where pixels must be read
|