当前位置: 首页>>知识库
阅读次数:460
three根据name或者id获得模型,设置透明度

var Floor = gltf.scene.getObjectById(2307);

Floor.material = new THREE.MeshLambertMaterial({

        color: 0x000000,

 });


var Floor = gltf.scene.getObjectByName('地面');

Floor.material = new THREE.MeshLambertMaterial({

       color: 0x000000,

 });


var Floor = gltf.scene.getObjectById(2307);

Floor.material = new THREE.MeshLambertMaterial({

color: 0x000000,

transparent: true,

opacity:0.2,//设置透明度 

visible: true

});




责任编辑:运营部

Copyright © 2019 南京乐芮天信息科技有限公司 苏ICP备19074256号-1
联系我们