@galacean/engine-loader 1.2.0-beta.7 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/main.js +14 -14
- package/dist/main.js.map +1 -1
- package/dist/miniprogram.js +14 -14
- package/dist/module.js +14 -14
- package/dist/module.js.map +1 -1
- package/package.json +4 -4
- package/types/gltf/extensions/KHR_draco_mesh_compression.d.ts +0 -1
- package/types/resource-deserialize/resources/animationClip/ComponentMap.d.ts +0 -2
- package/types/resource-deserialize/resources/parser/CustomParser.d.ts +0 -6
- package/types/resource-deserialize/resources/parser/PrefabParser.d.ts +0 -5
- package/types/resource-deserialize/resources/scene/ISceneCustomParser.d.ts +0 -6
package/dist/main.js
CHANGED
|
@@ -1297,9 +1297,9 @@ exports.MeshLoader = /*#__PURE__*/ function(Loader1) {
|
|
|
1297
1297
|
_proto.load = function load(item, resourceManager) {
|
|
1298
1298
|
var _this = this;
|
|
1299
1299
|
return new engineCore.AssetPromise(function(resolve, reject) {
|
|
1300
|
-
_this.request(item.url, {
|
|
1300
|
+
_this.request(item.url, _extends({}, item, {
|
|
1301
1301
|
type: "arraybuffer"
|
|
1302
|
-
}).then(function(data) {
|
|
1302
|
+
})).then(function(data) {
|
|
1303
1303
|
decode(data, resourceManager.engine).then(function(mesh) {
|
|
1304
1304
|
resolve(mesh);
|
|
1305
1305
|
});
|
|
@@ -1323,9 +1323,9 @@ exports.EditorTextureLoader = /*#__PURE__*/ function(Loader1) {
|
|
|
1323
1323
|
_proto.load = function load(item, resourceManager) {
|
|
1324
1324
|
var _this = this;
|
|
1325
1325
|
return new engineCore.AssetPromise(function(resolve, reject) {
|
|
1326
|
-
_this.request(item.url, {
|
|
1326
|
+
_this.request(item.url, _extends({}, item, {
|
|
1327
1327
|
type: "arraybuffer"
|
|
1328
|
-
}).then(function(data) {
|
|
1328
|
+
})).then(function(data) {
|
|
1329
1329
|
decode(data, resourceManager.engine).then(function(texture) {
|
|
1330
1330
|
resolve(texture);
|
|
1331
1331
|
});
|
|
@@ -1532,9 +1532,9 @@ var EnvLoader = /*#__PURE__*/ function(Loader1) {
|
|
|
1532
1532
|
_proto.load = function load(item, resourceManager) {
|
|
1533
1533
|
var _this = this;
|
|
1534
1534
|
return new engineCore.AssetPromise(function(resolve, reject) {
|
|
1535
|
-
_this.request(item.url, {
|
|
1535
|
+
_this.request(item.url, _extends({}, item, {
|
|
1536
1536
|
type: "arraybuffer"
|
|
1537
|
-
}).then(function(arraybuffer) {
|
|
1537
|
+
})).then(function(arraybuffer) {
|
|
1538
1538
|
var _this;
|
|
1539
1539
|
var shArray = new Float32Array(arraybuffer, 0, 27);
|
|
1540
1540
|
var shByteLength = 27 * 4;
|
|
@@ -1614,9 +1614,9 @@ var FontLoader = /*#__PURE__*/ function(Loader1) {
|
|
|
1614
1614
|
_proto.load = function load(item, resourceManager) {
|
|
1615
1615
|
var _this = this;
|
|
1616
1616
|
return new engineCore.AssetPromise(function(resolve, reject) {
|
|
1617
|
-
_this.request(item.url, {
|
|
1617
|
+
_this.request(item.url, _extends({}, item, {
|
|
1618
1618
|
type: "json"
|
|
1619
|
-
}).then(function(data) {
|
|
1619
|
+
})).then(function(data) {
|
|
1620
1620
|
var fontName = data.fontName, fontUrl = data.fontUrl;
|
|
1621
1621
|
if (fontUrl) {
|
|
1622
1622
|
_this._registerFont(fontName, fontUrl).then(function() {
|
|
@@ -5129,9 +5129,9 @@ var HDRLoader = (_HDRLoader = // referenece: https://www.flipcode.com/archives/H
|
|
|
5129
5129
|
var _this = this;
|
|
5130
5130
|
return new engineCore.AssetPromise(function(resolve, reject) {
|
|
5131
5131
|
var engine = resourceManager.engine;
|
|
5132
|
-
_this.request(item.url, {
|
|
5132
|
+
_this.request(item.url, _extends({}, item, {
|
|
5133
5133
|
type: "arraybuffer"
|
|
5134
|
-
}).then(function(buffer) {
|
|
5134
|
+
})).then(function(buffer) {
|
|
5135
5135
|
var uint8Array = new Uint8Array(buffer);
|
|
5136
5136
|
var _HDRLoader__parseHeader = HDRLoader._parseHeader(uint8Array), width = _HDRLoader__parseHeader.width, height = _HDRLoader__parseHeader.height, dataPosition = _HDRLoader__parseHeader.dataPosition;
|
|
5137
5137
|
var pixels = HDRLoader._readPixels(uint8Array.subarray(dataPosition), width, height);
|
|
@@ -5879,9 +5879,9 @@ var ProjectLoader = /*#__PURE__*/ function(Loader1) {
|
|
|
5879
5879
|
var _this = this;
|
|
5880
5880
|
var engine = resourceManager.engine;
|
|
5881
5881
|
return new engineCore.AssetPromise(function(resolve, reject) {
|
|
5882
|
-
_this.request(item.url, {
|
|
5882
|
+
_this.request(item.url, _extends({}, item, {
|
|
5883
5883
|
type: "json"
|
|
5884
|
-
}).then(function(data) {
|
|
5884
|
+
})).then(function(data) {
|
|
5885
5885
|
// @ts-ignore
|
|
5886
5886
|
engine.resourceManager.initVirtualResources(data.files);
|
|
5887
5887
|
return resourceManager.load({
|
|
@@ -6247,9 +6247,9 @@ var SceneLoader = /*#__PURE__*/ function(Loader1) {
|
|
|
6247
6247
|
var _this = this;
|
|
6248
6248
|
var engine = resourceManager.engine;
|
|
6249
6249
|
return new engineCore.AssetPromise(function(resolve, reject) {
|
|
6250
|
-
_this.request(item.url, {
|
|
6250
|
+
_this.request(item.url, _extends({}, item, {
|
|
6251
6251
|
type: "json"
|
|
6252
|
-
}).then(function(data) {
|
|
6252
|
+
})).then(function(data) {
|
|
6253
6253
|
return SceneParser.parse(engine, data).then(function(scene) {
|
|
6254
6254
|
var promises = [];
|
|
6255
6255
|
// parse ambient light
|