我正在尝试将笔触粗细添加到x3dom indexedLineSet中。到目前为止,我能找到的只是x3dom LineProperty。但提出的线宽比例因子似乎没有效果。
这是我到目前为止尝试过的:
<shape render="true" bboxcenter="0,0,0" bboxsize="-1,-1,-1" ispickable="true">
<lineset vertexcount="5" solid="true" ccw="true" usegeocache="true" lit="true">
<coordinate point="-0.5 0.5 0, 0.5 0.5 0, 0.5 -0.5 0, -0.5 -0.5 0, -0.5 0.5 0"></coordinate>
</lineset>
<appearance sorttype="auto" alphaclipthreshold="0.1">
<material emissivecolor="1 1 0" ambientintensity="0.2" diffusecolor="0.8,0.8,0.8" shininess="0.2" specularcolor="0,0,0">
<lineproperties linewidthscalefactor="3" applied="true" linetype="1"></lineproperties>
</material>
</appearance>
</shape>
代码片段是正确的。问题是浏览器。就我而言,铬无法正确处理WebGL lineWidth
。[问题演示]