forked from playcanvas/engine
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbinary.js
More file actions
30 lines (24 loc) · 718 Bytes
/
binary.js
File metadata and controls
30 lines (24 loc) · 718 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
pc.extend(pc, function () {
'use strict';
var BinaryHandler = function () {
};
BinaryHandler.prototype = {
load: function (url, callback) {
pc.http.get(url, {responseType: pc.Http.ResponseType.ARRAY_BUFFER}, function (err, response) {
if (!err) {
callback(null, response);
} else {
callback(pc.string.format("Error loading binary resource: {0} [{1}]", url, err));
}
});
},
open: function (url, data) {
return data;
},
patch: function (asset, assets) {
}
};
return {
BinaryHandler: BinaryHandler
};
}());