@galacean/engine-core 1.4.6 → 1.4.7
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 +9 -5
- package/dist/main.js.map +1 -1
- package/dist/module.js +9 -5
- package/dist/module.js.map +1 -1
- package/package.json +3 -3
package/dist/main.js
CHANGED
|
@@ -34082,13 +34082,17 @@ __decorate([
|
|
|
34082
34082
|
instanceVertices[offset + 14] = size;
|
|
34083
34083
|
}
|
|
34084
34084
|
// Start rotation
|
|
34085
|
-
var startRotationRand = main._startRotationRand;
|
|
34085
|
+
var startRotationRand = main._startRotationRand, flipRotation = main.flipRotation;
|
|
34086
|
+
var isOpposite = flipRotation < startRotationRand.random();
|
|
34087
|
+
var rotationZ = engineMath.MathUtil.degreeToRadian(main.startRotationZ.evaluate(undefined, startRotationRand.random()));
|
|
34086
34088
|
if (main.startRotation3D) {
|
|
34087
|
-
|
|
34088
|
-
|
|
34089
|
-
instanceVertices[offset +
|
|
34089
|
+
var rotationX = engineMath.MathUtil.degreeToRadian(main.startRotationX.evaluate(undefined, startRotationRand.random()));
|
|
34090
|
+
var rotationY = engineMath.MathUtil.degreeToRadian(main.startRotationY.evaluate(undefined, startRotationRand.random()));
|
|
34091
|
+
instanceVertices[offset + 15] = isOpposite ? -rotationX : rotationX;
|
|
34092
|
+
instanceVertices[offset + 16] = isOpposite ? -rotationY : rotationY;
|
|
34093
|
+
instanceVertices[offset + 17] = isOpposite ? -rotationZ : rotationZ;
|
|
34090
34094
|
} else {
|
|
34091
|
-
instanceVertices[offset + 15] =
|
|
34095
|
+
instanceVertices[offset + 15] = isOpposite ? -rotationZ : rotationZ;
|
|
34092
34096
|
}
|
|
34093
34097
|
// Start speed
|
|
34094
34098
|
instanceVertices[offset + 18] = startSpeed;
|