【问题标题】:A-Frame gltf 2.0 can't set opacityA-Frame gltf 2.0 无法设置不透明度
【发布时间】:2019-02-24 14:42:01
【问题描述】:

我在 A-Frame 场景中导入了一个动画 gltf 2.0 模型。

我想将其不透明度设置为 0.5。但它不起作用,即使我尝试使用 object3D 类修改值。

Hier 是关于故障的演示项目: https://glitch.com/edit/#!/animated-gltf-opacity

感谢您的帮助。

【问题讨论】:

    标签: three.js aframe webvr gltf


    【解决方案1】:

    你需要等到模型加载完毕,把你的代码扔给一个事件监听器:

    this.el.addEventListener("model-loaded", (e)=>{//change opacity})
    

    查看here

    【讨论】:

    • 知道了。非常感谢。
    猜你喜欢
    • 2018-07-21
    • 1970-01-01
    • 2018-07-21
    • 1970-01-01
    • 2018-03-27
    • 1970-01-01
    • 1970-01-01
    • 2020-04-19
    • 1970-01-01
    相关资源
    最近更新 更多