@galacean/engine-core 1.2.0-beta.3 → 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 +11 -9
- package/dist/main.js.map +1 -1
- package/dist/miniprogram.js +11 -9
- package/dist/module.js +11 -9
- package/dist/module.js.map +1 -1
- package/package.json +3 -3
- package/types/Deprecated.d.ts +101 -0
- package/types/RenderPipeline/RenderPass.d.ts +55 -0
- package/types/renderingHardwareInterface/IHardwareRenderer.d.ts +6 -0
- package/types/texture/enums/PixelFormat.d.ts +73 -0
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);
|
|
@@ -22127,9 +22129,10 @@ __decorate([
|
|
|
22127
22129
|
*/ _proto._updateShaderData = function _updateShaderData(shaderData) {
|
|
22128
22130
|
var _this = this, spotLight = _this._spotLights, pointLight = _this._pointLights, directLight = _this._directLights;
|
|
22129
22131
|
var _this1 = this, spotData = _this1._spotData, pointData = _this1._pointData, directData = _this1._directData;
|
|
22130
|
-
var
|
|
22131
|
-
var
|
|
22132
|
-
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);
|
|
22133
22136
|
for(var i = 0; i < spotLightCount; i++){
|
|
22134
22137
|
spotLight.get(i)._appendData(i, spotData);
|
|
22135
22138
|
}
|
|
@@ -27235,20 +27238,19 @@ exports.AnimatorLayerBlendingMode = void 0;
|
|
|
27235
27238
|
var relativePath = curve.relativePath;
|
|
27236
27239
|
var targetEntity = curve.relativePath === "" ? entity : entity.findByPath(curve.relativePath);
|
|
27237
27240
|
if (targetEntity) {
|
|
27238
|
-
var _curveOwnerPool, _instanceId, _propertyOwners, _property, _layerCurveOwnerPool, _instanceId1, _layerPropertyOwners,
|
|
27239
|
-
var propertyPath = "" + curve.typeIndex + "." + curve.property;
|
|
27241
|
+
var _curveOwnerPool, _instanceId, _propertyOwners, _property, _layerCurveOwnerPool, _instanceId1, _layerPropertyOwners, _property1;
|
|
27240
27242
|
var component = curve.typeIndex > 0 ? targetEntity.getComponents(curve.type, AnimationCurveOwner._components)[curve.typeIndex] : targetEntity.getComponent(curve.type);
|
|
27241
27243
|
if (!component) {
|
|
27242
27244
|
continue;
|
|
27243
27245
|
}
|
|
27244
27246
|
var property = curve.property;
|
|
27245
|
-
var instanceId =
|
|
27247
|
+
var instanceId = component.instanceId;
|
|
27246
27248
|
// Get owner
|
|
27247
27249
|
var propertyOwners = (_curveOwnerPool = curveOwnerPool)[_instanceId = instanceId] || (_curveOwnerPool[_instanceId] = Object.create(null));
|
|
27248
27250
|
var owner = (_propertyOwners = propertyOwners)[_property = property] || (_propertyOwners[_property] = curve._createCurveOwner(targetEntity, component));
|
|
27249
27251
|
// Get layer owner
|
|
27250
27252
|
var layerPropertyOwners = (_layerCurveOwnerPool = layerCurveOwnerPool)[_instanceId1 = instanceId] || (_layerCurveOwnerPool[_instanceId1] = Object.create(null));
|
|
27251
|
-
var layerOwner = (_layerPropertyOwners = layerPropertyOwners)[
|
|
27253
|
+
var layerOwner = (_layerPropertyOwners = layerPropertyOwners)[_property1 = property] || (_layerPropertyOwners[_property1] = curve._createCurveLayerOwner(owner));
|
|
27252
27254
|
if (mask && mask.pathMasks.length) {
|
|
27253
27255
|
var _mask_getPathMask;
|
|
27254
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);
|
|
@@ -22122,9 +22124,10 @@ __decorate([
|
|
|
22122
22124
|
*/ _proto._updateShaderData = function _updateShaderData(shaderData) {
|
|
22123
22125
|
var _this = this, spotLight = _this._spotLights, pointLight = _this._pointLights, directLight = _this._directLights;
|
|
22124
22126
|
var _this1 = this, spotData = _this1._spotData, pointData = _this1._pointData, directData = _this1._directData;
|
|
22125
|
-
var
|
|
22126
|
-
var
|
|
22127
|
-
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);
|
|
22128
22131
|
for(var i = 0; i < spotLightCount; i++){
|
|
22129
22132
|
spotLight.get(i)._appendData(i, spotData);
|
|
22130
22133
|
}
|
|
@@ -27230,20 +27233,19 @@ var AnimatorLayerBlendingMode;
|
|
|
27230
27233
|
var relativePath = curve.relativePath;
|
|
27231
27234
|
var targetEntity = curve.relativePath === "" ? entity : entity.findByPath(curve.relativePath);
|
|
27232
27235
|
if (targetEntity) {
|
|
27233
|
-
var _curveOwnerPool, _instanceId, _propertyOwners, _property, _layerCurveOwnerPool, _instanceId1, _layerPropertyOwners,
|
|
27234
|
-
var propertyPath = "" + curve.typeIndex + "." + curve.property;
|
|
27236
|
+
var _curveOwnerPool, _instanceId, _propertyOwners, _property, _layerCurveOwnerPool, _instanceId1, _layerPropertyOwners, _property1;
|
|
27235
27237
|
var component = curve.typeIndex > 0 ? targetEntity.getComponents(curve.type, AnimationCurveOwner._components)[curve.typeIndex] : targetEntity.getComponent(curve.type);
|
|
27236
27238
|
if (!component) {
|
|
27237
27239
|
continue;
|
|
27238
27240
|
}
|
|
27239
27241
|
var property = curve.property;
|
|
27240
|
-
var instanceId =
|
|
27242
|
+
var instanceId = component.instanceId;
|
|
27241
27243
|
// Get owner
|
|
27242
27244
|
var propertyOwners = (_curveOwnerPool = curveOwnerPool)[_instanceId = instanceId] || (_curveOwnerPool[_instanceId] = Object.create(null));
|
|
27243
27245
|
var owner = (_propertyOwners = propertyOwners)[_property = property] || (_propertyOwners[_property] = curve._createCurveOwner(targetEntity, component));
|
|
27244
27246
|
// Get layer owner
|
|
27245
27247
|
var layerPropertyOwners = (_layerCurveOwnerPool = layerCurveOwnerPool)[_instanceId1 = instanceId] || (_layerCurveOwnerPool[_instanceId1] = Object.create(null));
|
|
27246
|
-
var layerOwner = (_layerPropertyOwners = layerPropertyOwners)[
|
|
27248
|
+
var layerOwner = (_layerPropertyOwners = layerPropertyOwners)[_property1 = property] || (_layerPropertyOwners[_property1] = curve._createCurveLayerOwner(owner));
|
|
27247
27249
|
if (mask && mask.pathMasks.length) {
|
|
27248
27250
|
var _mask_getPathMask;
|
|
27249
27251
|
var _mask_getPathMask_active;
|