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