我有一些标准化的点(红色,蓝色,绿色)。当我将它们转换为RGB时,我得到的值如下:
R: 0.23
G: 0.44
B: 0.33
然而,当我在管状几何上对我的脸色时,这并没有显示为任何颜色而是白色。除了255, 0, 0
或0, 255, 0
var rVal = parseFloat(rLow + normalizedGr * (rHigh - rLow));
var gVal = parseFloat(gLow + normalizedGr * (gHigh - gLow));
var bVal = parseFloat(bLow + normalizedGr * (bHigh - bLow));
var logColor = new THREE.Color().setRGB(rVal, gVal, bVal);
for (var j = startingPoint; j < endingPoint; j++) {
tube.faces[j].color = logColor;
}
var mesh = THREE.SceneUtils.createMultiMaterialObject(tube, [new THREE.MeshLambertMaterial({ color: color, vertexColors: THREE.FaceColors })]);