【问题标题】:how does one transform / change the perspective of an image in titanium to provide 3D effect如何转换/改变钛图像的透视以提供 3D 效果
【发布时间】:2023-03-15 17:57:01
【问题描述】:

我正在尝试在 Titanium 中为图像创建 3D 效果。

能否请您提供有关如何制作看起来像的图像的指示

看起来像

我查看了 transform、create2dmatrix 等 - 但文档对我来说不太清楚。

 var image2 = Titanium.UI.createImageView ({
    image: '/giraffe.jpg',
    height: '323',
    width: "270",
    left: "1px",
    });

谢谢..

【问题讨论】:

    标签: ios titanium appcelerator appcelerator-mobile


    【解决方案1】:

    好的.. 在努力理解文档之后,以下实验为我修复了它。

    var image2 = Titanium.UI.createImageView ({
    image: '/giraffe.jpg',
    height: '323',
    width: "270",
    left: "1px",
    });
    
    t.m34 = 1.0/1000;
    t = t.rotate (20,0,1,0);
    t = t.rotate (20,0,1,0);
    img.transform = t ; 
    

    一切正常..

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2012-09-09
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-04-06
      • 2012-08-05
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多