简体   繁体   English

在arcore android中绘制透明3d立方体model

[英]draw transparent 3d cube model in arcore android

i have create cube using shapefactor in arcore android but it is not transparent.我在 arcore android 中使用 shapefactor 创建了立方体,但它不透明。 How can can i make model transparent so in which it is placed It shows the background view.我怎样才能使 model 透明以便放置它显示背景视图。 I have found only below method for create 3d cube model我发现只有以下创建 3d 立方体 model 的方法

MaterialFactory.makeTransparentWithColor(this,new Color(248,248,248))
                .thenAccept(
                        material -> {
                          ShapeFactory.makeCube(vector3, Vector3.zero(), material);

                        });

PLease help for making cube semi transparent so i can background view will be shown.请帮助使立方体半透明,以便我可以显示背景视图。

You forgot to specify the alpha value of your color:您忘记指定颜色的 alpha 值:

public Color (float r, float g, float b, float a)

new Color(248,248,248, /* alpha value here */)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM