@galacean/engine-core 1.2.0-beta.2 → 1.2.0-beta.4
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/LICENSE +2 -2
- package/dist/main.js +13 -10
- package/dist/main.js.map +1 -1
- package/dist/miniprogram.js +13 -10
- package/dist/module.js +13 -10
- package/dist/module.js.map +1 -1
- package/package.json +3 -3
package/dist/miniprogram.js
CHANGED
|
@@ -4941,7 +4941,8 @@ __decorate([
|
|
|
4941
4941
|
}
|
|
4942
4942
|
var shaderInfo = Shader._shaderLab.parseShader(nameOrShaderSource);
|
|
4943
4943
|
if (shaderMap[shaderInfo.name]) {
|
|
4944
|
-
|
|
4944
|
+
console.error('Shader named "' + shaderInfo.name + '" already exists.');
|
|
4945
|
+
return;
|
|
4945
4946
|
}
|
|
4946
4947
|
var subShaderList = shaderInfo.subShaders.map(function(subShaderInfo) {
|
|
4947
4948
|
var passList = subShaderInfo.passes.map(function(passInfo) {
|
|
@@ -4980,7 +4981,8 @@ __decorate([
|
|
|
4980
4981
|
return shader;
|
|
4981
4982
|
} else {
|
|
4982
4983
|
if (shaderMap[nameOrShaderSource]) {
|
|
4983
|
-
|
|
4984
|
+
console.error('Shader named "' + nameOrShaderSource + '" already exists.');
|
|
4985
|
+
return;
|
|
4984
4986
|
}
|
|
4985
4987
|
if (typeof vertexSourceOrShaderPassesOrSubShaders === "string") {
|
|
4986
4988
|
var shaderPass = new ShaderPass(vertexSourceOrShaderPassesOrSubShaders, fragmentSource);
|
|
@@ -19466,7 +19468,8 @@ __decorate([
|
|
|
19466
19468
|
/** @internal */ this._upList = new DisorderedArray();
|
|
19467
19469
|
/** @internal */ this._downList = new DisorderedArray();
|
|
19468
19470
|
this._nativeEvents = [];
|
|
19469
|
-
|
|
19471
|
+
// Temporary solution for mini program, window does not exist
|
|
19472
|
+
if (typeof Window !== "undefined" && _instanceof(target, Window)) {
|
|
19470
19473
|
throw "Do not set window as target because window cannot listen to pointer leave event.";
|
|
19471
19474
|
}
|
|
19472
19475
|
this._engine = engine;
|
|
@@ -22126,9 +22129,10 @@ __decorate([
|
|
|
22126
22129
|
*/ _proto._updateShaderData = function _updateShaderData(shaderData) {
|
|
22127
22130
|
var _this = this, spotLight = _this._spotLights, pointLight = _this._pointLights, directLight = _this._directLights;
|
|
22128
22131
|
var _this1 = this, spotData = _this1._spotData, pointData = _this1._pointData, directData = _this1._directData;
|
|
22129
|
-
var
|
|
22130
|
-
var
|
|
22131
|
-
var
|
|
22132
|
+
var maxLight = LightManager._maxLight;
|
|
22133
|
+
var spotLightCount = Math.min(spotLight.length, maxLight);
|
|
22134
|
+
var pointLightCount = Math.min(pointLight.length, maxLight);
|
|
22135
|
+
var directLightCount = Math.min(directLight.length, maxLight);
|
|
22132
22136
|
for(var i = 0; i < spotLightCount; i++){
|
|
22133
22137
|
spotLight.get(i)._appendData(i, spotData);
|
|
22134
22138
|
}
|
|
@@ -27234,20 +27238,19 @@ exports.AnimatorLayerBlendingMode = void 0;
|
|
|
27234
27238
|
var relativePath = curve.relativePath;
|
|
27235
27239
|
var targetEntity = curve.relativePath === "" ? entity : entity.findByPath(curve.relativePath);
|
|
27236
27240
|
if (targetEntity) {
|
|
27237
|
-
var _curveOwnerPool, _instanceId, _propertyOwners, _property, _layerCurveOwnerPool, _instanceId1, _layerPropertyOwners,
|
|
27238
|
-
var propertyPath = "" + curve.typeIndex + "." + curve.property;
|
|
27241
|
+
var _curveOwnerPool, _instanceId, _propertyOwners, _property, _layerCurveOwnerPool, _instanceId1, _layerPropertyOwners, _property1;
|
|
27239
27242
|
var component = curve.typeIndex > 0 ? targetEntity.getComponents(curve.type, AnimationCurveOwner._components)[curve.typeIndex] : targetEntity.getComponent(curve.type);
|
|
27240
27243
|
if (!component) {
|
|
27241
27244
|
continue;
|
|
27242
27245
|
}
|
|
27243
27246
|
var property = curve.property;
|
|
27244
|
-
var instanceId =
|
|
27247
|
+
var instanceId = component.instanceId;
|
|
27245
27248
|
// Get owner
|
|
27246
27249
|
var propertyOwners = (_curveOwnerPool = curveOwnerPool)[_instanceId = instanceId] || (_curveOwnerPool[_instanceId] = Object.create(null));
|
|
27247
27250
|
var owner = (_propertyOwners = propertyOwners)[_property = property] || (_propertyOwners[_property] = curve._createCurveOwner(targetEntity, component));
|
|
27248
27251
|
// Get layer owner
|
|
27249
27252
|
var layerPropertyOwners = (_layerCurveOwnerPool = layerCurveOwnerPool)[_instanceId1 = instanceId] || (_layerCurveOwnerPool[_instanceId1] = Object.create(null));
|
|
27250
|
-
var layerOwner = (_layerPropertyOwners = layerPropertyOwners)[
|
|
27253
|
+
var layerOwner = (_layerPropertyOwners = layerPropertyOwners)[_property1 = property] || (_layerPropertyOwners[_property1] = curve._createCurveLayerOwner(owner));
|
|
27251
27254
|
if (mask && mask.pathMasks.length) {
|
|
27252
27255
|
var _mask_getPathMask;
|
|
27253
27256
|
var _mask_getPathMask_active;
|
package/dist/module.js
CHANGED
|
@@ -4936,7 +4936,8 @@ __decorate([
|
|
|
4936
4936
|
}
|
|
4937
4937
|
var shaderInfo = Shader._shaderLab.parseShader(nameOrShaderSource);
|
|
4938
4938
|
if (shaderMap[shaderInfo.name]) {
|
|
4939
|
-
|
|
4939
|
+
console.error('Shader named "' + shaderInfo.name + '" already exists.');
|
|
4940
|
+
return;
|
|
4940
4941
|
}
|
|
4941
4942
|
var subShaderList = shaderInfo.subShaders.map(function(subShaderInfo) {
|
|
4942
4943
|
var passList = subShaderInfo.passes.map(function(passInfo) {
|
|
@@ -4975,7 +4976,8 @@ __decorate([
|
|
|
4975
4976
|
return shader;
|
|
4976
4977
|
} else {
|
|
4977
4978
|
if (shaderMap[nameOrShaderSource]) {
|
|
4978
|
-
|
|
4979
|
+
console.error('Shader named "' + nameOrShaderSource + '" already exists.');
|
|
4980
|
+
return;
|
|
4979
4981
|
}
|
|
4980
4982
|
if (typeof vertexSourceOrShaderPassesOrSubShaders === "string") {
|
|
4981
4983
|
var shaderPass = new ShaderPass(vertexSourceOrShaderPassesOrSubShaders, fragmentSource);
|
|
@@ -19461,7 +19463,8 @@ __decorate([
|
|
|
19461
19463
|
/** @internal */ this._upList = new DisorderedArray();
|
|
19462
19464
|
/** @internal */ this._downList = new DisorderedArray();
|
|
19463
19465
|
this._nativeEvents = [];
|
|
19464
|
-
|
|
19466
|
+
// Temporary solution for mini program, window does not exist
|
|
19467
|
+
if (typeof Window !== "undefined" && _instanceof(target, Window)) {
|
|
19465
19468
|
throw "Do not set window as target because window cannot listen to pointer leave event.";
|
|
19466
19469
|
}
|
|
19467
19470
|
this._engine = engine;
|
|
@@ -22121,9 +22124,10 @@ __decorate([
|
|
|
22121
22124
|
*/ _proto._updateShaderData = function _updateShaderData(shaderData) {
|
|
22122
22125
|
var _this = this, spotLight = _this._spotLights, pointLight = _this._pointLights, directLight = _this._directLights;
|
|
22123
22126
|
var _this1 = this, spotData = _this1._spotData, pointData = _this1._pointData, directData = _this1._directData;
|
|
22124
|
-
var
|
|
22125
|
-
var
|
|
22126
|
-
var
|
|
22127
|
+
var maxLight = LightManager._maxLight;
|
|
22128
|
+
var spotLightCount = Math.min(spotLight.length, maxLight);
|
|
22129
|
+
var pointLightCount = Math.min(pointLight.length, maxLight);
|
|
22130
|
+
var directLightCount = Math.min(directLight.length, maxLight);
|
|
22127
22131
|
for(var i = 0; i < spotLightCount; i++){
|
|
22128
22132
|
spotLight.get(i)._appendData(i, spotData);
|
|
22129
22133
|
}
|
|
@@ -27229,20 +27233,19 @@ var AnimatorLayerBlendingMode;
|
|
|
27229
27233
|
var relativePath = curve.relativePath;
|
|
27230
27234
|
var targetEntity = curve.relativePath === "" ? entity : entity.findByPath(curve.relativePath);
|
|
27231
27235
|
if (targetEntity) {
|
|
27232
|
-
var _curveOwnerPool, _instanceId, _propertyOwners, _property, _layerCurveOwnerPool, _instanceId1, _layerPropertyOwners,
|
|
27233
|
-
var propertyPath = "" + curve.typeIndex + "." + curve.property;
|
|
27236
|
+
var _curveOwnerPool, _instanceId, _propertyOwners, _property, _layerCurveOwnerPool, _instanceId1, _layerPropertyOwners, _property1;
|
|
27234
27237
|
var component = curve.typeIndex > 0 ? targetEntity.getComponents(curve.type, AnimationCurveOwner._components)[curve.typeIndex] : targetEntity.getComponent(curve.type);
|
|
27235
27238
|
if (!component) {
|
|
27236
27239
|
continue;
|
|
27237
27240
|
}
|
|
27238
27241
|
var property = curve.property;
|
|
27239
|
-
var instanceId =
|
|
27242
|
+
var instanceId = component.instanceId;
|
|
27240
27243
|
// Get owner
|
|
27241
27244
|
var propertyOwners = (_curveOwnerPool = curveOwnerPool)[_instanceId = instanceId] || (_curveOwnerPool[_instanceId] = Object.create(null));
|
|
27242
27245
|
var owner = (_propertyOwners = propertyOwners)[_property = property] || (_propertyOwners[_property] = curve._createCurveOwner(targetEntity, component));
|
|
27243
27246
|
// Get layer owner
|
|
27244
27247
|
var layerPropertyOwners = (_layerCurveOwnerPool = layerCurveOwnerPool)[_instanceId1 = instanceId] || (_layerCurveOwnerPool[_instanceId1] = Object.create(null));
|
|
27245
|
-
var layerOwner = (_layerPropertyOwners = layerPropertyOwners)[
|
|
27248
|
+
var layerOwner = (_layerPropertyOwners = layerPropertyOwners)[_property1 = property] || (_layerPropertyOwners[_property1] = curve._createCurveLayerOwner(owner));
|
|
27246
27249
|
if (mask && mask.pathMasks.length) {
|
|
27247
27250
|
var _mask_getPathMask;
|
|
27248
27251
|
var _mask_getPathMask_active;
|