@galacean/effects-core 2.5.0-alpha.3 → 2.5.0-alpha.5

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/index.js CHANGED
@@ -3,7 +3,7 @@
3
3
  * Description: Galacean Effects runtime core for the web
4
4
  * Author: Ant Group CO., Ltd.
5
5
  * Contributors: 燃然,飂兮,十弦,云垣,茂安,意绮
6
- * Version: v2.5.0-alpha.3
6
+ * Version: v2.5.0-alpha.5
7
7
  */
8
8
 
9
9
  'use strict';
@@ -12460,7 +12460,7 @@ var singleSplits = [
12460
12460
  0,
12461
12461
  1,
12462
12462
  1,
12463
- undefined
12463
+ 0
12464
12464
  ]
12465
12465
  ];
12466
12466
  /**
@@ -12875,12 +12875,17 @@ var singleSplits = [
12875
12875
  var uvTransform = baseRenderComponentData.splits && !baseRenderComponentData.textureSheetAnimation ? baseRenderComponentData.splits[0] : singleSplits[0];
12876
12876
  var x = uvTransform[0];
12877
12877
  var y = uvTransform[1];
12878
- var isRotate90 = uvTransform[4];
12878
+ var isRotate90 = Boolean(uvTransform[4]);
12879
12879
  var width = isRotate90 ? uvTransform[3] : uvTransform[2];
12880
12880
  var height = isRotate90 ? uvTransform[2] : uvTransform[3];
12881
+ var angle = isRotate90 ? -Math.PI / 2 : 0;
12881
12882
  var aUV = baseGeometry.getAttributeData("aUV");
12882
12883
  var aPos = baseGeometry.getAttributeData("aPos");
12883
12884
  var indices = baseGeometry.getIndexData();
12885
+ var tempPosition = [
12886
+ 0,
12887
+ 0
12888
+ ];
12884
12889
  if (aUV && aPos && indices) {
12885
12890
  var vertexCount = aUV.length / 2;
12886
12891
  for(var i = 0; i < vertexCount; i++){
@@ -12888,8 +12893,11 @@ var singleSplits = [
12888
12893
  var uvOffset = i * 2;
12889
12894
  var positionX = aPos[positionOffset];
12890
12895
  var positionY = aPos[positionOffset + 1];
12891
- aUV[uvOffset] = (positionX + 0.5) * width + x;
12892
- aUV[uvOffset + 1] = (positionY + 0.5) * height + y;
12896
+ tempPosition[0] = positionX;
12897
+ tempPosition[1] = positionY;
12898
+ rotateVec2(tempPosition, tempPosition, angle);
12899
+ aUV[uvOffset] = (tempPosition[0] + 0.5) * width + x;
12900
+ aUV[uvOffset + 1] = (tempPosition[1] + 0.5) * height + y;
12893
12901
  }
12894
12902
  this.geometry.setAttributeData("aPos", aPos.slice());
12895
12903
  this.geometry.setAttributeData("aUV", aUV.slice());
@@ -28392,7 +28400,7 @@ function getStandardSpriteContent(sprite, transform) {
28392
28400
  return ret;
28393
28401
  }
28394
28402
 
28395
- var version$1 = "2.5.0-alpha.3";
28403
+ var version$1 = "2.5.0-alpha.5";
28396
28404
  var v0 = /^(\d+)\.(\d+)\.(\d+)(-(\w+)\.\d+)?$/;
28397
28405
  var standardVersion = /^(\d+)\.(\d+)$/;
28398
28406
  var reverseParticle = false;
@@ -31642,7 +31650,7 @@ registerPlugin("sprite", SpriteLoader, exports.VFXItem);
31642
31650
  registerPlugin("particle", ParticleLoader, exports.VFXItem);
31643
31651
  registerPlugin("cal", CalculateLoader, exports.VFXItem);
31644
31652
  registerPlugin("interact", InteractLoader, exports.VFXItem);
31645
- var version = "2.5.0-alpha.3";
31653
+ var version = "2.5.0-alpha.5";
31646
31654
  logger.info("Core version: " + version + ".");
31647
31655
 
31648
31656
  exports.AbstractPlugin = AbstractPlugin;