【问题标题】:How can I add stroke thickness to x3dom LineSet如何将笔画粗细添加到 x3dom LineSet
【发布时间】:2017-09-06 17:52:03
【问题描述】:

我正在尝试将笔触粗细添加到 x3dom indexedLineSet。到目前为止,我只能找到x3dom LineProperty。但是建议的 linewidthScaleFactor 似乎没有效果。

这是我迄今为止尝试过的:

<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>

【问题讨论】:

    标签: x3dom


    【解决方案1】:

    代码 sn-p 是正确的。问题是浏览器。在我的情况下,chrome 不能正确处理 WebGL lineWidth。 [Issue Demo]

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2021-08-15
      • 1970-01-01
      • 1970-01-01
      • 2022-11-20
      • 2016-04-25
      • 1970-01-01
      • 1970-01-01
      • 2019-04-18
      相关资源
      最近更新 更多