@galacean/engine-core 1.3.12 → 1.3.14
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 +12 -8
- package/dist/main.js.map +1 -1
- package/dist/miniprogram.js +12 -8
- package/dist/module.js +12 -8
- package/dist/module.js.map +1 -1
- package/package.json +3 -3
package/dist/main.js
CHANGED
|
@@ -3191,8 +3191,11 @@ var ShaderFactory = /*#__PURE__*/ function() {
|
|
|
3191
3191
|
*/ _proto._destroy = function _destroy() {
|
|
3192
3192
|
var shaderProgramPools = this._shaderProgramPools;
|
|
3193
3193
|
for(var i = 0, n = shaderProgramPools.length; i < n; i++){
|
|
3194
|
-
shaderProgramPools[i]
|
|
3194
|
+
var shaderProgramPool = shaderProgramPools[i];
|
|
3195
|
+
shaderProgramPool._destroy();
|
|
3196
|
+
delete shaderProgramPool.engine._shaderProgramPools[this._shaderPassId];
|
|
3195
3197
|
}
|
|
3198
|
+
// Clear array storing multiple engine shader program pools
|
|
3196
3199
|
shaderProgramPools.length = 0;
|
|
3197
3200
|
};
|
|
3198
3201
|
/**
|
|
@@ -23176,7 +23179,8 @@ var unlitVs = "#define GLSLIFY 1\n#include <common>\n#include <common_vert>\n#in
|
|
|
23176
23179
|
* Shader program pool.
|
|
23177
23180
|
* @internal
|
|
23178
23181
|
*/ var ShaderProgramPool = /*#__PURE__*/ function() {
|
|
23179
|
-
function ShaderProgramPool() {
|
|
23182
|
+
function ShaderProgramPool(engine) {
|
|
23183
|
+
this.engine = engine;
|
|
23180
23184
|
this._cacheHierarchyDepth = 1;
|
|
23181
23185
|
this._cacheMap = Object.create(null);
|
|
23182
23186
|
}
|
|
@@ -23581,7 +23585,7 @@ ShaderPool.init();
|
|
|
23581
23585
|
if (length > shaderProgramPools.length) {
|
|
23582
23586
|
shaderProgramPools.length = length;
|
|
23583
23587
|
}
|
|
23584
|
-
shaderProgramPools[index] = pool = new ShaderProgramPool();
|
|
23588
|
+
shaderProgramPools[index] = pool = new ShaderProgramPool(this);
|
|
23585
23589
|
shaderPass._shaderProgramPools.push(pool);
|
|
23586
23590
|
}
|
|
23587
23591
|
return pool;
|
|
@@ -26264,17 +26268,16 @@ Shader.create(_PostProcessManager.UBER_SHADER_NAME, blitVs, UberPost);
|
|
|
26264
26268
|
* @internal
|
|
26265
26269
|
*/ _proto._onDisableInScene = function _onDisableInScene() {
|
|
26266
26270
|
var componentsManager = this.scene._componentsManager;
|
|
26267
|
-
var prototype = Script.prototype;
|
|
26268
26271
|
if (!this._started) {
|
|
26269
26272
|
componentsManager.removeOnStartScript(this);
|
|
26270
26273
|
}
|
|
26271
|
-
if (this.
|
|
26274
|
+
if (this._onUpdateIndex >= 0) {
|
|
26272
26275
|
componentsManager.removeOnUpdateScript(this);
|
|
26273
26276
|
}
|
|
26274
|
-
if (this.
|
|
26277
|
+
if (this._onLateUpdateIndex >= 0) {
|
|
26275
26278
|
componentsManager.removeOnLateUpdateScript(this);
|
|
26276
26279
|
}
|
|
26277
|
-
if (this.
|
|
26280
|
+
if (this._onPhysicsUpdateIndex >= 0) {
|
|
26278
26281
|
componentsManager.removeOnPhysicsUpdateScript(this);
|
|
26279
26282
|
}
|
|
26280
26283
|
this._entity._removeScript(this);
|
|
@@ -28638,8 +28641,9 @@ exports.AnimatorLayerBlendingMode = void 0;
|
|
|
28638
28641
|
eventHandler.event = event;
|
|
28639
28642
|
handlers.length = 0;
|
|
28640
28643
|
for(var j = scriptCount - 1; j >= 0; j--){
|
|
28644
|
+
var _script_funcName;
|
|
28641
28645
|
var script = scripts[j];
|
|
28642
|
-
var handler = script[funcName].bind(script);
|
|
28646
|
+
var handler = (_script_funcName = script[funcName]) == null ? void 0 : _script_funcName.bind(script);
|
|
28643
28647
|
handler && handlers.push(handler);
|
|
28644
28648
|
}
|
|
28645
28649
|
eventHandlers.push(eventHandler);
|