能否实现定时改变模型颜色功能?
您好,目前您可以通过配置脚本实现此功能,具体如下:
var colors = [0.7647, 0.72549,0.68627, 0.64705,0.6078431, 0.568627,0.529411, 0.490196,0.45098, 0.4117647, 0.372549]; scene.getMeshByID('mesh_a9Wi090e9lCe_1624517783433').enableEdgesRender ing(); scene.getMeshByID('mesh_a9Wi090e9lCe_1624517783433').edgesWidth = 0.4; scene.getMeshByID('mesh_a9Wi090e9lCe_1624517783433').edgesColor =new BABYLON.Color4(0.0941, colors[0], 0.94509, 0.8); var i = 1; setInterval(()=>{ scene.getMeshByID('mesh_a9Wi090e9lCe_1624517783433').edgesColor = new BABYLON.Color4(0.0941, colors[i], 0.94509, 0.8); if(i==colors.length-1) i=0; 7980 i++; },1000)
您好,目前您可以通过配置脚本实现此功能,具体如下:
var colors = [0.7647, 0.72549,0.68627, 0.64705,0.6078431, 0.568627,0.529411, 0.490196,0.45098, 0.4117647, 0.372549]; scene.getMeshByID('mesh_a9Wi090e9lCe_1624517783433').enableEdgesRender ing(); scene.getMeshByID('mesh_a9Wi090e9lCe_1624517783433').edgesWidth = 0.4; scene.getMeshByID('mesh_a9Wi090e9lCe_1624517783433').edgesColor =new BABYLON.Color4(0.0941, colors[0], 0.94509, 0.8); var i = 1; setInterval(()=>{ scene.getMeshByID('mesh_a9Wi090e9lCe_1624517783433').edgesColor = new BABYLON.Color4(0.0941, colors[i], 0.94509, 0.8); if(i==colors.length-1) i=0; 7980 i++; },1000)