【问题标题】:How to use Text as texture on Cube inside papervision3d?如何在papervision3d内的Cube上使用Text作为纹理?
【发布时间】:2010-01-19 07:08:18
【问题描述】:

使用 papervision3d 在立方体上应用抗锯齿文本作为纹理的最佳技术是什么?

  1. 制作动态文本字段,将其转换为电影素材,然后将其应用于立方体的面。

  2. 使用任何图片编辑器设计位图并制作 bitmapFileMaterial 以应用于立方体的面。

  3. 请有其他建议。

【问题讨论】:

    标签: flash actionscript-3 text textures papervision3d


    【解决方案1】:
    // create your text field and set its content.
    var t:TextField = new TextField();
    t.text = "Hello world!";
    
    // create a BitmapData of your wished width and height
    var bitmap:BitmapData = new BitmapData(100,100);
    
    // Fill bmp with the content of your TextField. 
    //It's as if you took a picture of t.
    bitmap.draw(t);
    // Create a material with the resulting BitmapData and you can use it on any DisplayObject3D!
    var material:BitmapMaterial = new BitmapMaterial(bitmap);
    material.smooth = true;
    material.doubleSided = true;
    
    // Create cube
    var cube:Cube = new Cube(material)
    

    【讨论】:

    • Cube 采用 MaterialList 而不是 Material。不管怎么说,还是要谢谢你。我试试看
    猜你喜欢
    • 2010-10-26
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2020-04-01
    • 1970-01-01
    • 2011-12-14
    • 2017-04-28
    相关资源
    最近更新 更多