【发布时间】:2019-11-03 13:22:20
【问题描述】:
将我的图像分成两半并旋转后,我看到镜像,我找不到解决问题的方法。
在输入我有这样的图像:https://i.imgur.com/YBjMY49.png 在 Y 轴旋转后,我回到了这样的状态:https://i.imgur.com/agyCAiW.png
我已经尝试使用 invertY 和 multivector by -1 反转图像,但这些都不起作用。
function defineCards (imgPath, scene)
{
let f = new BABYLON.Vector4(0.5, 0, 1, 1);
let b = new BABYLON.Vector4(0, 0, 0.5, 1);
let plane = BABYLON.MeshBuilder.CreatePlane("plane", {height:1.5, width: 1.05, sideOrientation: BABYLON.Mesh.DOUBLESIDE, frontUVs: f, backUVs: b}, scene);
let mat = new BABYLON.StandardMaterial("", scene);
mat.diffuseTexture = new BABYLON.Texture(imgPath, scene);
plane.material = mat;
return plane;
}
...
...
...
animation = new BABYLON.Animation("animationPlane1", "rotation.y", 60, BABYLON.Animation.ANIMATIONTYPE_FLOAT, BABYLON.Animation.ANIMATIONLOOPMODE_CYCLE);
我希望图像不会被反转。
谢谢。
【问题讨论】:
标签: javascript animation reverse image-rotation babylonjs