@galacean/engine 1.1.0-beta.11 → 1.1.0-beta.13
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/browser.js +24 -23
- package/dist/browser.min.js +1 -1
- package/dist/main.js +1 -1
- package/dist/miniprogram.js +1 -1
- package/dist/module.js +1 -1
- package/package.json +5 -5
package/dist/browser.js
CHANGED
|
@@ -21269,7 +21269,7 @@
|
|
|
21269
21269
|
* @internal
|
|
21270
21270
|
*/ var ShaderProgramPool = /*#__PURE__*/ function() {
|
|
21271
21271
|
var ShaderProgramPool = function ShaderProgramPool() {
|
|
21272
|
-
this.
|
|
21272
|
+
this._cacheHierarchyDepth = 1;
|
|
21273
21273
|
this._cacheMap = Object.create(null);
|
|
21274
21274
|
};
|
|
21275
21275
|
var _proto = ShaderProgramPool.prototype;
|
|
@@ -21280,12 +21280,14 @@
|
|
|
21280
21280
|
*/ _proto.get = function get(macros) {
|
|
21281
21281
|
var cacheMap = this._cacheMap;
|
|
21282
21282
|
var maskLength = macros._length;
|
|
21283
|
-
|
|
21284
|
-
|
|
21283
|
+
var cacheHierarchyDepth = this._cacheHierarchyDepth;
|
|
21284
|
+
if (maskLength > cacheHierarchyDepth) {
|
|
21285
|
+
this._resizeCacheMapHierarchy(cacheMap, 0, cacheHierarchyDepth, maskLength - cacheHierarchyDepth);
|
|
21286
|
+
this._cacheHierarchyDepth = maskLength;
|
|
21285
21287
|
}
|
|
21286
21288
|
var mask = macros._mask;
|
|
21287
21289
|
var endIndex = macros._length - 1;
|
|
21288
|
-
var maxEndIndex = this.
|
|
21290
|
+
var maxEndIndex = this._cacheHierarchyDepth - 1;
|
|
21289
21291
|
for(var i = 0; i < maxEndIndex; i++){
|
|
21290
21292
|
var subMask = endIndex < i ? 0 : mask[i];
|
|
21291
21293
|
var subCacheShaders = cacheMap[subMask];
|
|
@@ -21310,25 +21312,21 @@
|
|
|
21310
21312
|
*/ _proto.cache = function cache(shaderProgram) {
|
|
21311
21313
|
this._lastQueryMap[this._lastQueryKey] = shaderProgram;
|
|
21312
21314
|
};
|
|
21313
|
-
_proto._resizeCacheMapHierarchy = function _resizeCacheMapHierarchy(cacheMap, hierarchy,
|
|
21314
|
-
//
|
|
21315
|
-
|
|
21316
|
-
if (hierarchy == end) {
|
|
21315
|
+
_proto._resizeCacheMapHierarchy = function _resizeCacheMapHierarchy(cacheMap, hierarchy, currentHierarchy, increaseHierarchy) {
|
|
21316
|
+
// Only expand but not shrink
|
|
21317
|
+
if (hierarchy == currentHierarchy - 1) {
|
|
21317
21318
|
for(var k in cacheMap){
|
|
21318
21319
|
var shader = cacheMap[k];
|
|
21319
21320
|
var subCacheMap = cacheMap;
|
|
21320
|
-
for(var i = 0
|
|
21321
|
-
|
|
21322
|
-
subCacheMap[0] = shader;
|
|
21323
|
-
} else {
|
|
21324
|
-
subCacheMap = subCacheMap[i == 0 ? k : 0] = Object.create(null);
|
|
21325
|
-
}
|
|
21321
|
+
for(var i = 0; i < increaseHierarchy; i++){
|
|
21322
|
+
subCacheMap[i == 0 ? k : 0] = subCacheMap = Object.create(null);
|
|
21326
21323
|
}
|
|
21324
|
+
subCacheMap[0] = shader;
|
|
21327
21325
|
}
|
|
21328
|
-
this._cacheHierarchy = resizeLength;
|
|
21329
21326
|
} else {
|
|
21327
|
+
hierarchy++;
|
|
21330
21328
|
for(var k1 in cacheMap){
|
|
21331
|
-
this._resizeCacheMapHierarchy(cacheMap[k1],
|
|
21329
|
+
this._resizeCacheMapHierarchy(cacheMap[k1], hierarchy, currentHierarchy, increaseHierarchy);
|
|
21332
21330
|
}
|
|
21333
21331
|
}
|
|
21334
21332
|
};
|
|
@@ -38772,10 +38770,10 @@
|
|
|
38772
38770
|
/**
|
|
38773
38771
|
* @internal
|
|
38774
38772
|
*/ var GLTFParserContext = /*#__PURE__*/ function() {
|
|
38775
|
-
var GLTFParserContext = function GLTFParserContext(glTFResource, resourceManager,
|
|
38773
|
+
var GLTFParserContext = function GLTFParserContext(glTFResource, resourceManager, params) {
|
|
38776
38774
|
this.glTFResource = glTFResource;
|
|
38777
38775
|
this.resourceManager = resourceManager;
|
|
38778
|
-
this.
|
|
38776
|
+
this.params = params;
|
|
38779
38777
|
this.accessorBufferCache = {};
|
|
38780
38778
|
this._resourceCache = new Map();
|
|
38781
38779
|
this.contentRestorer = new GLTFContentRestorer(glTFResource);
|
|
@@ -41089,7 +41087,7 @@
|
|
|
41089
41087
|
return context.get(exports.GLTFParserType.Buffer).then(function(buffers) {
|
|
41090
41088
|
return GLTFUtils.getAccessorData(glTF, indexAccessor, buffers);
|
|
41091
41089
|
});
|
|
41092
|
-
}, context.keepMeshData).then(resolve);
|
|
41090
|
+
}, context.params.keepMeshData).then(resolve);
|
|
41093
41091
|
}
|
|
41094
41092
|
});
|
|
41095
41093
|
};
|
|
@@ -41269,6 +41267,7 @@
|
|
|
41269
41267
|
var _this = this;
|
|
41270
41268
|
var _context_glTF = context.glTF, scenes = _context_glTF.scenes, _context_glTF_scene = _context_glTF.scene, scene = _context_glTF_scene === void 0 ? 0 : _context_glTF_scene, glTFResource = context.glTFResource;
|
|
41271
41269
|
var sceneInfo = scenes[index];
|
|
41270
|
+
var sceneExtensions = sceneInfo.extensions;
|
|
41272
41271
|
var engine = glTFResource.engine;
|
|
41273
41272
|
var isDefaultScene = scene === index;
|
|
41274
41273
|
var sceneNodes = sceneInfo.nodes;
|
|
@@ -41294,6 +41293,7 @@
|
|
|
41294
41293
|
promises.push(this._parseEntityComponent(context, sceneNodes[i1]));
|
|
41295
41294
|
}
|
|
41296
41295
|
return Promise.all(promises).then(function() {
|
|
41296
|
+
GLTFParser.executeExtensionsAdditiveAndParse(sceneExtensions, context, sceneRoot, sceneInfo);
|
|
41297
41297
|
if (isDefaultScene) {
|
|
41298
41298
|
return Promise.all([
|
|
41299
41299
|
context.get(exports.GLTFParserType.Skin),
|
|
@@ -41666,11 +41666,12 @@
|
|
|
41666
41666
|
_inherits(GLTFLoader, Loader1);
|
|
41667
41667
|
var _proto = GLTFLoader.prototype;
|
|
41668
41668
|
_proto.load = function load(item, resourceManager) {
|
|
41669
|
-
var _params;
|
|
41670
41669
|
var url = item.url;
|
|
41671
41670
|
var params = item.params;
|
|
41672
41671
|
var glTFResource = new GLTFResource(resourceManager.engine, url);
|
|
41673
|
-
var context = new GLTFParserContext(glTFResource, resourceManager,
|
|
41672
|
+
var context = new GLTFParserContext(glTFResource, resourceManager, _extends({
|
|
41673
|
+
keepMeshData: false
|
|
41674
|
+
}, params));
|
|
41674
41675
|
return context.parse();
|
|
41675
41676
|
};
|
|
41676
41677
|
return GLTFLoader;
|
|
@@ -42861,7 +42862,7 @@
|
|
|
42861
42862
|
throw "BlendShape animation is not supported when using draco.";
|
|
42862
42863
|
}, function() {
|
|
42863
42864
|
return decodedGeometry.index.array;
|
|
42864
|
-
}, context.keepMeshData);
|
|
42865
|
+
}, context.params.keepMeshData);
|
|
42865
42866
|
});
|
|
42866
42867
|
});
|
|
42867
42868
|
};
|
|
@@ -43296,7 +43297,7 @@
|
|
|
43296
43297
|
], GALACEAN_animation_event);
|
|
43297
43298
|
|
|
43298
43299
|
//@ts-ignore
|
|
43299
|
-
var version = "1.1.0-beta.
|
|
43300
|
+
var version = "1.1.0-beta.13";
|
|
43300
43301
|
console.log("Galacean engine version: " + version);
|
|
43301
43302
|
for(var key in CoreObjects){
|
|
43302
43303
|
Loader.registerClass(key, CoreObjects[key]);
|